qcacld-3.0: SAP in CAC, block concurrency

At the time of starting / stopping 2nd or 3rd connection,
Host sends WMI_PDEV_SET_HW_CMDID command to FW to change
HW mode to DBS / Single-Mac based on concurrency rule.
FW upon receiving this command turns off TXRX chainmask
which means that radar pulses might get missed for
20ms - 50ms during CAC period. To fix this, Host should
block new connection when existing SAP is performing CAC
on DFS channel.

Change-Id: I51eb117afa763a6ef54211808875419026c9075b
CRs-Fixed: 2533717
This commit is contained in:
Rachit Kankane
2019-10-10 13:52:57 +05:30
committed by nshrivas
父節點 e2a6da27b9
當前提交 5e1e0e6bbb
共有 4 個文件被更改,包括 24 次插入1 次删除

查看文件

@@ -1309,6 +1309,7 @@ struct policy_mgr_hdd_cbacks {
enum QDF_OPMODE (*hdd_get_device_mode)(uint32_t session_id);
bool (*hdd_wapi_security_sta_exist)(void);
bool (*hdd_is_chan_switch_in_progress)(void);
bool (*hdd_is_cac_in_progress)(void);
void (*wlan_hdd_set_sap_csa_reason)(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint8_t reason);
};

查看文件

@@ -165,6 +165,17 @@ QDF_STATUS policy_mgr_pdev_set_hw_mode(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_E_FAILURE;
}
/* Don't send WMI_PDEV_SET_HW_MODE_CMDID to FW if existing SAP / GO is
* in CAC-in-progress state. Host is blocking this command as FW is
* having design limitation and FW don't expect this command when CAC
* is in progress state.
*/
if (pm_ctx->hdd_cbacks.hdd_is_cac_in_progress &&
pm_ctx->hdd_cbacks.hdd_is_cac_in_progress()) {
policy_mgr_err("SAP CAC_IN_PROGRESS state, drop WMI_PDEV_SET_HW_MODE_CMDID");
return QDF_STATUS_E_FAILURE;
}
msg.hw_mode_index = hw_mode_index;
msg.set_hw_mode_cb = (void *)policy_mgr_pdev_set_hw_mode_cb;
msg.reason = reason;

查看文件

@@ -1464,6 +1464,7 @@ void pm_dbs_opportunistic_timer_handler(void *data)
uint32_t session_id;
struct wlan_objmgr_psoc *psoc = (struct wlan_objmgr_psoc *)data;
enum policy_mgr_conn_update_reason reason;
struct policy_mgr_psoc_priv_obj *pm_ctx = policy_mgr_get_context(psoc);
if (!psoc) {
policy_mgr_err("Invalid Context");
@@ -1473,8 +1474,14 @@ void pm_dbs_opportunistic_timer_handler(void *data)
/* if we still need it */
action = policy_mgr_need_opportunistic_upgrade(psoc, &reason);
policy_mgr_debug("action:%d", action);
if (!action)
if (!action) {
return;
} else if (pm_ctx->hdd_cbacks.hdd_is_cac_in_progress &&
pm_ctx->hdd_cbacks.hdd_is_cac_in_progress()) {
policy_mgr_debug("SAP is in CAC_IN_PROGRESS state, restarting");
policy_mgr_restart_opportunistic_timer(psoc, false);
return;
}
session_id = pm_get_vdev_id_of_first_conn_idx(psoc);
policy_mgr_next_actions(psoc, session_id, action,
reason);

查看文件

@@ -610,6 +610,8 @@ QDF_STATUS policy_mgr_register_hdd_cb(struct wlan_objmgr_psoc *psoc,
hdd_cbacks->hdd_wapi_security_sta_exist;
pm_ctx->hdd_cbacks.hdd_is_chan_switch_in_progress =
hdd_cbacks->hdd_is_chan_switch_in_progress;
pm_ctx->hdd_cbacks.hdd_is_cac_in_progress =
hdd_cbacks->hdd_is_cac_in_progress;
return QDF_STATUS_SUCCESS;
}
@@ -628,6 +630,8 @@ QDF_STATUS policy_mgr_deregister_hdd_cb(struct wlan_objmgr_psoc *psoc)
pm_ctx->hdd_cbacks.wlan_hdd_get_channel_for_sap_restart = NULL;
pm_ctx->hdd_cbacks.get_mode_for_non_connected_vdev = NULL;
pm_ctx->hdd_cbacks.hdd_get_device_mode = NULL;
pm_ctx->hdd_cbacks.hdd_is_chan_switch_in_progress = NULL;
pm_ctx->hdd_cbacks.hdd_is_cac_in_progress = NULL;
return QDF_STATUS_SUCCESS;
}