wifi: mt76: mt7921: fix the wrong rate pickup for the chanctx driver
authorSean Wang <sean.wang@mediatek.com>
Mon, 18 Sep 2023 08:03:07 +0000 (16:03 +0800)
committerFelix Fietkau <nbd@nbd.name>
Sat, 30 Sep 2023 18:03:05 +0000 (20:03 +0200)
commit32b1000db221df33ec8b57794a091ba6075b6c28
treeb867534a1ede87b314c0eb0bd16fb8a13f2c7850
parentf50206555992abb802cee4e3f951d1ea669cb8bc
wifi: mt76: mt7921: fix the wrong rate pickup for the chanctx driver

The variable band should be determined by the ieee80211_chanctx_conf when
the driver is a kind of chanctx one e.g mt7921 and mt7922 driver so we
added the extension to mt76_connac2_mac_tx_rate_val by distinguishing if
it can support chanctx to fix the incorrect rate pickup.

Fixes: 41ac53c899bd ("wifi: mt76: mt7921: introduce chanctx support")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Reviewed-by: David Ruth <druth@chromium.org>
Tested-by: David Ruth <druth@chromium.org>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mac80211.c
drivers/net/wireless/mediatek/mt76/mt76.h
drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c