wifi: mt76: mt7996: fix TWT issues
authorPeter Chiu <chui-hao.chiu@mediatek.com>
Fri, 26 Jan 2024 09:09:13 +0000 (17:09 +0800)
committerFelix Fietkau <nbd@nbd.name>
Thu, 22 Feb 2024 08:55:18 +0000 (09:55 +0100)
commit5c832c228f6a7ba7e900c5296ce0fb3844bafec5
treead38b106bbc87b2b2bd35b8fc4c8f04d937c222c
parent9c9c25f1dcdd98fffda564d2073f26219c84a2c3
wifi: mt76: mt7996: fix TWT issues

This patch fixes the following TWT issues:
- Change table_mask to u16 to support up to 16 TWT stations
- Reject TWT flows for duplicated establishment
- Fix possible unaligned pointer
- Remove unsupported TWT_CONTROL_WAKE_DUR_UNIT flag
- The minimum TWT duration supported by mt7996 chipsets is 64. Reply
  with TWT_SETUP_CMD_DICTATE if the min_twt_dur is smaller than 64

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7996/mac.c
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h