OSDN Git Service

rtw89: correct use of BA CAM
authorPing-Ke Shih <pkshih@realtek.com>
Tue, 4 Jan 2022 01:20:52 +0000 (09:20 +0800)
committerKalle Valo <kvalo@kernel.org>
Fri, 28 Jan 2022 15:56:11 +0000 (17:56 +0200)
commit3ffbb5a8b8cf6f72de12517ddf2373afc929777e
tree8fef753364350a999b521432398b8707118e0fc4
parentc1ea345deda86cd5a1e19ca84ec3c75c3db2bc59
rtw89: correct use of BA CAM

BA CAM is used to ACK peer's packets, so it must be established when
IEEE80211_AMPDU_RX_START, and free it by IEEE80211_AMPDU_RX_STOP.

The hardware can support two static BA CAM entries, so I implement a bitmap
and a struct to record which entry is used and its corresponding tid. Also,
the hardware can learn and create dynamic BA CAM entries automatically if
received packets don't match static BA CAM. That means it can still work if
we don't use H2C to set static BA CAM. An exception is tid=0 should be
always allocated in static BA CAM, so an existing static BA CAM will be
replaced if it is full and peer is going to establish a BA with tid=0.

The new firmware use new format of this H2C, so I upgrade it as well.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220104012052.6911-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c
drivers/net/wireless/realtek/rtw89/core.h
drivers/net/wireless/realtek/rtw89/fw.c
drivers/net/wireless/realtek/rtw89/fw.h
drivers/net/wireless/realtek/rtw89/mac80211.c