wifi: mt76: mt7921: get regulatory information from the clc event

The clc event can report the radio configuration for the corresponding
country and the driver would take it as regulatory information of a
certain platform device.

This patch would change the clc commnad from no-waiting to waiting for
event. For backward compatible, we also add a new nic capability tag
to indicate the firmware did support this new clc event from now on.

Signed-off-by: Ming Yen Hsieh <[email protected]>
Co-developed-by: Deren Wu <[email protected]>
Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Ming Yen Hsieh
2023-09-30 20:17:46 +02:00
committed by Felix Fietkau
parent 581449ac52
commit 9bfd669e94
5 changed files with 41 additions and 4 deletions
+4
View File
@@ -25,6 +25,8 @@
#define MT792x_FW_TAG_FEATURE 4
#define MT792x_FW_CAP_CNM BIT(7)
#define MT792x_CHIP_CAP_CLC_EVT_EN BIT(0)
/* NOTE: used to map mt76_rates. idx may change if firmware expands table */
#define MT792x_BASIC_RATES_TBL 11
@@ -125,6 +127,7 @@ struct mt792x_phy {
struct mt76_mib_stats mib;
u8 sta_work_count;
u8 clc_chan_conf;
enum mt792x_reg_power_type power_type;
struct sk_buff_head scan_event_list;
@@ -133,6 +136,7 @@ struct mt792x_phy {
void *acpisar;
#endif
void *clc[MT792x_CLC_MAX_NUM];
u64 chip_cap;
struct work_struct roc_work;
struct timer_list roc_timer;