aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-01iwlwifi: regulatory: regulatory capabilities api changeGil Adam1-9/+89
Support v2 of regulatory capability flags parsed from the device NVM. New API support is determined by FW lookup of the MCC update command resposnse version, where version 6 supports the new API. Signed-off-by: Gil Adam <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Link: https://lore.kernel.org/r/iwlwifi.20200926002540.3d47f4e8ab98.I0fdd2ce23166c18284d2a7a624c40f35ea81cbc2@changeid Signed-off-by: Luca Coelho <[email protected]>
2020-05-29iwlwifi: set NO_HE if the regulatory domain forbids itHaim Dreyfuss1-0/+5
If the firmware's regulatory domain forbids HE operation, set it in the cfg80211 regdomain. Signed-off-by: Haim Dreyfuss <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Link: https://lore.kernel.org/r/iwlwifi.20200529092401.c3e50c36c628.I991bfa662c0ef35de5be9eaf5b78ef190b67cb56@changeid
2020-05-07Merge tag 'wireless-drivers-next-2020-05-07' of ↵David S. Miller1-2/+1
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.8 First set of patches for v5.8. Changes all over, ath10k apparently seeing most new features this time. rtw88 also had lots of changes due to preparation for new hardware support. In this pull request there's also a new macro to include/linux/iopoll: read_poll_timeout_atomic(). This is needed by rtw88 for atomic polling. Major changes: ath11k * add debugfs file for testing ADDBA and DELBA * add 802.11 encapsulation offload on hardware support * add htt_peer_stats_reset debugfs file ath10k * enable VHT160 and VHT80+80 modes * enable radar detection in secondary segment * sdio: disable TX complete indication to improve throughput * sdio: decrease power consumption * sdio: add HTT TX bundle support to increase throughput * sdio: add rx bitrate reporting ath9k * improvements to AR9002 calibration logic carl9170 * remove buggy P2P_GO support p54usb * add support for AirVasT USB stick rtw88 * add support for antenna configuration ti wlcore * add support for AES_CMAC cipher iwlwifi * support for a few new FW API versions * new hw configs ==================== Signed-off-by: David S. Miller <[email protected]>
2020-04-24iwlwifi: nvm: use iwl_nl80211_band_from_channel_idxTova Mussai1-2/+1
Use iwl_nl80211_band_from_channel_idx in iwl_parse_nvm_mcc_info Signed-off-by: Tova Mussai <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Link: https://lore.kernel.org/r/iwlwifi.20200417131727.a64a018f244e.Ie75ac5bb0f0f524d26944800138855ef2228339a@changeid
2020-04-21iwlwifi: mvm: Do not declare support for ACK Enabled AggregationIlan Peer1-4/+2
As this was not supposed to be enabled to begin with. Cc: [email protected] # v4.19+ Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/iwlwifi.20200417100405.53dbc3c6c36b.Idfe118546b92cc31548b2211472a5303c7de5909@changeid
2020-03-27iwlwifi: pass trans and NVM data to HE capability parsingJohannes Berg1-3/+5
We'll need this data in the future, pass the values. Change-Id: Iaeff50716e783f5c0bcea86ca1c93ada1560525e Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2020-01-27Merge tag 'wireless-drivers-next-2020-01-26' of ↵David S. Miller1-10/+4
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.6 Second set of patches for v5.6. Nothing special standing out, smaller new features and fixes allover. Major changes: ar5523 * add support for SMCWUSBT-G2 USB device iwlwifi * support new versions of the FTM FW APIs * support new version of the beacon template FW API * print some extra information when the driver is loaded rtw88 * support wowlan feature for 8822c * add support for WIPHY_WOWLAN_NET_DETECT brcmfmac * add initial support for monitor mode qtnfmac * add module parameter to enable DFS offloading in firmware * add support for STA HE rates * add support for TWT responder and spatial reuse ==================== Signed-off-by: David S. Miller <[email protected]>
2019-12-24iwlwifi: remove lar_disable module parameterLuca Coelho1-6/+7
This is an old parameter that was used supposed to be used only when LAR was still under development. It should not be used anymore, but, since it's available, end-users have been mangling with it unnecessarily. In some cases it can cause problems because when LAR is supported the driver and the firmware do not expect it to be disabled. Signed-off-by: Luca Coelho <[email protected]>
2019-12-23iwlwifi: remove CSR registers abstractionLuca Coelho1-10/+4
We needed this abstraction for some CSR registers for IWL_DEVICE_22560, but that has been removed, so we don't need the abstraction anymore. Remove it. Signed-off-by: Luca Coelho <[email protected]>
2019-12-23iwlwifi: Don't ignore the cap field upon mcc updateHaim Dreyfuss1-2/+46
When receiving a new MCC driver get all the data about the new country code and its regulatory information. Mistakenly, we ignored the cap field, which includes global regulatory information which should be applies to every channel. Fix it. Signed-off-by: Haim Dreyfuss <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-11-15iwlwifi: nvm: update iwl_uhb_nvm_channelsTova Mussai1-5/+4
Change the UHB channels to start from 1 to match the specs (11ax Draft 5.0). Signed-off-by: Tova Mussai <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-10-25iwlwifi: nvm: create function to convert channel index to nl80211_bandTova Mussai1-9/+17
Create function to convert channel index to nl80211_band and use it. Signed-off-by: Tova Mussai <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-09-06iwlwifi: always access the trans configuration via transLuca Coelho1-9/+8
Stop accessing the trans configuration via the iwl_cfg structure and always access it via the iwl_trans structure. This completes the requirements to disassociate the trans-specific configuration from the rest of the configuration. Signed-off-by: Luca Coelho <[email protected]>
2019-09-06iwlwifi: pass the iwl_trans instead of cfg to some functionsShaul Triebitz1-5/+8
A few functions were receiving the iwl_cfg struct directly, but we will also need other parts of the trans, so pass the trans (which includes the cfg) to them. Signed-off-by: Ido Yariv <[email protected]> Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-09-06iwlwifi: add a pointer to the trans_cfg directly in transLuca Coelho1-5/+5
Add a pointer to the iwl_trans structure and point it to the trans part of the cfg. This is the first step in disassociating the trans configuration from the rest of the configuration. Signed-off-by: Luca Coelho <[email protected]>
2019-09-06iwlwifi: separate elements from cfg that are needed by trans_allocLuca Coelho1-8/+8
In order to be able to select the cfg depending on the HW revision or on the RF ID, we need to set up the trans before selecting the cfg. To do so, move the elements from cfg that are needed by iwl_trans_alloc() to a separate struct at the top of the cfg, so it can be used by other cfg types as well, before selecting the rest of the configuration. Signed-off-by: Luca Coelho <[email protected]>
2019-09-06iwlwifi: allocate bigger nvm data in case of UHBTova Mussai1-1/+5
In case of Ultra-high-band (UHB), need to allocate nvm data structure in size of UHB channels array. Signed-off-by: Tova Mussai <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-09-06iwlwifi: remove unused regdb_ptrs allocationHaim Dreyfuss1-14/+0
regdb_ptrs is not in used anymore, remove it. Signed-off-by: Haim Dreyfuss <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-04-29iwlwifi: Use correct channel_profile iniwl_get_nvmYueHaibing1-1/+1
commit 2785ce008e3b ("iwlwifi: support new NVM response API") seems forgot use correct channel_profile in iwl_get_nvm when call iwl_init_sbands(). Fixes: 2785ce008e3b ("iwlwifi: support new NVM response API") Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-04-03iwlwifi: trust calling functionShaul Triebitz1-6/+1
When initializing or overriding HE band capabilities, no need to check the band validity. Trust the calling function to use a valid band. Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-03-22iwlwifi: remove unnecessary goto out in iwl_parse_nvm_mcc_info()Luca Coelho1-3/+1
This goto out was unnecessary because the out label was immediately below it. Remove it. Signed-off-by: Luca Coelho <[email protected]>
2019-03-22iwlwifi: Use struct_size() in kzallocYueHaibing1-10/+3
Use struct_size() in kzalloc instead of the 'regd_to_copy' Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-03-22iwlwifi: support new NVM response APIShaul Triebitz1-13/+33
Support REGULATORY_NVM_GET_INFO_RSP_API_S_VER_4. This API adds the new 6-7GHz channels. Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-03-22iwlwifi: add support for 6-7 GHz channelsShaul Triebitz1-30/+44
Add UHB (ultra high band) channels and use 16 bit variables to fit the new channels. Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-22Merge tag 'wireless-drivers-next-for-davem-2019-02-22' of ↵David S. Miller1-16/+15
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 5.1 Most likely the last set of patches for 5.1. WPA3 support to ath10k and qtnfmac. FTM support to iwlwifi and ath10k. And of course other new features and bugfixes. wireless-drivers was merged due to dependency in mt76. Major changes: iwlwifi * HE radiotap * FTM (Fine Timing Measurement) initiator and responder implementation * bump supported firmware API to 46 * VHT extended NSS support * new PCI IDs for 9260 and 22000 series ath10k * change QMI interface to support the new (and backwards incompatible) interface from HL3.1 and used in recent HL2.0 branch firmware releases * support WPA3 with WCN3990 * support for mac80211 airtime fairness based on transmit rate estimation, the firmware needs to support WMI_SERVICE_PEER_STATS to enable this * report transmit airtime to mac80211 with firmwares having WMI_SERVICE_REPORT_AIRTIME feature, this to have more accurate airtime fairness based on real transmit time (instead of just estimated from transmit rate) * support Fine Timing Measurement (FTM) responder role * add dynamic VLAN support with firmware having WMI_SERVICE_PER_PACKET_SW_ENCRYPT * switch to use SPDX license identifiers ath * add new country codes for US brcmfmac * support monitor frames with the hardware/ucode header qtnfmac * enable WPA3 SAE and OWE support mt76 * beacon support for USB devices (mesh+ad-hoc only) rtlwifi * convert to use SPDX license identifiers libertas_tf * get the MAC address before registering the device ==================== Signed-off-by: David S. Miller <[email protected]>
2019-02-22Merge remote-tracking branch 'net-next/master' into mac80211-nextJohannes Berg1-5/+2
Merge net-next to resolve a conflict and to get the mac80211 rhashtable fixes so further patches can be applied on top. Signed-off-by: Johannes Berg <[email protected]>
2019-02-22mac80211: update HE IEs to D3.3Liad Kaufman1-37/+21
Update element names and new fields according to D3.3 of the HE spec. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2019-02-20iwlwifi: nvm-parse: advertise IEEE80211_VHT_EXT_NSS_BW_CAPABLE in VHTJohannes Berg1-2/+5
We support this, so we should advertise it. In fact, if we don't, mac80211 will do it for us (as we advertise SUPPORTS_VHT_EXT_NSS_BW to it), but that requires a memory reallocation which is wasteful: ieee80211 phy0: copying sband (band 1) due to VHT EXT NSS BW flag Set the flag here to avoid that. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: nvm-parse: use struct_size() in kzalloc()Gustavo A. R. Silva1-11/+7
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; void *entry[]; }; instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL); This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-14iwlwifi: do not fail on large amount of channelsShaul Triebitz1-3/+3
Until supporting UHB (ultra high band) channels for devices AX210, do not fail if number of channels reported by firmware is greater than NL80211_MAX_SUPP_REG_RULES. The Driver in that case will use only the non-UHB channels. Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: use kmemdup in iwl_parse_nvm_mcc_info()YueHaibing1-3/+1
Use kmemdup rather than duplicating its implementation in iwl_parse_nvm_mcc_info(). Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: mvm: advertise support for TWT in the Extended Capability IEEmmanuel Grumbach1-2/+1
We want to advertise support for TWT in the Extended Capability IE. Since we don't want to set the bits for all the interface types, define an interface specific configuration. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-12-20iwlwifi: mvm: set TWT responder capability bit in 11AX SoftAP modeEmmanuel Grumbach1-1/+2
This is needed to test TWT requester on the client side. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2018-12-20iwlwifi: split HE capabilities between AP and STAShaul Triebitz1-101/+188
HE capabilities differ between AP and STA. Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2018-10-06iwlwifi: nvm: get num of hw addresses from firmwareNaftali Goldstein1-1/+9
With NICs that don't read the NVM directly and instead rely on getting the relevant data from the firmware, the number of reserved MAC addresses was not added to the API. This caused the driver to assume there is only one address which results in all interfaces getting the same address. Update the API to fix this. While at it, fix-up the comments with firmware api names to actually match what we have in the firmware. Fixes: e9e1ba3dbf00 ("iwlwifi: mvm: support getting nvm data from firmware") Signed-off-by: Naftali Goldstein <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-10-02Merge tag 'wireless-drivers-next-for-davem-2018-10-02' of ↵David S. Miller1-5/+0
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.20 First set of new features for 4.20. mt76 driver is going through major refactoring and that's why there are so many mt76 patches. iwlwifi is also under heavy development and smaller changes to other drivers. Also wireless-drivers was merged to fix a conflict between the two trees. Major changes: ath10k * limit available channels via DT ieee80211-freq-limit wil6210 * add 802.11r Fast Roaming support for AP and station modes * add support for channel 4 iwlwifi * new FW API handling * some improvements in the PCI recovery mechanism * enable a new scanning feature; * continued work on HE (mostly radiotap) * TKIP implementation in new devices * work continues for new 22560 hardware mt76 * add support for Alfa AWUS036ACM * lots of refactoring to make it easier to add new hardware support * prepare for adding mt76x0e (pci-e variant) support * add CONFIG_MT76x0E kconfig symbol brcmfmac * add support CYW89342 mini-PCIe device * add 4-way handshake offload detection for FT-802.1X * enable NL80211_EXT_FEATURE_CQM_RSSI_LIST * fix for proper support of 160MHz bandwidth rtl8xxxu * add rtl8188ctv support ==================== Signed-off-by: David S. Miller <[email protected]>
2018-09-05wireless: align to draft 11ax D3.0Shaul Triebitz1-13/+38
Align to new 11ax draft D3.0. Change/add new MAC and PHY capabilities and update drivers' 11ax capabilities and mac80211's debugfs accordingly. Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2018-09-03Merge tag 'mac80211-for-davem-2018-09-03' of ↵David S. Miller1-45/+5
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Here are quite a large number of fixes, notably: * various A-MSDU building fixes (currently only affects mt76) * syzkaller & spectre fixes in hwsim * TXQ vs. teardown fix that was causing crashes * embed WMM info in reg rule, bad code here had been causing crashes * one compilation issue with fix from Arnd (rfkill-gpio includes) * fixes for a race and bad data during/after channel switch * nl80211: a validation fix, attribute type & unit fixes along with other small fixes. ==================== Signed-off-by: David S. Miller <[email protected]>
2018-08-31iwlwifi: remove all occurrences of the FSF address paragraphLuca Coelho1-5/+0
The Free Software Foundation address is superfluous and causes checkpatch to issue a warning when present. Remove all paragraphs with FSF's address to prevent that. Signed-off-by: Luca Coelho <[email protected]>
2018-08-28cfg80211: make wmm_rule part of the reg_rule structureStanislaw Gruszka1-45/+5
Make wmm_rule be part of the reg_rule structure. This simplifies the code a lot at the cost of having bigger memory usage. However in most cases we have only few reg_rule's and when we do have many like in iwlwifi we do not save memory as it allocates a separate wmm_rule for each channel anyway. This also fixes a bug reported in various places where somewhere the pointers were corrupted and we ended up doing a null-dereference. Fixes: 230ebaa189af ("cfg80211: read wmm rules from regulatory database") Signed-off-by: Stanislaw Gruszka <[email protected]> [rephrase commit message slightly] Signed-off-by: Johannes Berg <[email protected]>
2018-07-26iwlwifi: pcie: support 2k rx buffersGolan Ben Ami1-0/+7
The smallest rb size supported today is 4k rx buffers. 22560 devices use 2k rxb's, so allow using 2k buffers. Signed-off-by: Golan Ben Ami <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-07-26iwlwifi: add module parameter to disable 802.11axLuca Coelho1-2/+2
Add a module parameter to disable 802.11ax features in supported devices. This is useful for testing or if there are interoperability issues with some APs. Signed-off-by: Luca Coelho <[email protected]>
2018-07-26iwlwifi: add support for IEEE802.11axLuca Coelho1-0/+103
Add support for the HE in the iwlwifi driver conforming with P802.11ax_D2.0. Signed-off-by: Luca Coelho <[email protected]>
2018-05-30iwlwifi: mvm: remove division by size of sizeof(struct ieee80211_wmm_rule)Colin Ian King1-2/+1
The subtraction of two struct ieee80211_wmm_rule pointers leaves a result that is automatically scaled down by the size of the size of pointed-to type, hence the division by sizeof(struct ieee80211_wmm_rule) is bogus and should be removed. Detected by CoverityScan, CID#1467777 ("Extra sizeof expression") Fixes: 77e30e10ee28 ("iwlwifi: mvm: query regdb for wmm rule if needed") Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-26iwlwifi: support new csr addresses for hw addressGolan Ben Ami1-4/+10
In future devices we use different csr addresses for hw addresses. Update csr addresses to support new and legacy devices. Signed-off-by: Golan Ben Ami <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.gitKalle Valo1-9/+87
To fix a conflict reported by Stephen Rothwell <[email protected]>: Today's linux-next merge of the wireless-drivers-next tree got a conflict in: drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c between commit: 77e30e10ee28 ("iwlwifi: mvm: query regdb for wmm rule if needed") from the wireless-drivers tree and commits: 9c4f7d512740 ("iwlwifi: move all NVM parsing code to the common files") 4c625c564ba2 ("iwlwifi: get rid of fw/nvm.c") from the wireless-drivers-next tree.
2018-04-20iwlwifi: get rid of fw/nvm.cShaul Triebitz1-7/+104
There's already an opmode common file for nvm iwl-nvm-parse.c Move the content of fw/nvm.c to iwl-nvm-parse.c and delete fw/nvm.c. Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: remove upper case letters in sku_capa_band_*_enableLuca Coelho1-3/+3
The sku_capa_band_24GHz_enable and sku_capa_band_52GHz_enable symbols cause checkpatch to complain whenever we use them. To prevent this, convert them to all lower case. Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: use flags to denote modifiers for the channel mapsLuca Coelho1-9/+16
Instead of having a boolean for each modifier we need to handle in the channel maps, create a bitmask with flags that denote each modification. Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: move all NVM parsing code to the common filesShaul Triebitz1-7/+207
Move all the NVM file handling code to iwl-nvm-parse.c where all this stuff belongs. This cleans up the MVM specific code and allows easier reuse by other opmodes if needed. Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>