qcacmn: Expand regdomain to include 6Ghz superdomain
The regulatory structure which contains country and regulatory domain, needs to be expanded to include 6Ghz superdomain. Make changes in the regulatory component to send the 6G super domain set by the user, to the target. Change-Id: I84b96cd74012e33d464d98675158c9cd5eabff4e CRs-Fixed: 2802131
This commit is contained in:
parent
e6cf256348
commit
ad5cb17aa7
@ -128,7 +128,7 @@ QDF_STATUS reg_get_rdpair_from_country_iso(uint8_t *alpha2,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS reg_get_rdpair_from_regdmn_id(uint16_t regdmn_id,
|
||||
QDF_STATUS reg_get_rdpair_from_regdmn_id(uint16_t reg_2g_5g_pair_id,
|
||||
uint16_t *regdmn_pair)
|
||||
{
|
||||
uint16_t j;
|
||||
@ -137,7 +137,7 @@ QDF_STATUS reg_get_rdpair_from_regdmn_id(uint16_t regdmn_id,
|
||||
reg_get_num_reg_dmn_pairs(&num_reg_dmn);
|
||||
|
||||
for (j = 0; j < num_reg_dmn; j++) {
|
||||
if (g_reg_dmn_pairs[j].reg_dmn_pair_id == regdmn_id)
|
||||
if (g_reg_dmn_pairs[j].reg_dmn_pair_id == reg_2g_5g_pair_id)
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -160,6 +160,7 @@ struct wlan_regulatory_psoc_priv_obj {
|
||||
* @pdev_opened: whether pdev has been opened by application
|
||||
* @band_capability: bitmap of bands enabled, using enum reg_wifi_band as the
|
||||
* bit position value
|
||||
* @reg_6g_superid: 6Ghz super domain id
|
||||
*/
|
||||
struct wlan_regulatory_pdev_priv_obj {
|
||||
struct regulatory_channel cur_chan_list[NUM_CHANNELS];
|
||||
@ -174,6 +175,7 @@ struct wlan_regulatory_pdev_priv_obj {
|
||||
uint16_t def_country_code;
|
||||
char current_country[REG_ALPHA2_LEN + 1];
|
||||
uint16_t reg_dmn_pair;
|
||||
uint16_t reg_6g_superid;
|
||||
uint16_t ctry_code;
|
||||
#ifdef DISABLE_UNII_SHARED_BANDS
|
||||
uint8_t unii_5g_bitmap;
|
||||
|
@ -2045,7 +2045,7 @@ QDF_STATUS reg_program_chan_list(struct wlan_objmgr_pdev *pdev,
|
||||
&country_index,
|
||||
®dmn_pair);
|
||||
} else if (rd->flags == REGDMN_IS_SET) {
|
||||
reg_get_rdpair_from_regdmn_id(rd->cc.regdmn_id,
|
||||
reg_get_rdpair_from_regdmn_id(rd->cc.regdmn.reg_2g_5g_pair_id,
|
||||
®dmn_pair);
|
||||
}
|
||||
|
||||
@ -2085,7 +2085,8 @@ QDF_STATUS reg_get_current_cc(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_mem_copy(rd->cc.alpha, pdev_priv_obj->current_country,
|
||||
sizeof(rd->cc.alpha));
|
||||
} else if (rd->flags == REGDMN_IS_SET) {
|
||||
rd->cc.regdmn_id = pdev_priv_obj->reg_dmn_pair;
|
||||
rd->cc.regdmn.reg_2g_5g_pair_id = pdev_priv_obj->reg_dmn_pair;
|
||||
rd->cc.regdmn.sixg_superdmn_id = pdev_priv_obj->reg_6g_superid;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
@ -258,10 +258,11 @@ QDF_STATUS reg_set_country(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
if (reg_is_world_ctry_code(
|
||||
pdev_priv_obj->def_region_domain))
|
||||
rd.cc.regdmn_id =
|
||||
rd.cc.regdmn.reg_2g_5g_pair_id =
|
||||
pdev_priv_obj->def_region_domain;
|
||||
else
|
||||
rd.cc.regdmn_id = DEFAULT_WORLD_REGDMN;
|
||||
rd.cc.regdmn.reg_2g_5g_pair_id =
|
||||
DEFAULT_WORLD_REGDMN;
|
||||
rd.flags = REGDMN_IS_SET;
|
||||
} else {
|
||||
qdf_mem_copy(rd.cc.alpha, cc.country,
|
||||
|
@ -900,6 +900,7 @@ struct cur_reg_rule {
|
||||
* @num_phy: number of phy
|
||||
* @phy_id: phy id
|
||||
* @reg_dmn_pair: reg domain pair
|
||||
* @reg_6g_superid: 6G super domain id
|
||||
* @ctry_code: country code
|
||||
* @alpha2: country alpha2
|
||||
* @offload_enabled: offload enabled
|
||||
@ -920,6 +921,7 @@ struct cur_regulatory_info {
|
||||
uint8_t num_phy;
|
||||
uint8_t phy_id;
|
||||
uint16_t reg_dmn_pair;
|
||||
uint16_t reg_6g_superid;
|
||||
uint16_t ctry_code;
|
||||
uint8_t alpha2[REG_ALPHA2_LEN + 1];
|
||||
bool offload_enabled;
|
||||
@ -1093,7 +1095,7 @@ struct mas_chan_params {
|
||||
char current_country[REG_ALPHA2_LEN + 1];
|
||||
uint16_t def_region_domain;
|
||||
uint16_t def_country_code;
|
||||
uint16_t reg_dmn_pair;
|
||||
uint32_t reg_dmn_pair;
|
||||
uint16_t ctry_code;
|
||||
struct reg_rule_info reg_rules;
|
||||
};
|
||||
@ -1114,15 +1116,19 @@ enum cc_regdmn_flag {
|
||||
|
||||
/**
|
||||
* struct cc_regdmn_s: User country code or regdomain
|
||||
* @country_code: Country code
|
||||
* @regdmn_id: Regdomain pair ID
|
||||
* @alpha: Country ISO
|
||||
* @flags: Regdomain flags
|
||||
* @country_code: Country code
|
||||
* @reg_2g_5g_pair_id: Regdomain pair ID (2Ghz + 5Ghz domain pair)
|
||||
* @sixg_superdmn_id: 6Ghz super domain id
|
||||
* @alpha: Country ISO
|
||||
* @flags: Regdomain flags
|
||||
*/
|
||||
struct cc_regdmn_s {
|
||||
union {
|
||||
uint16_t country_code;
|
||||
uint16_t regdmn_id;
|
||||
struct {
|
||||
uint16_t reg_2g_5g_pair_id;
|
||||
uint16_t sixg_superdmn_id;
|
||||
} regdmn;
|
||||
uint8_t alpha[REG_ALPHA2_LEN + 1];
|
||||
} cc;
|
||||
uint8_t flags;
|
||||
|
@ -12464,7 +12464,10 @@ static QDF_STATUS send_user_country_code_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
rd->cc.alpha[2]);
|
||||
} else if (rd->flags == REGDMN_IS_SET) {
|
||||
cmd->countrycode_type = WMI_COUNTRYCODE_DOMAIN_CODE;
|
||||
cmd->country_code.domain_code = rd->cc.regdmn_id;
|
||||
WMI_SET_BITS(cmd->country_code.domain_code, 0, 16,
|
||||
rd->cc.regdmn.reg_2g_5g_pair_id);
|
||||
WMI_SET_BITS(cmd->country_code.domain_code, 16, 16,
|
||||
rd->cc.regdmn.sixg_superdmn_id);
|
||||
}
|
||||
|
||||
wmi_mtrace(WMI_SET_INIT_COUNTRY_CMDID, NO_SESSION, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user