aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/wireless (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-02-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netDavid S. Miller1-1/+1
2021-02-15b43: N-PHY: Fix the update of coef for the PHY revision >= 3caseColin Ian King1-1/+1
The documentation for the PHY update [1] states: Loop 4 times with index i If PHY Revision >= 3 Copy table[i] to coef[i] Otherwise Set coef[i] to 0 the copy of the table to coef is currently implemented the wrong way around, table is being updated from uninitialized values in coeff. Fix this by swapping the assignment around. [1] https://bcm-v4.sipsolutions.net/802.11/PHY/N/RestoreCal/ Fixes: 2f258b74d13c ("b43: N-PHY: implement restoring general configuration") Addresses-Coverity: ("Uninitialized scalar variable") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-02-12Merge tag 'wireless-drivers-next-2021-02-12' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-nextDavid S. Miller223-5973/+33644
Kalle Valo says: ==================== wireless-drivers-next patches for v5.12 Second set of patches for v5.12. Last time there was a smaller pull request so unsurprisingly this time we have a big one. mt76 has new hardware support and lots of new features, iwlwifi getting new features and rtw88 got NAPI support. And the usual cleanups and fixes all over. Major changes: ath10k * support setting SAR limits via nl80211 rtw88 * support 8821 RFE type2 devices * NAPI support iwlwifi * add new FW API support * support for new So devices * support for RF interference mitigation (RFI) * support for PNVM (Platform Non-Volatile Memory, a firmware data file) from BIOS mt76 * add new mt7921e driver * 802.11 encap offload support * support for multiple pcie gen1 host interfaces on 7915 * 7915 testmode support * 7915 txbf support brcmfmac * support for CQM RSSI notifications wil6210 * support for extended DMG MCS 12.1 rate ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2021-02-12rtw88: 8822c: update RF_B (2/2) parameter tables to v60Po-Hao Huang1-852/+4780
Update RTL8822C devices' RF_A tables to v60. The new parameters fix incorrect RSSI report under 2.4G link. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210209070755.23019-9-pkshih@realtek.com
2021-02-12rtw88: 8822c: update RF_B (1/2) parameter tables to v60Po-Hao Huang1-11/+3775
Update RTL8822C devices' RF_B tables to v60. The new parameters fix incorrect RSSI report under 2.4G link. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210209070755.23019-8-pkshih@realtek.com
2021-02-12rtw88: 8822c: update RF_A parameter tables to v60Po-Hao Huang1-68/+7904
Update RTL8822C devices' RF_A tables to v60. The new parameters fix incorrect RSSI report under 2.4G link. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210209070755.23019-7-pkshih@realtek.com
2021-02-12rtw88: 8822c: update MAC/BB parameter tables to v60Po-Hao Huang1-371/+886
Update RTL8822C devices' MAC/BB tables to v60. The new parameters fix incorrect RSSI report under 2.4G link. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210209070755.23019-6-pkshih@realtek.com
2021-02-12rtw88: replace tx tasklet with work queuePo-Hao Huang5-7/+10
Replace tasklet so we can do tx scheduling in parallel. Since throughput is delay-sensitive in most cases, we allocate a dedicated, high priority wq for our needs. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210209070755.23019-5-pkshih@realtek.com
2021-02-12rtw88: add napi supportPo-Hao Huang3-24/+145
Use napi to reduce overhead on rx interrupts. Driver used to interrupt kernel for every Rx packet, this could affect both system and network performance. NAPI is a mechanism that uses polling when processing huge amount of traffic, by doing this the number of interrupts can be decreased. Network performance can also benefit from this patch. Since TCP connection is bidirectional and acks are required for every several packets. These ack packets occupie the PCI bus bandwidth and could lead to performance degradation. When napi is used, GRO receive is enabled by default in the mac80211 stack. So mac80211 won't pass every RX TCP packets to the kernel TCP network stack immediately. Instead an aggregated large length TCP packet will be delivered. This reduces the tx acks sent and gains rx performance. After the patch, the Rx throughput increases about 25Mbps in 11ac. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Tested-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210209070755.23019-4-pkshih@realtek.com
2021-02-12rtw88: add rts conditionPo-Hao Huang2-1/+10
Since we set the IEEE80211_HW_HAS_RATE_CONTROL flag, so use_rts in ieee80211_tx_info will never be set in the ieee80211_xmit_fast path. Add length check for skb to decide whether rts is needed. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210209070755.23019-3-pkshih@realtek.com
2021-02-12rtw88: add dynamic rrsr configurationPo-Hao Huang6-3/+74
Register rrsr determines the response rate we send. In field tests, using rate higher than current tx rate could lead to difficulty for the receiving end to receive management/control frames. Calculate current modulation level by tx rate then cross out rate higher than those. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210209070755.23019-2-pkshih@realtek.com
2021-02-12iwlwifi: remove incorrect comment in pnvmLuca Coelho1-5/+0
We use this driver as a backport that also runs on older kernels (as part of the backports project). So we use some checks to backport or prevent code from compiling in incompatible kernel version. When I took one of the PNVM patches from the backport, I accidentally left the comment that a certain part of the code doesn't work in older kernels. This obviously should never be valid for the mainline. Remove this comment. Reported-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/iwlwifi.20210211223049.40d545a0fa89.I04793aaa5312b926335c8db32131f000432df511@changeid
2021-02-11Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.gitKalle Valo31-69/+577
ath.git patches for v5.12. Major changes: wil6210 * add support for extended DMG MCS 12.1 rate
2021-02-11Merge tag 'iwlwifi-next-for-kalle-2021-02-10' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-nextKalle Valo55-444/+1116
Second set of iwlwifi patches intended for v5.12 * Add some device IDs that got lost in a rebase; * A bunch of fixes in the PPAG code; * A few fixes in the debugging framework; * Fix a couple of potential crashes in error paths; * More HW IDs for new HW; * Add one more value to the device configuration code; * Support new scan config FW API; * Some more CSA fixes; * Support for RF interference mitigation (RFI); * Improvements in the NVM flows; * Bump the FW API support version; * Implement support for PNVM from BIOS; * Fix PM status when a FW crash happens; * Some other small fixes, clean-ups and improvements. # gpg: Signature made Thu 11 Feb 2021 02:02:34 AM EET using RSA key ID 1A3CC5FA # gpg: Good signature from "Luciano Roth Coelho (Luca) <luca@coelho.fi>" # gpg: aka "Luciano Roth Coelho (Intel) <luciano.coelho@intel.com>"
2021-02-11ath11k: qmi: add debug message for allocated memory segment addresses and sizesKalle Valo1-0/+5
This helps debugging firmware memory allocation problems. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1613041549-7265-1-git-send-email-kvalo@codeaurora.org
2021-02-11ath11k: pci: remove experimental warningKalle Valo1-2/+0
I have received feedback that QCA6390 PCI support is working for many, and I'm also using QCA6390 on my daily driver^Hlaptop. While there are issues still to be resolved it's not really experimental anymore, so remove the experimental warning from driver initialisation. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1613040697-20289-1-git-send-email-kvalo@codeaurora.org
2021-02-11ath10k: hold RCU lock when calling ieee80211_find_sta_by_ifaddr()Shuah Khan1-2/+5
ieee80211_find_sta_by_ifaddr() must be called under the RCU lock and the resulting pointer is only valid under RCU lock as well. Fix ath10k_wmi_tlv_op_pull_peer_stats_info() to hold RCU lock before it calls ieee80211_find_sta_by_ifaddr() and release it when the resulting pointer is no longer needed. This problem was found while reviewing code to debug RCU warn from ath10k_wmi_tlv_parse_peer_stats_info(). Link: https://lore.kernel.org/linux-wireless/7230c9e5-2632-b77e-c4f9-10eca557a5bb@linuxfoundation.org/ Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210210212107.40373-1-skhan@linuxfoundation.org
2021-02-11ath10k: change ath10k_offchan_tx_work() peer present msg to a warnShuah Khan1-3/+2
Based on the comment block in this function and the FIXME for this, peer being present for the offchannel tx is unlikely. Peer is deleted once tx is complete. Change peer present msg to a warn to detect this condition. Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/3b1f71272d56ee1d7f567fbce13bdb56cc06d342.1612915444.git.skhan@linuxfoundation.org
2021-02-11ath9k: fix data bus crash when setting nf_override via debugfsLinus Lüssing1-1/+4
When trying to set the noise floor via debugfs, a "data bus error" crash like the following can happen: [ 88.433133] Data bus error, epc == 80221c28, ra == 83314e60 [ 88.438895] Oops[#1]: [ 88.441246] CPU: 0 PID: 7263 Comm: sh Not tainted 4.14.195 #0 [ 88.447174] task: 838a1c20 task.stack: 82d5e000 [ 88.451847] $ 0 : 00000000 00000030 deadc0de 83141de4 [ 88.457248] $ 4 : b810a2c4 0000a2c4 83230fd4 00000000 [ 88.462652] $ 8 : 0000000a 00000000 00000001 00000000 [ 88.468055] $12 : 7f8ef318 00000000 00000000 77f802a0 [ 88.473457] $16 : 83230080 00000002 0000001b 83230080 [ 88.478861] $20 : 83a1c3f8 00841000 77f7adb0 ffffff92 [ 88.484263] $24 : 00000fa4 77edd860 [ 88.489665] $28 : 82d5e000 82d5fda8 00000000 83314e60 [ 88.495070] Hi : 00000000 [ 88.498044] Lo : 00000000 [ 88.501040] epc : 80221c28 ioread32+0x8/0x10 [ 88.505671] ra : 83314e60 ath9k_hw_loadnf+0x88/0x520 [ath9k_hw] [ 88.512049] Status: 1000fc03 KERNEL EXL IE [ 88.516369] Cause : 5080801c (ExcCode 07) [ 88.520508] PrId : 00019374 (MIPS 24Kc) [ 88.524556] Modules linked in: ath9k ath9k_common pppoe ppp_async l2tp_ppp cdc_mbim batman_adv ath9k_hw ath sr9700 smsc95xx sierra_net rndis_host qmi_wwan pppox ppp_generic pl2303 nf_conntrack_ipv6 mcs7830 mac80211 kalmia iptable_nat ipt_REJECT ipt_MASQUERADE huawei_cdc_ncm ftdi_sio dm9601 cfg80211 cdc_subset cdc_ncm cdc_ether cdc_eem ax88179_178a asix xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_ecn xt_dscp xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_NETMAP xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CLASSIFY usbserial usbnet usbhid slhc rtl8150 r8152 pegasus nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack [ 88.597894] libcrc32c kaweth iptable_mangle iptable_filter ipt_ECN ipheth ip_tables hso hid_generic crc_ccitt compat cdc_wdm cdc_acm br_netfilter hid evdev input_core nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 l2tp_netlink l2tp_core udp_tunnel ip6_udp_tunnel xfrm6_mode_tunnel xfrm6_mode_transport xfrm6_mode_beet ipcomp6 xfrm6_tunnel esp6 ah6 xfrm4_tunnel xfrm4_mode_tunnel xfrm4_mode_transport xfrm4_mode_beet ipcomp esp4 ah4 tunnel6 tunnel4 tun xfrm_user xfrm_ipcomp af_key xfrm_algo sha256_generic sha1_generic jitterentropy_rng drbg md5 hmac echainiv des_generic deflate zlib_inflate zlib_deflate cbc authenc crypto_acompress ehci_platform ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc16 mii aead crypto_null cryptomgr crc32c_generic [ 88.671671] crypto_hash [ 88.674292] Process sh (pid: 7263, threadinfo=82d5e000, task=838a1c20, tls=77f81efc) [ 88.682279] Stack : 00008060 00000008 00000200 00000000 00000000 00000000 00000000 00000002 [ 88.690916] 80500000 83230080 82d5fe22 00841000 77f7adb0 00000000 00000000 83156858 [ 88.699553] 00000000 8352fa00 83ad62b0 835302a8 00000000 300a00f8 00000003 82d5fe38 [ 88.708190] 82d5fef4 00000001 77f54dc4 77f80000 77f7adb0 c79fe901 00000000 00000000 [ 88.716828] 80510000 00000002 00841000 77f54dc4 77f80000 801ce4cc 0000000b 41824292 [ 88.725465] ... [ 88.727994] Call Trace: [ 88.730532] [<80221c28>] ioread32+0x8/0x10 [ 88.734765] Code: 00000000 8c820000 0000000f <03e00008> 00000000 08088708 00000000 aca40000 03e00008 [ 88.744846] [ 88.746464] ---[ end trace db226b2de1b69b9e ]--- [ 88.753477] Kernel panic - not syncing: Fatal exception [ 88.759981] Rebooting in 3 seconds.. The "REG_READ(ah, AR_PHY_AGC_CONTROL)" in ath9k_hw_loadnf() does not like being called when the hardware is asleep, leading to this crash. The easiest way to reproduce this is trying to set nf_override while the hardware is down: $ ip link set down dev wlan0 $ echo "-85" > /sys/kernel/debug/ieee80211/phy0/ath9k/nf_override Fixing this crash by waking the hardware up before trying to set the noise floor. Similar to what other ath9k debugfs files do. Tested on a Lima board from 8devices, which has a QCA 4531 chipset. Fixes: b90189759a7f ("ath9k: add noise floor override option") Cc: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Linus Lüssing <ll@simonwunderlich.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210209184352.4272-1-linus.luessing@c0d3.blue
2021-02-11ath11k: add support to configure spatial reuse parameter setRajkumar Manoharan6-5/+447
The SPR parameter set comprises OBSS PD threshold for SRG and non SRG and Bitmap of BSS color and partial BSSID. This adds support to configure fields of SPR element to firmware. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01164-QCAHKSWPL_SILICONZ-1 Tested-by: Muna Sinada <msinada@codeaurora.org> Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1612843714-29174-1-git-send-email-rmanohar@codeaurora.org
2021-02-11ath10k: restore tx sk_buff of htt header for SDIOWen Gong1-0/+2
ieee80211_report_used_skb of mac80211 use the frame_control of ieee80211_hdr in sk_buff and indicate it to another function ieee80211_mgd_conn_tx_status, then it queue work ieee80211_sta_work, but ieee80211_is_auth(fc) in ieee80211_sta_work check fail when the authentication has transmitted by ath10k. When the ath10k report it with HTT_TX_COMPL_STATE_DISCARD, it will be set without flag IEEE80211_TX_STAT_ACK, then mac80211 should try the next authentication immeditely, but in fact mac80211 wait 1 second for it, the reason is ieee80211_is_auth(fc) in ieee80211_sta_work check fail for the sk_buff which is not restored, the data of sk_buff is not the begin of ieee80211_hdr, in fact it is the begin of htt_cmd_hdr. dmesg without this patch, it wait 1 second for the next retry when ath10k report without IEEE80211_TX_STAT_ACK for authentication: [ 6973.883116] wlan0: send auth to 5e:6f:2b:0d:fb:d7 (try 1/3) [ 6974.705471] wlan0: send auth to 5e:6f:2b:0d:fb:d7 (try 2/3) [ 6975.712962] wlan0: send auth to 5e:6f:2b:0d:fb:d7 (try 3/3) Restore the sk_buff make mac8011 retry the next authentication immeditely which meet logic of mac80211. dmesg with this patch, it retry the next immeditely when ath10k report without IEEE80211_TX_STAT_ACK for authentication: [ 216.734813] wlan0: send auth to 5e:6f:2b:0d:fb:d7 (try 1/3) [ 216.739914] wlan0: send auth to 5e:6f:2b:0d:fb:d7 (try 2/3) [ 216.745874] wlan0: send auth to 5e:6f:2b:0d:fb:d7 (try 3/3) Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049 Signed-off-by: Wen Gong <wgong@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1612839530-2263-1-git-send-email-wgong@codeaurora.org
2021-02-11wilc1000: Fix use of void pointer as a wrong struct typeVsevolod Kozlov3-9/+11
ac_classify() expects a struct sk_buff* as its second argument, which is a member of struct tx_complete_data. priv happens to be a pointer to struct tx_complete_data, so passing it directly to ac_classify() leads to wrong behaviour and occasional panics. Since there is only one caller of wilc_wlan_txq_add_net_pkt and it already knows the type behind this pointer, and the structure is already in the header file, change the function signature to use the real type instead of void* in order to prevent confusion. Signed-off-by: Vsevolod Kozlov <zaba@mm.st> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/YCQomJ1mO5BLxYOT@Vsevolods-Mini.lan
2021-02-11brcmsmac: Fix the spelling configation to configuration in the file d11.hBhaskar Chowdhury1-1/+1
s/configation/configuration/ Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210209232921.1255425-1-unixbhaskar@gmail.com
2021-02-11iwlwifi: bump FW API to 62 for AX devicesLuca Coelho1-1/+1
Start supporting API version 62 for AX devices. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210172142.8c2e4ebd947e.Id1be235baad632e9ba1c07590e62184fc2f07c04@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: pnvm: implement reading PNVM from UEFILuca Coelho1-1/+90
We now support fetching the PNVM data from a UEFI variable. Add the code to read this variable first and use it. If it's not available, we fall back to reading the data from the filesystem, as before. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210211015026.289084803334.Ie234805047df3be84f4235f9dafaf4cdecf0db9a@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: pnvm: move file loading code to a separate functionLuca Coelho1-37/+61
In preparation to support loading the PNVM from UEFI, move the function that loads the PNVM from the filesystem to a separate function. This will make it easier to try to load from both places later on. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210172142.072aa2e8bbc5.Ib351ee5da47a4cee60d44e66d32d2f6bba6f3150@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: pnvm: increment the pointer before checking the TLVLuca Coelho1-3/+3
If the SKU_ID doesn't match, we don't increment the pointer and keep checking the same TLV over and over again. We need to increment the pointer in all situtations, namely if the TLV is not a SKU_ID, if the SKU_ID matched or if the SKU_ID didn't match. So we can increment the pointer already before checking for these conditions to solve the problem. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Fixes: 6972592850c0 ("iwlwifi: read and parse PNVM file") Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210172142.de94d366f3ff.I9a5a54906cf0f4ec8af981d6066bfd771152ffb9@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: pcie: define FW_RESET_TIMEOUT for clarityMatti Gottlieb1-1/+3
Move fw reset timeout to a FW_RESET_TIMEOUT macro for better readability. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210172142.f71c99f461ff.If32fe0afed277ec99ba0d7e2615c27a8a80a0d29@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: pnvm: set the PNVM again if it was already loadedLuca Coelho2-10/+18
When the interface goes up, we have already loaded the PNVM during init, so we don't load it anymore. But we still need to set the PNVM values in the context so that the FW can load it again. Call set_pnvm when the PNVM is already loaded and change the trans_pcie implementation to accept a second call to set_pnvm when we have already allocated and, in this case, only set the values without allocating again. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Fixes: 6972592850c0 ("iwlwifi: read and parse PNVM file") Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210172142.622546a3566f.I659a8b9aa944d213c4ba446e142d74f3f6db9c64@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: mvm: global PM mode does not reset after FW crashRavi Darsi1-0/+1
When The driver in D3 and FW crash happens, trans->system_pm_mode is not reset to IWL_PLAT_PM_MODE_DISABLED which causes the driver not to send INIT conmmands and D3 resume fails. This patch contains the fix for resetting trans->system_pm_mode to IWL_PLAT_PM_MODE_DISABLED and D3 resume is successful. Signed-off-by: Ravi Darsi <ravi.darsi@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210172142.ad170ad48409.Ifc6b10e8b3f235876af91d0e23e90b462d270eff@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: mvm: reduce the print severity of failing getting NIC tempGolan Ben Ami1-1/+1
Currently, for all devices and families, failing getting the temp from the fw is indicated in the log as ERR. This is too severe for two reasons: 1. The driver has a fall back - and schedules the next temp read immediately after failing to read temp from the fw. 2. The temp read implementation in the fw is different between HWs, and on older devices the flow is a-sync and may timeout. Reducing the print severity from ERR to WARN will allow to track the issue if it will appear many times, but not frighten users if it appears once. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210172142.dfd423b2b2ef.Icd576dc3e2e7174d3ed9c1c32f48ea0013699e72@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: mvm: get NVM later in the mvm_start flowEmmanuel Grumbach1-9/+20
We don't need the NVM until fairly late in the flow and since this flow will be split soon, get the NVM later to unite it with the parts that really need it. Gather all what needs the NVM into a function. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210171218.bab0e65c4909.I789f3eb577b216ad1688269e036ce9fa4880f532@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlmvm: set properly NIC_NOT_ACK_ENABLED flagShaul Triebitz3-0/+22
The STA_CTXT_HE_NIC_NOT_ACK_ENABLED flag tells the firmware whether *we* support ack-enabled. So what should be checked is our *own* capability and not the *peer's* capability. Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210171218.59f44e210096.I8f31968f6f7303255e212d869ca0131becd309aa@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: remove max_ht_ampdu_exponent config parameterJohannes Berg10-45/+21
This always has the same value, since we don't have any devices with different values; remove the parameter. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210171218.50d11cbb073f.Ia44d022a4c549eb5fe0254fb20c62aa8d0bba634@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: remove max_vht_ampdu_exponent config parameterJohannes Berg2-6/+1
This is not (or no longer) used, so remove it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210171218.ed18d7c8e7b8.Ic3fdf7c8636f332e3d5ee5841b03bf85e3bc4855@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: mvm: Check ret code for iwl_mvm_load_nvm_to_nicAbhishek Naik2-6/+14
Return value of the iwl_mvm_load_nvm_to_nic func is not analyzed. If load NVM to nic func fails and NVM is not loaded to fw properly, then fw may behave badly and lead to some strange issue. This commit will analyze return value and if load NVM to nic has failed, then the error code is sent to the previous func, which will trigger WRT log collection. iwl_fw_dbg_error_collect() func collects dump only if tri type is FW_DBG_TRIGGER_ALIVE_TIMEOUT. But when Load NVM to nic function fails trig_type is FW_DBG_TRIGGER_DRIVER. This commit also has code changes to collect dump when trig_type is FW_DBG_TRIGGER_DRIVER. Signed-off-by: Abhishek Naik <abhishek.naik@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210171218.32998850192a.Ic58d08cb6944ca55e343ff0032c82cfa7821e588@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: mvm: don't check if CSA event is running before removingSara Sharon1-3/+0
We may want to remove it before it started (i.e. before the actual switch time). Signed-off-by: Sara Sharon <sara.sharon@intel.com> Fixes: 58ddd9b6d194 ("iwlwifi: mvm: don't send a CSA command the firmware doesn't know") Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210171218.835db8987b8a.Ic6c5d28d744302db1bc6c4314bd3138ba472f834@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: mvm: Support SCAN_CFG_CMD version 5Ilan Peer2-8/+11
Since the firmware support for internal station for auxiliary activities, there is no need to configure an auxiliary station as part of SCAN_CFG_CMD. Thus, this configuration was removed from the corresponding structure. Align the code accordingly. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210171218.9b8da8408692.I7fe99d73cd67ffc817c2ef6af4c9932ce9fc50b2@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: mvm: isolate the get nvm flowEmmanuel Grumbach1-12/+25
This will soon be a bit more complicated. Take it out to a function. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210171218.431f31a86ea0.I9db96647eb9c7142051e26cd5be3f52c5ffc5534@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: mvm: simplify iwl_mvm_dbgfs_registerEmmanuel Grumbach3-18/+21
No need to pass the dbgfs_dir just to assign it to mvm. Assign to mvm and then call iwl_mvm_dbgfs_register. This is a preparation towards the addition of a delayed op_mode_start flow. This will allow to split the op_mode_start flow. Registration to debugfs must happen after we register to mac80211 and the registration to mac80211 will soon be delayed in certain cases. In order not to have to remember the debugfs_dir in a separate variable, just set it into the mvm structure so that it can be usable later. Declare mvm->debugfs_dir in the iwl_mvm structure even when IWLWIFI_DEBUGFS isn't enabled to simplify the source code. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210171218.a92ee491863d.I047923aa3598fbf4fb6fce2cdff75a4969fedd76@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: mvm: register to mac80211 lastEmmanuel Grumbach1-7/+9
All the actions that were taken after the registration can be taken before the registration to mac80211. This will help to defer part of the op_mode_mvm_start function to a later stage in case the device is not available. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210171218.c03cc5db67c1.Ia928ca34d25a73d959a345ffbe4f1217c3f17394@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: acpi: add support for DSM RFIGregory Greenman3-14/+75
BIOS provides RFI feature enable/disable state via WiFi DSM ACPI object. By default the feature should be disabled. The GUID for this feature is different from the one driver currently uses, so need to provide a set of new definitions. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210171218.242bfe368981.Iaccce1e2fa3986b174d0b08942aa4fbf8bb94a95@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-11iwlwifi: mvm: add RFI-M supportGregory Greenman8-1/+261
RF Interference Mitigation is a new feature targeted to handle the problem of interference between DDR memory and WiFi. The role of the driver is to configure FW with the table holding a mapping between problematic channels/bands and the corresponding frequencies. This patch adds RFI infrastructure and adds two debugfs hooks: - send RFI configuration command (currently with a default table) which will reset feature in the FW - read the table, used by the FW (which can be a subset of the table that driver sent). Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210171218.2cea55a09bc7.I634b79795abad499ce442631d6672ffef8fc6d41@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netDavid S. Miller2-9/+7
2021-02-10iwlwifi:mvm: Add support for version 2 of the LARI_CONFIG_CHANGE command.Miri Korenblit2-5/+23
Add support for version 2 of the LARI_CONFIG_CHANGE command. this is needed to support UHB enable/disable from BIOS Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210142629.8a0c951bfdea.I850f29d3ff3931388447bda635dfbc742ea1df61@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-10iwlwifi: pcie: don't crash when rx queues aren't allocated in interruptEmmanuel Grumbach1-0/+3
WARNING is better than crashing. Since this happened to me, be on the safe side. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210142629.d4651427fcda.I1bcecb73676d039e2521309c07fc6b6314a90546@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-10iwlwifi: correction of group-id once sending REPLY_ERRORMukesh Sisodiya1-2/+5
Once sending the REPLY_ERROR group ID is not set and this lead to get it set to wrong value LONG_GROUP later in default handling Fix this by checking the REPLY_ERROR and avoid changing the Group ID Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210142629.82578caaea84.I0ca9cfdd4e656d2e88ee7696dd6baf4267e7cb52@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-10iwlwifi: pcie: add AX201 and AX211 radio modules for Ma devicesMatti Gottlieb3-0/+34
Add support for AX201 and AX211 radio modules, which we call HR2 and GF, respectively. These modules can be used with the Ma family of devices and above. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210142629.f8e3080ce633.I7377b421b031796730daf809c4024a3c3ef95fa8@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-10iwlwifi: pcie: add CDB bit to the device configuration parsingMatti Gottlieb3-75/+83
Some new devices contain an extra bit in the CRF ID register to denote that they support CDB. Add definitions and macros to be able to support it and add the "NO_CDB" to all existing entired. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210142629.7b40184d9899.I3bb2cf9b9afb0457583f786dc52d4d1b1ad75ffc@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-10iwlwifi: acpi: don't return valid pointer as an ERR_PTRHaim Dreyfuss1-3/+19
iwl_acpi_get_wifi_pkg() may return a valid pointer (meaning success), while `tbl_rev` is invalid (equel to 1). In this case, we will treat that as an error. Subsequent "users" of this "error code" may either check for nonzero (good; pointers are never zero) or negative (bad; pointers may be "positive") fix that by splitting the if statement. First check if IS_ERR(wifi_pkg) and then if tbl_rev != 0. Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210210142629.1c8c4b58c932.I147373f6fd364606b0282af8d402c722eb917225@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>