aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2019-02-07ath10k: Handle bundled tx completion for management framesRakesh Pillai5-0/+107
WCN3990 supports sending tx completion for multiple management frames bundled together in a single event. Add support to handle the bundled tx completion event for WCN3990. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Signed-off-by: Rakesh Pillai <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-07ath10k: update HOST capability qmi messageGovind Singh2-6/+257
HOST capability interface data structures are updated in HL3.1 fw version. Update the qmi host capability members for compatibility across different firmware versions. Since this change breaks backward compatibility with HL2.0 fw, HL2.0 fw upgrade to WLAN.HL.2.0-01617-QCAHLSWMTPLZ-1 or later version is required. Testing: Tested on QCS404 platform(WCN3990 HW). Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1, WLAN.HL.2.0-01617-QCAHLSWMTPLZ-1 Signed-off-by: Kalle Valo <[email protected]>
2019-02-07Merge tag 'iwlwifi-next-for-kalle-2019-02-04' of ↵Kalle Valo44-652/+1158
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Third batch of iwlwifi patches intended for v5.1 * Work on the new debugging infrastructure continues; * HE radiotap; * Support for new FW version 44; * A couple of new FW API changes; * A bunch of fixes for static analyzer reported issues; * General bugfixes; * Other cleanups and small fixes;
2019-02-06Merge tag 'wireless-drivers-next-for-davem-2019-02-06' of ↵David S. Miller177-3876/+4061
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 5.1 First set of patches for 5.1. Lots of new features in various drivers but nothing really special standing out. Major changes: brcmfmac * DMI nvram filename quirk for PoV TAB-P1006W-232 tablet rsi * support for hardware scan offload iwlwifi * support for Target Wakeup Time (TWT) -- a feature that allows the AP to specify when individual stations can access the medium * support for mac80211 AMSDU handling * some new PCI IDs * relicense the pcie submodule to dual GPL/BSD * reworked the TOF/CSI (channel estimation matrix) implementation * Some product name updates in the human-readable strings mt76 * energy detect regulatory compliance fixes * preparation for MT7603 support * channel switch announcement support mwifiex * support for sd8977 chipset qtnfmac * support for 4addr mode * convert to SPDX license identifiers ==================== Signed-off-by: David S. Miller <[email protected]>
2019-02-05mac80211_hwsim: Support boottime in scan resultsJouni Malinen1-2/+4
This makes the age information for cfg80211 scan results more accurate and fixes issues with wpa_supplicant dropping "old" scan results (e.g., "wlan0: Own scan request started a scan in 0.000456 seconds") that looked like would have been received before a scan started due to the inaccuracy of the default timing mechanism for calculating the BSS entry age. This makes hwsim test cases significantly more robust to run. Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2019-02-04Merge tag 'wireless-drivers-for-davem-2019-02-04' of ↵David S. Miller6-37/+35
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 5.0 First set of small, but importnat, fixes for 5.0. iwlwifi * fix a build regression introduced in 5.0-rc1 wlcore * fix a firmware regression from v4.18-rc1 mt76x0 * fix for configuring tx power from user space ath10k * fix wcn3990 regression from v4.20-rc1 ==================== Signed-off-by: David S. Miller <[email protected]>
2019-02-04ath9k: eeprom: Use scnprintf instead of snprintfKees Cook1-6/+6
Change snprintf to scnprintf. There are generally two cases where using snprintf causes problems. 1) Uses of size += snprintf(buf, SIZE - size, fmt, ...) In this case, if snprintf would have written more characters than what the buffer size (SIZE) is, then size will end up larger than SIZE. In later uses of snprintf, SIZE - size will result in a negative number, leading to problems. Note that size might already be too large by using size = snprintf before the code reaches a case of size += snprintf. 2) If size is ultimately used as a length parameter for a copy back to user space, then it will potentially allow for a buffer overflow and information disclosure when size is greater than SIZE. When the size is used to index the buffer directly, we can have memory corruption. This also means when size = snprintf... is used, it may also cause problems since size may become large. Copying to userspace is mitigated by the HARDENED_USERCOPY kernel configuration. The solution to these issues is to use scnprintf which returns the number of characters actually written to the buffer, so the size variable will never exceed SIZE. Cc: Willy Tarreau <[email protected]> Cc: Silvio Cesare <[email protected]> Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-04ath10k: Add support for extended HTT aggr msg supportGovind Singh3-1/+61
HTT aggr message parameter in HL2.0 fw are different in comparison to legacy fw version. Fill correct HTT aggr msg parameter for targets using HL2.0 firmware. Signed-off-by: Govind Singh <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-04ath10k: fix S5 power consumption issue for QCA9377Yu Wang1-1/+1
After system entering S5 (shut down but system still providing power to QCA9377) on Ubuntu platform, power consumption of QCA9377 is 69mA, which is too high. The root cause is pci_soft_reset is not set for QCA9377 during pci probe. To fix this issue, set 'pci_soft_reset' to 'th10k_pci_warm_reset', and then the power consumption drops to a normal value(10mA). Verified on Dell Ubuntu platform with firmware: WLAN.TF.1.0-00002-QCATFSWPZ-5 Signed-off-by: Yu Wang <[email protected]> Signed-off-by: Yu Wang <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-04ath10k: Set DMA address mask to 35 bit for WCN3990Rakesh Pillai6-25/+84
WCN3990 is a 37-bit target but can address memory range only upto 35 bits. The 36th bit is used to control the smmu/iommu translation and the 37th bit is used by the internal bus masters to access the wifi subsystem internal SRAM. With the DMA mask set to 37i-bit, the host driver can get 37-bit dma address, which leads to incorrect address access in the target. Hence the host driver can used addresses upto 35-bit for WCN3990. Fix the dma mask for wcn3990 to 35-bit, instead of 37-bit. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Tested-by: Bjorn Andersson <[email protected]> Signed-off-by: Rakesh Pillai <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-04iwlwifi: implement BISR HW workaround for 22260 devicesJohannes Berg3-1/+16
There's a small hardware bug in 22260 devices which thus require a few more delays during initialization. Implement this workaround. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: fix RFH config command with >=10 CPUsJohannes Berg1-6/+14
If we have >=10 (logical) CPUs, our command size exceeds the internal buffer size and the command fails; fix that by using IWL_HCMD_DFL_NOCOPY for the command that's allocated anyway. While at it, also fix the leak of cmd, and use struct_size() to calculate its size. Signed-off-by: Johannes Berg <[email protected]> Fixes: 8edbfaa19835 ("iwlwifi: mvm: configure multi RX queue") Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: refactor NIC init sequenceJohannes Berg6-122/+66
The typical sequence of setting INIT_DONE and then waiting for clock stabilisation is going to need a new workarounds, so first of all refactor it. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: fix send hcmd timeout recovery flowShahar S Matityahu5-10/+35
Both iwl_trans_fw_error and iwl_force_nmi initiate async recovery flow. Calling them both is redundant and causing a race. Solve this by removing the call to iwl_trans_fw_error. Signed-off-by: Shahar S Matityahu <[email protected]> Fixes: cfadc3ffccd5 ("iwlwifi: pcie: stop the firmware when we restart it") Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: dbg_ini: implement paging memory dumpShahar S Matityahu5-38/+125
Implement paging memory dump in the new dump mechanism. To support this change, moved iwl_self_init_dram strcut from trans_pcie to trans so that it will accessible via fw_runtime. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: dbg_ini: implement device internal memory dumpShahar S Matityahu2-55/+21
Implement device internal memory dump in the new dump mechanism. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: dbg_ini: implement csr memory dumpShahar S Matityahu1-31/+25
Implement csr memory dump in the new dump mechanism. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: dbg_ini: create new dump flow and implement prph dumpShahar S Matityahu3-39/+163
Create a skeleton to unite all memory dumps in ini mode. Implement prph dump with the new skeleton. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: dbg_ini: align struct iwl_fw_ini_region_cfg to the FWShahar S Matityahu2-21/+60
New fields were added to struct iwl_fw_ini_region_cfg. add those field and apply the changes the result from this change offset field is used to differentiate between the different LMACs and any memory access to the region addresses should be base_addr + offset. A fifo struct is to hold the meta data needed for fifo regions Also move range_data_size and num_of_ranges into a struct under the union to be aligned to the struct in the FW. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: fix RSS config commandSara Sharon1-6/+6
The hash mask is a bitmap, so we should use BIT() on the enum values. Signed-off-by: Sara Sharon <[email protected]> Fixes: 43413a975d06 ("iwlwifi: mvm: support rss queues configuration command") Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: support absolute thresholds in bf configurationAvigail Grinstein3-2/+32
Update iwl_beacon_filter_cmd to support BEACON_FILTER_CONFIG_API_S_VER_4. Currently driver configs them to be zero (i.e. disable them, so no change is applied). Signed-off-by: Avigail Grinstein <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: don't hide HE radiotap data in SKBJohannes Berg1-11/+36
Hiding the HE radiotap data for further processing of the SKB just caused another bug when adding the L-SIG data. Simply stop doing this and adjust the skb->data pointer accordingly when we need to get the 802.11 header. While at it, also verify and fix the data alignment, we need to add 2 bytes padding with the vendor data to ensure the whole length of all radiotap headers is a multiple of 4. Signed-off-by: Johannes Berg <[email protected]> Fixes: 6721039d5b8a ("iwlwifi: mvm: add L-SIG length to radiotap") Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: add description to second BAD_COMMAND assert numberNaftali Goldstein1-0/+1
Depending on exactly what happens in the FW, an invalid host-command could result in either assert 0x38 or 0x39. Add 0x39 to the assert-name table. Signed-off-by: Naftali Goldstein <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: move config structs to C fileJohannes Berg2-29/+34
Even if they're static const, there's no need to duplicate the structs every time they're included and used. Move them to an appropriate C file instead. Also remove useless parentheses along the way. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: add HE TB PPDU SIG-A BW to radiotapJohannes Berg1-6/+15
Expose the trigger-based PPDU SIG-A bandwidth to radiotap in the newly defined bits thereof. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: dbg_ini: remove redundant dram buffer allocationShahar S Matityahu4-48/+85
There are several flows in that can cause redundant allocation. In case the driver reaches the maximum amount of blocks allowed, it allocates the buffer and only then checks if it reached the maximum amount of blocks and return without freeing the buffer, causing a memory leak. Solve this by moving the check of the amount of buffers being used before the allocation. In case there was an assert, the apply points are being reused, causing that for each assert, the driver allocates a new redundant buffer. Solve this by adding a new is_alloc field to indicate if the driver already allocated memory for the requested buffer. Also, split iwl_fw_dbg_buffer_allocation function into iwl_fw_dbg_buffer_allocation and iwl_fw_dbg_buffer_apply to increase the clearity of the flow. Signed-off-by: Shahar S Matityahu <[email protected]> Fixes: d47902f9f71d ("iwlwifi: dbg: add apply point logic") Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: dvm: use %u for sscanf() into unsigned variableJohannes Berg1-1/+2
Use %u instead of using %d which looks signed but then won't get signed output if using an unsigned variable. It doesn't matter much, but be consistent. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: config mac ctxt to HE before TLCLiad Kaufman2-2/+5
If we have a station connecting HE, make sure that the MAC ctxt is updated with indication of this before setting the TLC rates via the TLC manager command. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: add tlc command name to outputLiad Kaufman1-0/+1
Instead of having the command appear as "UNKNOWN" in the dmesg, add the name to it. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: remove redundant conditionJohannes Berg1-5/+3
In iwl_mvm_sta_alloc_queue_tvqm(), we know that we have a station, so no need to check it. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: limit AMSDU size to 8KSara Sharon1-1/+6
Typically, when not in HE mode, we will not perform well with AMSDUs bigger than 8K. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: fix AP mode in WEPEmmanuel Grumbach3-63/+102
Recently we started to send the WEP keys to the firmware so that we could use hardware Tx encryption also on newer devices that require the keys to be installed in the firmware for encryption (as opposed to older devices that can get the key in the Tx command for each Tx). When we implemented that, we forgot to remove the key when we remove a station leading to a situation where a station that connects and disconnects a lot of times exhausts the key database inside the firmware. A fix was made for that, but we always removed the same key: mvmvif->ap_wep_key which means that we removed the same key entry in the firmware. This can make sense since in WEP, the key is the same for all the stations, but the internal implementation of iwl_mvm_set_sta_key and iwl_mvm_remove_sta_key assumes that each station uses a different key in the firmware's key database. So now we got to the situation where we have a single ieee80211_key_conf instance that means, a single ieee80211_key_conf.hw_key_idx index for several stations and hence for several keys. ieee80211_key_conf.hw_key_idx is set to 0 when the first station associates, and then it is overwritten to 1 when the second station associates which is a buggy of course. This led to the following message upon the removal of the second station: iwlwifi 0000:00:03.0: offset 1 not used in fw key table. WARNING: CPU: 2 PID: 27883 at net/mac80211/sta_info.c:1122 __sta_info_destroy_part2+0x16b/0x180 [mac80211] RIP: 0010:__sta_info_destroy_part2+0x16b/0x180 [mac80211] Call Trace: __sta_info_destroy+0x2a/0x40 [mac80211] sta_info_destroy_addr_bss+0x38/0x60 [mac80211] ieee80211_del_station+0x1d/0x30 [mac80211] nl80211_del_station+0xe0/0x1f0 [cfg80211] Fix this by copying the ieee80211_key_conf structure for each and every station. This is the easiest way to properly remove the keys with the right index. Another solution would have been to allow several stations to use the same key offset in the firmware. That would require to change the way we track keys in iwlmvm and not really worth it. Also, maintain correctly fw_key_table when we add a key for the multicast station. Remove the key when we remove the multicast station. Signed-off-by: Emmanuel Grumbach <[email protected]> Fixes: 337bfc9881a2 ("iwlwifi: mvm: set wep key for all stations in soft ap mode") Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: add fall through comments where neededLuca Coelho6-5/+10
Some switch-cases were missing a fall through comment, so the compiler may warn. Fix that by adding the comments where needed. In other cases there was more text in the comment, which the compiler doesn't recognize, so either remove the extra text or move it to a separate comment line as appropriate. Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: dvm: fix some fall through warningsLuca Coelho2-3/+6
Some case statements were missing a comment about falling through or had more text than the compiler can recognize. Fix that. Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: dbg_ini: update ini structs meta docShahar S Matityahu1-11/+11
Align the documentation of the structs with the latest version in the FW. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: Fix pre operational dumping flowsShahar S Matityahu8-49/+81
There are several dumping flows in the driver in case of a fail prior to operational. In some cases we get 2 dumps while in others we get none. Fix this by uniting the different flows. Add a different dump type to driver triggered dumps in case we want a dump but did not got assert, and make all dumping go through iwl_fw_dbg_collect_desc to avoid multiple dumps. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: remove duplicated include from ops.cYueHaibing1-1/+0
Remove duplicated include. Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: support new format for the beacon notificationEmmanuel Grumbach4-14/+48
The firmware is changing the format of the beacon notification to remove the dependency on the Tx response format. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: dbg_ini: update max region id num to support 64 regionsShahar S Matityahu1-1/+1
The driver should support 64 region ids. Update IWL_FW_INI_MAX_REGION_ID accordingly. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: dbg_ini: update ini triggers enumShahar S Matityahu1-46/+46
Align the triggers enum in the driver to the one in the FW. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: differentiate between alive timeout and alive flow failureShahar S Matityahu6-21/+24
There are two cases that can cause the alive flow to fail, an assert or a timeout. Currently we mask any incoming asserts when we wait for alive. Solve this by differentiating between the two cases: 1. Let the regular error handling to handle a received assert 2. Do a dump collection in the case of a timeout Signed-off-by: Shahar S Matityahu <[email protected]> Fixes: f38efdb29389 ("iwlwifi: add dump collection in case alive flow fails") Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: support CHANNEL_SWITCH_TIME_EVENT_CMD commandSara Sharon5-40/+119
When we do channel switch, we used to schedule time events ourselves. This was offloaded to FW. Support the new command and flow. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: mvm: simplify some return conditionsSara Sharon3-14/+7
Simplify some return conditions found by running a semantic patch to detect unnecessary assignments to local variables. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: fix bad dma handling in page_mem dumping flowShahar S Matityahu2-4/+3
Prior to gen2 we allocate the paging memory via alloc_pages which requires passing ownership on the memory between the cpu and the device using dma_sync_single_for_cpu and dma_sync_single_for_device. Add missing dma_sync_single_for_device in iwl_dump_paging after copying the memory. since gen2, we allocate the paging memory using dma_alloc_coherent which does not need passing ownership between the cpu and device. Remove unneeded call to dma_sync_single_for_cpu in iwl_trans_pcie_dump_data prior to copying the memory. Signed-off-by: Shahar S Matityahu <[email protected]> Fixes: 5538409ba393 ("iwlwifi: pcie: support page dumping in wrt in gen2") Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: dbg_ini: give better naming to region struct fieldsShahar S Matityahu2-15/+18
Some of the region struct fields have misleading naming change those fields to have an informative naming Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: dbg_ini: fix iwl_fw_ini_buffer_location field enum bad namingShahar S Matityahu1-1/+1
change IWL_FW_INI_LOCATION_SRAM_INVALID into IWL_FW_INI_LOCATION_INVALID Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi dbg_ini: update ini structs docShahar S Matityahu1-5/+5
update ini struct documentation to the structs being used in the FW Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-04iwlwifi: bump FW API to 44 for 9000 and 22000 seriesLuca Coelho2-2/+2
Start supporting API version 44 where applicable. Signed-off-by: Luca Coelho <[email protected]>
2019-02-01wireless: prefix header search paths with $(srctree)/Masahiro Yamada7-12/+10
Currently, the Kbuild core manipulates header search paths in a crazy way [1]. To fix this mess, I want all Makefiles to add explicit $(srctree)/ to the search paths in the srctree. Some Makefiles are already written in that way, but not all. The goal of this work is to make the notation consistent, and finally get rid of the gross hacks. Having whitespaces after -I does not matter since commit 48f6e3cf5bc6 ("kbuild: do not drop -I without parameter"). I also removed one header search path in: drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile I was able to compile without it. [1]: https://patchwork.kernel.org/patch/9632347/ Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01mt7601u: do not use WARN_ON in the datapathLorenzo Bianconi1-3/+3
Substitute WARN_ON with WARN_ON_ONCE in mt7601u_rx_next_seg_len routine Signed-off-by: Lorenzo Bianconi <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Signed-off-by: Kalle Valo <[email protected]>