aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2016-07-08ath10k: fix possible wrong rx_busy time reporting in QCA4019Vasanthakumar Thiagarajan1-1/+2
As hw cycle counters in QCA4019 wraparound independantly in QCA4019 it is possible cycle counter and rx clear counter would wraparound at the same time. Current logic assumes only one of the counters would wraparound at anytime. Fix this by moving 'else' part to another 'if'. Fixes: 8e100354a98 ("ath10k: fix cycle counter wraparound handling for QCA4019") Signed-off-by: Vasanthakumar Thiagarajan <[email protected]> Reviewed-by: Julian Calaby <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08wcn36xx: Silence error about unsupported smd event 188Bjorn Andersson1-0/+2
Sometimes the firmware sends a HAL_DEL_BA_IND, the prima driver silently ignore this message so let's do the same to silence the error message. Cc: Nicolas Dechesne <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08ath9k: Fix beacon configuration for addition/removal of interfacesBenjamin Berg4-126/+165
This patch fixes some issues with interface reconfiguration. It could for example happen that an AP interface in beacon slot 0 was removed leaving an IBSS station in one of the other slots. When this happens the driver never sends out the beacon as it only tries to send a beacon from slot 0. Appart from that the tracking of required changes to the beacon config is relatively complicated and prone to errors. The approach taken here is to solve reconfiguration issues is to reconfigure the beacons when any interface changes. This means that the complexity of deciding whether an interface change may modify the beacon configuration is gone. It also means that the beacon config will be reliably updated when an interface is removed. The issue that a single non-AP interface might not be in beacon slot 0 and wouldn't be send out is solved by moving it into the first slot. The TSF value in hardware is adjusted accordingly so that the timestamp of the beacons stay consistent. Signed-off-by: Benjamin Berg <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08ath9k: Remove some #defined constants to decrease verbosityBenjamin Berg8-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 <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08ath9k: Expose tsf_adjustment in mac80211 tsf getters and setters.Benjamin Berg1-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 <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08ath9k: Use tsf offset helper in ath9k_hw_resetBenjamin Berg1-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 <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08ath9k: Handle channel context in get_/set_/reset_tsfBenjamin Berg1-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 <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08ath9k: Correct TSF adjustment to align the beacon time correctlyBenjamin Berg1-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 <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08ath9k: move all ath9k_platform_data initialization into one functionMartin Blumenstingl1-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 <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08ath9k: remove return value from ath9k_hw_init_macaddrMartin Blumenstingl1-10/+5
ath9k_hw_init_macaddr unconditionally returns 0 in all cases, making the return value unnecessary. Signed-off-by: Martin Blumenstingl <[email protected]> Reviewed-by: Julian Calaby <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08ath9k: ath9k_hw_init_macaddr should not overwrite valid MAC addressesMartin Blumenstingl1-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 <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08ath9k: remove variable which is set but never readMartin Blumenstingl1-3/+0
No functional changes - this only removes a variable which is set but never read. Signed-off-by: Martin Blumenstingl <[email protected]> Reviewed-by: Julian Calaby <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08ath9k: Allow configuration of LED polarity in platform data.Martin Blumenstingl1-0/+3
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 <[email protected]> Signed-off-by: Martin Blumenstingl <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08wcn36xx: Fix up wcn36xx_smd_update_scan_params()Bjorn Andersson3-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 <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08wcn36xx: Correct DXE chip version differentiationBjorn Andersson4-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 <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08wcn36xx: Split mmio space into explicit regionsBjorn Andersson4-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 <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08wcn36xx: Change indication list lock to spinlockBjorn Andersson2-7/+7
In preparation for handling incoming messages from IRQ context, change the indication list lock to a spinlock Signed-off-by: Bjorn Andersson <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08wcn36xx: Fold indication payload into message headerBjorn Andersson2-10/+7
Merge the two allocation instead of separately allocating room for the indication payload. Signed-off-by: Bjorn Andersson <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtlwifi: rtl8723ae: Clean up the hardware info routineLarry Finger1-114/+117
This driver contains some complicated if ... else if ... else constructions. These are replaced by switch statements to improve readability. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtlwifi: rtl8192de: Convert driver to use common hardware info routineLarry Finger1-62/+15
The driver for RTL8192DE chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtlwifi: rtl8821ae: Convert driver to use common hardware info routineLarry Finger1-73/+11
The driver for RTL8821AE chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtlwifi: rtl8723be: Convert driver to use common hardware info routineLarry Finger1-62/+12
The driver for RTL8723BE chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtlwifi: rtl8723ae: Convert driver to use common hardware info routineLarry Finger1-65/+11
The driver for RTL8723AE chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtlwifi: rtl8192ee: Convert driver to use common hardware info routineLarry Finger1-61/+12
The driver for RTL8192EE chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtlwifi: rtl8188ee: Convert driver to use common hardware info routineLarry Finger1-63/+13
The driver for RTL8188EE chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtlwifi: rtl8192cu: Convert driver to use common hardware info routineLarry Finger1-46/+15
The driver for RTL8192CU chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtlwifi: rtl8192ce: Convert driver to use common hardware info routineLarry Finger1-71/+12
The driver for RTL8192CE chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtlwifi: Create common routine to get hardware infoLarry Finger2-0/+80
All of the rtlwifi family of drivers have a similar routine that acquires the hardware info from efuse and initializes a number of variables in the driver's private area. A common routine is created for all drivers to use. Reported-by: Arnd Bergmann <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08mwifiex: fix interrupt processing corner case in MSI modeShengzhen Li1-4/+46
As interrupt is read in interrupt handler as well as interrupt processing thread, we observed a corner case issue for MSI in which interrupt gets processed twice. This patch moves interrupt reading code for MSI mode from mwifiex_interrupt_status() to mwifiex_pcie_process_int() to avoid the issue. Signed-off-by: Shengzhen Li <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08mwifiex: mask PCIe interrupts before removalBrian Norris1-0/+6
The PCIe driver didn't mask the host interrupts before trying to tear down. This causes lockups at reboot or rmmod when using MSI-X on 8997, since the MSI handler gets confused and locks up the system. Also tested on 8897, which does not support MSI-X (and wasn't experiencing this same bug). No regressions seen there. Signed-off-by: Brian Norris <[email protected]> Tested-by: Douglas Anderson <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08mwifiex: Change default firmware for PCIe8997 chipsetAmitkumar Karwar2-8/+8
PCIe-USB8997 variant is being used in the product. Let's change default firmware from PCIe-UART to PCIe-USB. So by default PCIe-USB firmware would be downloaded if version register doesn't give any information. Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08mwifiex: Fix endianness for event TLV type TLV_BTCOEX_WL_SCANTIMEPrasun Maiti2-4/+4
The two members min_scan_time and max_scan_time of structure "mwifiex_ie_types_btcoex_scan_time" are of two bytes each. The values are assigned directtly from firmware without endian conversion handling. So, wrong datas will get saved in big-endian systems. This patch converts the values into cpu's byte order before assigning them into the local members. Signed-off-by: Prasun Maiti <[email protected]> Acked-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08brcmfmac: support removing AP interfaces with "interface_remove"Rafał Miłecki1-1/+38
New firmwares (e.g. 10.10.69.36 for BCM4366) support "interface_remove" for removing interfaces. Try to use this method on cfg80211 request. In case of older firmwares (e.g. 7.35.177.56 for BCM43602 as I tested) this will just result in firmware rejecting command and this won't change any behavior. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08brcmfmac: delete interface directly in code that sent fw requestRafał Miłecki2-4/+9
So far when receiving event about in-firmware-interface removal our event worker was notifying listener and afterwards it was removing Linux interface. First of all it was resulting in slightly unexpected order. The listener (del_virtual_intf callback) was (usually) returning with success before we even called unregister_netdev(ice). Please note this couldn't be simply fixed by changing order of calls in brcmf_fweh_handle_if_event as unregistering interface earlier could free struct brcmf_if. Another problem of current implementation are possible lockups. Focus on the time slot between calling event handler and removing Linux interface. During that time original caller may leave (unlocking rtnl semaphore) *and* another call to the same code may be done (locking it again). If that happens our event handler will stuck at removing Linux interface, it won't handle another event and will block process holding rtnl lock. This can be simply solved by unregistering interface in a proper callback, right after receiving confirmation event from firmware. This only required modifying worker to don't unregister on its own if there is someone waiting for the event. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08mwifiex: fix scan_block flag handlingAmitkumar Karwar1-0/+6
scan_block flag is used to block scan operation when 4 way handshake is in progress. Sometimes it doesn't get cleared due to incomplete association. An example is assoc request/response is done, but add key operation get canceled in some corner cases. As a result, further association/scan operations are blocked. This patch fixes the problem by clearing scan_block flag. Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Xinming Hu <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtlwifi: Fix typo in printkMasanari Iida7-7/+7
This patch fix spelling typos found in drivers/net/wireless/realtek. Signed-off-by: Masanari Iida <[email protected]> Reviewed-by: Julian Calaby <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtl8xxxu: gen1: Add module parameters to adjust DMA aggregation parametersJes Sorensen1-0/+28
This allows the user to specify DMA aggregation timout and block count. Blocks are presumably always 512 bytes, so the minimum block count is 6 for 802.11 packets. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtl8xxxu: gen1: Set aggregation timeout (REG_RXDMA_AGG_PG_TH + 1) as wellJes Sorensen1-2/+9
gen2 chips as well as 8188eu seems to use this register for setting DMA timeout threshold values, however the 8192cu is using REG_USB_DMA_AGG_TO. Set both to be on the safe side. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtl8xxxu: Make DMA aggregation optional by setting a module parameterJes Sorensen1-2/+9
Let the default to off until we have more data on the right default tuning values. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtl8xxxu: Enable aggregation for rtl8192cu/rtl8188cu/rtl8188ruJes Sorensen1-0/+2
This enables aggregation on rtl8192cu and derivative parts. This uses the same parameters as for rtl8723au. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtl8xxxu: Enable aggregation for rtl8723auJes Sorensen3-0/+37
Implement rtl8xxxu_gen1_init_aggregation(). Aggregation should be the same for all gen1 parts. We may want to allow for tuning parameters in the fileopes struct. For now this is based allocating 16KB RX buffers, leaving 16000 bytes for actual packets, and the rest for the skb overhead. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtl8xxxu: Adjust RX skb size to include space for phystatsJes Sorensen1-3/+4
The old allocation didn't leave space for phystats in the buffer, allowing the packet to be rejected if a frame size of size IEEE80211_MAX_FRAME_LEN was received. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtl8xxxu: Allocate larger RX skbs when aggregation is enabledJes Sorensen2-4/+11
This adds support for allocating larger skbs for devices which indicate they support it. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtl8xxxu: Add support for aggregated RX packets on gen1 partsJes Sorensen1-34/+69
This implements support for demuxing aggregated RX packets on gen1 devices, using the rxdesc16 format. So far this has only been tested with rtl8723au devices. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtl8xxxu: Correct rxdesc16 definitionJes Sorensen1-2/+4
This corrects the definition of rxdesc16 to correctly specify pkt_cnt for aggregated packets. This is based on the code of the vendor rtl8723au driver, as opposed to the struct definitions they use. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtl8xxxu: Obtain ieee80211_rx_status within parse_rx_desc()Jes Sorensen2-12/+8
When handling aggregated packets, we'll get a new ieee80211_rx_status for each cloned skb, so passing in the pointer from the outside doesn't make sense. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtl8xxxu: Move skb delivery into parse_tx_desc() handlerJes Sorensen1-54/+50
This is another prepatory patch to be able to handle aggregated RX packets. In order to avoid adding a prototype, this also moves the rtl8723bu_handle_c2h() function. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08rtl8xxxu: Set all ieee80211_rx_status values in parse_rx_desc()Jes Sorensen1-5/+12
This needs to be handled locally in the parse_rx_desc() function in order to be able to handle aggregated packets in the future. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08wlcore: time sync : add support for 64 bit clockMachani, Yaniv2-15/+30
Changed the configuration to support 64bit instead of 32bit this in order to offload the driver from handling a wraparound. Signed-off-by: Yaniv Machani <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-08mwifiex: fix NULL pointer dereference during suspendAmitkumar Karwar3-10/+13
This patch fixes below NULL pointer dereference observed in suspend stress test. When scan is cancelled during system suspend, we may end up aceesing "priv->scan_request" in corner case. [ 3035.304682] BUG: KASAN: null-ptr-deref on address 0000000000000008 [ 3035.304704] Read of size 4 by task ksdioirqd/mmc2/1183 [ 3035.304744] CPU: 0 PID: 1183 Comm: ksdioirqd/mmc2 Tainted: G W 3.18.0 #1169 [ 3035.304772] Call trace: [ 3035.304825] [<ffffffc00020a520>] dump_backtrace+0x0/0x190 [ 3035.304864] [<ffffffc00020a6cc>] show_stack+0x1c/0x28 [ 3035.304901] [<ffffffc000b36db8>] dump_stack+0xa0/0xf8 [ 3035.304940] [<ffffffc00039c494>] kasan_report+0x120/0x4fc [ 3035.304975] [<ffffffc00039b6b4>] __asan_load4+0x20/0x80 [ 3035.305546] [<ffffffbffc1f5aec>] mwifiex_check_next_scan_command+0x1a4/0x588 [mwifiex] [ 3035.306091] [<ffffffbffc1f7aec>] mwifiex_handle_event_ext_scan_report+0x304/0x370 [mwifiex] [ 3035.306735] [<ffffffbffc206bb8>] mwifiex_process_sta_event+0x6c0/0xf10 [mwifiex] [ 3035.307200] [<ffffffbffc1e609c>] mwifiex_process_event+0x2f4/0x358 [mwifiex] [ 3035.307612] [<ffffffbffc1e25c8>] mwifiex_main_process+0x3cc/0x80c [mwifiex] [ 3035.307737] [<ffffffbffc2523a0>] mwifiex_sdio_interrupt+0x198/0x1c0 [mwifiex_sdio] [ 3035.307785] [<ffffffc0008d9250>] process_sdio_pending_irqs+0x15c/0x1d4 [ 3035.307826] [<ffffffc0008d93f0>] sdio_irq_thread+0xd8/0x288 Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>