• Ping-Ke Shih's avatar
    rtw89: correct use of BA CAM · 3ffbb5a8
    Ping-Ke Shih authored
    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: default avatarPing-Ke Shih <pkshih@realtek.com>
    Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
    Link: https://lore.kernel.org/r/20220104012052.6911-1-pkshih@realtek.com
    3ffbb5a8
core.h 74.4 KB