Browse Source

qcacmn: Deliver CAC Events on curchan and prev chan

Use DFS curchan and prevchan to deliver DFS CAC Events.

When CAC is started, deliver WLAN_EV_CAC_STARTED on all the sub-channels
of the current channel. In order to reset the CAC_DONE state of the
previous channel, deliver the WLAN_EV_CAC_RESET event on all the
sub-channels of previous dfs channel. If the previous channel was non-dfs
channel the CAC_RESET event need not be delivered. Since in the case of
ETSI domains retain the CAC_DONE state CAC_RESET event need not be
delivered for this case too.

Change-Id: Ia1083828f9e2e269fd17969bc4f8d642e938990d
Vignesh U 3 năm trước cách đây
mục cha
commit
0e0728fe13
2 tập tin đã thay đổi với 22 bổ sung0 xóa
  1. 21 0
      umac/dfs/core/src/dfs.h
  2. 1 0
      umac/dfs/core/src/misc/dfs_cac.c

+ 21 - 0
umac/dfs/core/src/dfs.h

@@ -2240,6 +2240,22 @@ void dfs_cac_timer_reset(struct wlan_dfs *dfs);
  * @dfs: Pointer to wlan_dfs structure.
  */
 void dfs_cac_timer_detach(struct wlan_dfs *dfs);
+
+/**
+ * dfs_deliver_cac_state_events() - Deliver the DFS CAC events namely
+ * WLAN_EV_CAC_STARTED on cac started channel(current channel) and
+ * WLAN_EV_CAC_RESET on previous dfs channel.
+ *
+ * @dfs: Pointer to wlan_dfs structure.
+ */
+#if defined(WLAN_DISP_CHAN_INFO)
+void dfs_deliver_cac_state_events(struct wlan_dfs *dfs);
+#else
+static inline
+void dfs_deliver_cac_state_events(struct wlan_dfs *dfs)
+{
+}
+#endif
 #else
 static inline
 void dfs_stacac_stop(struct wlan_dfs *dfs)
@@ -2314,6 +2330,11 @@ static inline
 void dfs_cac_timer_detach(struct wlan_dfs *dfs)
 {
 }
+
+static inline
+void dfs_deliver_cac_state_events(struct wlan_dfs *dfs)
+{
+}
 #endif
 /**
  * dfs_set_update_nol_flag() - Sets update_nol flag.

+ 1 - 0
umac/dfs/core/src/misc/dfs_cac.c

@@ -229,6 +229,7 @@ void dfs_start_cac_timer(struct wlan_dfs *dfs)
 
 	dfs->dfs_cac_started_chan = *chan;
 
+	dfs_deliver_cac_state_events(dfs);
 	dfs_debug(dfs, WLAN_DEBUG_DFS,
 		  "chan = %d cfreq2 = %d timeout = %d sec, curr_time = %d sec",
 		  chan->dfs_ch_ieee, chan->dfs_ch_vhtop_ch_freq_seg2,