mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
qcacmn: Policy manager component HDD callback changes
Policy manager component HDD callback changes Change-Id: Ib2226a88b27abfff12104c8430245fe384978b9f CRs-Fixed: 2019994
This commit is contained in:
parent
3d9b5cf89d
commit
631fd9f12b
3 changed files with 40 additions and 43 deletions
|
|
@ -816,9 +816,11 @@ struct policy_mgr_sme_cbacks {
|
|||
* SAP
|
||||
*/
|
||||
struct policy_mgr_hdd_cbacks {
|
||||
void (*sap_restart_chan_switch_cb)(uint8_t,
|
||||
uint32_t, uint32_t);
|
||||
void (*sap_restart_chan_switch_cb)(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id, uint32_t channel,
|
||||
uint32_t channel_bw);
|
||||
QDF_STATUS (*wlan_hdd_get_channel_for_sap_restart)(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id, uint8_t *channel,
|
||||
uint8_t *sec_ch,
|
||||
struct ch_params_s *ch_params);
|
||||
|
|
@ -1454,6 +1456,17 @@ QDF_STATUS policy_mgr_register_sme_cb(struct wlan_objmgr_psoc *psoc,
|
|||
QDF_STATUS policy_mgr_register_hdd_cb(struct wlan_objmgr_psoc *psoc,
|
||||
struct policy_mgr_hdd_cbacks *hdd_cbacks);
|
||||
|
||||
/**
|
||||
* policy_mgr_deregister_hdd_cb() - Deregister HDD callbacks
|
||||
* @psoc: PSOC object information
|
||||
*
|
||||
* API, allows HDD to deregister callbacks
|
||||
*
|
||||
* Return: SUCCESS,
|
||||
* Failure (if de-registration fails)
|
||||
*/
|
||||
QDF_STATUS policy_mgr_deregister_hdd_cb(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* policy_mgr_register_tdls_cb() - register TDLS callbacks
|
||||
* @psoc: PSOC object information
|
||||
|
|
|
|||
|
|
@ -659,8 +659,13 @@ void policy_mgr_check_sta_ap_concurrent_ch_intf(void *data)
|
|||
if (!policy_mgr_is_restart_sap_allowed(psoc, mcc_to_scc_switch))
|
||||
goto work_done;
|
||||
|
||||
if (!pm_ctx->hdd_cbacks.wlan_hdd_get_channel_for_sap_restart) {
|
||||
policy_mgr_err("SAP restart get channel callback in NULL");
|
||||
goto work_done;
|
||||
}
|
||||
|
||||
status = pm_ctx->hdd_cbacks.
|
||||
wlan_hdd_get_channel_for_sap_restart(
|
||||
wlan_hdd_get_channel_for_sap_restart(psoc,
|
||||
cc_intf_work->vdev_id, &channel,
|
||||
&sec_ch, &ch_params);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
|
|
@ -680,7 +685,7 @@ void policy_mgr_check_sta_ap_concurrent_ch_intf(void *data)
|
|||
if (policy_mgr_is_sap_channel_change_without_restart(
|
||||
mcc_to_scc_switch) &&
|
||||
pm_ctx->hdd_cbacks.sap_restart_chan_switch_cb) {
|
||||
pm_ctx->hdd_cbacks.sap_restart_chan_switch_cb(
|
||||
pm_ctx->hdd_cbacks.sap_restart_chan_switch_cb(psoc,
|
||||
cc_intf_work->vdev_id, channel,
|
||||
ch_params.ch_width);
|
||||
}
|
||||
|
|
@ -789,8 +794,8 @@ void policy_mgr_change_sap_channel_with_csa(struct wlan_objmgr_psoc *psoc,
|
|||
|
||||
if (pm_ctx->hdd_cbacks.sap_restart_chan_switch_cb) {
|
||||
policy_mgr_info("SAP change change without restart");
|
||||
pm_ctx->hdd_cbacks.sap_restart_chan_switch_cb(vdev_id,
|
||||
channel, ch_width);
|
||||
pm_ctx->hdd_cbacks.sap_restart_chan_switch_cb(psoc,
|
||||
vdev_id, channel, ch_width);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -892,43 +897,6 @@ QDF_STATUS policy_mgr_restart_opportunistic_timer(
|
|||
return status;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
||||
QDF_STATUS policy_mgr_register_sap_restart_channel_switch_cb(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
void (*sap_restart_chan_switch_cb)(uint8_t, uint32_t, uint32_t))
|
||||
{
|
||||
struct policy_mgr_psoc_priv_obj *policy_mgr_ctx;
|
||||
|
||||
policy_mgr_ctx = policy_mgr_get_context(psoc);
|
||||
if (!policy_mgr_ctx) {
|
||||
policy_mgr_err("Invalid context");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
policy_mgr_ctx->hdd_cbacks.sap_restart_chan_switch_cb =
|
||||
sap_restart_chan_switch_cb;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS policy_mgr_deregister_sap_restart_channel_switch_cb(
|
||||
struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct policy_mgr_psoc_priv_obj *policy_mgr_ctx;
|
||||
|
||||
policy_mgr_ctx = policy_mgr_get_context(psoc);
|
||||
if (!policy_mgr_ctx) {
|
||||
policy_mgr_err("Invalid context");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
policy_mgr_ctx->hdd_cbacks.sap_restart_chan_switch_cb = NULL;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
QDF_STATUS policy_mgr_set_hw_mode_on_channel_switch(
|
||||
struct wlan_objmgr_psoc *psoc, uint8_t session_id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -436,6 +436,22 @@ QDF_STATUS policy_mgr_register_hdd_cb(struct wlan_objmgr_psoc *psoc,
|
|||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS policy_mgr_deregister_hdd_cb(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("Invalid Context");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
pm_ctx->hdd_cbacks.sap_restart_chan_switch_cb = NULL;
|
||||
pm_ctx->hdd_cbacks.wlan_hdd_get_channel_for_sap_restart = NULL;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS policy_mgr_register_wma_cb(struct wlan_objmgr_psoc *psoc,
|
||||
struct policy_mgr_wma_cbacks *wma_cbacks)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue