소스 검색

qcacld-3.0: Optimize processing of DFS phy events

qcacld-2.0 to qcacld-3.0 propagation

Optimize by avoiding processing of DFS phy events in below scenario's

1)Once radar indication given to UMAC.
2)Vdev restart in SAP interface

Change-Id: Ib175feed4a611a5c7185202e3d50abc3e84fc781
CRs-Fixed: 910586
Edhar, Mahesh Kumar 9 년 전
부모
커밋
7cbbe59672
4개의 변경된 파일29개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      core/sap/dfs/src/dfs_process_radarevent.c
  2. 1 0
      core/wma/inc/wma_dfs_interface.h
  3. 8 0
      core/wma/src/wma_dev_if.c
  4. 10 0
      core/wma/src/wma_features.c

+ 10 - 0
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 {

+ 1 - 0
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;
 
 /**

+ 8 - 0
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 =

+ 10 - 0
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;