Sean Wang
eff53d6ee1
wifi: mt76: mt7925: extend mt7925_mcu_bss_qos_tlv for per-link BSS
...
Extend mt7925_mcu_bss_qos_tlv with per-link BSS configuration.
The patch we created is a prerequisite to enable the MLO function in the
driver. It is purely a refactoring patch so the functionality should
remain unchanged.
Co-developed-by: Deren Wu <deren.wu@mediatek.com >
Signed-off-by: Deren Wu <deren.wu@mediatek.com >
Signed-off-by: Sean Wang <sean.wang@mediatek.com >
Link: https://patch.msgid.link/20240613030241.5771-13-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2024-07-09 23:01:50 +02:00
Sean Wang
a5c372f77a
wifi: mt76: mt7925: extend mt7925_mcu_bss_he_tlv for per-link BSS
...
Extend mt7925_mcu_bss_he_tlv with per-link BSS configuration.
The patch we created is a prerequisite to enable the MLO function in the
driver. It is purely a refactoring patch so the functionality should
remain unchanged.
Co-developed-by: Deren Wu <deren.wu@mediatek.com >
Signed-off-by: Deren Wu <deren.wu@mediatek.com >
Signed-off-by: Sean Wang <sean.wang@mediatek.com >
Link: https://patch.msgid.link/20240613030241.5771-12-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2024-07-09 23:01:50 +02:00
Sean Wang
b698264e1e
wifi: mt76: mt7925: extend mt7925_mcu_bss_color_tlv for per-link BSS
...
Extend mt7925_mcu_bss_color_tlv with per-link BSS configuration.
The patch we created is a prerequisite to enable the MLO function in the
driver. It is purely a refactoring patch so the functionality should
remain unchanged.
Co-developed-by: Deren Wu <deren.wu@mediatek.com >
Signed-off-by: Deren Wu <deren.wu@mediatek.com >
Signed-off-by: Sean Wang <sean.wang@mediatek.com >
Link: https://patch.msgid.link/20240613030241.5771-11-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2024-07-09 23:01:49 +02:00
Sean Wang
d62f77e347
wifi: mt76: mt7925: extend mt7925_mcu_bss_ifs_tlv for per-link BSS
...
Extend mt7925_mcu_bss_ifs_tlv with per-link BSS configuration.
The patch we created is a prerequisite to enable the MLO function in the
driver. It is purely a refactoring patch so the functionality should
remain unchanged.
Co-developed-by: Deren Wu <deren.wu@mediatek.com >
Signed-off-by: Deren Wu <deren.wu@mediatek.com >
Signed-off-by: Sean Wang <sean.wang@mediatek.com >
Link: https://patch.msgid.link/20240613030241.5771-10-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2024-07-09 23:01:49 +02:00
Sean Wang
b8b04b6616
wifi: mt76: mt7925: extend mt7925_mcu_set_timing for per-link BSS
...
Extend mt7925_mcu_set_timing with per-link BSS configuration.
The patch we created is a prerequisite to enable the MLO function in the
driver. It is purely a refactoring patch so the functionality should
remain unchanged.
Co-developed-by: Deren Wu <deren.wu@mediatek.com >
Signed-off-by: Deren Wu <deren.wu@mediatek.com >
Signed-off-by: Sean Wang <sean.wang@mediatek.com >
Link: https://patch.msgid.link/20240613030241.5771-9-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2024-07-09 23:01:49 +02:00
Sean Wang
fa5f44463f
wifi: mt76: mt7925: extend mt7925_mcu_add_bss_info for per-link BSS
...
Extend mt7925_mcu_add_bss_info with per-link BSS configuration.
The patch we created is a prerequisite to enable the MLO function in the
driver. It is purely a refactoring patch so the functionality should
remain unchanged.
Co-developed-by: Deren Wu <deren.wu@mediatek.com >
Signed-off-by: Deren Wu <deren.wu@mediatek.com >
Signed-off-by: Sean Wang <sean.wang@mediatek.com >
Link: https://patch.msgid.link/20240613030241.5771-8-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2024-07-09 23:01:48 +02:00
Deren Wu
acdfc3e798
wifi: mt76: mt7925: extend mt7925_mcu_set_tx with for per-link BSS
...
Extend mt7925_mcu_set_tx with per-link BSS configuration.
The patch we created is a prerequisite to enable the MLO function in the
driver. It is purely a refactoring patch so the functionality should
remain unchanged.
Co-developed-by: Sean Wang <sean.wang@mediatek.com >
Signed-off-by: Sean Wang <sean.wang@mediatek.com >
Signed-off-by: Deren Wu <deren.wu@mediatek.com >
Link: https://patch.msgid.link/20240613030241.5771-7-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2024-07-09 23:01:48 +02:00
Sean Wang
7cebb6a66a
wifi: mt76: mt792x: extend mt76_connac_mcu_uni_add_dev for per-link BSS
...
Extend mt76_connac_mcu_uni_add_dev with per-link BSS configuration.
The patch we created is a prerequisite to enable the MLO function in the
driver. It is purely a refactoring patch so the functionality should
remain unchanged.
We also extend link_idx field in mt76_connac_bss_basic_tlv for the firmware
to able to identify the link index in the MLO mode that is not harmful
for the current non-MLO mode.
Signed-off-by: Sean Wang <sean.wang@mediatek.com >
Link: https://patch.msgid.link/20240613030241.5771-6-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2024-07-09 23:01:48 +02:00
Deren Wu
43626f0e0c
wifi: mt76: mt7925: support for split bss_info_changed method
...
The .bss_info_changed method is being split into .vif_cfg_changed and
.link_info_changed to support MLD devices, but it will still support
non-MLD devices.
Co-developed-by: Sean Wang <sean.wang@mediatek.com >
Signed-off-by: Sean Wang <sean.wang@mediatek.com >
Signed-off-by: Deren Wu <deren.wu@mediatek.com >
Link: https://patch.msgid.link/20240613030241.5771-5-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2024-07-09 23:01:48 +02:00
Deren Wu
f3898da2e8
wifi: mt76: mt792x: add struct mt792x_chanctx
...
We are introducing a new structure, mt792x_chanctx, to quickly identify
the linked BSS it is working on. This eliminates the need to search in
mt7921_ctx_iter() or mt7925_ctx_iter() when the channel context changes.
Co-developed-by: Sean Wang <sean.wang@mediatek.com >
Signed-off-by: Sean Wang <sean.wang@mediatek.com >
Signed-off-by: Deren Wu <deren.wu@mediatek.com >
Link: https://patch.msgid.link/20240613030241.5771-4-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2024-07-09 23:01:47 +02:00
Deren Wu
4c28c0976e
wifi: mt76: mt792x: add struct mt792x_link_sta
...
We are introducing a new structure, mt792x_link_sta, to manage per-link
configurations in preparation for future station (STA) support of
Multi-Link Operation (MLO).
This patch only includes structural changes and does not involve any
logic changes.
We have moved relevant parameters, such as the wcid from the mt76_wcid
structure, from the mt7921x_sta structure to the mt792x_link_sta structure.
For current drivers that do not support MLO, there is only one link STA,
and link information is accessed via the deflink member.
However, we have not yet created the per-link BSS configuration indexed
by link ID for Multi-Link Device (MLD) support in mt7921x_sta.
This step needs to be completed before adding MLD support for STA mode.
Co-developed-by: Sean Wang <sean.wang@mediatek.com >
Signed-off-by: Sean Wang <sean.wang@mediatek.com >
Signed-off-by: Deren Wu <deren.wu@mediatek.com >
Link: https://patch.msgid.link/20240613030241.5771-3-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2024-07-09 23:01:47 +02:00
Deren Wu
30e89baeb0
wifi: mt76: mt792x: add struct mt792x_bss_conf
...
We are introducing a new structure, mt792x_bss_conf, to manage per-link
configurations in preparation for future STA support of Multi-Link
Operation (MLO).
The patch does not include any logic changes, only structural changes.
We have moved relevant parameters from the mt7921x_vif structure such
as to mt76 of mt76_vif structure, rssi and Tx queue parameters to
mt7921x_bss_conf structure. We can access those members to configure the
BSS for this interface, whether it is our own BSS or the one we are
associated with.
However, we have not yet created the per-link BSS configuration indexed by
link ID for Multi-Link Device (MLD) support. This step needs to be
extended before adding MLD support for AP mode.
Co-developed-by: Sean Wang <sean.wang@mediatek.com >
Signed-off-by: Sean Wang <sean.wang@mediatek.com >
Signed-off-by: Deren Wu <deren.wu@mediatek.com >
Link: https://patch.msgid.link/20240613030241.5771-2-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2024-07-09 23:01:47 +02:00
Kalle Valo
0321e45737
Merge tag 'rtw-next-2024-07-05' of https://github.com/pkshih/rtw
...
rtw-next patches for v6.11
Some cleanups of rtl8xxxu and rtlwifi, and some fixes of rtw88. The major
change is to develop WoWLAN and preparation of RTL8852BE-VT listed below:
rtw89:
- preparation of RTL8852BE-VT
* add RF calibration code
* move shared code with RTL8852BE to common module
- add WoWLAN for WiFi 6 chips
- support 36-bit PCI DMA
2024-07-09 13:17:09 +03:00
Chen Ni
3588e6438a
wifi: ipw2x00: Use kzalloc() instead of kmalloc()/memset()
...
Replace kmalloc() + memset() to kzalloc() for
better code readability and simplicity.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://patch.msgid.link/20240704090622.2260102-1-nichen@iscas.ac.cn
2024-07-09 13:16:05 +03:00
Sascha Hauer
c145eea2f7
wifi: mwifiex: Do not return unused priv in mwifiex_get_priv_by_id()
...
mwifiex_get_priv_by_id() returns the priv pointer corresponding to
the bss_num and bss_type, but without checking if the priv is actually
currently in use.
Unused priv pointers do not have a wiphy attached to them which can
lead to NULL pointer dereferences further down the callstack. Fix
this by returning only used priv pointers which have priv->bss_mode
set to something else than NL80211_IFTYPE_UNSPECIFIED.
Said NULL pointer dereference happened when an Accesspoint was started
with wpa_supplicant -i mlan0 with this config:
network={
ssid="somessid"
mode=2
frequency=2412
key_mgmt=WPA-PSK WPA-PSK-SHA256
proto=RSN
group=CCMP
pairwise=CCMP
psk="12345678"
}
When waiting for the AP to be established, interrupting wpa_supplicant
with <ctrl-c> and starting it again this happens:
| Unable to handle kernel NULL pointer dereference at virtual address 0000000000000140
| Mem abort info:
| ESR = 0x0000000096000004
| EC = 0x25: DABT (current EL), IL = 32 bits
| SET = 0, FnV = 0
| EA = 0, S1PTW = 0
| FSC = 0x04: level 0 translation fault
| Data abort info:
| ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
| CM = 0, WnR = 0, TnD = 0, TagAccess = 0
| GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
| user pgtable: 4k pages, 48-bit VAs, pgdp=0000000046d96000
| [0000000000000140] pgd=0000000000000000, p4d=0000000000000000
| Internal error: Oops: 0000000096000004 [#1 ] PREEMPT SMP
| Modules linked in: caam_jr caamhash_desc spidev caamalg_desc crypto_engine authenc libdes mwifiex_sdio
+mwifiex crct10dif_ce cdc_acm onboard_usb_hub fsl_imx8_ddr_perf imx8m_ddrc rtc_ds1307 lm75 rtc_snvs
+imx_sdma caam imx8mm_thermal spi_imx error imx_cpufreq_dt fuse ip_tables x_tables ipv6
| CPU: 0 PID: 8 Comm: kworker/0:1 Not tainted 6.9.0-00007-g937242013fce-dirty #18
| Hardware name: somemachine (DT)
| Workqueue: events sdio_irq_work
| pstate: 00000005 (nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
| pc : mwifiex_get_cfp+0xd8/0x15c [mwifiex]
| lr : mwifiex_get_cfp+0x34/0x15c [mwifiex]
| sp : ffff8000818b3a70
| x29: ffff8000818b3a70 x28: ffff000006bfd8a5 x27: 0000000000000004
| x26: 000000000000002c x25: 0000000000001511 x24: 0000000002e86bc9
| x23: ffff000006bfd996 x22: 0000000000000004 x21: ffff000007bec000
| x20: 000000000000002c x19: 0000000000000000 x18: 0000000000000000
| x17: 000000040044ffff x16: 00500072b5503510 x15: ccc283740681e517
| x14: 0201000101006d15 x13: 0000000002e8ff43 x12: 002c01000000ffb1
| x11: 0100000000000000 x10: 02e8ff43002c0100 x9 : 0000ffb100100157
| x8 : ffff000003d20000 x7 : 00000000000002f1 x6 : 00000000ffffe124
| x5 : 0000000000000001 x4 : 0000000000000003 x3 : 0000000000000000
| x2 : 0000000000000000 x1 : 0001000000011001 x0 : 0000000000000000
| Call trace:
| mwifiex_get_cfp+0xd8/0x15c [mwifiex]
| mwifiex_parse_single_response_buf+0x1d0/0x504 [mwifiex]
| mwifiex_handle_event_ext_scan_report+0x19c/0x2f8 [mwifiex]
| mwifiex_process_sta_event+0x298/0xf0c [mwifiex]
| mwifiex_process_event+0x110/0x238 [mwifiex]
| mwifiex_main_process+0x428/0xa44 [mwifiex]
| mwifiex_sdio_interrupt+0x64/0x12c [mwifiex_sdio]
| process_sdio_pending_irqs+0x64/0x1b8
| sdio_irq_work+0x4c/0x7c
| process_one_work+0x148/0x2a0
| worker_thread+0x2fc/0x40c
| kthread+0x110/0x114
| ret_from_fork+0x10/0x20
| Code: a94153f3 a8c37bfd d50323bf d65f03c0 (f940a000)
| ---[ end trace 0000000000000000 ]---
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Acked-by: Brian Norris <briannorris@chromium.org >
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com >
Signed-off-by: Kalle Valo <kvalo@kernel.org >
Link: https://patch.msgid.link/20240703072409.556618-1-s.hauer@pengutronix.de
2024-07-09 13:14:59 +03:00
Felix Fietkau
d2601e34a1
wifi: mac80211_hwsim: add support for multi-radio wiphy
...
This registers one wiphy radio per supported band. Number of different
channels is set per radio.
Signed-off-by: Felix Fietkau <nbd@nbd.name >
Link: https://patch.msgid.link/3a16838bb7a7d1a072bd7c9d586d17f70fcd8a60.1720514221.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-09 11:36:12 +02:00
Felix Fietkau
27d4c03441
wifi: mac80211: add wiphy radio assignment and validation
...
Validate number of channels and interface combinations per radio.
Assign each channel context to a radio.
Signed-off-by: Felix Fietkau <nbd@nbd.name >
Link: https://patch.msgid.link/1d3e9ba70a30ce18aaff337f0a76d7aeb311bafb.1720514221.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-09 11:36:12 +02:00
Felix Fietkau
6265c67f26
wifi: mac80211: move code in ieee80211_link_reserve_chanctx to a helper
...
Reduces indentation in preparation for further changes
Signed-off-by: Felix Fietkau <nbd@nbd.name >
Link: https://patch.msgid.link/cce95007092336254d51570f4a27e05a6f150a53.1720514221.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-09 11:36:12 +02:00
Felix Fietkau
0874bcd0e1
wifi: mac80211: extend ifcomb check functions for multi-radio
...
Add support for counting global and per-radio max/current number of
channels, as well as checking radio-specific interface combinations.
Signed-off-by: Felix Fietkau <nbd@nbd.name >
Link: https://patch.msgid.link/e76307f8ce562a91a74faab274ae01f6a5ba0a2e.1720514221.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-09 11:36:12 +02:00
Felix Fietkau
2920bc8d91
wifi: mac80211: add radio index to ieee80211_chanctx_conf
...
Will be used to explicitly assign a channel context to a wiphy radio.
Signed-off-by: Felix Fietkau <nbd@nbd.name >
Link: https://patch.msgid.link/59f76f57d935f155099276be22badfa671d5bfd9.1720514221.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-09 11:36:12 +02:00
Felix Fietkau
a01b1e9f99
wifi: mac80211: add support for DFS with multiple radios
...
DFS can be supported with multi-channel combinations, as long as each DFS
capable radio only supports one channel.
Signed-off-by: Felix Fietkau <nbd@nbd.name >
Link: https://patch.msgid.link/4d27a4adca99fa832af1f7cda4f2e71016bd9fda.1720514221.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-09 11:36:12 +02:00
Felix Fietkau
510dba80ed
wifi: cfg80211: add helper for checking if a chandef is valid on a radio
...
Check if the full channel width is in the radio's frequency range.
Signed-off-by: Felix Fietkau <nbd@nbd.name >
Link: https://patch.msgid.link/7c8ea146feb6f37cee62e5ba6be5370403695797.1720514221.git-series.nbd@nbd.name
[add missing Return: documentation]
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-09 11:36:00 +02:00
Felix Fietkau
abb4cfe366
wifi: cfg80211: extend interface combination check for multi-radio
...
Add a field in struct iface_combination_params to check per-radio
interface combinations instead of per-wiphy ones.
Signed-off-by: Felix Fietkau <nbd@nbd.name >
Link: https://patch.msgid.link/32b28da89c2d759b0324deeefe2be4cee91de18e.1720514221.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-09 11:29:59 +02:00
Felix Fietkau
e6c06ca8f2
wifi: cfg80211: add support for advertising multiple radios belonging to a wiphy
...
The prerequisite for MLO support in cfg80211/mac80211 is that all the links
participating in MLO must be from the same wiphy/ieee80211_hw. To meet this
expectation, some drivers may need to group multiple discrete hardware each
acting as a link in MLO under single wiphy.
With this change, supported frequencies and interface combinations of each
individual radio are reported to user space. This allows user space to figure
out the limitations of what combination of channels can be used concurrently.
Even for non-MLO devices, this improves support for devices capable of
running on multiple channels at the same time.
Signed-off-by: Felix Fietkau <nbd@nbd.name >
Link: https://patch.msgid.link/18a88f9ce82b1c9f7c12f1672430eaf2bb0be295.1720514221.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-09 11:29:59 +02:00
Zong-Zhe Yang
19b815ed71
wifi: mac80211: chanctx emulation set CHANGE_CHANNEL when in_reconfig
...
Chanctx emulation didn't info IEEE80211_CONF_CHANGE_CHANNEL to drivers
during ieee80211_restart_hw (ieee80211_emulate_add_chanctx). It caused
non-chanctx drivers to not stand on the correct channel after recovery.
RX then behaved abnormally. Finally, disconnection/reconnection occurred.
So, set IEEE80211_CONF_CHANGE_CHANNEL when in_reconfig.
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com >
Link: https://patch.msgid.link/20240709073531.30565-1-kevin_yang@realtek.com
Cc: stable@vger.kernel.org
Fixes: 0a44dfc070 ("wifi: mac80211: simplify non-chanctx drivers")
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-09 11:29:09 +02:00
Johannes Berg
6e909f4891
wifi: virt_wifi: don't use strlen() in const context
...
Looks like not all compilers allow strlen(constant) as
a constant, so don't do that. Instead, revert back to
defining the length as the first submission had it.
Fixes: b5d14b0c67 ("wifi: virt_wifi: avoid reporting connection success with wrong SSID")
Reported-by: kernel test robot <lkp@intel.com >
Closes: https://lore.kernel.org/oe-kbuild-all/202407090934.NnR1TUbW-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202407090944.mpwLHGt9-lkp@intel.com/
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-09 08:49:56 +02:00
Johannes Berg
b3603133d3
wifi: mac80211_hwsim: fix warning
...
WARN_ON("string") will unconditionally trigger a warning, but
not really do what it may look like. Use WARN(1, ...) instead
and add the mode number as well.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Link: https://patch.msgid.link/20240705133921.a50aa5b15ece.I9a25b7448b0498c0c2e503986978dae165c8bdf8@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-08 18:28:47 +02:00
Michael-CY Lee
4044b23781
wifi: mac80211: do not check BSS color collision in certain cases
...
Do not check BSS color collision in following cases
1. already under a color change
2. color change is disabled
Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com >
Link: https://patch.msgid.link/20240705074346.11228-1-michael-cy.lee@mediatek.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-08 18:28:47 +02:00
Michael-CY Lee
7cd4456355
wifi: mac80211: cancel color change finalize work when link is stopped
...
The color change finalize work might be called after the link is
stopped, which might lead to a kernel crash.
Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com >
Link: https://patch.msgid.link/20240705074326.11172-1-michael-cy.lee@mediatek.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-08 18:28:47 +02:00
En-Wei Wu
b5d14b0c67
wifi: virt_wifi: avoid reporting connection success with wrong SSID
...
When user issues a connection with a different SSID than the one
virt_wifi has advertised, the __cfg80211_connect_result() will
trigger the warning: WARN_ON(bss_not_found).
The issue is because the connection code in virt_wifi does not
check the SSID from user space (it only checks the BSSID), and
virt_wifi will call cfg80211_connect_result() with WLAN_STATUS_SUCCESS
even if the SSID is different from the one virt_wifi has advertised.
Eventually cfg80211 won't be able to find the cfg80211_bss and generate
the warning.
Fixed it by checking the SSID (from user space) in the connection code.
Fixes: c7cdba31ed ("mac80211-next: rtnetlink wifi simulation device")
Reported-by: syzbot+d6eb9cee2885ec06f5e3@syzkaller.appspotmail.com
Signed-off-by: En-Wei Wu <en-wei.wu@canonical.com >
Link: https://patch.msgid.link/20240705023756.10954-1-en-wei.wu@canonical.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-08 18:28:47 +02:00
Felix Fietkau
574e609c4e
wifi: mac80211: clear vif drv_priv after remove_interface when stopping
...
Avoid reusing stale driver data when an interface is brought down and up
again. In order to avoid having to duplicate the memset in every single
driver, do it here.
Signed-off-by: Felix Fietkau <nbd@nbd.name >
Link: https://patch.msgid.link/20240704130947.48609-1-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-08 18:28:47 +02:00
Felix Fietkau
34ce9c8b8a
wifi: nl80211: split helper function from nl80211_put_iface_combinations
...
Create a helper function that puts the data from struct
ieee80211_iface_combination to a nl80211 message.
This will be used for adding per-radio interface combination data.
Signed-off-by: Felix Fietkau <nbd@nbd.name >
Link: https://patch.msgid.link/22a0eee19dbcf98627239328bc66decd3395122c.1719919832.git-series.nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-08 17:27:04 +02:00
Aleksandr Mishin
85099c7ce4
wifi: rtw89: Fix array index mistake in rtw89_sta_info_get_iter()
...
In rtw89_sta_info_get_iter() 'status->he_gi' is compared to array size.
But then 'rate->he_gi' is used as array index instead of 'status->he_gi'.
This can lead to go beyond array boundaries in case of 'rate->he_gi' is
not equal to 'status->he_gi' and is bigger than array size. Looks like
"copy-paste" mistake.
Fix this mistake by replacing 'rate->he_gi' with 'status->he_gi'.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: e3ec7017f6 ("rtw89: add Realtek 802.11ax driver")
Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20240703210510.11089-1-amishin@t-argos.ru
2024-07-05 10:03:48 +08:00
Fredrik Lönnegren
a1e7eafd12
wifi: rtlwifi: fix default typo
...
Change 'defult' to 'default' in comments in several rtlwifi drivers.
Signed-off-by: Fredrik Lönnegren <fredrik@frelon.se >
Acked-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20240703070627.135328-1-fredrik@frelon.se
2024-07-05 09:59:46 +08:00
Zong-Zhe Yang
8095364696
wifi: rtw89: unify the selection logic of RFK table when MCC
...
Driver will notify FW the target index of RFK table to use at some
moments. When MCC (multi-channel concurrent), the correctness of the
notification is especially important.
We now unify the selection logic of RFK table as below among chips.
1. check each table if it matches target channel
2. check all tables if any is idle by iterating active channels
3. replace the first table if all are busy unexpectedly
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20240702124452.18747-2-pkshih@realtek.com
2024-07-05 09:51:34 +08:00
Zong-Zhe Yang
1e71be6a34
wifi: rtw89: mac: parse MRC C2H failure report
...
MRC (multi-role concurrency) has a C2H event for status report. Newer
FW will report some kinds of failures. We parse them now and show by
debug log.
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20240702124452.18747-1-pkshih@realtek.com
2024-07-05 09:50:44 +08:00
Ping-Ke Shih
52bc83ad2e
wifi: rtw89: 8852bx: add extra handles of BTC for 8852BT in 8852b_common
...
For 8852BT, the initial settings of BT-coexistence is a little bit
different, so add the extra handles.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20240701014619.7300-2-pkshih@realtek.com
2024-07-05 09:48:10 +08:00
Ping-Ke Shih
0e557c5c1a
wifi: rtw89: 8852bx: move BTC common code from 8852b to 8852b_common
...
The BT coexistence part of 8852B and 8852BT are similar, so move shared
code into common module.
Don't change logic for existing RTL8852BE.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20240701014619.7300-1-pkshih@realtek.com
2024-07-05 09:47:57 +08:00
Marcin Ślusarz
adc539784c
wifi: rtw88: usb: schedule rx work after everything is set up
...
Right now it's possible to hit NULL pointer dereference in
rtw_rx_fill_rx_status on hw object and/or its fields because
initialization routine can start getting USB replies before
rtw_dev is fully setup.
The stack trace looks like this:
rtw_rx_fill_rx_status
rtw8821c_query_rx_desc
rtw_usb_rx_handler
...
queue_work
rtw_usb_read_port_complete
...
usb_submit_urb
rtw_usb_rx_resubmit
rtw_usb_init_rx
rtw_usb_probe
So while we do the async stuff rtw_usb_probe continues and calls
rtw_register_hw, which does all kinds of initialization (e.g.
via ieee80211_register_hw) that rtw_rx_fill_rx_status relies on.
Fix this by moving the first usb_submit_urb after everything
is set up.
For me, this bug manifested as:
[ 8.893177] rtw_8821cu 1-1:1.2: band wrong, packet dropped
[ 8.910904] rtw_8821cu 1-1:1.2: hw->conf.chandef.chan NULL in rtw_rx_fill_rx_status
because I'm using Larry's backport of rtw88 driver with the NULL
checks in rtw_rx_fill_rx_status.
Link: https://lore.kernel.org/linux-wireless/CA+shoWQ7P49jhQasofDcTdQhiuarPTjYEDa--NiVVx494WcuQw@mail.gmail.com/
Signed-off-by: Marcin Ślusarz <mslusarz@renau.com >
Cc: Tim K <tpkuester@gmail.com >
Cc: Ping-Ke Shih <pkshih@realtek.com >
Cc: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Kalle Valo <kvalo@kernel.org >
Cc: linux-wireless@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20240528110246.477321-1-marcin.slusarz@gmail.com
2024-07-05 09:38:18 +08:00
Miri Korenblit
1b431ba4ef
wifi: iwlwifi: mvm: re-enable MLO
...
MLO was temporarily disabled by
commit 5f40400505 ("wifi: iwlwifi: mvm: disable MLO for the time being"),
until it will stabilize.
Now, that all the bugs were fixed and the minimum FW version was bumped
to a stable one, we can re-enable MLO back.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240703132713.8f77a71c3902.Ib302054cbd8fba82db97eb5298b2aaf8bbe106df@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-04 13:50:10 +02:00
Anjaneyulu
ef7ddf4e2f
wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v12
...
Add support for activate/deactivate unii4 in USA, Canada and WW by
reading DSM function 8 from UEFI or ACPI and sending it to the FW.
Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240703125541.674604cbb6d1.Ibb946ae8ce7a760940a3c9d101e7f4f1808c43e4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-04 13:50:06 +02:00
Mukesh Sisodiya
1895712afd
wifi: iwlwifi: Remove debug message
...
Debug logs related to reset_fw are logged with all
notification/response and polluting the trace.
Remove the debug message related to reset_fw setting
when dump is collected.
Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240703125541.8fc59cb17526.Ibb5d68b2fe5f7df709db3570de55a566d5af3f24@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-04 13:50:06 +02:00
Johannes Berg
8d4f5969f7
wifi: iwlwifi: mvm: document remaining mvm data
...
Many iwl_mvm_vif members are not documented, add that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240703125541.371664e5e8cd.I593ebee1ab984554b6d269dc2dddc67fbf3bb537@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-04 13:50:06 +02:00
Johannes Berg
6188855fbb
wifi: iwlwifi: fw: api: fix missing RX descriptor kernel-doc
...
The v1/v3 remaining bits are not annotated in kernel-doc,
fix that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240703125541.d7adf8b235fe.I91f75e292d1648f61e5e341e1fe58096f858853d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-04 13:50:06 +02:00
Johannes Berg
137579d65d
wifi: iwlwifi: document PPAG table command union correctly
...
This is not documented correctly, fix it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240703125541.2ff5ee61e9ec.I3a1299061e472490c38a9fff4bea319ba20f313a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-04 13:50:06 +02:00
Johannes Berg
94c97e1178
wifi: iwlwifi: fw: api: add puncturing to PHY context docs
...
Document the puncture_mask field in the PHY context.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240703125541.8ba6536ea36b.I181d8da205a14f4fcbf1d8cc6011dcf194a1638a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-04 13:50:06 +02:00
Johannes Berg
6009de8014
wifi: iwlwifi: fw: api: mac: fix kernel-doc
...
Fix kernel-doc for MAC context APIs.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240703125541.a7179f1b0e7e.Idd7ce381960707978ff0b16035101a2a725a4fd9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-04 13:50:06 +02:00
Johannes Berg
3a84161cd3
wifi: iwlwifi: fw: api: fix memory region kernel-doc
...
Add the missing special_mem union member and use constant
formatting (%) for the type constants.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240703125541.9344b2b94d45.Id770b4f1893308ba43fc039a8851c526312ad2b5@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-04 13:50:06 +02:00
Johannes Berg
5fdbde79ea
wifi: iwlwifi: mvm: add missing string for ROC EMLSR block
...
This should be labeled for the debug output, add the missing
string.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240703125541.03d428f4ff4d.I858f17a5173fe8337cea4e7665fec00dbb15e514@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-04 13:50:05 +02:00
Benjamin Berg
a2ed933dfe
wifi: iwlwifi: release TXQ lock during reclaim
...
Much of the work during reclaim can be done without holding the TXQ
lock and releasing the lock means that command submission can happen at
the same time.
Add a new reclaim_lock to prevent parallel cleanup. Release the lock
while working with an internal copy of the txq->read_ptr and only take
the lock again when updating the read pointer after the cleanup is done.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240703125541.2a81021d49ac.I53698ae92fb75a0461d41176db115462cf8be1cd@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-07-04 13:50:05 +02:00