diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index a948a73b922c..0472ddaf7e00 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -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; diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index aef2a519f655..7b64b6b38845 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -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 diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 6a8c6aef47f5..eff52defc5ef 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -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) {