qcacmn: Add dispatcher APIs for AFC in the regulatory
1) Add an ucfg dispatcher for reg_afc_start. 2) Add an API wlan_reg_get_afc_req_id, to fetch AFC request id. 3) Add an API wlan_reg_is_afc_expiry_event_received, to check if the AFC expiry event is received from the target. Change-Id: I45841706c500e74632b60546d945cde4d634a5d2 CRs-Fixed: 3011675
This commit is contained in:

committed by
Madan Koyyalamudi

parent
e2ada05cee
commit
0b8e97ac32
@@ -5869,4 +5869,33 @@ bool reg_is_afc_power_event_received(struct wlan_objmgr_pdev *pdev)
|
|||||||
|
|
||||||
return pdev_priv_obj->is_6g_afc_power_event_received;
|
return pdev_priv_obj->is_6g_afc_power_event_received;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS reg_get_afc_req_id(struct wlan_objmgr_pdev *pdev, uint64_t *req_id)
|
||||||
|
{
|
||||||
|
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||||
|
|
||||||
|
pdev_priv_obj = reg_get_pdev_obj(pdev);
|
||||||
|
|
||||||
|
if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
|
||||||
|
reg_err("reg pdev priv obj is NULL");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
*req_id = pdev_priv_obj->afc_request_id;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool reg_is_afc_expiry_event_received(struct wlan_objmgr_pdev *pdev)
|
||||||
|
{
|
||||||
|
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||||
|
|
||||||
|
pdev_priv_obj = reg_get_pdev_obj(pdev);
|
||||||
|
if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
|
||||||
|
reg_err("pdev reg component is NULL");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return pdev_priv_obj->is_6g_afc_expiry_event_received;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1706,5 +1706,24 @@ QDF_STATUS reg_send_afc_cmd(struct wlan_objmgr_pdev *pdev,
|
|||||||
* Return: true if AFC power event is received from the FW or false otherwise
|
* Return: true if AFC power event is received from the FW or false otherwise
|
||||||
*/
|
*/
|
||||||
bool reg_is_afc_power_event_received(struct wlan_objmgr_pdev *pdev);
|
bool reg_is_afc_power_event_received(struct wlan_objmgr_pdev *pdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* reg_get_afc_req_id() - Get the AFC request ID
|
||||||
|
* @pdev: pdev pointer
|
||||||
|
* @req_id: Pointer to request id
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS reg_get_afc_req_id(struct wlan_objmgr_pdev *pdev, uint64_t *req_id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* reg_is_afc_expiry_event_received() - Checks if AFC power event is
|
||||||
|
* received from the FW.
|
||||||
|
*
|
||||||
|
* @pdev: pdev ptr
|
||||||
|
*
|
||||||
|
* Return: true if AFC expiry event is received from the FW or false otherwise
|
||||||
|
*/
|
||||||
|
bool reg_is_afc_expiry_event_received(struct wlan_objmgr_pdev *pdev);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -600,6 +600,26 @@ QDF_STATUS wlan_reg_psd_2_eirp(struct wlan_objmgr_pdev *pdev,
|
|||||||
* Return: true if AFC power event is received from the FW or false otherwise
|
* 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);
|
bool wlan_reg_is_afc_power_event_received(struct wlan_objmgr_pdev *pdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_reg_get_afc_req_id() - Get the AFC request ID
|
||||||
|
* @pdev: pdev pointer
|
||||||
|
* @req_id: Pointer to request id
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS wlan_reg_get_afc_req_id(struct wlan_objmgr_pdev *pdev,
|
||||||
|
uint64_t *req_id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_reg_is_afc_expiry_event_received() - Checks if AFC power event is
|
||||||
|
* received from the FW.
|
||||||
|
*
|
||||||
|
* @pdev: pdev ptr
|
||||||
|
*
|
||||||
|
* Return: true if AFC exipry event is received from the FW or false otherwise
|
||||||
|
*/
|
||||||
|
bool wlan_reg_is_afc_expiry_event_received(struct wlan_objmgr_pdev *pdev);
|
||||||
#else
|
#else
|
||||||
static inline bool
|
static inline bool
|
||||||
wlan_reg_is_afc_power_event_received(struct wlan_objmgr_pdev *pdev)
|
wlan_reg_is_afc_power_event_received(struct wlan_objmgr_pdev *pdev)
|
||||||
|
@@ -517,5 +517,15 @@ ucfg_reg_set_cur_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev,
|
|||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
ucfg_reg_send_afc_resp_rx_ind(struct wlan_objmgr_pdev *pdev,
|
ucfg_reg_send_afc_resp_rx_ind(struct wlan_objmgr_pdev *pdev,
|
||||||
struct reg_afc_resp_rx_ind_info *afc_ind_obj);
|
struct reg_afc_resp_rx_ind_info *afc_ind_obj);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_reg_afc_start() - Start the AFC request from regulatory. This finally
|
||||||
|
* sends the request to registered callbacks
|
||||||
|
* @pdev: Pointer to pdev
|
||||||
|
* @req_id: The AFC request ID
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS ucfg_reg_afc_start(struct wlan_objmgr_pdev *pdev, uint64_t req_id);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1346,4 +1346,19 @@ bool wlan_reg_is_afc_power_event_received(struct wlan_objmgr_pdev *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
qdf_export_symbol(wlan_reg_is_afc_power_event_received);
|
qdf_export_symbol(wlan_reg_is_afc_power_event_received);
|
||||||
|
|
||||||
|
QDF_STATUS wlan_reg_get_afc_req_id(struct wlan_objmgr_pdev *pdev,
|
||||||
|
uint64_t *req_id)
|
||||||
|
{
|
||||||
|
return reg_get_afc_req_id(pdev, req_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(wlan_reg_get_afc_req_id);
|
||||||
|
|
||||||
|
bool wlan_reg_is_afc_expiry_event_received(struct wlan_objmgr_pdev *pdev)
|
||||||
|
{
|
||||||
|
return reg_is_afc_expiry_event_received(pdev);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(wlan_reg_is_afc_expiry_event_received);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -393,4 +393,10 @@ ucfg_reg_send_afc_resp_rx_ind(struct wlan_objmgr_pdev *pdev,
|
|||||||
{
|
{
|
||||||
return reg_send_afc_cmd(pdev, afc_ind_obj);
|
return reg_send_afc_cmd(pdev, afc_ind_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_reg_afc_start(struct wlan_objmgr_pdev *pdev, uint64_t req_id)
|
||||||
|
{
|
||||||
|
return reg_afc_start(pdev, req_id);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user