]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: rtw88: assign mac_id for vif/sta and update to TX desc
authorPing-Ke Shih <pkshih@realtek.com>
Mon, 19 Aug 2024 02:52:48 +0000 (10:52 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 2 Sep 2024 00:44:54 +0000 (08:44 +0800)
commit902cb7b11f9a7ff07233cc4c626b54c3e4703149
treeeea8f198fc3108b68e64934284fbcb7fcf1fe132
parentfaa2e484b393c56bc1243dca6676a70bc485f775
wifi: rtw88: assign mac_id for vif/sta and update to TX desc

A mac_id as an instance in firmware has to be assigned for each station
including AP and connected stations. Firmware will use the mac_id to
control TX rate and do statistics.

Assignment rule is to assign mac_id to each vif when adding vif.
For station mode, sta->mac_id will reuse vif->mac_id. For AP mode,
dynamically allocate an sta->mac_id to a station, and vif->mac_id is
used to send broadcast/multicast packets which are not belong to
a station. For example,

                  vif->mac_id      sta->mac_id
vif0 (STA mode)        0               0
vif1 (AP mode)         1               2...

By the way, remove unused RTW_BC_MC_MACID, which was planed to send
broadcast/multicast packets on fixed mac_id.

Tested-on RTL8822CE with STA + AP SCC mode.

Link: https://lore.kernel.org/linux-wireless/e4be0a75-43b2-4ae5-9aab-5c4a88e78097@gmail.com/
Cc: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240819025248.17939-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtw88/mac80211.c
drivers/net/wireless/realtek/rtw88/main.c
drivers/net/wireless/realtek/rtw88/main.h
drivers/net/wireless/realtek/rtw88/tx.c
drivers/net/wireless/realtek/rtw88/tx.h