Peter Chiu
4e029000fc
wifi: mt76: mt7996: init mpdu density cap
...
Init mpdu density based on the hardware capability to prevent rx drop.
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com >
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 16:08:48 +02:00
Peter Chiu
8b14ce24a0
wifi: mt76: mt7996: fix pointer calculation in ie countdown event
...
Fix the tail and data pointers. The rxd->len in mt7996_mcu_rxd does not
include the length of general rxd. It only includes the length of
firmware event rxd. Use skb->length to get the correct length.
Fixes: 98686cd216 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com >
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 16:08:48 +02:00
Shayne Chen
c04ab57dab
wifi: mt76: mt7996: remove unused eeprom band selection
...
Tri-band chipsets support one band on each a-die, so remove the unused
definition of eeprom band selection.
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 16:08:47 +02:00
Shayne Chen
d0b6f86fdb
wifi: mt76: mt7996: let non-bufferable MMPDUs use correct hw queue
...
Pass qid into mt7996_mac_write_txwi() to let the tx descriptor of
non-bufferable MMPDUs be filled with correct hw queue index.
Fixes: 98686cd216 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 16:08:47 +02:00
Shayne Chen
021af94599
wifi: mt76: mt7996: add eht rx rate support
...
Add support to report eht rx rate.
Note that extended fields for eht in mt76_rx_status will make the struct
size exceed the cb size, so make nss and band share the same u8.
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 16:08:47 +02:00
Ryder Lee
dda423dd65
wifi: mt76: mt7996: remove mt7996_mcu_beacon_check_caps()
...
Those capabilities have been added into ieee80211_bss_conf.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:52:55 +02:00
Ryder Lee
885f7af7e5
wifi: mt76: mt7915: remove mt7915_mcu_beacon_check_caps()
...
Those capabilities have been added into ieee80211_bss_conf.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:49:09 +02:00
Ryder Lee
1a1ff6c3b3
wifi: mt76: connac: refresh tx session timer for WED device
...
There's no keep-alive packet being received by mac80211 stack when WED
is enabled, which leads to tx BA session timeout. This patch calls
ieee80211_refresh_tx_agg_session_timer() to refresh timer according
to tx status reporting.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:49:09 +02:00
Felix Fietkau
5b8ccdfb94
wifi: mt76: add missing locking to protect against concurrent rx/status calls
...
According to the documentation, ieee80211_rx_list must not run concurrently
with ieee80211_tx_status (or its variants).
Cc: stable@vger.kernel.org
Fixes: 88046b2c9f ("mt76: add support for reporting tx status with skb")
Reported-by: Brian Coverstone <brian@mainsequence.net >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:39:05 +02:00
Kang Chen
9e47dd9f64
wifi: mt76: handle failure of vzalloc in mt7615_coredump_work
...
vzalloc may fails, dump might be null and will cause
illegal address access later.
Link: https://lore.kernel.org/all/Y%2Fy5Asxw3T3m4jCw@lore-desk
Fixes: d2bf7959d9 ("mt76: mt7663: introduce coredump support")
Signed-off-by: Kang Chen <void0red@gmail.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:34:34 +02:00
Peter Chiu
e4d2b8bcac
wifi: mt76: drop the incorrect scatter and gather frame
...
The scatter and gather frame may be incorrect because WED and WO may
send frames to host driver interleaved.
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com >
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:34:34 +02:00
Howard Hsu
9c97df11df
wifi: mt76: mt7915: rework init flow in mt7915_thermal_init()
...
If kernel do not enable CONFIG_HWMON, it may cause thermal
initialization to be done with temperature value 0 and then can not
transmit. This commit fixes it by setting trigger/restore temperature
before checking CONFIG_HWMON.
Fixes: 7d12b38ab6 ("wifi: mt76: mt7915: call mt7915_mcu_set_thermal_throttling() only after init_work")
Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:34:34 +02:00
Sujuan Chen
db1a5a6c69
wifi: mt76: mt7915: add dev->hif2 support for mt7916 WED device
...
Enable two PCIe interfaces (dev->hif2) support for mt7916 when WED is enabled.
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:34:34 +02:00
Lorenz Brun
90fb69212c
wifi: mt76: mt7915: expose device tree match table
...
On MT7986 the WiFi driver currently does not get automatically loaded,
requiring manual modprobing because the device tree compatibles are not
exported into metadata.
Add the missing MODULE_DEVICE_TABLE macro to fix this.
Fixes: 99ad32a4ca ("mt76: mt7915: add support for MT7986")
Signed-off-by: Lorenz Brun <lorenz@brun.one >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:34:34 +02:00
Ryder Lee
c278a64a93
wifi: mt76: dynamic channel bandwidth changes in AP mode
...
Allow AP to change channel width for 40Mhz intolerant STA on the
2.4 GHz band.
Signed-off-by: Himanshu Goyal <himanshu.goyal@mediatek.com >
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:34:34 +02:00
Ryder Lee
63a3724632
wifi: mt76: mt7996: fix radiotap bitfield
...
The 11be generation's radiotap bitfields were wrongly copy-and-pasted
from 11ax driver, so fix them accordingly.
Fixes: 98686cd216 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:34:34 +02:00
Dan Carpenter
cdc215c2c8
wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store()
...
Drop the lock before returning -EINVAL.
Fixes: ecaccdae7a ("wifi: mt76: mt7915: rework mt7915_thermal_temp_store()")
Signed-off-by: Dan Carpenter <error27@gmail.com >
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:34:34 +02:00
Yang Li
df5e5bfdb1
wifi: mt76: mt7996: Remove unneeded semicolon
...
./drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:3136:3-4: Unneeded semicolon
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4059
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:34:34 +02:00
Deren Wu
9270270d62
wifi: mt76: mt7921: fix PCI DMA hang after reboot
...
mt7921 just stop some workers and clean up chip status before reboot.
In stress test, there are working activities still running at the period
of .shutdown callback and that would cause some hosts cannot recover
DMA after reboot. To avoid the floating state in reboot, we use
mt7921_pci_remove() to fully deinit all resources.
Fixes: f23a0cea8b ("wifi: mt76: mt7921e: add pci .shutdown() support")
Signed-off-by: Deren Wu <deren.wu@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:34:34 +02:00
Deren Wu
fcc51acfeb
wifi: mt76: mt7921: fix wrong command to set STA channel
...
Should not use AND operator to check vif type NL80211_IFTYPE_MONITOR, and
that will cause we go into sniffer command for both STA and MONITOR
mode. However, the sniffer command would set channel properly (with some
extra options), the STA mode still works even if using the wrong
command.
Fix vif type check to make sure we using the right command to update
channel.
Fixes: 914189af23 ("wifi: mt76: mt7921: fix channel switch fail in monitor mode")
Signed-off-by: Deren Wu <deren.wu@mediatek.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:34:34 +02:00
Frank Wunderlich
64822bdba4
dt-bindings: mt76: add active-low property for led
...
LEDs can be in low-active mode, driver already supports it, but
documentation is missing. Add documentation for the dt property.
Signed-off-by: Frank Wunderlich <frank-w@public-files.de >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:34:34 +02:00
Deren Wu
532f0482fc
wifi: mt76: remove redundent MCU_UNI_CMD_* definitions
...
clear redundent definitions only
Fixes: 5b55b6da98 ("wifi: mt76: mt7921: add unified ROC cmd/event support")
Signed-off-by: Deren Wu <deren.wu@mediatek.com >
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2023-04-17 15:34:34 +02:00
Po-Hao Huang
f22c0bffe8
wifi: rtw89: add support of concurrent mode
...
Add iface_combination declaration to enable concurrent mode. Only two
interfaces under same frequency is supported currently. We limit the
role combination to be STA + P2P or STA + AP only for now until new
feature is requested.
Signed-off-by: Po-Hao Huang <phhuang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20230415035016.15788-2-pkshih@realtek.com
2023-04-17 12:49:52 +03:00
Po-Hao Huang
982a916427
wifi: rtw89: Disallow power save with multiple stations
...
Power saving for more than one station is not supported currently.
Disallow entering PS mode when we have more than one associated
stations.
Signed-off-by: Po-Hao Huang <phhuang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20230415035016.15788-1-pkshih@realtek.com
2023-04-17 12:49:52 +03:00
Po-Hao Huang
ac83f38090
wifi: rtw89: update statistics to FW for fine-tuning performance
...
Since firmware can't have proper statistics, driver update the
statistics periodically to firmware to assist in tuning performance.
Signed-off-by: Po-Hao Huang <phhuang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20230415034900.15679-5-pkshih@realtek.com
2023-04-17 12:49:52 +03:00
Ping-Ke Shih
8b048bd5dd
wifi: rtw89: use struct instead of macros to set H2C command of hardware scan
...
Remove macros that set H2C data. Instead, use struct and
le32_encode_bits() with mask definition to make it clean.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20230415034900.15679-4-pkshih@realtek.com
2023-04-17 12:49:52 +03:00
Po-Hao Huang
e7399db231
wifi: rtw89: refine scan function after chanctx
...
Since we can get the current channel definition each interface maps to,
remove store_op function that is no longer required to make things simple.
Signed-off-by: Po-Hao Huang <phhuang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20230415034900.15679-3-pkshih@realtek.com
2023-04-17 12:49:51 +03:00
Chih-Kang Chang
e579e943ba
wifi: rtw89: prohibit enter IPS during HW scan
...
Mac80211 core may ask driver to change to idle mode during HW scan,
then H2C command for HW scan will send failed since chip is in idle
mode. Therefore, We check the SCANNING flag before entering IPS to
prevent this behavior.
Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20230415034900.15679-2-pkshih@realtek.com
2023-04-17 12:49:51 +03:00
Ping-Ke Shih
c0fea064b2
wifi: rtw89: coex: send more hardware module info to firmware for 8851B
...
8851B has various hardware module types, so BT coexistence in firmware
needs these information to make decision. Add them to make 8851B work
well.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20230412012831.10519-5-pkshih@realtek.com
2023-04-17 12:49:23 +03:00
Ching-Te Ku
2380a22031
wifi: rtw89: coex: Update function to get BT RSSI and hardware counter
...
Correct Bluetooth RSSI count method. The 6dB is the gap between hardware
packet sampled value and real RSSI value.
Signed-off-by: Ching-Te Ku <ku920601@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20230412012831.10519-4-pkshih@realtek.com
2023-04-17 12:49:22 +03:00
Ching-Te Ku
9fde305628
wifi: rtw89: coex: Add path control register to monitor list
...
Chips use similar hardware for path control, but could different
path/antenna configuration. Add these register to monitor, if there are
wrong settings, these register can help to debug.
Signed-off-by: Ching-Te Ku <ku920601@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20230412012831.10519-3-pkshih@realtek.com
2023-04-17 12:49:22 +03:00
Ching-Te Ku
36ef71db55
wifi: rtw89: coex: Enable Wi-Fi RX gain control for free run solution
...
When Wi-Fi & Bluetooth are both busy at the same time, Wi-Fi need to
enable RX gain to protect Wi-Fi RX RF ability. Without this configure
the interference from Bluetooth will bring a big impact to Wi-Fi RX.
Signed-off-by: Ching-Te Ku <ku920601@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20230412012831.10519-2-pkshih@realtek.com
2023-04-17 12:49:22 +03:00
Chih-Kang Chang
deb1b2aed7
wifi: rtw89: fix power save function in WoWLAN mode
...
In WoWLAN Mode, it's expected that WiFi chip could enter power save mode
only after all setting is finished, but current wow_enter_lps function
break the rule and may lead to WoWLAN function fail in low probability,
so fix it.
Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20230410053438.10682-2-pkshih@realtek.com
2023-04-17 12:47:48 +03:00
Chin-Yen Lee
6863ad915d
wifi: rtw89: support WoWLAN mode for 8852be
...
To support WoWLAN mode for 8852be, we add one PLE quota setting and
WoWLAN stub, which shows that supported WLAN events include receiving
magic packet, rekey packet and deauth packet, and disconnecting from AP.
Signed-off-by: Chin-Yen Lee <timlee@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20230410053438.10682-1-pkshih@realtek.com
2023-04-17 12:47:48 +03:00
Golan Ben Ami
9ec71b52cc
wifi: iwlwifi: move debug buffer allocation failure to info verbosity
...
This is noising the kernel log and customers asked to hush it down.
We can live with this message in "info" verbosity.
Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230416154301.0a7f557aa2a0.If9db474b63242b1bfaed659aa174b678ae8dc196@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:25 +02:00
Emmanuel Grumbach
28965ec0b5
wifi: iwlwifi: make the loop for card preparation effective
...
Since we didn't reset t to 0, only the first iteration of the loop
did checked the ready bit several times.
From the second iteration and on, we just tested the bit once and
continued to the next iteration.
Reported-and-tested-by: Lorenzo Zolfanelli <lorenzo@zolfa.nl >
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216452
Fixes: 289e5501c3 ("iwlwifi: fix the preparation of the card")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230416154301.615b683ab9c8.Ic52c3229d3345b0064fa34263293db095d88daf8@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:25 +02:00
Johannes Berg
d9bfd5a064
wifi: iwlwifi: mvm: allow number of beacons from FW
...
Newer firmware images have a TLV advertising how many
beacons they support, use that to permit adding more
links in AP mode (FW needs to support at least as many
links as beacons).
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230416154301.0d7522533557.Ic6b5992e94446c35cb0f3add019defa6e7aded2a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:25 +02:00
Johannes Berg
8642ddb2a3
wifi: iwlwifi: mvm: implement key link switching
...
Implement switching keys from one set of firmware station IDs
to another set, during link switch.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230416154301.c6a777dd5e47.I693f7fd7c52fe8b51a58af69d45488511367f49e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:25 +02:00
Johannes Berg
7a243c6b68
wifi: iwlwifi: mvm: implement BAID link switching
...
When we switch station links, also add the code to switch
BAIDs from one station mask to the new one.
To do so, refactor the switching code a bit to have common
code for all the needed switches; will add keys next.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230416154301.40654afce24f.I0e35151f69e7513be53ddb8f008e9ab48278c352@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:25 +02:00
Johannes Berg
9aa3856d9b
wifi: iwlwifi: mvm: track station mask for BAIDs
...
When we have MLO connections, a BAID applies to multiple
firmware stations. Track the station mask instead of the
station ID, getting rid of a few more deflink cases and
preparing for handling link switching for BAIDs.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230416154301.c08523808c34.I719b7bba499648d1495ed3e3a90889d4732ef15d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:24 +02:00
Gregory Greenman
ef3ed33dfc
wifi: iwlwifi: bump FW API to 77 for AX devices
...
Start supporting API version 77 for AX devices.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230416154301.e522ccefe354.If7628363fafeb7687163103e734206915c445197@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:24 +02:00
Johannes Berg
6f2c5f38a7
wifi: iwlwifi: mvm: use correct sta mask to remove queue
...
When we remove a queue we need to use the currently active
firmware stations in the mask, not the deflink one. Fix that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230416154301.01cdd2153418.I176d54f2d869f51b3707d056adb96455cf885f93@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:24 +02:00
Avraham Stern
85eb75c34e
wifi: iwlwifi: mvm: avoid iterating over an un-initialized list
...
The initiator smooth list is initialized only in iwl_mvm_up(), but is
cleared in iwl_mvm_mac_stop. This may result in iterating over the
list before it was initialized in case iwl_mvm_up() failed early.
Fix it by moving the list initialization to an earlier stage.
Fixes: b68bd2e314 ("iwlwifi: mvm: Add FTM initiator RTT smoothing logic")
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230416154301.b50b1fe9a576.Ie348ffae110612d2e252ac120a3ba0aea063b1b6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:24 +02:00
Johannes Berg
66a588bff2
wifi: iwlwifi: mvm: factor out iwl_mvm_sta_fw_id_mask()
...
We are going to need this in more places than just the
key code, so factor out the functionality of getting
the FW station ID mask (filtered to a specific link if
needed) to a separate function that can now be called
both under RCU and mvm->mutex protection.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230416154301.eff92b93025d.I2c50290a0537d5db3d3460f4d57c78a4712ffb75@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:24 +02:00
Johannes Berg
bb7fcb37c9
wifi: iwlwifi: mvm: properly implement HE AP support
...
The firmware split the HE support field into HE and "pseudo HE",
the latter is really for AP and doesn't implement trigger frame
handling for example.
Use the new field for AP mode.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230416154301.34dbfefe2a49.I0e39cd35dbe03ff9209b26733746479eae1c8966@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:24 +02:00
Ilan Peer
69e1089316
wifi: iwlwifi: mvm: Fix _iwl_mvm_get_scan_type()
...
The usage of the 'dtim_period' value was wrong, as it is only
a multiplier of the beacon interval, and thus, beacon interval should
also be considered. Fix it.
Signed-off-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230416154301.e08293d6cace.I25f8cea3189472bd714676ca38b121d7c60fb9d9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:23 +02:00
Johannes Berg
0af637b571
wifi: iwlwifi: mvm: fix getting lowest TX rate for MLO
...
In iwl_mvm_mac_ctxt_get_lowest_rate() we were still accessing
vif->bss_conf without any multi-link provisions, and also the
info->band, both of which isn't valid in MLO.
Fix the code to look at the correct link. In case of EAPOL
transmissions for the initial 4-way-HS, look up the correct
link here as well, and warn if multiple are active.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230416154301.d892f68d3bcd.I7d6927abeea5c3899db225391dbc6a5c77805e80@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:23 +02:00
Gregory Greenman
5af2bb3168
wifi: iwlwifi: call napi_synchronize() before freeing rx/tx queues
...
When rx/tx queues are being freed, on a different CPU there could be
still rx flow running. Call napi_synchronize() to prevent such a race.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Co-developed-by: Benjamin Berg <benjamin.berg@intel.com >
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com >
Link: https://lore.kernel.org/r/20230416154301.5171ee44dcc1.Iff18718540da412e084e7d8266447d40730600ed@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:23 +02:00
Johannes Berg
f8f9c31129
wifi: iwlwifi: nvm-parse: add full BW UL MU-MIMO support
...
For some devices, in client mode, we support full bandwidth
uplink multi-user MIMO. Add the necessary capability.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com >
Link: https://lore.kernel.org/r/20230416154301.88b6aac6c876.Ibf2a7a38d7a172c371c347c9d4441e8c656cefe3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2023-04-17 09:53:23 +02:00
Rob Herring
666f4ab26c
bcma: Add explicit of_device.h include
...
bcma/main.c uses of_dma_configure() which is declared in of_device.h.
of_device.h gets implicitly included by of_platform.h, but that is going
to be removed soon.
Signed-off-by: Rob Herring <robh@kernel.org >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://lore.kernel.org/r/20230410232701.1561613-1-robh@kernel.org
2023-04-14 15:32:56 +03:00