wifi: mt76: mt7921: update the channel usage when the regd domain changed
authorMing Yen Hsieh <mingyen.hsieh@mediatek.com>
Sat, 30 Sep 2023 02:25:09 +0000 (10:25 +0800)
committerFelix Fietkau <nbd@nbd.name>
Sat, 30 Sep 2023 18:17:18 +0000 (20:17 +0200)
commit09382d8f8641bc12fffc41a93eb9b37be0e653c0
treeacb9d8d97d1fd2f61504bceb73bfc42fc4abf6a7
parent4fc8df50fd41c2762d893211487be0ecb24c6a05
wifi: mt76: mt7921: update the channel usage when the regd domain changed

The 5.9/6GHz channel license of a certain platform device has been
regulated in various countries. That may be difference with standard
Liunx regulatory domain settings. In this case, when .reg_notifier()
called for regulatory change, mt792x chipset should update the channel
usage based on clc or dts configurations.

Channel would be disabled by following cases.
* clc report the particular UNII-x is disabled.
* dts enabled and the channel is not configured.

Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Co-developed-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/eeprom.c
drivers/net/wireless/mediatek/mt76/mt76.h
drivers/net/wireless/mediatek/mt76/mt7921/init.c
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c