Browse Source

qcacmn: Wait for 2secs before sending CSA

Reverse CSA:
===========
Problem:
When Repater detects the RADAR, it sends RCSA to RootAP and
immediately switches to a new channel without waiting for CSA
from Root AP.

Expected behaviour:
When Repeater detects the RADAR, if uplink is present then it sends
RCSA to RootAP and waits for 2secs to receive CSA. If Repeater
does not receive CSA in 2sec, choose a random channel and
bring up the AP vap.

Solution:
In Repeater, if RCSA is sent successfully to RootAP then wait for
2secs to receive CSA from Root else choose a random channel and
bring up the vaps.

Change-Id: Ica204981db85917554c06cd86c0e016df624c45f
CRs-Fixed: 2104219
Abhijit Pradhan 7 years ago
parent
commit
09e53bd45c

+ 7 - 1
umac/dfs/core/src/filtering/dfs_radar.c

@@ -494,6 +494,8 @@ void dfs_get_radars(struct wlan_dfs *dfs)
 
 void dfs_radar_found_action(struct wlan_dfs *dfs)
 {
+	bool wait_for_csa = false;
+
 	if (dfs->dfs_rinfo.rn_use_nol == 1) {
 		/*
 		 * If precac is running and the radar found in secondary
@@ -556,7 +558,11 @@ void dfs_radar_found_action(struct wlan_dfs *dfs)
 	 * needs to be fixed. See EV 105776.
 	 */
 	if (dfs->dfs_rinfo.rn_use_nol == 1)  {
-		dfs_mlme_start_rcsa(dfs->dfs_pdev_obj);
+		dfs_mlme_start_rcsa(dfs->dfs_pdev_obj,
+				&wait_for_csa);
+		if (wait_for_csa)
+			return;
+
 		dfs_mlme_mark_dfs(dfs->dfs_pdev_obj,
 				dfs->dfs_curchan->dfs_ch_ieee,
 				dfs->dfs_curchan->dfs_ch_freq,

+ 3 - 1
umac/dfs/dispatcher/inc/wlan_dfs_mlme_api.h

@@ -43,8 +43,10 @@ void dfs_mlme_channel_mark_radar(struct wlan_objmgr_pdev *pdev,
 /**
  * dfs_mlme_start_rcsa() - Send RCSA to RootAP.
  * @pdev: Pointer to DFS pdev object.
+ * @wait_for_csa: Wait for CSA from RootAP.
  */
-void dfs_mlme_start_rcsa(struct wlan_objmgr_pdev *pdev);
+void dfs_mlme_start_rcsa(struct wlan_objmgr_pdev *pdev,
+		bool *wait_for_csa);
 
 /**
  * dfs_mlme_mark_dfs() - Mark the channel in the channel list.

+ 2 - 1
umac/dfs/dispatcher/inc/wlan_dfs_ucfg_api.h

@@ -71,7 +71,8 @@ struct dfs_to_mlme {
 			uint16_t freq,
 			uint8_t vhtop_ch_freq_seg2,
 			uint64_t flags);
-	QDF_STATUS (*dfs_start_rcsa)(struct wlan_objmgr_pdev *pdev);
+	QDF_STATUS (*dfs_start_rcsa)(struct wlan_objmgr_pdev *pdev,
+			bool *wait_for_csa);
 	QDF_STATUS (*mlme_mark_dfs)(struct wlan_objmgr_pdev *pdev,
 			uint8_t ieee,
 			uint16_t freq,

+ 3 - 2
umac/dfs/dispatcher/src/wlan_dfs_mlme_api.c

@@ -42,10 +42,11 @@ void dfs_mlme_channel_mark_radar(struct wlan_objmgr_pdev *pdev,
 				flags);
 }
 
-void dfs_mlme_start_rcsa(struct wlan_objmgr_pdev *pdev)
+void dfs_mlme_start_rcsa(struct wlan_objmgr_pdev *pdev,
+		bool *wait_for_csa)
 {
 	if (global_dfs_to_mlme.dfs_start_rcsa != NULL)
-		global_dfs_to_mlme.dfs_start_rcsa(pdev);
+		global_dfs_to_mlme.dfs_start_rcsa(pdev, wait_for_csa);
 }
 
 #ifndef QCA_MCL_DFS_SUPPORT