diff options
author | Lorenzo Bianconi <lorenzo.bianconi@redhat.com> | 2018-07-12 10:50:01 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-07-30 17:32:36 +0300 |
commit | d0db2f7a02e45dd4791b70404bd90874b20c38a4 (patch) | |
tree | b7d278cc88608382c5ff90d02e7b429bfb6a9b47 | |
parent | f24909ab394347e7a3f329ad5c93f470a1d238a9 (diff) | |
download | blackbird-op-linux-d0db2f7a02e45dd4791b70404bd90874b20c38a4.tar.gz blackbird-op-linux-d0db2f7a02e45dd4791b70404bd90874b20c38a4.zip |
mt76x2: fix CCK protection control frame rate
Use 11M as tx rate for CCK protection control frames
Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c index 79ab93613e06..8ab9788464e8 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c @@ -84,7 +84,13 @@ mt76x2_write_reg_pairs(struct mt76x2_dev *dev, static void mt76_write_mac_initvals(struct mt76x2_dev *dev) { -#define DEFAULT_PROT_CFG \ +#define DEFAULT_PROT_CFG_CCK \ + (FIELD_PREP(MT_PROT_CFG_RATE, 0x3) | \ + FIELD_PREP(MT_PROT_CFG_NAV, 1) | \ + FIELD_PREP(MT_PROT_CFG_TXOP_ALLOW, 0x3f) | \ + MT_PROT_CFG_RTS_THRESH) + +#define DEFAULT_PROT_CFG_OFDM \ (FIELD_PREP(MT_PROT_CFG_RATE, 0x2004) | \ FIELD_PREP(MT_PROT_CFG_NAV, 1) | \ FIELD_PREP(MT_PROT_CFG_TXOP_ALLOW, 0x3f) | \ @@ -159,8 +165,8 @@ mt76_write_mac_initvals(struct mt76x2_dev *dev) { MT_HT_CTRL_CFG, 0x000001ff }, }; struct mt76x2_reg_pair prot_vals[] = { - { MT_CCK_PROT_CFG, DEFAULT_PROT_CFG }, - { MT_OFDM_PROT_CFG, DEFAULT_PROT_CFG }, + { MT_CCK_PROT_CFG, DEFAULT_PROT_CFG_CCK }, + { MT_OFDM_PROT_CFG, DEFAULT_PROT_CFG_OFDM }, { MT_MM20_PROT_CFG, DEFAULT_PROT_CFG_20 }, { MT_MM40_PROT_CFG, DEFAULT_PROT_CFG_40 }, { MT_GF20_PROT_CFG, DEFAULT_PROT_CFG_20 }, |