diff options
author | Lorenzo Bianconi <lorenzo.bianconi@redhat.com> | 2018-12-12 22:51:55 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-01-11 15:10:18 +0100 |
commit | f82ce8d9bd49ed1c3487662c734badfbf560cfe0 (patch) | |
tree | 5f71781dbc7555c9d236d49467ea241d523e17fa /drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c | |
parent | 3fd612df8ac79d8ac902985cb570f1723a82e979 (diff) | |
download | linux-f82ce8d9bd49ed1c3487662c734badfbf560cfe0.tar.bz2 |
mt76: add energy detect CCA support to mt76x{0,2}e drivers
Ported from the reference driver. Should fix compliance with ETSI
regulatories on preventing transmission while energy detect values
are above the threshold.
The code has been tested using an ath9k device running tx99 as
noise generator
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c b/drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c index 5bd523b091b6..19fdcab746a0 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c @@ -884,6 +884,10 @@ mt76x02_dfs_set_domain(struct mt76x02_dev *dev, mutex_lock(&dev->mt76.mutex); if (dfs_pd->region != region) { tasklet_disable(&dfs_pd->dfs_tasklet); + + dev->ed_monitor = region == NL80211_DFS_ETSI; + mt76x02_edcca_init(dev); + dfs_pd->region = region; mt76x02_dfs_init_params(dev); tasklet_enable(&dfs_pd->dfs_tasklet); |