summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-07-06iwlwifi: mvm: set sta_id in SCD_QUEUE_CONFIG cmdLiad Kaufman
Set the correct sta_id in the SCD_QUEUE_CONFIG command sent to the FW when enabling/disabling queues. This is needed in DQA-mode to allow the FW to associate between queue and STA. In case the queue isn't connected to a specific station but rather is a static "generic" queue - the sta_id should be set to 0x10 (max supported STA is 0x0f). Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-06iwlwifi: mvm: support dqa queue sharingLiad Kaufman
Support DQA queue sharing when no free queue exists for allocation to a STA that already exists. This means that a single queue will serve more than a single TID (although the RA will be the same for all TIDs served). We try to choose the lowest AC possible, to ensure the shared queues have the lowest possible combined AC requirements. The queue to share is chosen only from the same RA's DATA queues as follows (in descending priority): 1. An AC_BE queue 2. Same AC queue 3. Highest AC queue that is lower than new AC 4. Any existing AC (there always is at least 1 DATA queue) If any aggregations existed for any of the TIDs of the shared queue - they are stopped (the FW is notified), but no delBA is sent. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-06iwlwifi: mvm: silence uninitialized variable warningDan Carpenter
"max_amsdu_len" isn't set if kstrtouint() fails. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-06iwlwifi: mvm: remove an unused variableDan Carpenter
We never initialize ampdu_status so it causes a static checker warning when we pass it to iwl_mvm_pass_packet_to_mac80211(). Fortunately, it's never used so we can just remove it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-06iwlwifi: mvm: change scan timeout to a delayed workLuca Coelho
Some transports may sleep when writing to registers, which is done when calling iwl_force_nmi(). So we can't call iwl_force_nmi() in a timer context. To solve that, convert the scan timeout timer to a delayed work. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-06iwlwifi: mvm: fix possible division by zeroSara Sharon
Theoretically we may get only one IRQ from OS, in which case we will have only 1 queue even in MSIx mode. This will cause division by zero in the indirection table calculation. We do not need send the command in that case, as there is only one queue so all RX traffic will be directed to it anyway. Bail out early if there is only one queue. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-06iwlwifi: pcie: unify restock calls on initSara Sharon
Currently code calls restock for mq devices during the init function, unlike sq where restock is called after init. This causes an harmless but alarming deadlock warning from lockdep, to fix this - unify the init code. Rename the restock functions while at it. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-06iwlwifi: mvm: support dqa queue inactivation upon timeoutLiad Kaufman
Support marking queues as inactive upon a timeout expiring, and allow inactive queues to be re-assigned to other RA/TIDs if no other queue is free. This is done by keeping a timestamp of the latest frame TXed for every RA/TID, and then going over the queues currently in use when a new queue is needed, inactivating all those that are inactive. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-06iwlwifi: change fw.mvm_fw to fw.typeJohannes Berg
Instead of explicitly indicating the difference between just DVM and MVM with an mvm_fw boolean change this to fw.type to be more extensible and easier to understand. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-06iwlwifi: remove useless enum valuesJohannes Berg
Since the values of this enum are used only internally, we can let the compiler number them. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-05rtlwifi: rtl8821ae: Fix potential race conditionLarry Finger
Flag rfchange_inprogress in struct rtl_ps_ctl is protected by a spinlock in most routines but not in rtl8821ae_dm_watchdog() which could lead to a race condition. The necessary locking to prevent this condition is added. Reported-by: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-05rtlwifi: rtl8723ae: Fix potential race conditionLarry Finger
Flag rfchange_inprogress in struct rtl_ps_ctl is protected by a spinlock in most routines but not in rtl8723e_dm_watchdog(), which could lead to a race condition. The necessary locking to prevent this condition is added. Reported-by: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-05rtlwifi: rtl8723be: Fix potential race conditionLarry Finger
Flag rfchange_inprogress in struct rtl_ps_ctl is protected by a spinlock in most routines but not in rtl8723be_dm_watchdog(), which could lead to a race condition. The necessary locking to prevent this condition is added. Reported-by: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-05rtlwifi: rtl8192ee: Fix potential race conditionLarry Finger
Flag rfchange_inprogress in struct rtl_ps_ctl is protected by a spinlock in most routines but not in rtl92ee_dm_watchdog(), which could lead to a race condition. The necessary locking to prevent this condition is added. Reported-by: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-05rtlwifi: rtl8188ee: Fix potential race conditionLarry Finger
Flag rfchange_inprogress in struct rtl_ps_ctl is protected by a spinlock in most routines but not in rtl88e_dm_watchdog(), which could lead to a race condition. The necessary locking to prevent this condition is added. Reported-by: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-05rtlwifi: Remove unused parameter from rtl_ps_set_rf_state()Larry Finger
Commit 4b9d8d67b44a ("rtlwifi: rtl8192cu: Remove unused parameter") reworked this routine. Those changes were later reverted by commit d3feae41a347 ("rtlwifi: Update power-save routines for 062814 driver"). There were two changes in commit 4b9d8d67b44a. The first of these removed a parameter from rtl_ps_set_rf_state() that was always false. This is the change that is restored in the current patch. A second change that reworked the locking is still being analyzed. In addition to removing the unused parameter, there is no need for rtl_ps_set_rf_state() to be exported. Reported-by: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-05mwifiex: disable MSIx interrupt for 8997 chipsetShengzhen Li
Sometimes MSIx interrupts are received out of order on multi-core system. This creates a problem when there is a race between data packet and SLEEP event from firmware. We will disable MSIx interrupt mode to solve the problem and go with MSI mode. Signed-off-by: Shengzhen Li <szli@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-05mwifiex: add get_antenna support for cfg80211Shengzhen Li
Since commit de3bb771f471 ("cfg80211: add more warnings for inconsistent ops") the wireless core warns if a driver implements a cfg80211 callback but doesn't implements the inverse operation. The mwifiex driver defines a .set_antenna handler but not a .get_antenna so this not only makes the core to print a warning when creating a new wiphy but also the antenna isn't reported to user-space apps such as iw. This patch queries the antenna to the firmware so is properly reported to user-space. With this patch, the wireless core does not warn anymore and: $ iw phy phy0 info | grep Antennas Available Antennas: TX 0x3 RX 0x3 Configured Antennas: TX 0x3 RX 0x3 Signed-off-by: Shengzhen Li <szli@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> [javier: expand the commit message] Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-05mwifiex: add a cfg80211 .get_tx_power operation callbackJavier Martinez Canillas
The mwifiex driver implements a cfg80211 .set_tx_power operation handler but doesn't have the inverse .get_tx_power callback. This not only has the effect that the Tx power can't be reported to user space tools such as iwconfig and iwlist but also that the wireless core prints a warning when a new wiphy is created due an cfg80211 operation being implemented without its counterpart. After this patch, the Tx power is properly reported to user-space tools: $ iwlist mlan0 txpower mlan0 unknown transmit-power information. Current Tx-Power=13 dBm (19 mW) and also the following warning isn't shown anymore on the driver probe: WARNING: CPU: 3 PID: 127 at net/wireless/core.c:366 wiphy_new_nm+0x66c/0x6ac Modules linked in: mwifiex_sdio mwifiex CPU: 3 PID: 127 Comm: kworker/3:1 Tainted: G W 4.7.0-rc1-next-20160531-00006-g569df5b983f3 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) Workqueue: events request_firmware_work_func [<c010e1ac>] (unwind_backtrace) from [<c010af38>] (show_stack+0x10/0x14) [<c010af38>] (show_stack) from [<c0323b9c>] (dump_stack+0x88/0x9c) [<c0323b9c>] (dump_stack) from [<c011a828>] (__warn+0xe8/0x100) [<c011a828>] (__warn) from [<c011a8f0>] (warn_slowpath_null+0x20/0x28) [<c011a8f0>] (warn_slowpath_null) from [<c06a42d4>] (wiphy_new_nm+0x66c/0x6ac) [<c06a42d4>] (wiphy_new_nm) from [<bf1c24cc>] (mwifiex_register_cfg80211+0x28/0x3f0 [mwifiex]) [<bf1c24cc>] (mwifiex_register_cfg80211 [mwifiex]) from [<bf1a0018>] (mwifiex_fw_dpc+0x2b0/0x474 [mwifiex]) [<bf1a0018>] (mwifiex_fw_dpc [mwifiex]) from [<c040eb74>] (request_firmware_work_func+0x30/0x58) [<c040eb74>] (request_firmware_work_func) from [<c012fe90>] (process_one_work+0x124/0x338) [<c012fe90>] (process_one_work) from [<c01300dc>] (worker_thread+0x38/0x4d4) [<c01300dc>] (worker_thread) from [<c01353b8>] (kthread+0xdc/0xf4) [<c01353b8>] (kthread) from [<c0107978>] (ret_from_fork+0x14/0x3c) Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-05mwifiex: fix unconditional error return in .add_virtual_intf callbackJavier Martinez Canillas
The commit 7311ea850079 ("mwifiex: fix AP start problem for newly added interface") attempted to fix an issue when a new AP interface is added. But the patch didn't check the return value of the functions doing the firmware calls and returned an error even if the functions didn't fail. This prevents the network device to be registered properly, so fix it. Fixes: 7311ea850079 ("mwifiex: fix AP start problem for newly added interface") Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-05Merge tag 'iwlwifi-next-for-kalle-2016-07-01' of ↵Kalle Valo
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * More work on the RX path for the 9000 device series * Some more dynamic queue allocation work * A few bugfixes and other improvements
2016-07-01iwlwifi: mvm: handle FRAME_RELEASE in MQ codeJohannes Berg
For some reason, the FRAME_RELEASE message handling for the default queue ended up being in the only/default queue for non-RSS devices; fix that and handle FRAME_RELEASE properly on the default queue for RSS devices. Fixes: 585a6fccf5b8 ("iwlwifi: mvm: infrastructure for frame-release message") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-01iwlwifi: mvm: Support CSA countdown offloadingAndrei Otcheretianski
Add support CSA countdown offloading. When CSA starts, the driver specifies the offsets to the eCSA and CSA IEs in the beacon template command and the fw performs the countdown. The fw notifies the driver when the channel switch flow should be performed. Beacon sent notifications are not used anymore. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-01iwlwifi: pcie: make sure packet arrived to destined queueSara Sharon
Add a warning in case packet didn't end up in the HW destined queue. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-01iwlwifi: pcie: allow more than one frame in RB for 9000 devicesSara Sharon
We now have 9000 devices that support multiple frames in a single RB. Enable it. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-01iwlwifi: pcie: set RB chunk size per busSara Sharon
For 9000 devices we can have PCIe bus for discrete devices and IOSF bus for integrated devices. PCIe supports maximum transfer size of 128B while IOSF bus supports maximum transfer size of 64B. Configure RB size accordingly. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-01iwlwifi: pcie: workaround HW shadow registers bugSara Sharon
Integrated 9000 devices have a bug with shadow registers value retention. If driver writes RBD registers while MAC is asleep the values are stored in shadow registers to be copied whenever MAC wakes up. However, in 9000 devices a MAC wakeup is not triggered and when the bus powers down due to inactivity the shadow values and dirty bits are lost. Turn on the chicken-bits that cause MAC wakeup for RX-related values as well when the device is in D0. When the device is in low power mode turn the RX wakeup chicken bits off since driver is idle and this W/A is not needed. Remove previous W/A which was ineffective. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-01iwlwifi: mvm: free dqa queues on STA removal also in non-bssLiad Kaufman
Support queue removal in DQA mode in iwl_mvm_rm_sta() also when the device isn't a STA connected to an AP. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-01iwlwifi: mvm: update mpdu metadata APISara Sharon
rx_phy notification is no longer sent in devices with multiple rx queues. All the needed data is now set in the metadata - update code accordingly to reflect all the features as in the previous RX path. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-01iwlwifi: mvm: remove RX_PHY support for 9000 deviceSara Sharon
In multiple RX queues architecture, the RX_PHY notification is no longer useful as it is received in the default queue even for packets that are received on RSS queue, and cannot be accessed without locking. All the needed data is in the new RX packet metadata and firmware will no longer send this notification for 9000 devices. Remove support of it. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-01iwlwifi: rename CAPA_P2P_STANDALONE_UAPSD to CAPA_P2P_SCM_UAPSDAvraham Stern
Ucode capability bit 26 indicates support for UAPSD on P2P interface even with a simultaneous BSS station interface, as long as both interfaces are in the same binding. Change the name of the capability bit to reflect that. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-01iwlwifi: mvm: fix comment indentationJohannes Berg
Somehow we ended up without leading spaces here, fix that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-01iwlwifi: mvm: do not trust NSSN for amsdu sub-framesSara Sharon
We cannot trust NSSN for AMSDU sub-frames that are not the last. The reason is that NSSN advances on the first sub-frame, and may cause the reorder buffer to advance before all the sub-frames arrive. Example: Reorder buffer contains SN 0 & 2. We receive AMSDU with SN 1 and NSSN for first sub frame 3. The result us that driver releases SN 0,1, 2. When sub-frame 1 arrives - reorder buffer is already ahead and it will be dropped. If the last sub-frame is not on this queue - we will get frame release notification with up to date NSSN. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-01iwlwifi: advertise maximal MPDU length when Rx MQ is supportedEmmanuel Grumbach
The new hardware that supports multiple queue also de-aggregates A-MSDUs. This means that we can advertise the maximal size of A-MSDUs regardless of the receive buffer's size. In order to be able to forcefully use a lower A-MSDU size, add a default value for the module parameter. Pre-9000 will have a default of 4K, and 9000 will have 12K. Setting the amsdu_size module parameter to 4K will limit the A-MSDU on 9000 as well. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-06-29wlcore: reconfigure sta rates on authorizationGuy Mishol
Since stations can now be added before association (NL80211_FEATURE_FULL_AP_CLIENT_STATE support), no supported rates are set when the station is added to the fw, resulting in fw recovery. Fix it by first configuring the AP basic rates as the station configured rates (when the station is first added to the driver), and after the station was authorized re-configure it, now with the actual supported rates. Signed-off-by: Guy Mishol <guym@ti.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29brcmfmac: add missing break when deleting P2P_DEVICERafał Miłecki
We obviously don't want to fall through in that switch. With this change 1) We wait for event (triggered by p2p_disc) as expected 2) We remove interface manually on timeout 3) We return 0 on success instead of -ENOTSUPP Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29brcmfmac: include also core.h header in cfg80211.hRafał Miłecki
This header provides two inline functions using struct brcmf_if so we need core.h to avoid: drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h: In function ‘ndev_to_prof’: drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h:368:13: error: dereferencing pointer to incomplete type return &ifp->vif->profile; ^ drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h: In function ‘ndev_to_vif’: drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h:374:12: error: dereferencing pointer to incomplete type return ifp->vif; ^ Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29brcmfmac: use const char * for interface name in brcmf_add_ifRafał Miłecki
This function can work just fine with const pointer, it only calls alloc_netdev which take const as well. Moreover it makes this function more flexible as some cfg80211 callback may provide const char * as well, e.g. add_virtual_intf. This will be needed for more advanced interface management. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29brcmfmac: fix lockup when removing P2P interface after event timeoutRafał Miłecki
Removing P2P interface is handled by sending a proper request to the firmware. On success firmware triggers an event and driver's handler removes a matching interface. However on event timeout we remove interface directly from the cfg80211 callback. Current code doesn't handle this case correctly as it always assumes rtnl to be unlocked. Fix it by adding an extra rtnl_locked parameter to functions and calling unregister_netdevice when needed. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29wireless: ipw2200: fix old-style declarationArnd Bergmann
Modern C standards expect the 'inline' keyword to come before the return type in a declaration, and we get a warning for this with "make W=1": drivers/net/wireless/intel/ipw2x00/ipw2200.c:4096:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Stanislav Yakovlev <stas.yakovlev@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29wireless: brcmsmac: fix old-style declarationArnd Bergmann
Modern C standards expect the 'static' keyword to come first in a declaration, and we get a warning for this with "make W=1": drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:3353:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29wireless: airo: rename 'register' variableArnd Bergmann
'register' is a keyword in C and cannot be used in place of a variable name, as shown by this -Wextra warning: drivers/net/wireless/cisco/airo.c:1105:29: error: 'register' is not at beginning of declaration [-Werror=old-style-declaration] This replaces the 'register' keyword with a 'reg' identifier in the declaration, which matches the definition and has the intended meaning. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29mwifiex: fix AP start problem for newly added interfaceAmitkumar Karwar
It's been observed that if interface type is changed from managed to __ap, AP can be successfully started. But there is a problem if new ap interface is added. The problem got resolved after sending appropriate commands to firmware in add_interface handler. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29mwifiex: fix AP unable to start in VHT40 problemAmitkumar Karwar
This patch populates secondary channel offset and downloads it to firmware to fix the problem. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29mwifiex: fix system hang problem after resumeAmitkumar Karwar
On some platforms, driver is unable to wakeup firmware after system resume due to a problem at MMC subsystem. Triggering card reset in this case has a race with card removal from MMC which causes system hang. This patch resolves the problem by not triggering card reset. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29mwifiex: cancel pending scan during disconnectXinming Hu
It is obeserved that sometimes scan operation will block the disconnect during system suspend. It's ok to cancel ongoing scan in this case. It reduces unnecessary system suspend delay. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29mwifiex: factor out mwifiex_cancel_scanXinming Hu
This patch creates common function mwifiex_cancel_scan to remove duplication of code. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29mwifiex: Fix an issue spotted by KASANGanapathi Bhat
When an association command is sent to firmware but the process is killed before the command response arrives, driver will try to access bss_desc which is already freed. This issue is fixed by checking return value of bss_start. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29rtlwifi: use s8 instead of charArnd Bergmann
Compiling the rtlwifi drivers for ARM with gcc -Wextra warns about lots of incorrect code that results from 'char' being unsigned here, e.g. realtek/rtlwifi/rc.c:113:18: error: comparison is always true due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8188ee/dm.c:1070:22: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8192ce/trx.c:54:16: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8192cu/mac.c:601:16: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8192de/trx.c:53:16: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8192ee/phy.c:1268:12: error: comparison is always true due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8192se/rf.c:150:20: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8723be/dm.c:877:29: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8723be/phy.c:386:16: error: comparison is always true due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8821ae/dm.c:1514:38: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8821ae/phy.c:1558:11: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8821ae/phy.c:386:24: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8821ae/trx.c:55:12: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/stats.c:31:16: error: comparison is always false due to limited range of data type [-Werror=type-limits] This patch changes all uses of 'char' in this driver that refer to 8-bit integers to use 's8' instead, which is signed on all architectures. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29libertas: Add spinlock to avoid race conditionPavel Andrianov
lbs_mac_event_disconnected may free priv->currenttxskb while lbs_hard_start_xmit accesses to it. The patch adds a spinlock for mutual exclusion. Tested on OLPC XO-1 (usb8388) and XO-1.5 (sd8686) with v4.7-rc3. Confirmed that lbs_mac_event_disconnected is being called on the station when hostapd on access point is given SIGHUP. Signed-off-by: Pavel <andrianov@ispras.ru> Tested-by: James Cameron <quozl@laptop.org> Acked-by: Vaishali Thakkar <vaishali.thakkar@oracle.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>