瀏覽代碼

qca-wifi: Enhancement of auto channel zerowait using RCAC

If user configures DFS channel, use intermediate channel to
bring up VAPs. Parallely start RCAC on configured DFS channel.
Once minimal RCAC run is done on configured RCAC channel, switch
channel from intermediate channel to DFS channel using CSA.
When user configures new channel using iwconfig, start the RCAC
state machine if newly configured channel is DFS by staying in
current channel until RCAC minimal run is complete on newly
configured DFS channel. Once the minimal RCAC is complete,
switch to the user configured channel using CSA.

Change-Id: I4a54344fddeb49534a78d70a377a6393d26140d6
Shreedhar Parande 4 年之前
父節點
當前提交
2a6d9d7bfa
共有 2 個文件被更改,包括 36 次插入0 次删除
  1. 14 0
      umac/dfs/core/src/misc/dfs_agile_sm.c
  2. 22 0
      umac/dfs/core/src/misc/dfs_zero_cac.c

+ 14 - 0
umac/dfs/core/src/misc/dfs_agile_sm.c

@@ -620,6 +620,20 @@ static void dfs_agile_state_complete_entry(void *ctx)
 
 	/* Mark the RCAC channel as CAC done. */
 	dfs_mark_adfs_chan_as_cac_done(dfs);
+	/*
+	 * Check if rcac is done on preffered channel.
+	 * If so, change channel from intermediate channel to preffered chan.
+	 */
+	dfs_precac_check_home_chan_change(dfs);
+	/*
+	 * In case of preCAC interCAC, if the above home channel change fails,
+	 * we explicitly do agile start (DFS_AGILE_SM_EV_AGILE_START) as we need
+	 * to pick the next agile channel. However, in case of RCAC, if the
+	 * above home channel change fails, the agile continues in the current
+	 * RCAC channel therefore explicit agile start
+	 * (DFS_AGILE_SM_EV_AGILE_START) is not required. Refer to function
+	 * "dfs_agile_state_running_event"
+	 */
 }
 
 /**

+ 22 - 0
umac/dfs/core/src/misc/dfs_zero_cac.c

@@ -1362,6 +1362,7 @@ dfs_decide_precac_preferred_chan_for_freq(struct wlan_dfs *dfs,
 					  enum wlan_phymode mode)
 {
 	struct dfs_channel *chan;
+	qdf_freq_t rcac_freq;
 
 	chan = qdf_mem_malloc(sizeof(struct dfs_channel));
 
@@ -1401,6 +1402,27 @@ dfs_decide_precac_preferred_chan_for_freq(struct wlan_dfs *dfs,
 			  chan->dfs_ch_freq,
 			  dfs->dfs_autoswitch_des_mode,
 			  *pref_chan_freq);
+
+		if (dfs_is_agile_rcac_enabled(dfs)) {
+			dfs_get_rcac_freq(dfs, &rcac_freq);
+			if (chan->dfs_ch_freq != rcac_freq) {
+				/*
+				 * Since the upper layer will not do any channel
+				 * restart, the agile state machine will not
+				 * automatically be restarted. Therefore, stop
+				 * and start the the agile state machine on the
+				 * desired channel.
+				 */
+				dfs_agile_sm_deliver_evt(dfs->dfs_soc_obj,
+							 DFS_AGILE_SM_EV_AGILE_STOP,
+							 0, (void *)dfs);
+				dfs_set_rcac_freq(dfs, chan->dfs_ch_freq);
+				dfs_agile_sm_deliver_evt(dfs->dfs_soc_obj,
+							 DFS_AGILE_SM_EV_AGILE_START,
+							 0, (void *)dfs);
+			}
+		}
+
 		dfs->dfs_autoswitch_chan = chan;
 		return true;
 	}