aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel
AgeCommit message (Collapse)AuthorFilesLines
2019-01-29iwlwifi: mvm: remove sta key on wep apLiad Kaufman1-0/+10
If WEP is used, no one removes the STA key upon STA removal, leading to a situation where after 16 connect/disconnects - the AP could no longer decrypt incoming data frames since iwl_mvm_set_fw_key_idx() called from iwl_mvm_set_sta_key() during association returns STA_KEY_IDX_INVALID, thus not setting the key for that connecting STA. Fix this by removing the key in the driver when the STA is removed. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: make sure cur_fw_img is valid before accessing imgLuca Coelho1-0/+1
Harden the fwrt->fw->img array access by making sure the cur_fw_img value doesn't go out of bounds. Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: calculate pointers from out_cmd instead of out_cmd->hdrLuca Coelho1-2/+2
The out_cmd structure starts with a header, so there's no need to use &out_cmd->hdr, out_cmd alone is enough. We use this when calculating other addresses and klocwork gets confused with that because it thinks we are trying to access hdr (as an array) beyond its size. Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: mvm: pre-initialize alive_data in wait_alive()Luca Coelho1-1/+1
The function we pass to the wait alive notification procedure may may not even get called if the timeout occurs before the function is called. To prevent accessing unitialized data in alive_data, pre-set it to zero in the declaration. Found by static analyzers. Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: move iwl_enable_{rx,tx}_ampdu to iwl-modparams.hJohannes Berg3-40/+23
These inlines just check the module parameters, so they don't need a configuration parameter and can move to a better place. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: make iwl_fw_dbg_start_stop_hcmd() inlineLuca Coelho1-1/+2
This function is supposed to be used as an inline function and is in a header file, so make it inline. Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: mvm: save and export regdb blob from the NVMLuca Coelho3-0/+9
Sometimes we want to debug issues related to the regulatory blob in the NVM. To make that easier, add a debugfs entry to export it together with the other nvm blobs we export. Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: mvm: clean up LDBG config command usageJohannes Berg5-75/+29
Clean up the LDBG config command to not be called "continuous recording", and while at it actually remove the continuous recording implementation completely since it was only used for store & forward architectures. This also fixes a bug at least in iwl_fw_dbg_buffer_allocation() because what's now "__le32 type" (matching the firmware) used to be "__le16 enable_recording", so the buffer allocation config sub-struct would erroneously have started at the wrong offset. In the other cases this didn't actually lead to a bug as other bytes in pad[] were all zeroes, so accessing the 16-bit value as a 32-bit value wouldn't make a difference (in little endian.) Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: pcie: align licensing to dual GPL/BSDJohannes Berg5-19/+192
These files have a long history of code changes, but analysing the remaining code leads to having only a few changes that are not already owned by Intel, notably from - Andy Lutomirski <[email protected]> - Joonwoo Park <[email protected]> - Kirtika Ruchandani <[email protected]> - Rajat Jain <[email protected]> - Stanislaw Gruszka <[email protected]> remaining in the code today. Note that - I myself was working for Intel and for any possibly code that might be before my employment there give permission - Wizery employees were working for Intel More specifically, we identified the following commits that (partially may) remain today: 25c03d8e8c13 Joonwoo Park <[email protected]> ("iwlwifi: do not schedule tasklet when rcv unused irq") f36d04abe684 Stanislaw Gruszka <[email protected]> ("iwlwifi: use dma_alloc_coherent") 387f3381f732 Stanislaw Gruszka <[email protected]> ("iwlwifi: fix dma mappings and skbs leak") 2624e96ce16b Stanislaw Gruszka <[email protected]> ("iwlwifi: fix possible data overwrite in hcmd callback") bfe4b80e9f73 Stanislaw Gruszka <[email protected]> ("iwlwifi: always check if got h/w access before write") d536c32b45d2 Andy Lutomirski <[email protected]> ("iwlwifi: pcie: log when waking the NIC for hcmd submission fails") a6d24fad00d9 Rajat Jain <[email protected]> ("iwlwifi: pcie: dump registers when HW becomes inaccessible") fb12777ab59b Kirtika Ruchandani <[email protected]> ("iwlwifi: Add more call-sites for pcie reg dumper") 3a73a30049f2 Stanislaw Gruszka <[email protected]> ("iwlwifi: cleanup/fix memory barriers") aa5affbacb24 Stanislaw Gruszka <[email protected]> ("iwlwifi: dump stack when fail to gain access to the device") Align the licenses with their permission to clean up and to make it all identical. CC: Joonwoo Park <[email protected]> CC: Stanislaw Gruszka <[email protected]> CC: Andy Lutomirski <[email protected]> CC: Rajat Jain <[email protected]> CC: Kirtika Ruchandani <[email protected]> Acked-by: Johannes Berg <[email protected]> Acked-by: Kirtika Ruchandani <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Acked-by: Joonwoo Park <[email protected]> Acked-by: Rajat Jain <[email protected]> Acked-by: Andy Lutomirski <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: mvm: read IWL_RX_MPDU_PHY_SHORT_PREAMBLE only for CCKJohannes Berg1-1/+2
Due to a general shortage of RX API bits, the firmware is going to reuse this bit on non-CCK frames to mean something else. Use it only on CCK frames to prepare for that change. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: mvm: fix %16 to %016 print formatJohannes Berg2-2/+2
With just %16, it means 16 characters padding, but we really don't want to print "0x 1F4547B", but instead want to have this filled with zeroes, so we need the 0. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: pcie: add prints to track virtual IDSara Sharon1-1/+7
In case there are bugs in this area, this data can help with debugging. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: iwlmvm: in monitor NDP notif take the NSS from rx_vecShaul Triebitz2-5/+17
Take the NSS value from 'rx_vec' rather than from 'rate_n_flags'. The rate_n_flags has only 2 bits for the NSS giving a max of 4SS (0 = 1SS etc.). Since there may be up to 8SS use the rx_vec which has 3 bits for the NSS. While at it, fix the rx_vec array to length of 2. Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: iwlmvm: ignore HE PPDU type regarding EOFShaul Triebitz1-11/+7
When setting the EOF bit in Rx flags (propagated to radiotap) do not depend it on the PPDU type (SU/MU/TB) since it doesn't. Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: pcie: fix the use of a wrong defineSara Sharon1-1/+1
The code checks that we haven't exceeded the maximum number of TBs by comparing to a define of gen1 instead of gen2, fix it. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: fw api: document WoWLAN patterns commandJohannes Berg1-0/+10
Document the WoWLAN patterns command structure. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: fw api: remove unused/deprecated filter statusJohannes Berg1-4/+0
These are unused by both firmware and driver, remove them. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: avoid access out of memory allocatedMordechay Goodstein1-0/+6
The value in num_lmac can be bigger than mem_cfg->lmac array, warn in case it's bigger. Signed-off-by: Mordechay Goodstein <[email protected]> Fixes: 68025d5f9bfe ("iwlwifi: dbg: refactor dump code to improve readability") Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: mvm: avoid possible access out of array.Mordechay Goodstein1-6/+13
The value in txq_id can be out of array scope, validate it before accessing the array. Signed-off-by: Mordechay Goodstein <[email protected]> Fixes: cf961e16620f ("iwlwifi: mvm: support dqa-mode agg on non-shared queue") Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: memcpy from dev_cmd and not dev_cmd->hdrLiad Kaufman2-4/+3
Klocwork complains about copying from dev_cmd->hdr if copying more than 4 bytes since it means part of the copy is from the next field. This isn't a real bug, but for not failing Klocwork next time - fix this. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: tighten boundary checksLiad Kaufman3-6/+26
The driver assumes certain sizes and lengths aren't crossed in some places. Make sure this indeed happens. Found by Klocwork. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: mvm: make num_active_macs unsignedLiad Kaufman1-1/+3
There is no point in having num_active_macs signed since it should never be negative. Set it to be an unsigned variable to ensure this. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: update hcmds documentationLiad Kaufman1-2/+6
A few commands refer to a struct that no longer exists in the mentioned name. Our trace-cmd parsing scripts rely on these mentioned names and can't find them, resulting in these commands not being parsed nicely. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: mvm: Do not set RTS/CTS protection for P2P Device MACIlan Peer1-2/+0
As this is not needed and might cause interoperability issues during pairing with devices that would not reply to RTS frames. Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: mvm: Set Tx rate and flags when there is not stationIlan Peer1-3/+4
When a frame is transmitted without a station, need to set the rate and flags in the Tx command, as the FW does not have any information as to what rate and flags should be used for this frame. Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: mvm: Flush transmit queues on P2P Device ROC doneIlan Peer1-0/+1
When a time event for a P2P Device interface is done, it is possible that there is still a frame pending for transmission that should be flushed. Set the IWL_MVM_STATUS_NEED_FLUSH_P2P to indicate to the ROC worker that P2P Device station queue need also to be flushed. Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: mvm: bring back mvm GSO codeSara Sharon2-2/+223
We have a slightly better TCP performance with GSO. Add it back, it can co-exist with the code that builds AMSDUs in mac80211. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: fix spelling mistake "registrating" -> "registering"Colin Ian King1-1/+1
Trivial fix to spelling mistake in IWL_ERR error message Signed-off-by: Colin Ian King <[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: fix values in the table exampleLuca Coelho1-6/+6
We erroneously had some values for NGI in the table we give as an example in rs_fill_rates_for_column(), when they should be SGI. Change them so that they match what we say. Reported-by: Rémy Grünblatt <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: mvm: support mac80211 AMSDUSara Sharon5-226/+67
Support getting mac80211 building AMSDUs for us. Remove GSO support from mvm - we don't need it anymore. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: mvm: support mac80211 TXQs modelSara Sharon9-443/+331
Move to use the new mac80211 TXQs implementation. This has quite a few benefits for us. We can get rid of the awkward mapping of DQA to mac80211 queues. We can stop buffering traffic while waiting for the queue to be allocated. We can also use mac80211 AMSDUs instead of building it ourselves. The usage is pretty simple: Each ieee80211_txq contains iwl_mvm_txq. There is such a queue for each TID, and one for management frames. We keep having static AP queues for probes and non-bufferable MMPDUs, along with broadcast and multicast queues. Those are being used from the "old" TX invocation path - iwl_mvm_mac_tx. When there is a new frame in a TXQ, iwl_mvm_mac_wake_tx is being called, and either invokes the TX path, or allocates the queue if it does not exist. Most of the TX path is left untouched, although we can consider cleaning it up some more, for example get rid of the duplication of txq_id in both iwl_mvm_txq and iwl_mvm_dqa_txq_info. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: mvm: make NVM access actually fail on failuresJohannes Berg1-3/+7
On any failure, including if we crash the firmware or get garbage data, we currently ignore this and pretend the OTP was empty. Clearly, this isn't typically the case. In cases other than the firmware saying it can't read the requested section, or the section having ended, make the access actually fail and trickle the error up through the layers to fail init. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: wrt: add 22000 device familiy prph dump supportShahar S Matityahu1-37/+131
Add prph dump addresses to support prph dump in 22000 HW. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: pcie: remove suspend/resume workaround for 9000A devicesLuca Coelho1-11/+0
We don't support 9000 A-step devices anymore, so we can remove the suspend/resume workaround. Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: pcie: remove unnecessary iwl_pcie_enable_rx_wake() functionLuca Coelho3-32/+0
This function was only used by 9000 A-step devices, which we don't support anymore, so it can be removed. Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: remove support for 9000 A-step devicesLuca Coelho3-98/+45
We don't support 9000 A-step devices anymore, so we can remove support for loading both the a0/a0 and a0/b0 FWs. Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: mvm: fix firmware statistics usageEmmanuel Grumbach2-15/+10
The new (CDB) statistics API is used by non-CDB devices as well. Look at the right TLV flag to know which version of the statistics notification to use. To avoid confusion, remove the _cdb suffix from the structure name. While at it, remove a structure that was never used. Signed-off-by: Emmanuel Grumbach <[email protected]> Fixes: 678d9b6dddea ("iwlwifi: mvm: update rx statistics cmd api") Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: add new cards for 22560, 9260 and killer seriesIhab Zhaika3-3/+69
add few PCI ID'S for 22560, 9260 and killer series. Signed-off-by: Ihab Zhaika <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: correct one of the PCI struct namesIhab Zhaika4-21/+22
One of the cfg struct names is mistakenly "iwl22000", when it should be "iwl22560". Chage-Id: If9fbfa4bceef81d028c90c98d47115fbe39da547 Signed-off-by: Ihab Zhaika <[email protected]> Fixes: 2f7a3863191a ("iwlwifi: rename the temporary name of A000 to the official 22000") Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: mvm: fix wrong DCM TLC configShaul Triebitz1-6/+1
When configuring TLC DCM flag: 1. check the peer's RX DCM capabilities (since we TX) 2. do not set DCM_NSS_2 since we do not support it Signed-off-by: Shaul Triebitz <[email protected]> Fixes: 423584dd8060 ("iwlwifi: rs-fw: support dcm") Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: pcie: recognize NICs with hw_rev 0x364 correctlyLuca Coelho2-1/+5
Some devices with PCI ID 0x2723, which is supposed to be 22260, are actually not. So we need to differentiate them by checking the hw_rev and change the cfg accordingly. Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: add PCI IDs for the 22260 device seriesLuca Coelho4-1/+55
Add new structs and PCI IDs for 22260 devices. Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: mvm: rely on mac80211 to configure TWT supportEmmanuel Grumbach1-20/+2
Mac80211 will check both the HE Capability IE and the Extended Capability IE, so set the TWT support bit when mac80211 tells us to. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: mvm: advertise support for TWT in the Extended Capability IEEmmanuel Grumbach2-2/+23
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]>
2019-01-25iwlwifi: wrt: add to dump number of lmacs, lmac1 and umac error idShahar S Matityahu5-10/+30
Add to the dump the number of lmacs, the error id of the umac and the error id of lmac1, if supported. In case the reason for the dump trigger is not an assert the error id is zero. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: pcie: make array 'prop' static, shrinks object sizeColin Ian King1-1/+1
Don't populate the array prop on the stack but instead make it static. Makes the object code smaller by 30 bytes: Before: text data bss dec hex filename 80138 15382 576 96096 17760 drivers/net/wireless/intel/iwlwifi/pcie/trans.o After: text data bss dec hex filename 79948 15542 576 96066 17742 drivers/net/wireless/intel/iwlwifi/pcie/trans.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-16iwlwifi: make IWLWIFI depend on CFG80211Luca Coelho1-1/+2
Since IWLWIFI doesn't depend on MAC80211 anymore, it needs to depend on CFG80211, because it uses a few symbols from it. Add the dependency on CFG80211 accordingly. Additionally, make IWLWIFI_LEDS depend on IWLMVM or IWLDVM, since it doesn't need mac80211 but must be used for these. Fixes: aca432f06b8a ("iwlwifi: make MVM and DVM depend on MAC80211") Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-01-08cross-tree: phase out dma_zalloc_coherent()Luis Chamberlain1-24/+15
We already need to zero out memory for dma_alloc_coherent(), as such using dma_zalloc_coherent() is superflous. Phase it out. This change was generated with the following Coccinelle SmPL patch: @ replace_dma_zalloc_coherent @ expression dev, size, data, handle, flags; @@ -dma_zalloc_coherent(dev, size, handle, flags) +dma_alloc_coherent(dev, size, handle, flags) Suggested-by: Christoph Hellwig <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]> [hch: re-ran the script on the latest tree] Signed-off-by: Christoph Hellwig <[email protected]>
2018-12-20Merge tag 'wireless-drivers-next-for-davem-2018-12-20' of ↵David S. Miller45-678/+1305
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.21 Last set of patches for 4.21. mt76 is still in very active development and having some refactoring as well as new features. But also other drivers got few new features and fixes. Major changes: ath10k * add amsdu support for QCA6174 monitor mode * report tx rate using the new ieee80211_tx_rate_update() API * wcn3990 support is not experimental anymore iwlwifi * support for FW version 43 for 9000 and 22000 series brcmfmac * add support for CYW43012 SDIO chipset * add the raw 4354 PCIe device ID for unprogrammed Cypress boards mwifiex * add NL80211_STA_INFO_RX_BITRATE support mt76 * use the same firmware for mt76x2e and mt76x2u * mt76x0e survey support * more unification between mt76x2 and mt76x0 * mt76x0e AP mode support * mt76x0e DFS support * rework and fix tx status handling for mt76x0 and mt76x2 ==================== Signed-off-by: David S. Miller <[email protected]>