diff options
author | Lorenzo Bianconi <lorenzo.bianconi@redhat.com> | 2018-12-10 13:22:00 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-01-11 17:10:16 +0300 |
commit | b9f81643b6aea47602adc3a61edf5ad207d640ec (patch) | |
tree | 5fdac461949d05dfb4798c99874ed05b46519a1e | |
parent | e207afa0232d40606e025059c18c70b89a7d5912 (diff) | |
download | linux-b9f81643b6aea47602adc3a61edf5ad207d640ec.tar.xz |
mt76x0: pci: fix ACS support
Fix Automatic Channel Selection (ACS) support in mt76x0e driver
configuring properly MT_CH_TIME_CFG register
Fixes: 6250318694ca ("mt76x0: pci: add get_survey support")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c index d895b6f3dc44..1906cc62690f 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c @@ -141,6 +141,14 @@ static int mt76x0e_register_device(struct mt76x02_dev *dev) mt76_clear(dev, 0x110, BIT(9)); mt76_set(dev, MT_MAX_LEN_CFG, BIT(13)); + mt76_wr(dev, MT_CH_TIME_CFG, + MT_CH_TIME_CFG_TIMER_EN | + MT_CH_TIME_CFG_TX_AS_BUSY | + MT_CH_TIME_CFG_RX_AS_BUSY | + MT_CH_TIME_CFG_NAV_AS_BUSY | + MT_CH_TIME_CFG_EIFS_AS_BUSY | + FIELD_PREP(MT_CH_TIME_CFG_CH_TIMER_CLR, 1)); + err = mt76x0_register_device(dev); if (err < 0) return err; |