qcacmn: Get AFC mas_chan_list and check if AFC power event is received

Add an API wlan_reg_is_afc_power_event_received, to check if AFC power
event is received.

Add an API wlan_reg_get_6g_afc_mas_chan_list. to get the AFC master
channel list.

Export wlan_reg_get_6g_afc_chan_list so that it can be used by
APIs outside the UMAC module.

Change-Id: I09338a41f38e4db03f00ef2c15e9a0b7805f649e
CRs-Fixed: 2991293
这个提交包含在:
Hariharan Basuthkar
2021-07-14 16:35:14 +05:30
提交者 Madan Koyyalamudi
父节点 93c0702c78
当前提交 d2ef66d69a
修改 8 个文件,包含 115 行新增4 行删除

查看文件

@@ -555,6 +555,18 @@ QDF_STATUS wlan_reg_get_6g_ap_master_chan_list(struct wlan_objmgr_pdev *pdev,
QDF_STATUS wlan_reg_get_6g_afc_chan_list(struct wlan_objmgr_pdev *pdev,
struct regulatory_channel *chan_list);
/**
* wlan_reg_get_6g_afc_mas_chan_list() - provide the pdev afc master channel
* list
* @pdev: pdev pointer
* @chan_list: channel list pointer
*
* Return: QDF_STATUS
*/
QDF_STATUS
wlan_reg_get_6g_afc_mas_chan_list(struct wlan_objmgr_pdev *pdev,
struct regulatory_channel *chan_list);
/**
* wlan_reg_psd_2_eirp() - Calculate EIRP from PSD and bandwidth
* channel list
@@ -569,6 +581,29 @@ QDF_STATUS wlan_reg_psd_2_eirp(struct wlan_objmgr_pdev *pdev,
int16_t psd,
uint16_t ch_bw,
int16_t *eirp);
/**
* wlan_reg_is_afc_power_event_received() - Checks if AFC power event is
* received from the FW.
*
* @pdev: pdev ptr
*
* Return: true if AFC power event is received from the FW or false otherwise
*/
bool wlan_reg_is_afc_power_event_received(struct wlan_objmgr_pdev *pdev);
#else
static inline bool
wlan_reg_is_afc_power_event_received(struct wlan_objmgr_pdev *pdev)
{
return false;
}
static inline QDF_STATUS
wlan_reg_get_6g_afc_chan_list(struct wlan_objmgr_pdev *pdev,
struct regulatory_channel *chan_list)
{
return QDF_STATUS_E_NOSUPPORT;
}
#endif
/**

查看文件

@@ -504,7 +504,7 @@ ucfg_reg_set_cur_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev,
}
#endif
#ifdef CONFIG_AFC_SUPPORT
#if defined(CONFIG_AFC_SUPPORT) && defined(CONFIG_BAND_6GHZ)
/**
* ucfg_reg_send_afc_resp_rx_ind() - Send AFC response received indication to
* the FW.

查看文件

@@ -145,6 +145,17 @@ QDF_STATUS wlan_reg_get_6g_afc_chan_list(struct wlan_objmgr_pdev *pdev,
return reg_get_6g_afc_chan_list(pdev, chan_list);
}
qdf_export_symbol(wlan_reg_get_6g_afc_chan_list);
QDF_STATUS
wlan_reg_get_6g_afc_mas_chan_list(struct wlan_objmgr_pdev *pdev,
struct regulatory_channel *chan_list)
{
return reg_get_6g_afc_mas_chan_list(pdev, chan_list);
}
qdf_export_symbol(wlan_reg_get_6g_afc_mas_chan_list);
QDF_STATUS wlan_reg_psd_2_eirp(struct wlan_objmgr_pdev *pdev,
int16_t psd,
uint16_t ch_bw,
@@ -1274,6 +1285,8 @@ QDF_STATUS wlan_reg_get_6g_chan_ap_power(struct wlan_objmgr_pdev *pdev,
tx_power, eirp_psd_power);
}
qdf_export_symbol(wlan_reg_get_6g_chan_ap_power);
QDF_STATUS
wlan_reg_get_client_power_for_connecting_ap(struct wlan_objmgr_pdev *pdev,
enum reg_6g_ap_type ap_type,
@@ -1319,3 +1332,12 @@ bool wlan_reg_is_ext_tpc_supported(struct wlan_objmgr_psoc *psoc)
{
return reg_is_ext_tpc_supported(psoc);
}
#ifdef CONFIG_AFC_SUPPORT
bool wlan_reg_is_afc_power_event_received(struct wlan_objmgr_pdev *pdev)
{
return reg_is_afc_power_event_received(pdev);
}
qdf_export_symbol(wlan_reg_is_afc_power_event_received);
#endif

查看文件

@@ -386,7 +386,7 @@ ucfg_reg_get_cur_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev,
qdf_export_symbol(ucfg_reg_get_cur_6g_ap_pwr_type);
#endif
#ifdef CONFIG_AFC_SUPPORT
#if defined(CONFIG_AFC_SUPPORT) && defined(CONFIG_BAND_6GHZ)
QDF_STATUS
ucfg_reg_send_afc_resp_rx_ind(struct wlan_objmgr_pdev *pdev,
struct reg_afc_resp_rx_ind_info *afc_ind_obj)