qcacmn: Update Host Regdb to accommodate the new 6G regdomains
Make the following changes to update Host Regdb to accommodate the new 6G regdomains: 1) Add a macro COMPILE_REGDB_6G, to prevent compilation of the new 6G regdomains in the host. 2) Add new 6G super domains, 6G sub domains, and 6G reg rules (add a new structure regulatory_rule_ext) and place them under COMPILE_REGDB_6G. 3) Add 2 new fields to the struct country_code_to_reg_domain - reg_6ghz_super_dmn_id and max_bw_6g. If COMPILE_REGDB_6G and CONFIG_BAND_GHZ are defined then, reg_6ghz_super_dmn_id and max_bw_6g are part of the country_code_to_reg_domain table for a country entry. If COMPILE_REGDB_6G or CONFIG_BAND_GHZ, is not defined then they are absent. Change-Id: I72ba7b8f6fb4761205fbde51bbc8570bac531e87 CRs-Fixed: 2794085
This commit is contained in:

committed by
snandini

parent
e4fbc9890d
commit
19b0f038d4
File diff suppressed because it is too large
Load Diff
@@ -25,6 +25,29 @@
|
|||||||
#ifndef __REG_DB_H
|
#ifndef __REG_DB_H
|
||||||
#define __REG_DB_H
|
#define __REG_DB_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If COMPILE_REGDB_6G and CONFIG_BAND_6GHZ are defined, then
|
||||||
|
* reg_6ghz_super_dmn_id and max_bw_6g are part of the
|
||||||
|
* country_code_to_reg_domain table for a country
|
||||||
|
* entry. If COMPILE_REGDB_6G and CONFIG_BAND_6GHZ are not defined, then they
|
||||||
|
* are absent.
|
||||||
|
*
|
||||||
|
* COMPILE_REGDB_6G is not defined for the Partial offload platform.
|
||||||
|
*
|
||||||
|
* CE:- country entry
|
||||||
|
*/
|
||||||
|
#if defined(CONFIG_BAND_6GHZ) && defined(COMPILE_REGDB_6G)
|
||||||
|
#define CE(country_code, reg_dmn_pair_id, reg_6ghz_super_dmn_id, \
|
||||||
|
alpha2, max_bw_2g, max_bw_5g, max_bw_6g, phymode_bitmap) \
|
||||||
|
{CTRY_ ## country_code, reg_dmn_pair_id, reg_6ghz_super_dmn_id, \
|
||||||
|
#alpha2, max_bw_2g, max_bw_5g, max_bw_6g, phymode_bitmap}
|
||||||
|
#else
|
||||||
|
#define CE(country_code, reg_dmn_pair_id, reg_6ghz_super_dmn_id, alpha2, \
|
||||||
|
max_bw_2g, max_bw_5g, max_bw_6g, phymode_bitmap) \
|
||||||
|
{CTRY_ ## country_code, reg_dmn_pair_id, #alpha2, max_bw_2g, \
|
||||||
|
max_bw_5g, phymode_bitmap}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Alpha2 code for world reg domain */
|
/* Alpha2 code for world reg domain */
|
||||||
#define REG_WORLD_ALPHA2 "00"
|
#define REG_WORLD_ALPHA2 "00"
|
||||||
|
|
||||||
@@ -44,6 +67,26 @@ struct regulatory_rule {
|
|||||||
uint16_t flags;
|
uint16_t flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(CONFIG_BAND_6GHZ) && defined(COMPILE_REGDB_6G)
|
||||||
|
/**
|
||||||
|
* struct regulatory_rule_ext
|
||||||
|
* @start_freq: start frequency in MHz
|
||||||
|
* @end_freq: end frequency in MHz
|
||||||
|
* @max_bw: maximum bandwidth in MHz
|
||||||
|
* @eirp_power: EIRP power in dBm
|
||||||
|
* @psd_power: Max PSD power in dBm per MHz
|
||||||
|
* @flags: regulatory flags
|
||||||
|
*/
|
||||||
|
struct regulatory_rule_ext {
|
||||||
|
uint16_t start_freq;
|
||||||
|
uint16_t end_freq;
|
||||||
|
uint16_t max_bw;
|
||||||
|
uint8_t eirp_power;
|
||||||
|
int8_t psd_power;
|
||||||
|
uint16_t flags;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct regdomain
|
* struct regdomain
|
||||||
* @ctl_val: CTL value
|
* @ctl_val: CTL value
|
||||||
@@ -63,21 +106,45 @@ struct regdomain {
|
|||||||
uint8_t reg_rule_id[MAX_REG_RULES];
|
uint8_t reg_rule_id[MAX_REG_RULES];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(CONFIG_BAND_6GHZ) && defined(COMPILE_REGDB_6G)
|
||||||
|
/**
|
||||||
|
* struct sub_6g_regdomain
|
||||||
|
* @min_bw: Minimum bandwidth in MHz
|
||||||
|
* @max_bw: Maximum bandwidth in MHz
|
||||||
|
* @num_reg_rules: number of regulatory rules
|
||||||
|
* @reg_rules_id: regulatory rule index
|
||||||
|
*/
|
||||||
|
struct sub_6g_regdomain {
|
||||||
|
uint16_t min_bw;
|
||||||
|
uint16_t max_bw;
|
||||||
|
uint8_t num_reg_rules;
|
||||||
|
uint8_t sixg_reg_rule_id[MAX_REG_RULES];
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct country_code_to_reg_domain
|
* struct country_code_to_reg_domain
|
||||||
* @country_code: country code
|
* @country_code: country code
|
||||||
* @reg_dmn_pair_id: reg domainpair id
|
* @reg_dmn_pair_id: reg domainpair id
|
||||||
|
* @reg_6ghz_super_dmn_id: 6GHz super domain id
|
||||||
* @alpha2: iso-3166 alpha2
|
* @alpha2: iso-3166 alpha2
|
||||||
* @max_bw_2g: maximum 2g bandwidth
|
* @max_bw_2g: maximum 2g bandwidth in MHz
|
||||||
* @max_bw_5g: maximum 5g bandwidth
|
* @max_bw_5g: maximum 5g bandwidth in MHz
|
||||||
|
* @max_bw_6g: maximum 6g bandwidth in MHz
|
||||||
* @phymode_bitmap: phymodes not supported
|
* @phymode_bitmap: phymodes not supported
|
||||||
*/
|
*/
|
||||||
struct country_code_to_reg_domain {
|
struct country_code_to_reg_domain {
|
||||||
uint16_t country_code;
|
uint16_t country_code;
|
||||||
uint16_t reg_dmn_pair_id;
|
uint16_t reg_dmn_pair_id;
|
||||||
|
#if defined(CONFIG_BAND_6GHZ) && defined(COMPILE_REGDB_6G)
|
||||||
|
uint16_t reg_6ghz_super_dmn_id;
|
||||||
|
#endif
|
||||||
uint8_t alpha2[REG_ALPHA2_LEN + 1];
|
uint8_t alpha2[REG_ALPHA2_LEN + 1];
|
||||||
uint16_t max_bw_2g;
|
uint16_t max_bw_2g;
|
||||||
uint16_t max_bw_5g;
|
uint16_t max_bw_5g;
|
||||||
|
#if defined(CONFIG_BAND_6GHZ) && defined(COMPILE_REGDB_6G)
|
||||||
|
uint16_t max_bw_6g;
|
||||||
|
#endif
|
||||||
uint16_t phymode_bitmap;
|
uint16_t phymode_bitmap;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -93,6 +160,28 @@ struct reg_domain_pair {
|
|||||||
uint8_t dmn_id_2g;
|
uint8_t dmn_id_2g;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(CONFIG_BAND_6GHZ) && defined(COMPILE_REGDB_6G)
|
||||||
|
/**
|
||||||
|
* struct sixghz_super_to_subdomains
|
||||||
|
* @reg_6ghz_super_dmn_id: 6G super domain id.
|
||||||
|
* @reg_domain_6g_id_ap_sp: 6G domain id for SP AP.
|
||||||
|
* @reg_domain_6g_id_ap_lpi: 6G domain id for LPI AP.
|
||||||
|
* @reg_domain_6g_id_ap_vlp: 6G domain id for VLP AP.
|
||||||
|
* @reg_domain_6g_id_client_sp: 6G domain id for clients of the SP AP.
|
||||||
|
* @reg_domain_6g_id_client_lpi: 6G domain id for clients of the LPI AP.
|
||||||
|
* @reg_domain_6g_id_client_vlp: 6G domain id for clients of the VLP AP.
|
||||||
|
*/
|
||||||
|
struct sixghz_super_to_subdomains {
|
||||||
|
uint16_t reg_6ghz_super_dmn_id;
|
||||||
|
uint8_t reg_domain_6g_id_ap_sp;
|
||||||
|
uint8_t reg_domain_6g_id_ap_lpi;
|
||||||
|
uint8_t reg_domain_6g_id_ap_vlp;
|
||||||
|
uint8_t reg_domain_6g_id_client_sp[REG_MAX_CLIENT_TYPE - 1];
|
||||||
|
uint8_t reg_domain_6g_id_client_lpi[REG_MAX_CLIENT_TYPE - 1];
|
||||||
|
uint8_t reg_domain_6g_id_client_vlp[REG_MAX_CLIENT_TYPE - 1];
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
QDF_STATUS reg_get_num_countries(int *num_countries);
|
QDF_STATUS reg_get_num_countries(int *num_countries);
|
||||||
|
|
||||||
QDF_STATUS reg_get_num_reg_dmn_pairs(int *num_reg_dmn);
|
QDF_STATUS reg_get_num_reg_dmn_pairs(int *num_reg_dmn);
|
||||||
|
Reference in New Issue
Block a user