summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ath9k: Remove some #defined constants to decrease verbosityBenjamin Berg2016-07-088-14/+11
| | | | | | | | | The removed ATH9K_SLOT_TIME_X constants simply map the value in microseconds to the same integer. These constants were not used consistently, so fix the inconsistency issue by replacing all occurances with the integer equivalent. Signed-off-by: Benjamin Berg <benjamin.berg@open-mesh.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath9k: Expose tsf_adjustment in mac80211 tsf getters and setters.Benjamin Berg2016-07-081-0/+2
| | | | | | | | | | | The ath9k driver modifies the TSF for VIFs for the purpose of sending beacons in a staggered fashion. This patch exposes this VIF specific adjustment of the TSF value to mac80211. Without the change the TSF routines handle the hardware TSF value instead of the actual TSF value as seen on the air. Signed-off-by: Benjamin Berg <benjamin.berg@open-mesh.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath9k: Use tsf offset helper in ath9k_hw_resetBenjamin Berg2016-07-081-8/+8
| | | | | | | | | | | | | These changes make ath9k_hw_reset more consistent with other places that handle the TSF value by using the same helper routine. A slight improvement is to not assume that a fixed time of 1.5ms has passed for the initval writes when compared to the first write attempt. Instead the TSF value is re-calculated which will yield a higher accuracy of the restored TSF timer. Signed-off-by: Benjamin Berg <benjamin.berg@open-mesh.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath9k: Handle channel context in get_/set_/reset_tsfBenjamin Berg2016-07-081-3/+18
| | | | | | | | | | | | | The ath9k TSF handling routines need to be aware of the channel context that is being modified. With this change the TSF related values that are stored in each channel context will be correctly tracked and the harware will only be updated if the modified context is currently the active one. Without this change the TSF modifications done using these routines would for example be lost during a hardware reset as done by ath_complete_reset. Signed-off-by: Benjamin Berg <benjamin.berg@open-mesh.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath9k: Correct TSF adjustment to align the beacon time correctlyBenjamin Berg2016-07-081-4/+8
| | | | | | | | | | | | | | Beacons were not send out at (timestamp % beacon_time == 0) for interfaces other than the primary one. To send out beacons with the correct timestamp according to 10.1.3.2 of the 802.11 standard the tsf_adjustment has to be set to the negative time difference instead of positive. This way the later beacons get corrected to have a lower (and similar) timestamp with regard to the beacon from slot 0. I am not aware about any issues that have been caused by this. Signed-off-by: Benjamin Berg <benjamin.berg@open-mesh.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath9k: move all ath9k_platform_data initialization into one functionMartin Blumenstingl2016-07-081-24/+25
| | | | | | | | | No functional changes, this simply makes the code easier to understand because all initialization based on ath9k_platform_data is now within one function. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath9k: remove return value from ath9k_hw_init_macaddrMartin Blumenstingl2016-07-081-10/+5
| | | | | | | | | ath9k_hw_init_macaddr unconditionally returns 0 in all cases, making the return value unnecessary. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath9k: ath9k_hw_init_macaddr should not overwrite valid MAC addressesMartin Blumenstingl2016-07-081-9/+13
| | | | | | | | | | Currently setting the MAC address via ath9k_platform_data works only due to the order in which init.c sets common->macaddr, which is done after ath9k_hw_init_macaddr was executed. It would be better if the latter was independent of the order in which it's being called. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath9k: remove variable which is set but never readMartin Blumenstingl2016-07-081-3/+0
| | | | | | | | | No functional changes - this only removes a variable which is set but never read. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath9k: Allow configuration of LED polarity in platform data.Martin Blumenstingl2016-07-082-0/+4
| | | | | | | | | | Some devices running OpenWrt need this and it makes sense to add this to ath9k_platform_data as the next patches will add a devicetree (boolean) property for it as well. Suggested-by: Vittorio Gambaletta <openwrt@vittgam.net> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wcn36xx: Fix up wcn36xx_smd_update_scan_params()Bjorn Andersson2016-07-083-9/+12
| | | | | | | | | Fix up the wcn36xx_smd_update_scan_params() to work with non-ancient versions of the firmware and support actually specifying the list of channels. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wcn36xx: Correct DXE chip version differentiationBjorn Andersson2016-07-084-26/+11
| | | | | | | | | | The CCU block in WCNSS is configured for appropriate routing of interrupts from the DXE to the application cpu, this is not dependant on the iris version (wcn3660 vs wcn3680), but rather if the SoC has a riva or pronto built in. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wcn36xx: Split mmio space into explicit regionsBjorn Andersson2016-07-084-27/+59
| | | | | | | | Split the wcnss mmio space into explicit regions for ccu and dxe and acquire these from the node referenced by the qcom,mmio phandle. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wcn36xx: Change indication list lock to spinlockBjorn Andersson2016-07-082-7/+7
| | | | | | | | | In preparation for handling incoming messages from IRQ context, change the indication list lock to a spinlock Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wcn36xx: Fold indication payload into message headerBjorn Andersson2016-07-082-10/+7
| | | | | | | | | Merge the two allocation instead of separately allocating room for the indication payload. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: replace warning with an error message if HTT op version is unsetMohammed Shafi Shajakhan2016-07-081-1/+1
| | | | | | | | | Print an ath10k error message rather a call trace when HTT op version is not found from firmware META data (IE). This should be sufficient to figure out what went wrong. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: enable support for QCA9888Anilkumar Kolli2016-07-084-0/+60
| | | | | | | | QCA9888 shares the same configuration with QCA99X0 with NSS=2. Signed-off-by: Anilkumar Kolli <akolli@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: remove unused member in ath10k_hw_regsAnilkumar Kolli2016-07-082-5/+0
| | | | | | | | rtc_state_cold_reset_mask is unused in ath10k_hw_regs. instead fixed delays are used. Signed-off-by: Anilkumar Kolli <akolli@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: Clean up peer when sta goes away.Ben Greear2016-07-081-2/+10
| | | | | | | | If WMI and/or firmware has issues removing the peer object, then we still need to clean up the peer object in the driver. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: Add WARN_ON if we over-write peer-map pointer.Ben Greear2016-07-081-0/+1
| | | | | | | | Not sure this can happen, but seems like a reasonable sanity check. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: remove extra space on ath10k_update_channel_listEduardo Abinader2016-07-081-1/+1
| | | | | | | | just to comply to coding style. Signed-off-by: Eduardo Abinader <eduardo.abinader@riverbed.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: simplify pktlog htt event processingAshok Raj Nagarajan2016-07-082-24/+3
| | | | | | | | | | | | | | | | | | | | It is expected that all pktlog events for 10.4 firmware based solutions should come through CE8 where as in case of 10.2 firmware based solutions, it should come through one of the HTT events (HTT_T2H_MSG_TYPE_PKTLOG). But from experiments with 10.4 based solutions, it is observed that pktlog event for ATH_PKTLOG_TYPE_TX_MSDU_ID is coming through HTT pktlog event. Currently, we always parse with 10.2 pktlog header which will lead to pktlog decoding issues (payload length mismatch exceptions) For trace points, it is required to provide only the payload size. So fixing this by simplifying the payload size calculation without the use of ath10k pktlog headers. While there, remove the unused ath10k pktlog headers. Signed-off-by: Ashok Raj Nagarajan <arnagara@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: remove unused <linux/semaphore.h>Chaehyun Lim2016-07-081-1/+0
| | | | | | | <linux/semaphore.h> is not used anymore, so just remove the include. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: ensure peer_map references are cleaned upBen Greear2016-07-081-0/+17
| | | | | | | | | | | While debugging OS crashes due to firmware crashes, I enabled kasan, and it noticed that peer objects were being used-after-freed. Looks like there are two places we could be leaving stale references in the peer-map, so clean that up. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: ensure txrx-compl-task is stopped when cleaning htt-txBen Greear2016-07-081-0/+2
| | | | | | | Otherwise, the txrx-compl-task may access some bad memory? Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: remove debugfs support for Per STA total rx durationMohammed Shafi Shajakhan2016-07-081-24/+0
| | | | | | | | | | | | | cfg80211/nl80211 interface changes for per STA total rx-duration and very basic 'ath10k_sta_statistics' mac80211 callback is implemented to extend support for per station statistics from the driver. Also provision in 'iw dev wlan#N station dump' to parse rx-duration is supported. So its safer to remove the debugfs entry for per STA rx-duration Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: add support for ath10k_sta_statistics supportMohammed Shafi Shajakhan2016-07-083-0/+18
| | | | | | | | | | Enable support for 'drv_sta_statistics' callback. Export rx_duration support if available to cfg80211/nl80211 This can also act as a placeholder for any new per STA stats support Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: fix 10.4 extended peer stats updateMohammed Shafi Shajakhan2016-07-086-22/+119
| | | | | | | | | | | | | | | | | | | 10.4 'extended peer stats' will be not be appended with normal peer stats data and they shall be coming in separate chunks. Fix this by maintaining a separate linked list 'extender peer stats' for 10.4 and update rx_duration for per station statistics. Also parse through beacon filter (if enabled), to make sure we parse the extended peer stats properly. This issue was exposed when more than one client is connected and extended peer stats for 10.4 is enabled The order for the stats is as below S - standard peer stats, E- extended peer stats, B - beacon filter stats {S1, S2, S3..} -> {B1, B2, B3..}(if available) -> {E1, E2, E3..} Fixes: f9575793d44c ("ath10k: enable parsing per station rx duration for 10.4") Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath9k: Fix programming of minCCA power thresholdSven Eckelmann2016-06-301-1/+1
| | | | | | | | | | | | | The function ar9003_hw_apply_minccapwr_thresh takes as second parameter not a pointer to the channel but a boolean value describing whether the channel is 2.4GHz or not. This broke (according to the origin commit) the ETSI regulatory compliance on 5GHz channels. Fixes: 3533bf6b15a0 ("ath9k: Fix regulatory compliance") Signed-off-by: Sven Eckelmann <sven@narfation.org> Cc: Simon Wunderlich <sw@simonwunderlich.de> Cc: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath9k: return false when reading wrong eeprom offsetEduardo Abinader2016-06-301-0/+2
| | | | | | | Just setting the proper return for reading beyond the eeprom data. Signed-off-by: Eduardo Abinader <eduardo.abinader@riverbed.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: fix some typo in spectral code commmentsMohammed Shafi Shajakhan2016-06-301-2/+2
| | | | | | | | Found this obvious typo while going through the spectral code design in ath10k Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: disable TX_STBC for tx chainmask of 1Mohammed Shafi Shajakhan2016-06-301-1/+4
| | | | | | | | | Disable TX_STBC for both HT and VHT if the devices tx chainmask is '1' TX_STBC is required only for devices with tx_chainmask > 1. This fixes a ping failure for QCA9887 (1x1) in HT/VHT mode Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: enable beacon loss detection support for 10.4Mohammed Shafi Shajakhan2016-06-301-0/+4
| | | | | | | | | Enable beacon loss detection support for 10.4 by handling roam event. With this change QCA99X0 station is able to detect beacon loss when the AP is powered off Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: fix potential null dereference bugsBob Copeland2016-06-304-15/+24
| | | | | | | | | | | | | | | | | | | | Smatch warns about a number of cases in ath10k where a pointer is null-checked after it has already been dereferenced, in code involving ath10k private virtual interface pointers. Fix these by making the dereference happen later. Addresses the following smatch warnings: drivers/net/wireless/ath/ath10k/mac.c:3651 ath10k_mac_txq_init() warn: variable dereferenced before check 'txq' (see line 3649) drivers/net/wireless/ath/ath10k/mac.c:3664 ath10k_mac_txq_unref() warn: variable dereferenced before check 'txq' (see line 3659) drivers/net/wireless/ath/ath10k/htt_tx.c:70 __ath10k_htt_tx_txq_recalc() warn: variable dereferenced before check 'txq->sta' (see line 52) drivers/net/wireless/ath/ath10k/htt_tx.c:740 ath10k_htt_tx_get_vdev_id() warn: variable dereferenced before check 'cb->vif' (see line 736) drivers/net/wireless/ath/ath10k/txrx.c:86 ath10k_txrx_tx_unref() warn: variable dereferenced before check 'txq' (see line 84) drivers/net/wireless/ath/ath10k/wmi.c:1837 ath10k_wmi_op_gen_mgmt_tx() warn: variable dereferenced before check 'cb->vif' (see line 1825) Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: remove unneccessary WARN_ON_ONCE in rx during ACSMohammed Shafi Shajakhan2016-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The below warning message seems to hit occasionally with the following combination (IPQ4019 + ACS scan) where we receive packets as a self peer when hostapd does ACS when we bring up AP mode . ath10k has the below fall back mechanism to fetch current operating channel in rx (it will check for the next channel tracking variable if the current one is NULL) [scan channel] --> [rx channel] --> [peer channel] --> [vdev channel] --> [any vdev channel] --> [target oper channel] 'scan channel' and 'target operating channel' are directly fetched from firmware events. All the others should be updated by mac80211. During ACS scan we wouldn't have a valid channel context assigned from mac80211 ('ar->rx_channel'), and also relying on ('ar->scan_channel') is not helpful (it becomes NULL when it goes to BSS channel and also when the scan event is completed). In short we cannot always rely on these two channel tracking variables. 'Target Operating Channel' (ar->tgt_oper_chan) seems to keep track of the current operating even while we are doing ACS scan and etc. Hence remove this un-necessary warning message and continue with target_operating channel. At the worst case scenario when the target operating channel is invalid (NULL) we already have an ath10k warning message to notify we really don't have a proper channel configured in rx to update the rx status("no channel configured; ignoring frame(s)!") WARNING: CPU: 0 PID: 0 at ath/ath10k/htt_rx.c:803 [<c0318838>] (warn_slowpath_null) from [<bf4a0104>] (ath10k_htt_rx_h_channel+0xe0/0x1b8 [ath10k_core]) [<bf4a0104>] (ath10k_htt_rx_h_channel [ath10k_core]) from [<bf4a025c>] (ath10k_htt_rx_h_ppdu+0x80/0x288 [ath10k_core]) [<bf4a025c>] (ath10k_htt_rx_h_ppdu [ath10k_core]) from [<bf4a1a9c>] (ath10k_htt_txrx_compl_task+0x724/0x9d4 [ath10k_core]) [<bf4a1a9c>] (ath10k_htt_txrx_compl_task [ath10k_core]) Fixes:3b0499e9ce42 ("ath10k: reduce warning messages during rx without proper channel context") Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: fix crash during card removalMohammed Shafi Shajakhan2016-06-301-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usually when the firmware crashes we check for the value 'FW_IND_EVENT_PENDING' in 'FW_INDICATOR_ADDRESS' and proceed with disabling the irq and dumping firmware 'crash dump'. Now when the PCI card is unplugged from the device the PCI controller seems to generate a spurious interrupt after some time which was as treated a firmware crash and resulting in the below race condition (and eventually crashing the system) ath10k_core_unregister -> ath10k_core_free_board_files ...... device unplug spurious interrupt ......... ath10k_pci_taklet -> ath10k_pci_fw_crashed_dump ...etc Clearly even after the firmware board files related data structure is freed up we are getting a spurious interrupt from PCI with 0xfffffff in the 'FW_INDICATOR_ADDRESS' resulting in scheduling of the pci tasklet and doing a crash dump, printing f/w board related info resulting in the below crash. Fix this by detecting this spurious interrupt in ath10k PCI irq handler itself and return IRQ_NONE. Thanks to Michal Kazior for helping us conclude the most appropriate fix. Call trace: EIP is at ath10k_debug_print_board_info+0x39/0xb0 [ath10k_core] EAX: 00000000 EBX: d4de15a0 ECX: 00000000 EDX: 00000064 ESI: f615ddd0 EDI: f8530000 EBP: f615de3c ESP: f615ddbc DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 CR0: 80050033 CR2: 00000004 CR3: 01c0a000 CR4: 000006f0 Stack: f615ddd0 00000064 f8b4ecdd 00000000 00000000 00412f4e 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Call Trace: [<f8b1f517>] ath10k_print_driver_info+0x17/0x30 [ath10k_core] [<f875463a>] ath10k_pci_fw_crashed_dump+0x7a/0xe0 [ath10k_pci] [<f87549d0>] ath10k_pci_tasklet+0x70/0x90 [ath10k_pci] [<c106151e>] tasklet_action+0x9e/0xb0 Cc: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wlcore: reconfigure sta rates on authorizationGuy Mishol2016-06-292-0/+12
| | | | | | | | | | | | | | | | 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>
* brcmfmac: add missing break when deleting P2P_DEVICERafał Miłecki2016-06-291-0/+2
| | | | | | | | | | 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>
* brcmfmac: include also core.h header in cfg80211.hRafał Miłecki2016-06-291-0/+1
| | | | | | | | | | | | | | | | | 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>
* brcmfmac: use const char * for interface name in brcmf_add_ifRafał Miłecki2016-06-292-2/+2
| | | | | | | | | | | 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>
* brcmfmac: fix lockup when removing P2P interface after event timeoutRafał Miłecki2016-06-294-16/+21
| | | | | | | | | | | | | | | | 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>
* wireless: ipw2200: fix old-style declarationArnd Bergmann2016-06-291-1/+1
| | | | | | | | | | | 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>
* wireless: brcmsmac: fix old-style declarationArnd Bergmann2016-06-291-2/+2
| | | | | | | | | | 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>
* wireless: airo: rename 'register' variableArnd Bergmann2016-06-291-2/+2
| | | | | | | | | | | | | | '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>
* mwifiex: fix AP start problem for newly added interfaceAmitkumar Karwar2016-06-291-0/+8
| | | | | | | | | | | | | 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>
* mwifiex: fix AP unable to start in VHT40 problemAmitkumar Karwar2016-06-292-2/+30
| | | | | | | | | 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>
* mwifiex: fix system hang problem after resumeAmitkumar Karwar2016-06-291-1/+1
| | | | | | | | | | 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>
* mwifiex: cancel pending scan during disconnectXinming Hu2016-06-291-0/+3
| | | | | | | | | | 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>
* mwifiex: factor out mwifiex_cancel_scanXinming Hu2016-06-293-38/+29
| | | | | | | | | 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>
* mwifiex: Fix an issue spotted by KASANGanapathi Bhat2016-06-292-0/+16
| | | | | | | | | | 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>