diff --git a/core/sap/dfs/src/dfs_process_radarevent.c b/core/sap/dfs/src/dfs_process_radarevent.c index 41ce9160f5..a639d44d3d 100644 --- a/core/sap/dfs/src/dfs_process_radarevent.c +++ b/core/sap/dfs/src/dfs_process_radarevent.c @@ -224,6 +224,16 @@ int dfs_process_radarevent(struct ath_dfs *dfs, struct ieee80211_channel *chan) ATH_DFSEVENTQ_UNLOCK(dfs); found = 0; + cdf_spin_lock_bh(&dfs->ic->chan_lock); + if (dfs->ic->disable_phy_err_processing) { + ATH_DFSQ_LOCK(dfs); + empty = STAILQ_EMPTY(&(dfs->dfs_radarq)); + ATH_DFSQ_UNLOCK(dfs); + cdf_spin_unlock_bh(&dfs->ic->chan_lock); + continue; + } + + cdf_spin_unlock_bh(&dfs->ic->chan_lock); if (re.re_chanindex < DFS_NUM_RADAR_STATES) rs = &dfs->dfs_radar[re.re_chanindex]; else { diff --git a/core/wma/inc/wma_dfs_interface.h b/core/wma/inc/wma_dfs_interface.h index 53d1cc4cb6..740e23a84c 100644 --- a/core/wma/inc/wma_dfs_interface.h +++ b/core/wma/inc/wma_dfs_interface.h @@ -233,6 +233,7 @@ typedef struct ieee80211com { uint8_t last_radar_found_chan; int32_t dfs_pri_multiplier; cdf_spinlock_t chan_lock; + bool disable_phy_err_processing; } IEEE80211COM, *PIEEE80211COM; /** diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 8bbcf71714..925fcdb98b 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -766,6 +766,12 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info, return -EINVAL; } + if (wma_is_vdev_in_ap_mode(wma, resp_event->vdev_id)) { + cdf_spin_lock_bh(&wma->dfs_ic->chan_lock); + wma->dfs_ic->disable_phy_err_processing = false; + cdf_spin_unlock_bh(&wma->dfs_ic->chan_lock); + } + if (resp_event->status == CDF_STATUS_SUCCESS) { wma->interfaces[resp_event->vdev_id].tx_streams = resp_event->cfgd_tx_streams; @@ -2051,6 +2057,8 @@ CDF_STATUS wma_vdev_start(tp_wma_handle wma, } cdf_spin_lock_bh(&wma->dfs_ic->chan_lock); + if (isRestart) + wma->dfs_ic->disable_phy_err_processing = true; /* provide the current channel to DFS */ wma->dfs_ic->ic_curchan = diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index f3945b94a2..9faaac67e4 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -1734,6 +1734,13 @@ static int wma_unified_dfs_radar_rx_event_handler(void *handle, cdf_spin_lock_bh(&ic->chan_lock); chan = ic->ic_curchan; + if (ic->disable_phy_err_processing) { + WMA_LOGD("%s: radar indication done,drop phyerror event", + __func__); + cdf_spin_unlock_bh(&ic->chan_lock); + return 0; + } + if (CHANNEL_STATE_DFS != cds_get_channel_state(chan->ic_ieee)) { WMA_LOGE ("%s: Invalid DFS Phyerror event. Channel=%d is Non-DFS", @@ -6921,6 +6928,9 @@ int wma_dfs_indicate_radar(struct ieee80211com *ic, * radar events to be posted on the same channel. */ cdf_spin_lock_bh(&ic->chan_lock); + if (!pmac->sap.SapDfsInfo.disable_dfs_ch_switch) + wma->dfs_ic->disable_phy_err_processing = true; + if ((ichan->ic_ieee != (wma->dfs_ic->last_radar_found_chan)) || (pmac->sap.SapDfsInfo.disable_dfs_ch_switch == true)) { wma->dfs_ic->last_radar_found_chan = ichan->ic_ieee;