mt76: mt7915: fix mgmt frame using unexpected bitrate
authorSean Wang <sean.wang@mediatek.com>
Tue, 13 Jul 2021 20:16:01 +0000 (04:16 +0800)
committerFelix Fietkau <nbd@nbd.name>
Wed, 20 Oct 2021 08:36:29 +0000 (10:36 +0200)
commitbad67a264183004283f4fa6883d594388eae711d
treead544b3f48f8ffa750daee35d81993ea19cc99bf
parent326d229f86226670bff7fcadb01bc2b33f112dbf
mt76: mt7915: 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: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
Suggested-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7915/mac.c
drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h