mt76: mt7921: fix mgmt frame using unexpected bitrate
authorSean Wang <sean.wang@mediatek.com>
Tue, 13 Jul 2021 20:16:00 +0000 (04:16 +0800)
committerFelix Fietkau <nbd@nbd.name>
Wed, 20 Oct 2021 08:36:28 +0000 (10:36 +0200)
commit326d229f86226670bff7fcadb01bc2b33f112dbf
tree56605165a16b48eb38e3852c5ae5ebfd7fd4be80
parente4867225431fe6bf09969516994002966c5b755c
mt76: mt7921: fix mgmt frame using unexpected bitrate

Fix the current driver mgmt frame is not respecting the basic rates field
provided by the AP and then unconditionally is using the lowest (1 or 6
Mbps) rate.

For example, if the AP only supported basic rate {24, 36, 48, 54} Mbps,
mt7921 cannot send mgmt frame with the rate not in the group. So,
instead, we pick up the lowest basic rate the AP can support to send.

Fixes: 163f4d22c118 ("mt76: mt7921: add MAC support")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7921/mac.c
drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h