summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2013-06-12rtlwifi: rtl8192cu: Fix problem in connecting to WEP or WPA(1) networksLarry Finger
Driver rtl8192cu can connect to WPA2 networks, but fails for any other encryption method. The cause is a failure to set the rate control data blocks. These changes fix https://bugzilla.redhat.com/show_bug.cgi?id=952793 and https://bugzilla.redhat.com/show_bug.cgi?id=761525. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-12mwifiex: debugfs: Fix out of bounds array accessMark A. Greer
When reading the contents of '/sys/kernel/debug/mwifiex/p2p0/info', the following panic occurs: $ cat /sys/kernel/debug/mwifiex/p2p0/info Unable to handle kernel paging request at virtual address 74706164 pgd = de530000 [74706164] *pgd=00000000 Internal error: Oops: 5 [#1] SMP ARM Modules linked in: phy_twl4030_usb omap2430 musb_hdrc mwifiex_sdio mwifiex CPU: 0 PID: 1635 Comm: cat Not tainted 3.10.0-rc1-00010-g1268390 #1 task: de16b6c0 ti: de048000 task.ti: de048000 PC is at strnlen+0xc/0x4c LR is at string+0x3c/0xf8 pc : [<c02c123c>] lr : [<c02c2d1c>] psr: a0000013 sp : de049e10 ip : c06efba0 fp : de6d2092 r10: bf01a260 r9 : ffffffff r8 : 74706164 r7 : 0000ffff r6 : ffffffff r5 : de6d209c r4 : 00000000 r3 : ff0a0004 r2 : 74706164 r1 : ffffffff r0 : 74706164 Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 10c5387d Table: 9e530019 DAC: 00000015 Process cat (pid: 1635, stack limit = 0xde048240) Stack: (0xde049e10 to 0xde04a000) 9e00: de6d2092 00000002 bf01a25e de6d209c 9e20: de049e80 c02c438c 0000000a ff0a0004 ffffffff 00000000 00000000 de049e48 9e40: 00000000 2192df6d ff0a0004 ffffffff 00000000 de6d2092 de049ef8 bef3cc00 9e60: de6b0000 dc358000 de6d2000 00000000 00000003 c02c45a4 bf01790c bf01a254 9e80: 74706164 bf018698 00000000 de59c3c0 de048000 de049f80 00001000 bef3cc00 9ea0: 00000008 00000000 00000000 00000000 00000000 00000000 00000000 00000000 9ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 9ee0: 00000000 00000000 00000000 00000001 00000000 00000000 6669776d 20786569 9f00: 20302e31 2e343128 392e3636 3231702e 00202933 00000000 00000003 c0294898 9f20: 00000000 00000000 00000000 00000000 de59c3c0 c0107c04 de554000 de59c3c0 9f40: 00001000 bef3cc00 de049f80 bef3cc00 de049f80 00000000 00000003 c0108a00 9f60: de048000 de59c3c0 00000000 00000000 de59c3c0 00001000 bef3cc00 c0108b60 9f80: 00000000 00000000 00001000 bef3cc00 00000003 00000003 c0014128 de048000 9fa0: 00000000 c0013f80 00001000 bef3cc00 00000003 bef3cc00 00001000 00000000 9fc0: 00001000 bef3cc00 00000003 00000003 00000001 00000001 00000001 00000003 9fe0: 00000000 bef3cbdc 00011984 b6f1127c 60000010 00000003 18dbdd2c 7f7bfffd [<c02c123c>] (strnlen+0xc/0x4c) from [<c02c2d1c>] (string+0x3c/0xf8) [<c02c2d1c>] (string+0x3c/0xf8) from [<c02c438c>] (vsnprintf+0x1e8/0x3e8) [<c02c438c>] (vsnprintf+0x1e8/0x3e8) from [<c02c45a4>] (sprintf+0x18/0x24) [<c02c45a4>] (sprintf+0x18/0x24) from [<bf01790c>] (mwifiex_info_read+0xfc/0x3e8 [mwifiex]) [<bf01790c>] (mwifiex_info_read+0xfc/0x3e8 [mwifiex]) from [<c0108a00>] (vfs_read+0xb0/0x144) [<c0108a00>] (vfs_read+0xb0/0x144) from [<c0108b60>] (SyS_read+0x44/0x70) [<c0108b60>] (SyS_read+0x44/0x70) from [<c0013f80>] (ret_fast_syscall+0x0/0x30) Code: e12fff1e e3510000 e1a02000 0a00000d (e5d03000) ---[ end trace ca98273dc605a04f ]--- The panic is caused by the mwifiex_info_read() routine assuming that there can only be four modes (0-3) which is an invalid assumption. For example, when testing P2P, the mode is '8' (P2P_CLIENT) so the code accesses data beyond the bounds of the bss_modes[] array which causes the panic. Fix this by updating bss_modes[] to support the current list of modes and adding a check to prevent the out-of-bounds access from occuring in the future when more modes are added. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-12Bluetooth: btmrvl: support Marvell Bluetooth device SD8897Bing Zhao
The register offsets have been changed in SD8897 and newer chips. Define a new btmrvl_sdio_card_reg map for SD88xx. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Frank Huang <frankh@marvell.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-11iwlwifi: mvm: Update the supported interface combinationsIlan Peer
iwlmvm does not support concurrent operation of AP with P2P Client/GO. Update the interface limits to reflect that iwlmvm supports only concurrent operation of station with AP and P2P Client/GO. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-11iwlwifi: mvm: don't set the MCAST queue in STA's queue listEmmanuel Grumbach
The MCAST queue should be enabled after DTIM only. According to fw API, the MCAST must not be attached to any station, but should appear in the mcast_qid of the AP's mac context only. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-11iwlwifi: mvm: properly tell the fw that a STA is awakeEmmanuel Grumbach
The firmware API wasn't being used correctly, fix that. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-11Merge remote-tracking branch 'wireless-next/master' into iwlwifi-nextJohannes Berg
2013-06-11iwlwifi: include export.h instead of module.hJohannes Berg
We only need EXPORT_SYMBOL_GPL, none of the other things from module.h, so only include export.h. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-11iwlwifi: ignore 0-length PHY DB sectionsEmmanuel Grumbach
This can happen during development but can cause problems, WARN (once) and go on. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Guy Cohen <guy.cohen@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-11iwlwifi: mvm: fix irrelevant commentEmmanuel Grumbach
This code moved and is now far away from the code that takes the mutex. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-11iwlwifi: mvm: remove unused wait_for_ba fieldEmmanuel Grumbach
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-11cw1200: Fix an assorted pile of checkpatch warnings.Solomon Peachy
Signed-off-by: Solomon Peachy <pizza@shaftnet.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-11cw1200: Eliminate the ETF debug/engineering code.Solomon Peachy
This is only really useful for people who are bringing up new hardware designs and have access to the proprietary vendor tools that interface with this mode. It'll live out of tree until it's rewritten to use a less kludgy interface. Signed-off-by: Solomon Peachy <pizza@shaftnet.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-11cw1200: Remove "ITP" debug subsystem.Solomon Peachy
This can live on as an out-of-tree patch for those that care. Signed-off-by: Solomon Peachy <pizza@shaftnet.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-11ath6kl: make mgmt_tx accept a NULL channelAntonio Quartulli
cfg80211 passes a NULL channel to mgmt_tx if the frame has to be sent on the one currently in use by the device. Make the implementation of mgmt_tx correctly handle this case Cc: Nicolas Cavallari <Nicolas.Cavallari@lri.fr> Acked-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-11brcm80211: make mgmt_tx in brcmfmac accept a NULL channelAntonio Quartulli
cfg80211 passes a NULL channel to mgmt_tx if the frame has to be sent on the one currently in use by the device. Make the implementation of mgmt_tx correctly handle this case Cc: brcm80211-dev-list@broadcom.com Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-10rt2x00: rt2x00queue: initialize data_queue fields earlierGabor Juhos
Support for rt2800 device is broken since my 'rt2x00: rt2x00dev: use rt2x00dev->tx->limit' patch. The changelog of that commit says that the TX data queue is initialized already when the rt2x00lib_probe_hw() function is called. However as Jakub noticed it, this statement is not correct. The queue->limit field is initialized in the rt2x00queue_alloc_entries routine and that is not yet called when rt2x00lib_probe_hw() runs. Because the value of tx->limit contains zero, the driver tries to allocate a kernel fifo with zero size and kfifo_alloc rejects that with -EINVAL. PCI: Enabling device 0000:01:00.0 (0000 -> 0002) ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 3071, rev 021c detected ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 0008 detected ieee80211 phy1: rt2x00lib_probe_dev: Error - Failed to initialize hw rt2800pci: probe of 0000:01:00.0 failed with error -22 Move the data_queue field initialization from the rt2x00queue_alloc_entries routine into the rt2x00queue_init function. The initialization code is not strictly related to the allocation, and the change ensures that the queue_data fields can be used in the probe routines. The patch also introduces a helper function in order to be able to get the correct data_queue_desc structure for a given queue. This helper is only needed temporarily and it will be removed later. Reported-by: Jakub Kicinski <moorray@wp.pl> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-10rtlwifi: initialize local array and set value.Yunlian Jiang
GCC 4.8 is spitting out uninitialized-variable warnings against "drivers/net/wireless/rtlwifi/rtl8192de/dm.c". drivers/net/wireless/rtlwifi/rtl8192de/dm.c:941:31: error: 'ofdm_index_old[1]' may be used uninitialized in this function [-Werror=maybe-uninitialized] rtlpriv->dm.ofdm_index[i] = ofdm_index_old[i]; This patch adds initialization to the variable and properly sets its value. Signed-off-by: Yunlian Jiang <yunlian@google.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-10Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
2013-06-10cw1200: handle allocation failure in wsm_event_indication()Dan Carpenter
Check for allocation failures and return -ENOMEM. The caller already expects it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-10cw1200: read beyond end of array in debug codeDan Carpenter
This has only one caller and rates[] is an array with IEEE80211_TX_MAX_RATES (4) elements. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-10cw1200: Sanity-check arguments in copy_from_user()Solomon Peachy
The optional debugfs interface to the vendor's engineering tools wasn't bounds checking at all, which made it trivial to perform a buffer overflow if this interface was compiled in and then explicitly enabled at runtime. This patch checks both the length supplied as part of the data to ensure it is sane, and also the amount of data compared to the remaining buffer space. If either is too large, fail immediately. (This bug was spotted by Dan Carpenter <dan.carpenter@oracle.com>) Signed-off-by: Solomon Peachy <pizza@shaftnet.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-10cw1200: hwio: Remove an unnecessary gotoJoe Perches
goto after return is wrong. The other code in this block needs to set an error value then goto an error release block. This one doesn't need to release anything and was likely a copy/paste remainder. Signed-off-by: Joe Perches <joe@perches.com> Acked-By: Solomon Peachy <pizza@shaftnet.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-10iwlwifi: mvm: remove iwl_mvm_dbgfs_set_fw_dbg_log declarationJohannes Berg
This function doesn't actually exist, remove its declaration. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-05mac80211: Use suitable semantics for beacon availability indicationAlexander Bondar
Currently beacon availability upon association is marked by have_beacon flag of assoc_data structure that becomes unavailable when association completes. However beacon availability indication is required also after association to inform a driver. Currently dtim_period parameter is used for this purpose. Move have_beacon flag to another structure, persistant throughout a interface's life cycle. Use suitable sematics for beacon availability indication. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> [fix another instance of BSS_CHANGED_DTIM_PERIOD in docs] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-05iwlwifi: mvm: don't request SMPS on non-STA ifaceEytan Lifshitz
The Thermal Throttling code could do that, fix it. Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-05iwlwifi: mvm: fix MCAST in AP modeEmmanuel Grumbach
In multicast, there is no retries nor RTS since there is no specific recipient that can ACK or send CTS. This means that we must not use the rate scale table for multicast frames. This true for any frame that doesn't have a valid ieee80211_sta pointer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-05iwlwifi: mvm: enable PM always in unassociated modeAlexander Bondar
In unassociated BSS STA mode FW verifies both power save and power management flags to decide on switching power off. The driver currently sets power management flag according to mac80211 decision. As result, in unassociated mode power management flag is down and power consumption is high. Change power management enablement. When unassociated in BPS and LP power save modes enable power management regardless of mac80211 decision. Rely on mac80211 decision if associated. Add power management state update during associated/disassociated modes transitions. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-04iwlwifi: mvm: Change location of vif_count verification for PMAlexander Bondar
Currently vif_count verification for power management enablement appear in different places. Move these verifications to one place in iwl_mvm_update_power_mode(). Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-04iwlwifi: mvm: correctly configure MCAST in AP modeEmmanuel Grumbach
The AP mode needs to use the MCAST fifo for the MCAST frames sent after the DTIM. This fifo needs to be configured with the same parameters as the VOICE FIFO. A separate SCD queue is mapped to this fifo - the cab_queue (cab stands for Content After Beacon). This queue isn't connected to any station, but rather to the MAC context. This queue should (and is already) be set as the MCAST queue - this is part of the of MAC context command. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-04iwlwifi: mvm: reorder Rx handler for performance purposesEmmanuel Grumbach
Since SCAN related handlers are much less likely than beacon related handlers, reorder between them. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-04iwlwifi: mvm: Fix quota command settingsIlan Peer
According to the FW implementation, the quota command should have a valid entry for each active binding (where 'active' in this context means that the binding is known to the FW). In case the binding should not get any quota, the 'quota' should be set to zero. Not setting an 0 quota for an active binding when all the MACs in the binding are idle, i.e., not associated in case of managed interface, will result in preventing the FW scheduler from entering IDLE state and the FW from transitioning to low PS. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-04iwlwifi: don't return -ERFKILL if SEND_IF_RFKILL is setEran Harary
When CMD_SEND_IN_RFKILL is set, it is perfectly legitimate to send a host command while RFKILL is asserted. In this case, the host command sending functions should return 0 even if RFKILL is asserted. Signed-off-by: Eran Harary <eran.harary@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-04iwlwifi: mvm: don't enable MIMO when BT is activeEmmanuel Grumbach
Another step in the rate control / BT Coex integration Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-04iwlwifi: mvm: don't start BA agreement when BT is activeEmmanuel Grumbach
Otherwise WiFi would kill BT. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-04iwlwifi: mvm: limit the length of the AMPDU when BT is runningEmmanuel Grumbach
This holds for existing BA agreements. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-04iwlwifi: mvm: fix the LUT for BT CoexEmmanuel Grumbach
There was a typo in the Loose LUT for BT Coex. Fix that. Reported-by: Roi Cohen <roi.cohen@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-04Merge remote-tracking branch 'wireless-next/master' into HEADJohannes Berg
Merge to get the wil6210 changes that a cfg80211 change needs. A conflict in drivers/net/wireless/ath/ath9k/init.c was just whitespace changes. Also fix a semantic conflict due to cw1200 using WoWLAN which I had modified in my tree. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-03brcmsmac: Reduce log spam in heavy tx, make err print in debugJohn Greene
Move message to debug mode to reduce log spam under heavy tx (iperf) load. This message prints in ht debug mode only: brcms_c_ampdu_dotxstatus_complete: Pkt tx suppressed, illegal channel possibly 153 Signed-off-by: John Greene <jogreene@redhat.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-03ath9k: Do not maintain ANI state per-channelSujith Manoharan
ANI state can be maintained globally instead of per-channel. This reduces memory usage and since default values are used during a scan run, per-channel state is not required. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-03ath9k: Print ANI statistics in debugfsSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-03ath9k: Set ofdmWeakSigDetect directlySujith Manoharan
The macros ATH9K_ANI_USE_OFDM_WEAK_SIG can be removed. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-03ath9k: Simplify ANI initializationSujith Manoharan
The check "enable_ani" is not required since it is always set to true and the logic for disabling/enabling ANI via debugfs is done at a higher layer. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-03ath9k: Remove unused structure ath_dbg_bb_mac_sampSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-03ath9k: Enable WoW only for AR9462Sujith Manoharan
The only card with which WoW has been tested and verified is AR9462. Do not enable it for all cards since WoW is really quirky and needs to be tested properly with each chip. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-03ath9k: Return early for invalid ratesSujith Manoharan
Process and update the internal RSSI average, which is used by ANI, after verifying that the received frame has valid rate information. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-03net, ipw2x00: remove redundant D0 power state setYijing Wang
Pci_enable_device() will set device power state to D0, so it's no need to do it again in ipw2100_pci_init_one(). Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-03ath9k: advertise support for active monitor interfacesFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-03Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2013-06-03cw1200: rename the cw1200 platform definition headerSolomon Peachy
My previous patch just moved the file, but it also needed to be renamed to conform to proper conventions. Signed-off-by: Solomon Peachy <pizza@shaftnet.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>