mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacmn: Allow STA in LPI mode if AP ctry US and advertises LPI
The existing logic is if STA and AP have different ctry code, and STA is in ETSI, then it operates in VLP mode irrespective of AP ctry. New logic would be if AP ctry is US and if it advertises LPI power type in HE ops IE via beacon, then STA can advance to LPI mode. Change-Id: Ifbee7052854277c3d21ccd21b65b79edb5e89f46 CRs-Fixed: 3084589
This commit is contained in:
parent
0b62d7f8ac
commit
b8894c96e2
4 changed files with 18 additions and 7 deletions
|
|
@ -328,7 +328,8 @@ QDF_STATUS
|
|||
reg_get_6g_power_type_for_ctry(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *ap_ctry, uint8_t *sta_ctry,
|
||||
enum reg_6g_ap_type *pwr_type_6g,
|
||||
bool *ctry_code_match)
|
||||
bool *ctry_code_match,
|
||||
enum reg_6g_ap_type ap_pwr_type)
|
||||
{
|
||||
*pwr_type_6g = REG_INDOOR_AP;
|
||||
|
||||
|
|
@ -354,6 +355,12 @@ reg_get_6g_power_type_for_ctry(struct wlan_objmgr_psoc *psoc,
|
|||
sta_ctry[0], sta_ctry[1]);
|
||||
*pwr_type_6g = REG_VERY_LOW_POWER_AP;
|
||||
}
|
||||
|
||||
if (wlan_reg_is_us(ap_ctry) && ap_pwr_type == REG_INDOOR_AP) {
|
||||
reg_debug("AP ctry:%c%c, AP power type:%d, allow STA IN LPI",
|
||||
ap_ctry[0], ap_ctry[1], ap_pwr_type);
|
||||
*pwr_type_6g = REG_INDOOR_AP;
|
||||
}
|
||||
} else {
|
||||
*ctry_code_match = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -317,14 +317,15 @@ QDF_STATUS reg_get_domain_from_country_code(v_REGDOMAIN_t *reg_domain_ptr,
|
|||
* @sta_ctry: ptr to sta programmed country
|
||||
* @pwr_type_6g: ptr to 6G power type
|
||||
* @ctry_code_match: Check for country IE and sta country code match
|
||||
*
|
||||
* @ap_pwr_type: AP's power type as advertised in HE ops IE
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
reg_get_6g_power_type_for_ctry(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *ap_ctry, uint8_t *sta_ctry,
|
||||
enum reg_6g_ap_type *pwr_type_6g,
|
||||
bool *ctry_code_match);
|
||||
bool *ctry_code_match,
|
||||
enum reg_6g_ap_type ap_pwr_type);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -547,14 +547,15 @@ QDF_STATUS wlan_reg_read_current_country(struct wlan_objmgr_psoc *psoc,
|
|||
* @sta_ctry: ptr to sta programmed country
|
||||
* @pwr_type_6g: ptr to 6G power type
|
||||
* @ctry_code_match: Check for country IE and sta country code match
|
||||
*
|
||||
* @ap_pwr_type: AP's power type for 6G as advertised in HE ops IE
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_reg_get_6g_power_type_for_ctry(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *ap_ctry, uint8_t *sta_ctry,
|
||||
enum reg_6g_ap_type *pwr_type_6g,
|
||||
bool *ctry_code_match);
|
||||
bool *ctry_code_match,
|
||||
enum reg_6g_ap_type ap_pwr_type);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
|
|
|
|||
|
|
@ -90,10 +90,12 @@ QDF_STATUS
|
|||
wlan_reg_get_6g_power_type_for_ctry(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *ap_ctry, uint8_t *sta_ctry,
|
||||
enum reg_6g_ap_type *pwr_type_6g,
|
||||
bool *ctry_code_match)
|
||||
bool *ctry_code_match,
|
||||
enum reg_6g_ap_type ap_pwr_type)
|
||||
{
|
||||
return reg_get_6g_power_type_for_ctry(psoc, ap_ctry, sta_ctry,
|
||||
pwr_type_6g, ctry_code_match);
|
||||
pwr_type_6g, ctry_code_match,
|
||||
ap_pwr_type);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue