diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-04-22 13:25:54 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-05-12 20:52:32 +0300 |
commit | ab9a1ed229ba668c4b0481cd174096f7876933a0 (patch) | |
tree | 5585abaed287d529976b87f95703eef79edcf2c5 /drivers/net/wireless/mediatek/mt76/mt7615/mac.c | |
parent | 61cb60758a05de1eaf5017e37a099fe52c5cce25 (diff) | |
download | linux-ab9a1ed229ba668c4b0481cd174096f7876933a0.tar.xz |
mt76: mt7615: never use an 802.11b CF-End rate on 5GHz
Sometimes mt7615_mac_set_timing gets called while the slot time is still
configured to 20. Ensure that in this case it always uses the OFDM CFend
rate.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7615/mac.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index 396f11e1bbf6..63c7acfd4cc2 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -117,8 +117,9 @@ void mt7615_mac_set_timing(struct mt7615_phy *phy) u32 ofdm = FIELD_PREP(MT_TIMEOUT_VAL_PLCP, 60) | FIELD_PREP(MT_TIMEOUT_VAL_CCA, 24); int sifs, offset; + bool is_5ghz = phy->mt76->chandef.chan->band == NL80211_BAND_5GHZ; - if (phy->mt76->chandef.chan->band == NL80211_BAND_5GHZ) + if (is_5ghz) sifs = 16; else sifs = 10; @@ -151,7 +152,7 @@ void mt7615_mac_set_timing(struct mt7615_phy *phy) FIELD_PREP(MT_IFS_SIFS, sifs) | FIELD_PREP(MT_IFS_SLOT, phy->slottime)); - if (phy->slottime < 20) + if (phy->slottime < 20 || is_5ghz) val = MT7615_CFEND_RATE_DEFAULT; else val = MT7615_CFEND_RATE_11B; |