qcacld-3.0: Regdomain kernel-doc and other changes
Add kernel documentation for regdomain data structures. Also
rename some of the data structures to better names.
Change-Id: Iae26079ae8a7f06e2670594694ae36c2c2a0a524
CRs-Fixed: 961806
diff --git a/core/cds/inc/cds_regdomain.h b/core/cds/inc/cds_regdomain.h
index c5db379..68a0bb1 100644
--- a/core/cds/inc/cds_regdomain.h
+++ b/core/cds/inc/cds_regdomain.h
@@ -77,177 +77,6 @@
#define COUNTRY_ERD_FLAG 0x8000
#define WORLDWIDE_ROAMING_FLAG 0x4000
-enum reg_domain {
- NO_ENUMRD = 0x00,
- NULL1_WORLD = 0x03,
- NULL1_ETSIB = 0x07,
- NULL1_ETSIC = 0x08,
-
- FCC1_FCCA = 0x10,
- FCC1_WORLD = 0x11,
- FCC2_FCCA = 0x20,
- FCC2_WORLD = 0x21,
- FCC2_ETSIC = 0x22,
- FCC3_FCCA = 0x3A,
- FCC3_WORLD = 0x3B,
- FCC3_ETSIC = 0x3F,
- FCC4_FCCA = 0x12,
- FCC5_FCCA = 0x13,
- FCC6_FCCA = 0x14,
- FCC7_FCCA = 0x15,
- FCC8_FCCA = 0x16,
- FCC6_WORLD = 0x23,
- FCC9_FCCA = 0x17,
- FCC10_FCCA = 0x18,
- FCC11_WORLD = 0x19,
-
- ETSI1_WORLD = 0x37,
- ETSI3_ETSIA = 0x32,
- ETSI2_WORLD = 0x35,
- ETSI3_WORLD = 0x36,
- ETSI4_WORLD = 0x30,
- ETSI4_ETSIC = 0x38,
- ETSI5_WORLD = 0x39,
- ETSI6_WORLD = 0x34,
- ETSI_RESERVED = 0x33,
- FRANCE_RES = 0x31,
- ETSI7_WORLD = 0x3C,
- ETSI8_WORLD = 0x3D,
- ETSI9_WORLD = 0x3E,
- ETSI10_WORLD = 0x24,
- ETSI11_WORLD = 0x26,
-
- APL4_WORLD = 0x42,
- APL3_FCCA = 0x50,
- APL_RESERVED = 0x44,
- APL2_WORLD = 0x45,
- APL2_FCCA = 0x4D,
- APL2_APLC = 0x46,
- APL3_WORLD = 0x47,
- APL2_APLD = 0x49,
- APL1_WORLD = 0x52,
- APL1_FCCA = 0x53,
- APL1_APLA = 0x54,
- APL1_ETSIC = 0x55,
- APL2_ETSIC = 0x56,
- APL5_WORLD = 0x58,
- APL6_WORLD = 0x5B,
- APL7_FCCA = 0x5C,
- APL8_WORLD = 0x5D,
- APL9_WORLD = 0x5E,
- APL10_WORLD = 0x5F,
- APL11_FCCA = 0x4F,
- APL12_WORLD = 0x51,
- APL13_WORLD = 0x5A,
-
- WOR0_WORLD = 0x60,
- WOR1_WORLD = 0x61,
- WOR2_WORLD = 0x62,
- WOR3_WORLD = 0x63,
- WOR4_FCCA = 0x64,
- WOR5_ETSIC = 0x65,
- WOR01_WORLD = 0x66,
- WOR02_WORLD = 0x67,
- EU1_WORLD = 0x68,
- WOR9_WORLD = 0x69,
- WORA_WORLD = 0x6A,
- WORB_WORLD = 0x6B,
- WORC_WORLD = 0x6C,
-
- MKK3_MKKB = 0x80,
- MKK3_MKKA2 = 0x81,
- MKK3_MKKC = 0x82,
- MKK4_MKKB = 0x83,
- MKK4_MKKA2 = 0x84,
- MKK4_MKKC = 0x85,
- MKK5_MKKA = 0x99,
- MKK5_FCCA = 0x9A,
- MKK5_MKKB = 0x86,
- MKK5_MKKA2 = 0x87,
- MKK5_MKKC = 0x88,
- MKK3_MKKA = 0xF0,
- MKK3_MKKA1 = 0xF1,
- MKK3_FCCA = 0xF2,
- MKK4_MKKA = 0xF3,
- MKK4_MKKA1 = 0xF4,
- MKK4_FCCA = 0xF5,
- MKK9_MKKA = 0xF6,
- MKK9_FCCA = 0xFC,
- MKK9_MKKA1 = 0xFD,
- MKK9_MKKC = 0xFE,
- MKK9_MKKA2 = 0xFF,
- MKK10_MKKA = 0xF7,
- MKK10_FCCA = 0xD0,
- MKK10_MKKA1 = 0xD1,
- MKK10_MKKC = 0xD2,
- MKK10_MKKA2 = 0xD3,
- MKK11_MKKA = 0xD4,
- MKK11_FCCA = 0xD5,
- MKK11_MKKA1 = 0xD6,
- MKK11_MKKC = 0xD7,
- MKK11_MKKA2 = 0xD8,
-
- FCC1 = 0x0110,
- FCC2 = 0x0120,
- FCC3 = 0x0160,
- FCC4 = 0x0165,
- FCC5 = 0x0510,
- FCC6 = 0x0610,
- FCC7 = 0x0710,
- FCC8 = 0x0810,
- FCC9 = 0x0910,
- FCC10 = 0x0B10,
- FCC11 = 0x0B20,
-
- ETSI1 = 0x0130,
- ETSI2 = 0x0230,
- ETSI3 = 0x0330,
- ETSI4 = 0x0430,
- ETSI5 = 0x0530,
- ETSI6 = 0x0630,
- ETSI8 = 0x0830,
- ETSI9 = 0x0930,
- ETSI10 = 0x0D30,
- ETSI11 = 0x0E30,
-
- APL1 = 0x0150,
- APL2 = 0x0250,
- APL3 = 0x0350,
- APL4 = 0x0450,
- APL5 = 0x0550,
- APL6 = 0x0650,
- APL7 = 0x0750,
- APL8 = 0x0850,
- APL9 = 0x0950,
- APL10 = 0x1050,
- APL11 = 0x1150,
- APL12 = 0x1160,
- APL13 = 0x1170,
-
- NULL1 = 0x0198,
- MKK3 = 0x0340,
- MKK4 = 0x0440,
- MKK5 = 0x0540,
- MKK9 = 0x0940,
- MKK10 = 0x1040,
- MKK11 = 0x1140,
-
- WORLD = 0x0199,
- FCCA = 0x0A10,
- MKKA = 0x0A40,
- MKKC = 0x0A50,
- ETSIC = 0x0C30,
-
- DEBUG_REG_DMN = 0x01ff,
-};
-
-enum ctl_val {
- FCC = 0x10,
- MKK = 0x40,
- ETSI = 0x30,
- NO_CTL = 0xff
-};
-
enum country_code {
CTRY_AFGHANISTAN = 4,
CTRY_ALBANIA = 8,
@@ -461,25 +290,194 @@
CTRY_JAPAN56 = 4056,
};
-enum dfs_domain {
- DFS_UNINIT_DOMAIN = 0,
- DFS_FCC_DOMAIN = 1,
- DFS_ETSI_DOMAIN = 2,
- DFS_MKK4_DOMAIN = 3
+enum reg_domain {
+ NO_ENUMRD = 0x00,
+ NULL1_WORLD = 0x03,
+ NULL1_ETSIB = 0x07,
+ NULL1_ETSIC = 0x08,
+
+ FCC1_FCCA = 0x10,
+ FCC1_WORLD = 0x11,
+ FCC2_FCCA = 0x20,
+ FCC2_WORLD = 0x21,
+ FCC2_ETSIC = 0x22,
+ FCC3_FCCA = 0x3A,
+ FCC3_WORLD = 0x3B,
+ FCC3_ETSIC = 0x3F,
+ FCC4_FCCA = 0x12,
+ FCC5_FCCA = 0x13,
+ FCC6_FCCA = 0x14,
+ FCC7_FCCA = 0x15,
+ FCC8_FCCA = 0x16,
+ FCC6_WORLD = 0x23,
+ FCC9_FCCA = 0x17,
+ FCC10_FCCA = 0x18,
+ FCC11_WORLD = 0x19,
+
+ ETSI1_WORLD = 0x37,
+ ETSI3_ETSIA = 0x32,
+ ETSI2_WORLD = 0x35,
+ ETSI3_WORLD = 0x36,
+ ETSI4_WORLD = 0x30,
+ ETSI4_ETSIC = 0x38,
+ ETSI5_WORLD = 0x39,
+ ETSI6_WORLD = 0x34,
+ ETSI_RESERVED = 0x33,
+ FRANCE_RES = 0x31,
+ ETSI7_WORLD = 0x3C,
+ ETSI8_WORLD = 0x3D,
+ ETSI9_WORLD = 0x3E,
+ ETSI10_WORLD = 0x24,
+ ETSI11_WORLD = 0x26,
+
+ APL4_WORLD = 0x42,
+ APL3_FCCA = 0x50,
+ APL_RESERVED = 0x44,
+ APL2_WORLD = 0x45,
+ APL2_FCCA = 0x4D,
+ APL2_APLC = 0x46,
+ APL3_WORLD = 0x47,
+ APL2_APLD = 0x49,
+ APL1_WORLD = 0x52,
+ APL1_FCCA = 0x53,
+ APL1_APLA = 0x54,
+ APL1_ETSIC = 0x55,
+ APL2_ETSIC = 0x56,
+ APL5_WORLD = 0x58,
+ APL6_WORLD = 0x5B,
+ APL7_FCCA = 0x5C,
+ APL8_WORLD = 0x5D,
+ APL9_WORLD = 0x5E,
+ APL10_WORLD = 0x5F,
+ APL11_FCCA = 0x4F,
+ APL12_WORLD = 0x51,
+ APL13_WORLD = 0x5A,
+
+ WOR0_WORLD = 0x60,
+ WOR1_WORLD = 0x61,
+ WOR2_WORLD = 0x62,
+ WOR3_WORLD = 0x63,
+ WOR4_FCCA = 0x64,
+ WOR5_ETSIC = 0x65,
+ WOR01_WORLD = 0x66,
+ WOR02_WORLD = 0x67,
+ EU1_WORLD = 0x68,
+ WOR9_WORLD = 0x69,
+ WORA_WORLD = 0x6A,
+ WORB_WORLD = 0x6B,
+ WORC_WORLD = 0x6C,
+
+ MKK3_MKKB = 0x80,
+ MKK3_MKKA2 = 0x81,
+ MKK3_MKKC = 0x82,
+ MKK4_MKKB = 0x83,
+ MKK4_MKKA2 = 0x84,
+ MKK4_MKKC = 0x85,
+ MKK5_MKKA = 0x99,
+ MKK5_FCCA = 0x9A,
+ MKK5_MKKB = 0x86,
+ MKK5_MKKA2 = 0x87,
+ MKK5_MKKC = 0x88,
+ MKK3_MKKA = 0xF0,
+ MKK3_MKKA1 = 0xF1,
+ MKK3_FCCA = 0xF2,
+ MKK4_MKKA = 0xF3,
+ MKK4_MKKA1 = 0xF4,
+ MKK4_FCCA = 0xF5,
+ MKK9_MKKA = 0xF6,
+ MKK9_FCCA = 0xFC,
+ MKK9_MKKA1 = 0xFD,
+ MKK9_MKKC = 0xFE,
+ MKK9_MKKA2 = 0xFF,
+ MKK10_MKKA = 0xF7,
+ MKK10_FCCA = 0xD0,
+ MKK10_MKKA1 = 0xD1,
+ MKK10_MKKC = 0xD2,
+ MKK10_MKKA2 = 0xD3,
+ MKK11_MKKA = 0xD4,
+ MKK11_FCCA = 0xD5,
+ MKK11_MKKA1 = 0xD6,
+ MKK11_MKKC = 0xD7,
+ MKK11_MKKA2 = 0xD8,
+
+ FCC1 = 0x0110,
+ FCC2 = 0x0120,
+ FCC3 = 0x0160,
+ FCC4 = 0x0165,
+ FCC5 = 0x0510,
+ FCC6 = 0x0610,
+ FCC7 = 0x0710,
+ FCC8 = 0x0810,
+ FCC9 = 0x0910,
+ FCC10 = 0x0B10,
+ FCC11 = 0x0B20,
+
+ ETSI1 = 0x0130,
+ ETSI2 = 0x0230,
+ ETSI3 = 0x0330,
+ ETSI4 = 0x0430,
+ ETSI5 = 0x0530,
+ ETSI6 = 0x0630,
+ ETSI8 = 0x0830,
+ ETSI9 = 0x0930,
+ ETSI10 = 0x0D30,
+ ETSI11 = 0x0E30,
+
+ APL1 = 0x0150,
+ APL2 = 0x0250,
+ APL3 = 0x0350,
+ APL4 = 0x0450,
+ APL5 = 0x0550,
+ APL6 = 0x0650,
+ APL7 = 0x0750,
+ APL8 = 0x0850,
+ APL9 = 0x0950,
+ APL10 = 0x1050,
+ APL11 = 0x1150,
+ APL12 = 0x1160,
+ APL13 = 0x1170,
+
+ NULL1 = 0x0198,
+ MKK3 = 0x0340,
+ MKK4 = 0x0440,
+ MKK5 = 0x0540,
+ MKK9 = 0x0940,
+ MKK10 = 0x1040,
+ MKK11 = 0x1140,
+
+ WORLD = 0x0199,
+ FCCA = 0x0A10,
+ MKKA = 0x0A40,
+ MKKC = 0x0A50,
+ ETSIC = 0x0C30,
};
-struct reg_dmn_pair {
- uint16_t reg_dmn_enum;
- uint16_t reg_dmn_5ghz;
- uint16_t reg_dmn_2ghz;
- uint16_t single_cc;
+/**
+ * enum ctl_val - CTL value
+ * @FCC: FCC
+ * @MKK: MKK
+ * @ETSI: ETSI
+ * @NO_CTL: no CTL
+ */
+enum ctl_val {
+ FCC = 0x10,
+ MKK = 0x40,
+ ETSI = 0x30,
+ NO_CTL = 0xff
};
-struct country_code_to_reg_dmn {
- uint16_t country_code;
- uint16_t reg_dmn_enum;
- const char *iso_name;
- const char *name;
+/**
+ * enum dfs_region - DFS region
+ * @DFS_UNINIT_REGION: un-initialized region
+ * @DFS_FCC_REGION: FCC region
+ * @DFS_ETSI_REGION: ETSI region
+ * @DFS_MKK_REGION: MKK region
+ */
+enum dfs_region {
+ DFS_UNINIT_REGION = 0,
+ DFS_FCC_REGION = 1,
+ DFS_ETSI_REGION = 2,
+ DFS_MKK_REGION = 3
};
/**
@@ -500,8 +498,51 @@
};
/**
+ * enum offset_t: channel offset
+ * @BW20: 20 mhz channel
+ * @BW40_LOW_PRIMARY: lower channel in 40 mhz
+ * @BW40_HIGH_PRIMARY: higher channel in 40 mhz
+ * @BW80: 80 mhz channel
+ * @BWALL: unknown bandwidth
+ */
+enum offset_t {
+ BW20 = 0,
+ BW40_LOW_PRIMARY = 1,
+ BW40_HIGH_PRIMARY = 3,
+ BW80,
+ BWALL
+};
+
+/**
+ * struct reg_dmn_pair: regulatory domain pair
+ * @reg_dmn_pair: reg domain pair
+ * @reg_dmn_5ghz: 5G reg domain
+ * @reg_dmn_2ghz: 2G reg domain
+ * @single_cc: country with this reg domain
+ */
+struct reg_dmn_pair {
+ uint16_t reg_dmn_pair;
+ uint16_t reg_dmn_5ghz;
+ uint16_t reg_dmn_2ghz;
+ uint16_t single_cc;
+};
+
+/**
+ * struct country_code_to_reg_dmn: country code to reg domain mapping
+ * @country_code: country code
+ * @reg_dmn_pair: regulatory domain pair
+ * @alpha2: country alpha2
+ * @name: country name
+ */
+struct country_code_to_reg_dmn {
+ uint16_t country_code;
+ uint16_t reg_dmn_pair;
+ const char *alpha2;
+ const char *name;
+};
+
+/**
* struct ch_params_s
- *
* @ch_width: channel width
* @sec_ch_offset: secondary channel offset
* @center_freq_seg0: center freq for segment 0
@@ -514,19 +555,23 @@
uint8_t center_freq_seg1;
};
+/**
+ * struct reg_dmn: regulatory domain structure
+ * @reg_dmn: regulatory domain
+ * @conformance_test_limit: CTL limit
+ */
struct reg_dmn {
uint16_t reg_dmn;
uint8_t conformance_test_limit;
};
-enum offset_t {
- BW20 = 0,
- BW40_LOW_PRIMARY = 1,
- BW40_HIGH_PRIMARY = 3,
- BW80,
- BWALL
-};
-
+/**
+ * struct reg_dmn_op_class_map_t: operating class
+ * @op_class: operating class number
+ * @ch_spacing: channel spacing
+ * @offset: offset
+ * @channels: channel set
+ */
struct reg_dmn_op_class_map_t {
uint8_t op_class;
uint8_t ch_spacing;
@@ -534,11 +579,25 @@
uint8_t channels[MAX_CHANNELS_PER_OPERATING_CLASS];
};
+/**
+ * struct reg_dmn_supp_op_classes: operating classes
+ * @num_classes: number of classes
+ * @classes: classes
+ */
struct reg_dmn_supp_op_classes {
uint8_t num_classes;
uint8_t classes[CDS_MAX_SUPP_OPER_CLASSES];
};
+/**
+ * struct reg_dmn_tables: reg domain table
+ * @reg_dmn_pairs: list of reg domain pairs
+ * @all_countries: list of countries
+ * @reg_dmns: list of reg domains
+ * @reg_dmn_pairs_cnt: count of reg domain pairs
+ * @all_countries_cnt: count of countries
+ * @reg_dmns_cnt: count of reg domains
+ */
struct reg_dmn_tables {
const struct reg_dmn_pair *reg_dmn_pairs;
const struct country_code_to_reg_dmn *all_countries;
diff --git a/core/cds/src/cds_regdomain.c b/core/cds/src/cds_regdomain.c
index 89bba13..a7e8e3e 100644
--- a/core/cds/src/cds_regdomain.c
+++ b/core/cds/src/cds_regdomain.c
@@ -482,7 +482,7 @@
return true;
} else {
for (i = 0; i < g_reg_dmn_tbl.reg_dmn_pairs_cnt; i++)
- if (g_reg_dmn_tbl.reg_dmn_pairs[i].reg_dmn_enum
+ if (g_reg_dmn_tbl.reg_dmn_pairs[i].reg_dmn_pair
== reg_dmn)
return true;
}
@@ -522,8 +522,8 @@
int32_t i;
for (i = 0; i < g_reg_dmn_tbl.all_countries_cnt; i++) {
- if (g_reg_dmn_tbl.all_countries[i].iso_name[0] == alpha2[0] &&
- g_reg_dmn_tbl.all_countries[i].iso_name[1] == alpha2[1])
+ if (g_reg_dmn_tbl.all_countries[i].alpha2[0] == alpha2[0] &&
+ g_reg_dmn_tbl.all_countries[i].alpha2[1] == alpha2[1])
return g_reg_dmn_tbl.all_countries[i].country_code;
}
@@ -549,7 +549,7 @@
}
for (i = 0; i < g_reg_dmn_tbl.reg_dmn_pairs_cnt; i++) {
- if (g_reg_dmn_tbl.reg_dmn_pairs[i].reg_dmn_enum == reg_dmn) {
+ if (g_reg_dmn_tbl.reg_dmn_pairs[i].reg_dmn_pair == reg_dmn) {
if (g_reg_dmn_tbl.reg_dmn_pairs[i].single_cc != 0)
return g_reg_dmn_tbl.reg_dmn_pairs[i].single_cc;
else
@@ -571,7 +571,7 @@
int32_t i;
for (i = 0; i < g_reg_dmn_tbl.reg_dmn_pairs_cnt; i++) {
- if (g_reg_dmn_tbl.reg_dmn_pairs[i].reg_dmn_enum == reg_dmn)
+ if (g_reg_dmn_tbl.reg_dmn_pairs[i].reg_dmn_pair == reg_dmn)
return &g_reg_dmn_tbl.reg_dmn_pairs[i];
}
@@ -608,7 +608,7 @@
int32_t i;
for (i = 0; i < g_reg_dmn_tbl.all_countries_cnt; i++) {
- if (g_reg_dmn_tbl.all_countries[i].reg_dmn_enum == reg_dmn)
+ if (g_reg_dmn_tbl.all_countries[i].reg_dmn_pair == reg_dmn)
return &g_reg_dmn_tbl.all_countries[i];
}
@@ -661,7 +661,7 @@
return -EINVAL;
}
- reg_dmn = country->reg_dmn_enum;
+ reg_dmn = country->reg_dmn_pair;
}
reg->regpair = get_reg_dmn_pair(reg_dmn);
@@ -677,8 +677,8 @@
country = get_country_from_rd(reg_dmn);
if (country) {
- reg->alpha2[0] = country->iso_name[0];
- reg->alpha2[1] = country->iso_name[1];
+ reg->alpha2[0] = country->alpha2[0];
+ reg->alpha2[1] = country->alpha2[1];
} else {
reg->alpha2[0] = '0';
reg->alpha2[1] = '0';
@@ -698,9 +698,9 @@
uint8_t i;
for (i = 0; i < g_reg_dmn_tbl.all_countries_cnt; i++) {
- if ((g_reg_dmn_tbl.all_countries[i].iso_name[0] == alpha2[0]) &&
- (g_reg_dmn_tbl.all_countries[i].iso_name[1] == alpha2[1]))
- return g_reg_dmn_tbl.all_countries[i].reg_dmn_enum;
+ if ((g_reg_dmn_tbl.all_countries[i].alpha2[0] == alpha2[0]) &&
+ (g_reg_dmn_tbl.all_countries[i].alpha2[1] == alpha2[1]))
+ return g_reg_dmn_tbl.all_countries[i].reg_dmn_pair;
}
return -1;
@@ -785,7 +785,7 @@
uint16_t i;
for (i = 0; i < g_reg_dmn_tbl.reg_dmn_pairs_cnt; i++) {
- if (g_reg_dmn_tbl.reg_dmn_pairs[i].reg_dmn_enum == reg_dmn)
+ if (g_reg_dmn_tbl.reg_dmn_pairs[i].reg_dmn_pair == reg_dmn)
return g_reg_dmn_tbl.reg_dmn_pairs[i].reg_dmn_5ghz;
}
diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c
index 9609620..5ddb11b 100644
--- a/core/hdd/src/wlan_hdd_regulatory.c
+++ b/core/hdd/src/wlan_hdd_regulatory.c
@@ -142,7 +142,7 @@
struct reg_dmn_pair *regpair =
(struct reg_dmn_pair *)reg->regpair;
- switch (regpair->reg_dmn_enum) {
+ switch (regpair->reg_dmn_pair) {
case 0x60:
case 0x61:
case 0x62:
@@ -497,17 +497,17 @@
/* remap the ctl code to dfs region code */
switch (hdd_ctx->reg.ctl_5g) {
case FCC:
- cds_put_dfs_region(DFS_FCC_DOMAIN);
+ cds_put_dfs_region(DFS_FCC_REGION);
break;
case ETSI:
- cds_put_dfs_region(DFS_ETSI_DOMAIN);
+ cds_put_dfs_region(DFS_ETSI_REGION);
break;
case MKK:
- cds_put_dfs_region(DFS_MKK4_DOMAIN);
+ cds_put_dfs_region(DFS_MKK_REGION);
break;
default:
/* set default dfs_region to FCC */
- cds_put_dfs_region(DFS_FCC_DOMAIN);
+ cds_put_dfs_region(DFS_FCC_REGION);
break;
}
diff --git a/core/sap/dfs/src/dfs.c b/core/sap/dfs/src/dfs.c
index d938c01..a2b5cff 100644
--- a/core/sap/dfs/src/dfs.c
+++ b/core/sap/dfs/src/dfs.c
@@ -61,7 +61,7 @@
#include "dfs_ioctl.h"
#include "dfs.h"
-int domainoverride = DFS_UNINIT_DOMAIN;
+int domainoverride = DFS_UNINIT_REGION;
/*
** channel switch announcement (CSA)
diff --git a/core/sap/dfs/src/dfs_process_phyerr.c b/core/sap/dfs/src/dfs_process_phyerr.c
index f91aa64..8725236 100644
--- a/core/sap/dfs/src/dfs_process_phyerr.c
+++ b/core/sap/dfs/src/dfs_process_phyerr.c
@@ -625,8 +625,8 @@
*
* BIN 5 chirping pulses are only for FCC or Japan MMK4 domain
*/
- if (((dfs->dfsdomain == DFS_FCC_DOMAIN) ||
- (dfs->dfsdomain == DFS_MKK4_DOMAIN)) &&
+ if (((dfs->dfsdomain == DFS_FCC_REGION) ||
+ (dfs->dfsdomain == DFS_MKK_REGION)) &&
(e.dur >= MAYBE_BIN5_DUR) && (e.dur < MAX_BIN5_DUR)) {
int add_dur;
int slope = 0, dc_found = 0;
@@ -675,8 +675,8 @@
* We have a pulse that is either bigger than
* MAX_BIN5_DUR or * less than MAYBE_BIN5_DUR
*/
- if ((dfs->dfsdomain == DFS_FCC_DOMAIN) ||
- (dfs->dfsdomain == DFS_MKK4_DOMAIN)) {
+ if ((dfs->dfsdomain == DFS_FCC_REGION) ||
+ (dfs->dfsdomain == DFS_MKK_REGION)) {
/*
* XXX Would this result in very large pulses
* wrapping around to become short pulses?
diff --git a/core/sap/dfs/src/dfs_process_radarevent.c b/core/sap/dfs/src/dfs_process_radarevent.c
index 321161c..30392b1 100644
--- a/core/sap/dfs/src/dfs_process_radarevent.c
+++ b/core/sap/dfs/src/dfs_process_radarevent.c
@@ -176,7 +176,7 @@
This is normally 2 but can be higher for W53.
*/
- if ((dfs->dfsdomain == DFS_MKK4_DOMAIN) &&
+ if ((dfs->dfsdomain == DFS_MKK_REGION) &&
(dfs->dfs_caps.ath_chip_is_bb_tlv) &&
(chan->ic_freq < FREQ_5500_MHZ)) {
@@ -430,8 +430,8 @@
* so process the next pulse in the queue.
*/
if ((dfs->disable_dfs_ch_switch == false) &&
- (DFS_FCC_DOMAIN == dfs->dfsdomain ||
- DFS_MKK4_DOMAIN == dfs->dfsdomain) &&
+ (DFS_FCC_REGION == dfs->dfsdomain ||
+ DFS_MKK_REGION == dfs->dfsdomain) &&
(re.re_dur >= 11 && re.re_dur <= 20) &&
(diff_ts > 500 || diff_ts <= 305) &&
(re.sidx == -4)) {
@@ -452,8 +452,8 @@
* following condition is reported in radar
* summary report.
*/
- if ((DFS_FCC_DOMAIN == dfs->dfsdomain ||
- DFS_MKK4_DOMAIN == dfs->dfsdomain) &&
+ if ((DFS_FCC_REGION == dfs->dfsdomain ||
+ DFS_MKK_REGION == dfs->dfsdomain) &&
((chan->ic_flags & IEEE80211_CHAN_VHT80) ==
IEEE80211_CHAN_VHT80) &&
(chan->ic_pri_freq_center_freq_mhz_separation ==
@@ -486,7 +486,7 @@
* and ETSI type 3 radar pulses when the following
* condition is reported in radar summary report.
*/
- if ((DFS_ETSI_DOMAIN == dfs->dfsdomain) &&
+ if ((DFS_ETSI_REGION == dfs->dfsdomain) &&
((chan->ic_flags & IEEE80211_CHAN_VHT80) ==
IEEE80211_CHAN_VHT80) &&
(chan->ic_pri_freq_center_freq_mhz_separation ==
@@ -520,8 +520,8 @@
/* BIN5 pulses are FCC and Japan specific */
- if ((dfs->dfsdomain == DFS_FCC_DOMAIN)
- || (dfs->dfsdomain == DFS_MKK4_DOMAIN)) {
+ if ((dfs->dfsdomain == DFS_FCC_REGION)
+ || (dfs->dfsdomain == DFS_MKK_REGION)) {
for (p = 0;
(p < dfs->dfs_rinfo.rn_numbin5radars) && (!found);
p++) {
diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c
index 8bbe02d..8d4e690 100644
--- a/core/sap/src/sap_fsm.c
+++ b/core/sap/src/sap_fsm.c
@@ -1296,7 +1296,7 @@
channelID = sapContext->SapAllChnlList.channelList[i].channel;
/*
- * IN JAPAN REGULATORY DOMAIN CHECK IF THE FOLLOWING TWO
+ * IN MKK DFS REGION CHECK IF THE FOLLOWING TWO
* TWO RULES APPLY AND FILTER THE AVAILABLE CHANNELS
* ACCORDINGLY.
*
@@ -1312,7 +1312,7 @@
* channels only based up on the SAP Channel location
* indicated by "sap_operating_channel_location" param.
*/
- if (DFS_MKK4_DOMAIN == dfs_region) {
+ if (DFS_MKK_REGION == dfs_region) {
/*
* Check for JAPAN W53 Channel operation capability
*/
@@ -4698,7 +4698,7 @@
cds_get_dfs_region(&dfs_region);
- if ((dfs_region == DFS_ETSI_DOMAIN)
+ if ((dfs_region == DFS_ETSI_REGION)
&& ((IS_ETSI_WEATHER_CH(sapContext->channel)) ||
(sap_is_channel_bonding_etsi_weather_channel(sapContext)))) {
cacTimeOut = ETSI_WEATHER_CH_CAC_TIMEOUT;
diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c
index 709719f..983ce42 100644
--- a/core/sap/src/sap_module.c
+++ b/core/sap/src/sap_module.c
@@ -2563,7 +2563,7 @@
* Set the JAPAN W53 restriction only if the current
* regulatory domain is JAPAN.
*/
- if (DFS_MKK4_DOMAIN == dfs_region) {
+ if (DFS_MKK_REGION == dfs_region) {
pMac->sap.SapDfsInfo.is_dfs_w53_disabled = disable_Dfs_W53;
QDF_TRACE(QDF_MODULE_ID_SAP,
QDF_TRACE_LEVEL_INFO_LOW,
@@ -2648,7 +2648,7 @@
* restriction is currently enforeced only for
* JAPAN regulatory domain.
*/
- if (DFS_MKK4_DOMAIN == dfs_region) {
+ if (DFS_MKK_REGION == dfs_region) {
pMac->sap.SapDfsInfo.sap_operating_chan_preferred_location =
dfs_Preferred_Channels_location;
QDF_TRACE(QDF_MODULE_ID_SAP,
diff --git a/core/wma/inc/wma_dfs_interface.h b/core/wma/inc/wma_dfs_interface.h
index ae21355..f30f7b3 100644
--- a/core/wma/inc/wma_dfs_interface.h
+++ b/core/wma/inc/wma_dfs_interface.h
@@ -260,7 +260,7 @@
int (*ic_dfs_control)(struct ieee80211com *ic,
u_int id, void *indata, uint32_t insize,
void *outdata, uint32_t *outsize);
- enum dfs_domain current_dfs_regdomain;
+ enum dfs_region current_dfs_regdomain;
uint8_t vdev_id;
uint8_t last_radar_found_chan;
int32_t dfs_pri_multiplier;
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index 2477741..8d367b1 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/core/wma/src/wma_dev_if.c
@@ -1805,7 +1805,7 @@
* early on, to protect the DFS module from
* processing phyerrors without being intialized.
*/
- if (DFS_UNINIT_DOMAIN ==
+ if (DFS_UNINIT_REGION ==
wma->dfs_ic->current_dfs_regdomain) {
WMA_LOGE("%s[%d]:DFS Configured with Invalid regdomain"
" Failed to send VDEV START command",
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index c0f502f..a50cf7e 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -6008,25 +6008,25 @@
* which radar pulses to use.
*/
switch (dfsdomain) {
- case DFS_FCC_DOMAIN:
+ case DFS_FCC_REGION:
WMA_LOGI("%s: DFS-FCC domain", __func__);
- rinfo.dfsdomain = DFS_FCC_DOMAIN;
+ rinfo.dfsdomain = DFS_FCC_REGION;
rinfo.dfs_radars = dfs_fcc_radars;
rinfo.numradars = QDF_ARRAY_SIZE(dfs_fcc_radars);
rinfo.b5pulses = dfs_fcc_bin5pulses;
rinfo.numb5radars = QDF_ARRAY_SIZE(dfs_fcc_bin5pulses);
break;
- case DFS_ETSI_DOMAIN:
+ case DFS_ETSI_REGION:
WMA_LOGI("%s: DFS-ETSI domain", __func__);
- rinfo.dfsdomain = DFS_ETSI_DOMAIN;
+ rinfo.dfsdomain = DFS_ETSI_REGION;
rinfo.dfs_radars = dfs_etsi_radars;
rinfo.numradars = QDF_ARRAY_SIZE(dfs_etsi_radars);
rinfo.b5pulses = NULL;
rinfo.numb5radars = 0;
break;
- case DFS_MKK4_DOMAIN:
- WMA_LOGI("%s: DFS-MKK4 domain", __func__);
- rinfo.dfsdomain = DFS_MKK4_DOMAIN;
+ case DFS_MKK_REGION:
+ WMA_LOGI("%s: DFS-MKK domain", __func__);
+ rinfo.dfsdomain = DFS_MKK_REGION;
rinfo.dfs_radars = dfs_mkk4_radars;
rinfo.numradars = QDF_ARRAY_SIZE(dfs_mkk4_radars);
rinfo.b5pulses = dfs_jpn_bin5pulses;
@@ -6034,7 +6034,7 @@
break;
default:
WMA_LOGI("%s: DFS-UNINT domain", __func__);
- rinfo.dfsdomain = DFS_UNINIT_DOMAIN;
+ rinfo.dfsdomain = DFS_UNINIT_REGION;
rinfo.dfs_radars = NULL;
rinfo.numradars = 0;
rinfo.b5pulses = NULL;
@@ -6190,9 +6190,9 @@
void wma_set_dfs_region(tp_wma_handle wma, uint8_t dfs_region)
{
/* dfs information is passed */
- if (dfs_region > DFS_MKK4_DOMAIN || dfs_region == DFS_UNINIT_DOMAIN)
- /* assign DFS_FCC_DOMAIN as default domain*/
- wma->dfs_ic->current_dfs_regdomain = DFS_FCC_DOMAIN;
+ if (dfs_region > DFS_MKK_REGION || dfs_region == DFS_UNINIT_REGION)
+ /* assign DFS_FCC_REGION as default region*/
+ wma->dfs_ic->current_dfs_regdomain = DFS_FCC_REGION;
else
wma->dfs_ic->current_dfs_regdomain = dfs_region;