qcacld-3.0: Take account of dfs cac state to determine dfs_cac_block_tx
Regarding to the go+sap scc on dfs channel, sap can follow with go to the same dfs channel, but sap tx is hung. Since the host set the dfs_cac_block_tx by mistake when ap started, though the ap skip the cac because the scc go finished the cac procedure, then dfs_cac_block_tx has no chance to be reset. The fix is to take account of dfs cac state to determine the proper dfs_cac_block_tx. Change-Id: I7a35225711f587b83d2fc381108d7d3f15893867 CRs-Fixed: 2631457
This commit is contained in:
parent
90614d7036
commit
865036ff4f
@ -1787,6 +1787,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(struct sap_event *sap_event,
|
||||
struct hdd_context *hdd_ctx;
|
||||
struct iw_michaelmicfailure msg;
|
||||
uint8_t ignoreCAC = 0;
|
||||
eSapDfsCACState_t cac_state = eSAP_DFS_DO_NOT_SKIP_CAC;
|
||||
struct hdd_config *cfg = NULL;
|
||||
struct wlan_dfs_info dfs_info;
|
||||
uint8_t cc_len = WLAN_SVC_COUNTRY_CODE_LEN;
|
||||
@ -1883,12 +1884,16 @@ QDF_STATUS hdd_hostapd_sap_event_cb(struct sap_event *sap_event,
|
||||
hdd_ctx->psoc, adapter->vdev_id))
|
||||
ignoreCAC = true;
|
||||
|
||||
wlansap_get_dfs_cac_state(mac_handle, &cac_state);
|
||||
|
||||
/* DFS requirement: DO NOT transmit during CAC. */
|
||||
if (CHANNEL_STATE_DFS !=
|
||||
wlan_reg_get_channel_state_for_freq(
|
||||
hdd_ctx->pdev, ap_ctx->operating_chan_freq)
|
||||
|| ignoreCAC
|
||||
|| hdd_ctx->dev_dfs_cac_status == DFS_CAC_ALREADY_DONE)
|
||||
hdd_ctx->pdev, ap_ctx->operating_chan_freq) ||
|
||||
ignoreCAC ||
|
||||
(hdd_ctx->dev_dfs_cac_status ==
|
||||
DFS_CAC_ALREADY_DONE) ||
|
||||
(eSAP_DFS_SKIP_CAC == cac_state))
|
||||
ap_ctx->dfs_cac_block_tx = false;
|
||||
else
|
||||
ap_ctx->dfs_cac_block_tx = true;
|
||||
|
@ -1137,6 +1137,17 @@ QDF_STATUS wlansap_get_dfs_ignore_cac(mac_handle_t mac_handle,
|
||||
*/
|
||||
QDF_STATUS wlansap_set_dfs_ignore_cac(mac_handle_t mac_handle,
|
||||
uint8_t ignore_cac);
|
||||
/**
|
||||
* wlansap_get_dfs_cac_state() - Get cac_state value
|
||||
* @mac_handle: Opaque handle to the global MAC context
|
||||
* @cac_state: Location to store cac_state value
|
||||
*
|
||||
* This API is used to Get the value of ignore_cac value
|
||||
*
|
||||
* Return: The QDF_STATUS code associated with performing the operation
|
||||
*/
|
||||
QDF_STATUS wlansap_get_dfs_cac_state(mac_handle_t mac_handle,
|
||||
eSapDfsCACState_t *cac_state);
|
||||
|
||||
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
|
||||
QDF_STATUS
|
||||
|
@ -1908,6 +1908,22 @@ QDF_STATUS wlansap_set_dfs_ignore_cac(mac_handle_t mac_handle,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS wlansap_get_dfs_cac_state(mac_handle_t mac_handle,
|
||||
eSapDfsCACState_t *cac_state)
|
||||
{
|
||||
struct mac_context *mac = NULL;
|
||||
|
||||
if (mac_handle) {
|
||||
mac = MAC_CONTEXT(mac_handle);
|
||||
} else {
|
||||
sap_err("Invalid mac_handle pointer");
|
||||
return QDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
*cac_state = mac->sap.SapDfsInfo.cac_state;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
bool sap_is_auto_channel_select(struct sap_context *sapcontext)
|
||||
{
|
||||
if (!sapcontext) {
|
||||
|
Loading…
Reference in New Issue
Block a user