qcacmn: Find best 6 GHz power type for connection

Find the best 6 GHz power type for connection
according to following regulatory policy:
1) SP power type is selected only if AP advertises
   SP and client supports SP.
2) LPI power type is selected only if AP advertises
   LPI and client supports LPI.
3) VLP power type is selected for the below cases,
   a) AP advertises VLP and client supports VLP
   b) AP advertises SP but client doesn't support
      SP but supports VLP.
   c) AP advertises LPI but client doesn't support
      LPI but supports VLP.

Change-Id: I6e3b9fc4bf7445c58681ef0ea8e45b434851a5b6
CRs-Fixed: 3456182
这个提交包含在:
Asutosh Mohapatra
2023-02-13 01:34:52 -08:00
提交者 Madan Koyyalamudi
父节点 fc6a569241
当前提交 459cea50e2
修改 4 个文件,包含 57 行新增86 行删除

查看文件

@@ -586,24 +586,19 @@ QDF_STATUS wlan_reg_read_current_country(struct wlan_objmgr_psoc *psoc,
#ifdef CONFIG_REG_CLIENT
/**
* wlan_reg_get_6g_power_type_for_ctry() - Return power type for 6G based
* on country IE
* wlan_reg_get_best_6g_power_type() - Return best power type for 6GHz
* connection
* @psoc: pointer to psoc
* @pdev: pointer to pdev
* @ap_ctry: pointer to country string in country IE
* @sta_ctry: pointer to sta programmed country
* @pwr_type_6g: pointer 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,
struct wlan_objmgr_pdev *pdev,
uint8_t *ap_ctry, uint8_t *sta_ctry,
enum reg_6g_ap_type *pwr_type_6g,
bool *ctry_code_match,
enum reg_6g_ap_type ap_pwr_type);
wlan_reg_get_best_6g_power_type(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_pdev *pdev,
enum reg_6g_ap_type *pwr_type_6g,
enum reg_6g_ap_type ap_pwr_type);
#endif
#ifdef CONFIG_CHAN_FREQ_API

查看文件

@@ -104,16 +104,13 @@ qdf_export_symbol(wlan_reg_get_pwrmode_chan_list);
#ifdef CONFIG_REG_CLIENT
QDF_STATUS
wlan_reg_get_6g_power_type_for_ctry(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_pdev *pdev,
uint8_t *ap_ctry, uint8_t *sta_ctry,
enum reg_6g_ap_type *pwr_type_6g,
bool *ctry_code_match,
enum reg_6g_ap_type ap_pwr_type)
wlan_reg_get_best_6g_power_type(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_pdev *pdev,
enum reg_6g_ap_type *pwr_type_6g,
enum reg_6g_ap_type ap_pwr_type)
{
return reg_get_6g_power_type_for_ctry(psoc, pdev, ap_ctry, sta_ctry,
pwr_type_6g, ctry_code_match,
ap_pwr_type);
return reg_get_best_6g_power_type(psoc, pdev, pwr_type_6g,
ap_pwr_type);
}
#endif