Sean Wang [Sat, 6 Jul 2024 08:28:15 +0000 (01:28 -0700)]
wifi: mt76: mt7925: update mt7925_mac_link_bss_add for MLO
Update band_idx in per-link BSS to be auto for the MLO-enabled firmware
and the MLO-enabled firmware only supports omac index in 0.
The change remains compatible with the non-MLO mode and the older firmware.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/37fcf3ea7b4883840d61f97231277b297e1b15a3.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:28:14 +0000 (01:28 -0700)]
wifi: mt76: mt7925: update mt7925_mcu_bss_basic_tlv for MLO
update mt7925_mcu_bss_basic_tlv for the MLO-enabled firmware.
The change remains compatible with the non-MLO mode and the
older firmware.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/583a3ac10583cfef0028f9a0b5a4802fc4070b99.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:28:13 +0000 (01:28 -0700)]
wifi: mt76: mt7925: update mt7925_mcu_set_timing for MLO
Set the BSS index from the per-linked BSS for the firmware to identify
which link the command is operating on.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/dde970c748586d03fbecbccb10cb9903284719aa.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:28:12 +0000 (01:28 -0700)]
wifi: mt76: mt7925: update mt7925_mcu_sta_phy_tlv for MLO
when we serve MLO during the multiple-linked connection, the chanctx may
be not available in the internal driver, we should get the proper the
band information from link_conf for the MLO-enabled firmware.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/6620e00fbeef686fb2041556deba346411eab0f1.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:28:11 +0000 (01:28 -0700)]
wifi: mt76: mt7925: update mt7925_mcu_sta_rate_ctrl_tlv for MLO
Get band information from the per-link BSS.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/4f6ca2d082627bb93f79d5a4df80dc08998ee5d2.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:28:10 +0000 (01:28 -0700)]
wifi: mt76: mt7925: add mt7925_mcu_sta_eht_mld_tlv for MLO
add mt7925_mcu_sta_eht_mld_tlv for the MLO-enabled firmware.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/a1001592eeef4e4ee2c3e15dc94cca0815d64e59.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:28:09 +0000 (01:28 -0700)]
wifi: mt76: mt7925: update mt7925_mcu_sta_update for MLO
update mt7925_mcu_sta_update for the MLO-enabled firmware.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/2e25bfc2d8aa503ecd1ba8099c6e54dce0c27b99.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:28:08 +0000 (01:28 -0700)]
wifi: mt76: mt7925: update mt7925_mcu_add_bss_info for MLO
Update mt7925_mcu_bss_mld_tlv for the MLO-enabled firmware
The change remains compatible with the non-MLO mode and the
older firmware.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/a3d03b0a1ca916b2b8b2e7c0afcdcd7e258d97c3.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:28:07 +0000 (01:28 -0700)]
wifi: mt76: mt7925: update mt7925_mcu_bss_mld_tlv for MLO
update mt7925_mcu_bss_mld_tlv for the MLO-enabled firmware,
the change remains compatible with the non-MLO mode and the
older firmware.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/2d89b93bcfd92e7c6987aaa0a3c4637e605ac154.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:28:06 +0000 (01:28 -0700)]
wifi: mt76: mt7925: update mt7925_mcu_sta_mld_tlv for MLO
Update mt7925_mcu_sta_mld_tlv for the MLO-enabled firmware.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/25ea3ffd3875083577ab440ec63f3dcd9dc233f4.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:28:05 +0000 (01:28 -0700)]
wifi: mt76: mt7925: add mt7925_[assign,unassign]_vif_chanctx
add mt7925_[assign,unassign]_vif_chanctx to assign and unassign
chanctx to the specific link configuration. If the chctx is not
pass in the parameter, we will look up the channel information
from link_conf->chanreq.oper.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/15261879a16cb12674d6dea7703410baa6883799.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:28:04 +0000 (01:28 -0700)]
wifi: mt76: add def_wcid to struct mt76_wcid
add def_wcid to struct mt76_wcid to allow per-link wcid to retrieve the
struct ieee80211_sta structure.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/d5188ca633666eaad7e90a8061d1a0585487e128.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:28:03 +0000 (01:28 -0700)]
wifi: mt76: mt7925: report link information in rx status
report link information in rx status
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/c7cdc17d94375a76802a5c4a825ea3e51cdb53af.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:28:02 +0000 (01:28 -0700)]
wifi: mt76: mt7925: update rate index according to link id
Update rate index according to link id.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/e0bbc0932edbd9225fe7b7736693c137cf433a52.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:28:01 +0000 (01:28 -0700)]
wifi: mt76: mt7925: add link handling in the mt7925_ipv6_addr_change
add link handling in the mt7925_ipv6_addr_change
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/ed429b1896cc10c8db25dc2ade3e59bec78d7131.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:28:00 +0000 (01:28 -0700)]
wifi: mt76: mt7925: add link handling in the BSS_CHANGED_ARP_FILTER handler
add link handling in the BSS_CHANGED_ARP_FILTER handler.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/6e26e2ce253630ab29702693a7822f9961de6a18.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:59 +0000 (01:27 -0700)]
wifi: mt76: mt7925: add link handling in mt7925_vif_connect_iter
add link handling in mt7925_vif_connect_iter
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/c8d66043a4d31801249d53dd23f695c28a97a933.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:58 +0000 (01:27 -0700)]
wifi: mt76: mt7925: add link handling in mt7925_sta_set_decap_offload
add link handling in mt7925_sta_set_decap_offload
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/df2524e3a63a93699bde441e4ab70a70bbac53ef.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:57 +0000 (01:27 -0700)]
wifi: mt76: mt7925: add link handling in mt7925_mac_sta_assoc
add links handling in mt7925_mac_sta_assoc
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/0ddf1834783b111d626b05d298478f520d7c0caa.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:56 +0000 (01:27 -0700)]
wifi: mt76: mt7925: add link handling in mt7925_txwi_free
add link handling in mt7925_txwi_free.
MT7996 should have the similar the logic, we try to copy from there to
ensure consistency between both.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/f8084e19d388c6b0807618ac6d1bb8ac633dc8cd.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:55 +0000 (01:27 -0700)]
wifi: mt76: mt7925: add link handling in mt7925_mcu_set_beacon_filter
add link handling in mt7925_mcu_set_beacon_filter
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/b814718a40ad5df6100e63d15c87ba95a318bc22.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:54 +0000 (01:27 -0700)]
wifi: mt76: mt7925: add link handling in the BSS_CHANGED_PS handler
Added link handling in the BSS_CHANGED_PS handler.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/542ca29261af0cac007d2cb821ed36284d51c679.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:53 +0000 (01:27 -0700)]
wifi: mt76: mt7925: add link handling to mt7925_change_chanctx
add link handling to mt7925_change_chanctx
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/49f2a2f8230979a4e123bc1dab70a8496875cc6c.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:52 +0000 (01:27 -0700)]
wifi: mt76: mt7925: add link handling in mt7925_set_key
add link handling in mt7925_set_key to support MLO-enabled
firmware.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/164608d96ce10a40e673bc6f252189c94bc48da7.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:51 +0000 (01:27 -0700)]
wifi: mt76: mt7925: add link handling to txwi
add link handling to mt792x_tx and writing txwi.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/c0a7c0b33ea2640bcb4f13a5f79a8976b73fa8f2.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:50 +0000 (01:27 -0700)]
wifi: mt76: mt7925: add link handling in mt7925_mac_sta_remove
Added link handling to mt7925_mac_sta_remove, supporting the MLO-enabled
firmware. The change remains comptabile with the non-MLO mode.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/20d53511fe1f64984d893f4d3ec87cb9f87d3070.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:49 +0000 (01:27 -0700)]
wifi: mt76: mt7925: add link handling in mt7925_mac_sta_add
Added link handling to mt7925_mac_sta_add to support MLD devices.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/632faefe8c82cd5609c2af00aabee15ccc9616ed.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:48 +0000 (01:27 -0700)]
wifi: mt76: mt7925: add mt7925_change_sta_links
add mt7925_change_sta_links to change the valid links of a station,
supporting the MLO-enabled firmware.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/eeedec88f0576315791a8b1b453464173a4addbe.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:47 +0000 (01:27 -0700)]
wifi: mt76: mt7925: add mt7925_change_vif_links
Add mt7925_change_vif_links to change the valid links on an interface,
supporting the MLO-enabled firmware.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/31c9de30c3a18592c8e100f909845383b66f8677.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:46 +0000 (01:27 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_uni_roc_event
We extended the function to be able multiple pieces of information
in a single event, supporting the future MLO-enabled firmware.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/4be7b34904034d521dab147883b898b5402fd29f.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:45 +0000 (01:27 -0700)]
wifi: mt76: mt7925: add mt7925_set_link_key
add mt7925_set_link_key to set up the key according to the link id
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/e8cd7d37484be238a4eb9e500ef2b8aa46e43667.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:44 +0000 (01:27 -0700)]
wifi: mt76: mt7925: set mt7925_mcu_sta_key_tlv according to link id
configure mt7925_mcu_sta_key_tlv according to link id
We created a link id field in the common structure mt76_wcid so that
mt7925_mcu_sta_key_tlv can access per-link STA/BSS. Additionally,
.link_id will be required when reporting the link information of Rx status
to mac80211. We will submit the changes for reporting the Rx status in
a separate patch.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/16d65aae010113f9be3c4e6e759b4226d396a1be.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:43 +0000 (01:27 -0700)]
wifi: mt76: mt7925: set Tx queue parameters according to link id
Configure TX queue parameters according to link id.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/84a401891b8942f66d1ffbd0a3f10866c94d1bc0.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Sat, 6 Jul 2024 08:27:42 +0000 (01:27 -0700)]
wifi: mt76: mt7925: update mt7925_mac_link_sta_[add, assoc, remove] for MLO
[add, assoc, remove] the per-link STA from the corresponding to per-link
BSS with the same link id. The change remains compatible with the non-MLO
mode.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/2410cc73eec3849c2185b5cfa613b7e903e68abb.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Wed, 3 Jul 2024 21:42:06 +0000 (14:42 -0700)]
wifi: mt76: mt7925: update mt76_connac_mcu_uni_add_dev for MLO
Set OMAC address with the per-link BSS. The change remains compatible with
the non-MLO mode and the older firmware.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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/6b2502d0c3a53093f83ae33329e9d782ba2465b3.1720042294.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:41 +0000 (20:02 -0700)]
wifi: mt76: mt7925: simpify mt7925_mcu_sta_cmd logic by removing fw_offload
The mt7925 only supports offload firmware making the fw_offload check
redundant. This update simplifies the logic in "mt7925_mcu_sta_cmd"
by removing the unnecessary check for fw_offoad.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20240613030241.5771-48-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:40 +0000 (20:02 -0700)]
wifi: mt76: mt7925: add mt7925_mac_link_bss_remove to remove per-link BSS
The mt7925_mac_link_bss_remove function currently removes the per-link BSS.
We will extend this function when we implement the MLO functionality.
This patch only includes structural changes and does not involve any
logic changes.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20240613030241.5771-47-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:39 +0000 (20:02 -0700)]
wifi: mt76: mt7925: add mt7925_mac_link_bss_add to create per-link BSS
The mt7925_mac_link_bss_add function currently creates the per-link BSS.
We will extend this function when we implement the MLO functionality.
This patch only includes structural changes and does not involve any
logic changes.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20240613030241.5771-46-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:38 +0000 (20:02 -0700)]
wifi: mt76: mt7925: add mt7925_mac_link_sta_remove to remove per-link STA
The mt7925_mac_link_sta_remove function currently removes the per-link STA.
We will extend this function when we implement the MLO functionality.
This patch only includes structural changes and does not involve any
logic changes.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20240613030241.5771-45-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:37 +0000 (20:02 -0700)]
wifi: mt76: mt7925: add mt7925_mac_link_sta_assoc to associate per-link STA
The mt7925_mac_link_sta_add function currently associates the per-link STA.
We will extend this function when we implement the MLO functionality.
This patch only includes structural changes and does not involve any
logic changes.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20240613030241.5771-44-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:36 +0000 (20:02 -0700)]
wifi: mt76: mt7925: add mt7925_mac_link_sta_add to create per-link STA
The mt7925_mac_link_sta_add function currently adds the per-link STA.
We will extend this function when we implement the MLO functionality.
This patch only includes structural changes and does not involve any
logic changes.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20240613030241.5771-43-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:35 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_bss_basic_tlv for per-link STA
Extend mt7925_mcu_bss_basic_tlv with the per-link STA configuration.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-42-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:34 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_bss_mld_tlv for per-link STA
Extend mt7925_mcu_bss_mld_tlv with the per-link STA configuration.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-41-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:33 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_add_bss_info for per-link STA
Extend mt7925_mcu_add_bss_info with the per-link STA 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: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-40-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:32 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_sta_hdr_trans_tlv for per-link STA
Extend mt7925_mcu_sta_hdr_trans_tlv with per-link STA 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: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-39-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:31 +0000 (20:02 -0700)]
wifi: mt76: mt762x: extend mt76_connac_mcu_sta_basic_tlv for per-link STA
Extend mt76_connac_mcu_sta_basic_tlv with the per-link STA 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: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-38-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:30 +0000 (20:02 -0700)]
wifi: mt76: mt792x: extend mt76_connac_get_phy_mode_v2 for per-link STA
Extend mt76_connac_get_phy_mode_v2 with the per-link STA 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.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20240613030241.5771-37-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:29 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_get_phy_mode for per-link STA
Extend mt7925_get_phy_mode with the per-link STA 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: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-36-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:28 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_get_phy_mode_ext for per-link STA
Extend mt7925_get_phy_mode_ext with the per-link STA 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: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-35-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:27 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_sta_phy_tlv for per-link STA
Extend mt7925_mcu_sta_phy_tlv with per-link STA 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: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-34-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:26 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_sta_ht_tlv for per-link STA
Extend mt7925_mcu_sta_ht_tlv with the per-link STA 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: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-33-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:25 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_sta_vht_tlv for per-link STA
Extend mt7925_mcu_sta_vht_tlv with the per-link STA 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: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-32-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:24 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_sta_amsdu_tlv for per-link STA
Extend mt7925_mcu_sta_amsdu_tlv with the per-link STA 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: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-31-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:23 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_sta_he_tlv for per-link STA
Extend mt7925_mcu_sta_he_tlv with the per-link STA 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: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-30-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:22 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_sta_he_6g_tlv for per-link STA
Extend mt7925_mcu_sta_he_6g_tlv with the per-link STA 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: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-29-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:21 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_sta_eht_tlv for per-link STA
Extend mt7925_mcu_sta_eht_tlv with the per-link STA 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: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-28-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:20 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_sta_rate_ctrl_tlv with per-link STA
Extend mt7925_mcu_sta_rate_ctrl_tlv with the per-link STA 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: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-27-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:19 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_sta_state_v2_tlv for per-link STA
Extend mt7925_mcu_sta_state_v2_tlv with the per-link STA 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: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
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-26-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:18 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_sta_update for per-link STA
Extend mt7925_mcu_sta_update with the per-link STA 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.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20240613030241.5771-25-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:17 +0000 (20:02 -0700)]
wifi: mt76: mt7925: mt7925_mcu_set_chctx rely on mt7925_mcu_bss_rlm_tlv
make mt7925_mcu_set_chctx rely on mt7925_mcu_bss_rlm_tlv to get rid of
the redundant code.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20240613030241.5771-24-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:16 +0000 (20:02 -0700)]
wifi: mt76: mt7925: add mt7925_mcu_bss_rlm_tlv to constitue the RLM TLV
add mt7925_mcu_bss_rlm_tlv to maintain consistency with the other TLVs that
constitute the command for creating the per-link BSS.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20240613030241.5771-23-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:15 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_uni_bss_ps for per-link BSS
Extend mt7925_mcu_uni_bss_ps 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-22-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:14 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_uni_bss_bcnft for per-link BSS
Extend mt7925_mcu_uni_bss_bcnft 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-21-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:13 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_[abort, set]_roc for per-link BSS
The channel context has to be bound with the per-link BSS, thus,
we extend mt7925_mcu_[abort, set]_roc to work with the 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-20-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:12 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_set_bss_pm for per-link BSS
Extend mt7925_mcu_set_bss_pm 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-19-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:11 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_bss_basic_tlv for per-link BSS
Extend mt7925_mcu_bss_basic_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-18-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:10 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_bss_sec_tlv for per-link BSS
Extend mt7925_mcu_bss_sec_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-17-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:09 +0000 (20:02 -0700)]
wifi: mt76: mt7925: remove unused parameters in mt7925_mcu_bss_bmc_tlv
remove unused parameters in mt7925_mcu_bss_bmc_tlv
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-16-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:08 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_bss_bmc_tlv for per-link BSS
Extend mt7925_mcu_bss_bmc_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-15-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:07 +0000 (20:02 -0700)]
wifi: mt76: mt7925: extend mt7925_mcu_bss_mld_tlv for per-link BSS
Extend mt7925_mcu_bss_mld_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-14-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sean Wang [Thu, 13 Jun 2024 03:02:06 +0000 (20:02 -0700)]
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>
Sean Wang [Thu, 13 Jun 2024 03:02:05 +0000 (20:02 -0700)]
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>
Sean Wang [Thu, 13 Jun 2024 03:02:04 +0000 (20:02 -0700)]
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>
Sean Wang [Thu, 13 Jun 2024 03:02:03 +0000 (20:02 -0700)]
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>
Sean Wang [Thu, 13 Jun 2024 03:02:02 +0000 (20:02 -0700)]
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>
Sean Wang [Thu, 13 Jun 2024 03:02:01 +0000 (20:02 -0700)]
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>
Deren Wu [Thu, 13 Jun 2024 03:02:00 +0000 (20:02 -0700)]
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>
Sean Wang [Thu, 13 Jun 2024 03:01:59 +0000 (20:01 -0700)]
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>
Deren Wu [Thu, 13 Jun 2024 03:01:58 +0000 (20:01 -0700)]
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>
Deren Wu [Thu, 13 Jun 2024 03:01:57 +0000 (20:01 -0700)]
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>
Deren Wu [Thu, 13 Jun 2024 03:01:56 +0000 (20:01 -0700)]
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>
Deren Wu [Thu, 13 Jun 2024 03:01:55 +0000 (20:01 -0700)]
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>
Kalle Valo [Tue, 9 Jul 2024 10:17:09 +0000 (13:17 +0300)]
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
Chen Ni [Thu, 4 Jul 2024 09:06:22 +0000 (17:06 +0800)]
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
Sascha Hauer [Wed, 3 Jul 2024 07:24:09 +0000 (09:24 +0200)]
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
Felix Fietkau [Tue, 9 Jul 2024 08:38:38 +0000 (10:38 +0200)]
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>
Felix Fietkau [Tue, 9 Jul 2024 08:38:37 +0000 (10:38 +0200)]
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>
Felix Fietkau [Tue, 9 Jul 2024 08:38:36 +0000 (10:38 +0200)]
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>
Felix Fietkau [Tue, 9 Jul 2024 08:38:35 +0000 (10:38 +0200)]
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>
Felix Fietkau [Tue, 9 Jul 2024 08:38:34 +0000 (10:38 +0200)]
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>
Felix Fietkau [Tue, 9 Jul 2024 08:38:33 +0000 (10:38 +0200)]
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>
Felix Fietkau [Tue, 9 Jul 2024 08:38:32 +0000 (10:38 +0200)]
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>
Felix Fietkau [Tue, 9 Jul 2024 08:38:31 +0000 (10:38 +0200)]
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>
Felix Fietkau [Tue, 9 Jul 2024 08:38:30 +0000 (10:38 +0200)]
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>
Zong-Zhe Yang [Tue, 9 Jul 2024 07:35:31 +0000 (15:35 +0800)]
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:
0a44dfc07074 ("wifi: mac80211: simplify non-chanctx drivers")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 9 Jul 2024 06:34:09 +0000 (08:34 +0200)]
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:
b5d14b0c6716 ("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>
Johannes Berg [Fri, 5 Jul 2024 11:39:21 +0000 (13:39 +0200)]
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>
Michael-CY Lee [Fri, 5 Jul 2024 07:43:46 +0000 (15:43 +0800)]
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>
Michael-CY Lee [Fri, 5 Jul 2024 07:43:26 +0000 (15:43 +0800)]
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>
En-Wei Wu [Fri, 5 Jul 2024 02:37:56 +0000 (10:37 +0800)]
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:
c7cdba31ed8b ("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>