Переглянути джерело

qcacmn: Remove legacy preCAC core APIs

Remove the legacy preCAC feature core APIs from the DFS component.

Change-Id: Id88f47931fceebe37f1d249502cd52c609cf4668
Vignesh Mohan 3 роки тому
батько
коміт
ab3624cc01

+ 2 - 4
umac/dfs/core/src/dfs.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2013, 2016-2021 The Linux Foundation.  All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  * Copyright (c) 2005-2006 Atheros Communications, Inc.
  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
@@ -1114,8 +1115,6 @@ struct dfs_rcac_params {
  *                                   to be sent in NOL IE with RCSA.
  * @dfs_is_rcsa_ie_sent:             To send or to not send RCSA IE.
  * @dfs_is_nol_ie_sent:              To send or to not send NOL IE.
- * @dfs_legacy_precac_ucfg:          User configuration for legacy preCAC in
- *                                   partial offload chipsets.
  * @dfs_agile_precac_ucfg:           User configuration for agile preCAC.
  * @dfs_agile_rcac_ucfg:             User configuration for Rolling CAC.
  * @dfs_fw_adfs_support_non_160:     Target Agile DFS support for non-160 BWs.
@@ -1287,8 +1286,7 @@ struct wlan_dfs {
 	bool           dfs_is_rcsa_ie_sent;
 	bool           dfs_is_nol_ie_sent;
 #endif
-	uint8_t        dfs_legacy_precac_ucfg:1,
-		       dfs_agile_precac_ucfg:1,
+	uint8_t        dfs_agile_precac_ucfg:1,
 #if defined(QCA_SUPPORT_ADFS_RCAC)
 		       dfs_agile_rcac_ucfg:1,
 #endif

+ 0 - 81
umac/dfs/core/src/dfs_zero_cac.h

@@ -417,71 +417,6 @@ static inline int dfs_get_override_precac_timeout(struct wlan_dfs *dfs,
 }
 #endif
 
-/**
- * Zero-CAC-DFS algorithm:-
- * Zero-CAC-DFS algorithm works in stealth mode.
- * 1) When any channel change happens in VHT80 mode the algorithm
- * changes the HW channel mode to VHT80_80/VHT160 mode and adds a
- * new channel in the secondary VHT80 to perform precac and a
- * precac timer is started. However the upper layer/UMAC is unaware
- * of this change.
- * 2) When the precac timer expires without being interrupted by
- * any channel change the secondary VHT80 channel is moved from
- * precac-required-list to precac-done-list.
- * 3) If there is a radar detect at any time in any segment
- * (segment-1 is preimary VHT80 and segment-2 is VHT80)then the
- * channel is searched in both precac-reuired-list and precac-done-list
- * and moved to precac-nol-list.
- * 4) Whenever channel change happens if the new channel is a DFS
- * channel then precac-done-list is searched and if the channel is
- * found in the precac-done-list then the CAC is skipped.
- * 5) The precac expiry timer makes a vedv_restart(channel change
- * with current-upper-layer-channel-mode which is VHT80). In channel
- * change the algorithm tries to pick a new channel from the
- * precac-required list. If none found then channel mode remains same.
- * Which means when all the channels in precac-required-list are
- * exhausted the VHT80_80/VHT160 comes back to VHT80 mode.
- */
-#if !defined(MOBILE_DFS_SUPPORT)
-/*
- * dfs_find_vht80_chan_for_precac_for_freq() - Find VHT80 channel for precac.
- * @dfs: Pointer to wlan_dfs structure.
- * @chan_mode: Channel mode.
- * @ch_freq_seg1: Segment1 channel freq in mhz.
- * @cfreq1: cfreq1.
- * @cfreq2: cfreq2.
- * @phy_mode: Precac phymode.
- * @dfs_set_cfreq2: Precac cfreq2
- * @set_agile: Agile mode flag.
- */
-#ifdef CONFIG_CHAN_FREQ_API
-void dfs_find_vht80_chan_for_precac_for_freq(struct wlan_dfs *dfs,
-					     uint32_t chan_mode,
-					     uint16_t ch_freq_seg1_mhz,
-					     uint32_t *cfreq1,
-					     uint32_t *cfreq2,
-					     uint32_t *phy_mode,
-					     bool *dfs_set_cfreq2,
-					     bool *set_agile);
-#endif
-
-#else
-
-#ifdef CONFIG_CHAN_FREQ_API
-static inline
-void dfs_find_vht80_chan_for_precac_for_freq(struct wlan_dfs *dfs,
-					     uint32_t chan_mode,
-					     uint16_t ch_freq_seg1_mhz,
-					     uint32_t *cfreq1,
-					     uint32_t *cfreq2,
-					     uint32_t *phy_mode,
-					     bool *dfs_set_cfreq2,
-					     bool *set_agile)
-{
-}
-#endif
-#endif
-
 #if defined(QCA_SUPPORT_AGILE_DFS)
 /**
  * dfs_find_pdev_for_agile_precac() - Find pdev to select channel for precac.
@@ -643,22 +578,6 @@ static inline void dfs_set_precac_enable(struct wlan_dfs *dfs,
 }
 #endif
 
-/**
- * dfs_is_legacy_precac_enabled() - Check if legacy preCAC is enabled for the
- * DFS onject.
- * @dfs: Pointer to the wlan_dfs object.
- *
- * Return: True if legacy preCAC is enabled, else false.
- */
-#if !defined(MOBILE_DFS_SUPPORT)
-bool dfs_is_legacy_precac_enabled(struct wlan_dfs *dfs);
-#else
-static inline bool dfs_is_legacy_precac_enabled(struct wlan_dfs *dfs)
-{
-	return 0;
-}
-#endif
-
 /**
  * dfs_is_agile_precac_enabled() - Check if agile preCAC is enabled for the DFS.
  * @dfs: Pointer to the wlan_dfs object.

+ 1 - 29
umac/dfs/core/src/filtering/dfs_process_radarevent.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2013, 2016-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  * Copyright (c) 2002-2010, Atheros Communications Inc.
  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
@@ -1445,32 +1446,6 @@ static void dfs_radar_found_action(struct wlan_dfs *dfs,
 	}
 }
 
-/**
- * dfs_is_radar_source_legacy_agile() - Check if radar pulse event is received
- * on a Zero CAC agile channel.
- * @dfs: Pointer to wlan_dfs structure.
- *
- * Return: If a radar pulse event is received on a zero cac agile
- * channel return true. Otherwise, return false.
- */
-#if defined(ATH_SUPPORT_ZERO_CAC_DFS)
-static
-bool dfs_is_radar_source_legacy_agile(struct wlan_dfs *dfs)
-{
-	if (dfs_is_legacy_precac_enabled(dfs) &&
-	    dfs_is_precac_timer_running(dfs) &&
-	    dfs->dfs_precac_secondary_freq_mhz)
-		return true;
-	return false;
-}
-#else
-static
-bool dfs_is_radar_source_legacy_agile(struct wlan_dfs *dfs)
-{
-	return false;
-}
-#endif
-
 /**
  * dfs_radar_pulse_event_basic_sanity() - Check if radar pulse event is received
  * on a DFS channel or Zero CAC agile channel.
@@ -1490,9 +1465,6 @@ bool dfs_radar_pulse_event_basic_sanity(struct wlan_dfs *dfs,
 		return false;
 	}
 
-	if (dfs_is_radar_source_legacy_agile(dfs))
-		return true;
-
 	if (!WLAN_IS_PRIMARY_OR_SECONDARY_CHAN_DFS(chan)) {
 		dfs_debug(dfs, WLAN_DEBUG_DFS1,
 			  "radar event on a non-DFS chan");

+ 25 - 48
umac/dfs/core/src/misc/dfs_process_radar_found_ind.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -361,34 +361,25 @@ dfs_compute_radar_found_cfreq(struct wlan_dfs *dfs,
 	} else if (!radar_found->segment_id) {
 		*freq_center = curchan->dfs_ch_mhz_freq_seg1;
 	} else {
-	    /* Radar found on secondary segment by the HW when
-	     * preCAC was running. It (dfs_precac_enable) is specific to
-	     * legacy chips.
-	     */
-		if (dfs_is_precac_timer_running(dfs) &&
-			dfs_is_legacy_precac_enabled(dfs)) {
-			*freq_center = dfs->dfs_precac_secondary_freq_mhz;
-		} else {
-		    /* Radar found on secondary segment by the HW, when preCAC
-		     * was not running in legacy chips or preCAC was running
-		     * in Lithium chips.
-		     */
-			*freq_center = curchan->dfs_ch_mhz_freq_seg2;
-			if (WLAN_IS_CHAN_MODE_160(curchan)) {
-				/* If center frequency of entire 160 band
-				 * is less than center frequency of primary
-				 * segment, then the center frequency of
-				 * secondary segment is -40 of center
-				 * frequency of entire 160 segment.
-				 */
-				if (curchan->dfs_ch_mhz_freq_seg2 <
-				    curchan->dfs_ch_mhz_freq_seg1)
-					*freq_center -=
-						DFS_160MHZ_SECOND_SEG_OFFSET;
-				else
-					*freq_center +=
-						DFS_160MHZ_SECOND_SEG_OFFSET;
-			}
+		/* Radar found on secondary segment by the HW, when preCAC
+		 * was not running in legacy chips or preCAC was running
+		 * in Lithium chips.
+		 */
+		*freq_center = curchan->dfs_ch_mhz_freq_seg2;
+		if (WLAN_IS_CHAN_MODE_160(curchan)) {
+			/* If center frequency of entire 160 band
+			 * is less than center frequency of primary
+			 * segment, then the center frequency of
+			 * secondary segment is -40 of center
+			 * frequency of entire 160 segment.
+			 */
+			if (curchan->dfs_ch_mhz_freq_seg2 <
+			    curchan->dfs_ch_mhz_freq_seg1)
+				*freq_center -=
+					DFS_160MHZ_SECOND_SEG_OFFSET;
+			else
+				*freq_center +=
+					DFS_160MHZ_SECOND_SEG_OFFSET;
 		}
 	}
 }
@@ -744,17 +735,8 @@ uint8_t dfs_get_bonding_channels_for_freq(struct wlan_dfs *dfs,
 		center_freq = curchan->dfs_ch_mhz_freq_seg2;
 	else if (!segment_id)
 		center_freq = curchan->dfs_ch_mhz_freq_seg1;
-	else {
-		/* When precac is running "dfs_ch_vhtop_ch_freq_seg2" is
-		 * zero and "dfs_precac_secondary_freq" holds the secondary
-		 * frequency.
-		 */
-		if (dfs_is_legacy_precac_enabled(dfs) &&
-		    dfs_is_precac_timer_running(dfs))
-			center_freq = dfs->dfs_precac_secondary_freq_mhz;
-		else
-			center_freq = curchan->dfs_ch_mhz_freq_seg2;
-	}
+	else
+		center_freq = curchan->dfs_ch_mhz_freq_seg2;
 
 	if (WLAN_IS_CHAN_MODE_20(curchan)) {
 		nchannels = 1;
@@ -1021,17 +1003,12 @@ bool dfs_is_radarsource_agile(struct wlan_dfs *dfs,
 	      dfs_is_precac_timer_running(dfs)) ||
 	     dfs_is_agile_rcac_enabled(dfs)) &&
 	    (radar_found->detector_id == dfs_get_agile_detector_id(dfs));
-	bool is_radar_from_zero_wait_dfs =
-	    (dfs_is_legacy_precac_enabled(dfs) &&
-	     dfs_is_precac_timer_running(dfs) &&
-	     (radar_found->segment_id == SEG_ID_SECONDARY));
 
 	dfs_debug(dfs, WLAN_DEBUG_DFS_AGILE,
-		  "radar on PreCAC segment: ADFS:%d Zero Wait DFS:%d",
-		  is_radar_from_agile_dfs,
-		  is_radar_from_zero_wait_dfs);
+		  "radar on PreCAC segment: ADFS:%d",
+		  is_radar_from_agile_dfs);
 
-	return (is_radar_from_agile_dfs || is_radar_from_zero_wait_dfs);
+	return is_radar_from_agile_dfs;
 }
 #else
 static

+ 0 - 25
umac/dfs/dispatcher/inc/wlan_dfs_tgt_api.h

@@ -362,31 +362,6 @@ QDF_STATUS tgt_dfs_agile_precac_start(struct wlan_objmgr_pdev *pdev);
 QDF_STATUS tgt_dfs_ocac_complete(struct wlan_objmgr_pdev *pdev,
 				 struct vdev_adfs_complete_status *ocac_status);
 
-/**
- * tgt_dfs_find_vht80_precac_chan_freq() - Find VHT80 channel for precac
- * @pdev: Pointer to DFS pdev object.
- * @chan_mode: Channel mode.
- * @ch_freq_seg1_mhz: Segment1 channel freq in MHZ.
- * @cfreq1: cfreq1.
- * @cfreq2: cfreq2.
- * @phy_mode: Precac phymode.
- * @dfs_set_cfreq2: Precac cfreq2
- * @set_agile: Agile mode flag.
- *
- * wrapper function for  dfs_find_vht80_chan_for_precac_for_freq().
- */
-#ifdef CONFIG_CHAN_FREQ_API
-QDF_STATUS
-tgt_dfs_find_vht80_precac_chan_freq(struct wlan_objmgr_pdev *pdev,
-				    uint32_t chan_mode,
-				    uint16_t ch_freq_mhz_seg1,
-				    uint32_t *cfreq1,
-				    uint32_t *cfreq2,
-				    uint32_t *phy_mode,
-				    bool *dfs_set_cfreq2,
-				    bool *set_agile);
-#endif
-
 /**
  * tgt_dfs_cac_complete() - Process cac complete indication.
  * @pdev: Pointer to DFS pdev object.

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

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for
@@ -289,18 +290,6 @@ QDF_STATUS ucfg_dfs_override_precac_timeout(struct wlan_objmgr_pdev *pdev,
 QDF_STATUS ucfg_dfs_set_precac_enable(struct wlan_objmgr_pdev *pdev,
 				      uint32_t value);
 
-/**
- * ucfg_dfs_get_legacy_precac_enable() - Get the legacy precac enable flag.
- * @pdev: Pointer to DFS pdev object.
- * @buff: Pointer to save precac_enable value.
- *
- * Wrapper function for dfs_is_legacy_precac_enabled() and returns the
- * legacy precac enable flag for partial offload chipsets.
- * This function called from outside of dfs component.
- */
-QDF_STATUS ucfg_dfs_get_legacy_precac_enable(struct wlan_objmgr_pdev *pdev,
-					     bool *buff);
-
 /**
  * ucfg_dfs_get_agile_precac_enable() - Get agile precac enable flag.
  * @pdev: Pointer to DFS pdev object.

+ 0 - 34
umac/dfs/dispatcher/src/wlan_dfs_tgt_api.c

@@ -509,40 +509,6 @@ QDF_STATUS tgt_dfs_ocac_complete(struct wlan_objmgr_pdev *pdev,
 #endif
 qdf_export_symbol(tgt_dfs_ocac_complete);
 
-#ifdef CONFIG_CHAN_FREQ_API
-QDF_STATUS
-tgt_dfs_find_vht80_precac_chan_freq(struct wlan_objmgr_pdev *pdev,
-				    uint32_t chan_mode,
-				    uint16_t chan_freq_seg1_mhz,
-				    uint32_t *cfreq1,
-				    uint32_t *cfreq2,
-				    uint32_t *phy_mode,
-				    bool *dfs_set_cfreq2,
-				    bool *set_agile)
-{
-	struct wlan_dfs *dfs;
-
-	dfs = wlan_pdev_get_dfs_obj(pdev);
-	if (!dfs) {
-		dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "dfs is NULL");
-		return  QDF_STATUS_E_FAILURE;
-	}
-
-	dfs_find_vht80_chan_for_precac_for_freq(dfs,
-						chan_mode,
-						chan_freq_seg1_mhz,
-						cfreq1,
-						cfreq2,
-						phy_mode,
-						dfs_set_cfreq2,
-						set_agile);
-
-	return  QDF_STATUS_SUCCESS;
-}
-
-qdf_export_symbol(tgt_dfs_find_vht80_precac_chan_freq);
-#endif
-
 QDF_STATUS tgt_dfs_process_radar_ind(struct wlan_objmgr_pdev *pdev,
 				     struct radar_found_info *radar_found)
 {

+ 1 - 21
umac/dfs/dispatcher/src/wlan_dfs_ucfg_api.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for
@@ -139,27 +140,6 @@ QDF_STATUS ucfg_dfs_set_precac_enable(struct wlan_objmgr_pdev *pdev,
 }
 qdf_export_symbol(ucfg_dfs_set_precac_enable);
 
-QDF_STATUS ucfg_dfs_get_legacy_precac_enable(struct wlan_objmgr_pdev *pdev,
-					     bool *buff)
-{
-	struct wlan_dfs *dfs;
-
-	if (!tgt_dfs_is_5ghz_supported_in_pdev(pdev))
-		return QDF_STATUS_SUCCESS;
-
-	dfs = wlan_pdev_get_dfs_obj(pdev);
-	if (!dfs) {
-		dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS,  "null dfs");
-		return  QDF_STATUS_E_FAILURE;
-	}
-
-	*buff = dfs_is_legacy_precac_enabled(dfs);
-
-	return QDF_STATUS_SUCCESS;
-}
-
-qdf_export_symbol(ucfg_dfs_get_legacy_precac_enable);
-
 QDF_STATUS ucfg_dfs_get_agile_precac_enable(struct wlan_objmgr_pdev *pdev,
 					    bool *buff)
 {

+ 0 - 15
umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h

@@ -1855,18 +1855,6 @@ struct wlan_lmac_if_dfs_rx_ops {
 	QDF_STATUS (*dfs_is_precac_timer_running)(struct wlan_objmgr_pdev *pdev,
 						  bool *is_precac_timer_running
 						  );
-#ifdef CONFIG_CHAN_FREQ_API
-	QDF_STATUS
-	    (*dfs_find_vht80_chan_for_precac_for_freq)(struct wlan_objmgr_pdev
-						       *pdev,
-						       uint32_t chan_mode,
-						       uint16_t ch_freq_seg1,
-						       uint32_t *cfreq1,
-						       uint32_t *cfreq2,
-						       uint32_t *phy_mode,
-						       bool *dfs_set_cfreq2,
-						       bool *set_agile);
-#endif
 	QDF_STATUS (*dfs_agile_precac_start)(struct wlan_objmgr_pdev *pdev);
 	QDF_STATUS (*dfs_set_agile_precac_state)(struct wlan_objmgr_pdev *pdev,
 						 int agile_precac_state);
@@ -1881,9 +1869,6 @@ struct wlan_lmac_if_dfs_rx_ops {
 			int precac_timeout);
 	QDF_STATUS (*dfs_set_precac_enable)(struct wlan_objmgr_pdev *pdev,
 			uint32_t value);
-	QDF_STATUS
-	(*dfs_get_legacy_precac_enable)(struct wlan_objmgr_pdev *pdev,
-					bool *buff);
 	QDF_STATUS (*dfs_get_agile_precac_enable)(struct wlan_objmgr_pdev *pdev,
 						  bool *buff);
 #ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT

+ 0 - 4
umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c

@@ -512,8 +512,6 @@ static void register_dfs_rx_ops_for_freq(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
 {
 	if (!rx_ops)
 		return;
-	rx_ops->dfs_find_vht80_chan_for_precac_for_freq =
-		tgt_dfs_find_vht80_precac_chan_freq;
 	rx_ops->dfs_set_current_channel_for_freq =
 		tgt_dfs_set_current_channel_for_freq;
 }
@@ -665,8 +663,6 @@ wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
 	dfs_rx_ops->dfs_override_precac_timeout =
 		ucfg_dfs_override_precac_timeout;
 	dfs_rx_ops->dfs_set_precac_enable = ucfg_dfs_set_precac_enable;
-	dfs_rx_ops->dfs_get_legacy_precac_enable =
-		ucfg_dfs_get_legacy_precac_enable;
 	dfs_rx_ops->dfs_get_agile_precac_enable =
 		ucfg_dfs_get_agile_precac_enable;
 	dfs_rx_ops->dfs_get_override_precac_timeout =

+ 1 - 14
umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c

@@ -347,7 +347,7 @@ static QDF_STATUS vdev_mgr_start_param_update(
 {
 	struct wlan_channel *des_chan;
 	uint32_t dfs_reg;
-	bool set_agile = false, dfs_set_cfreq2 = false, is_stadfs_en = false;
+	bool is_stadfs_en = false;
 	struct wlan_objmgr_vdev *vdev;
 	struct wlan_objmgr_pdev *pdev;
 	enum QDF_OPMODE op_mode;
@@ -458,19 +458,6 @@ static QDF_STATUS vdev_mgr_start_param_update(
 	}
 	wlan_vdev_mlme_get_ssid(vdev, param->ssid.ssid, &param->ssid.length);
 
-	if (des_chan->ch_phymode == WLAN_PHYMODE_11AC_VHT80 ||
-	    des_chan->ch_phymode == WLAN_PHYMODE_11AXA_HE80) {
-		tgt_dfs_find_vht80_precac_chan_freq(pdev,
-						    des_chan->ch_phymode,
-						    des_chan->ch_freq_seg1,
-						    &param->channel.cfreq1,
-						    &param->channel.cfreq2,
-						    &param->channel.phy_mode,
-						    &dfs_set_cfreq2,
-						    &set_agile);
-		param->channel.dfs_set_cfreq2 = dfs_set_cfreq2;
-		param->channel.set_agile = set_agile;
-	}
 	wlan_objmgr_pdev_release_ref(pdev, WLAN_MLME_SB_ID);
 	return QDF_STATUS_SUCCESS;
 }