Pārlūkot izejas kodu

qcacmn: Don't use dfs_find_target_channel_in_channel_matrix()

As part of regulatory cleanup, remove
dfs_find_target_channel_in_channel_matrix()

Use dfs_find_target_channel_in_channel_matrix_for_freq() instead
of dfs_find_target_channel_in_channel_matrix()

Change-Id: I8750b95d5cf4a4fa3d738c2209edf1328794d486
CRs-Fixed: 2959916
Jyoti Kumari 4 gadi atpakaļ
vecāks
revīzija
aab3676557

+ 0 - 20
umac/dfs/core/src/dfs_random_chan_sel.h

@@ -176,26 +176,6 @@ struct dfs_matrix_tx_leak_info {
 };
 #endif
 
-/**
- * dfs_mark_leaking_ch() - to mark channel leaking in to nol
- * @dfs: dfs handler.
- * @ch_width: channel width
- * @temp_ch_lst_sz: the target channel list
- * @temp_ch_lst: the target channel list
- *
- * This function removes the channels from temp channel list that
- * (if selected as target channel) will cause leakage in one of
- * the NOL channels
- *
- * Return: QDF_STATUS
- */
-#ifdef CONFIG_CHAN_NUM_API
-QDF_STATUS dfs_mark_leaking_ch(struct wlan_dfs *dfs,
-		enum phy_ch_width ch_width,
-		uint8_t temp_ch_lst_sz,
-		uint8_t *temp_ch_lst);
-#endif
-
 /**
  * dfs_mark_leaking_chan_for_freq() - to mark channel leaking in to nol
  * @dfs: dfs handler.

+ 0 - 141
umac/dfs/core/src/misc/dfs_random_chan_sel.c

@@ -715,67 +715,6 @@ struct dfs_matrix_tx_leak_info ht20_chan[] = {
 	  } },
 };
 
-/*
- * dfs_find_target_channel_in_channel_matrix() - finds the leakage matrix
- * @ch_width: target channel width
- * @NOL_channel: the NOL channel whose leakage matrix is required
- * @pTarget_chnl_mtrx: pointer to target channel matrix returned.
- *
- * This function gives the leakage matrix for given NOL channel and ch_width
- *
- * Return: TRUE or FALSE
- */
-#ifdef CONFIG_CHAN_NUM_API
-static bool
-dfs_find_target_channel_in_channel_matrix(enum phy_ch_width ch_width,
-				uint8_t NOL_channel,
-				struct dfs_tx_leak_info **pTarget_chnl_mtrx)
-{
-	struct dfs_tx_leak_info *target_chan_matrix = NULL;
-	struct dfs_matrix_tx_leak_info *pchan_matrix = NULL;
-	uint32_t nchan_matrix;
-	int i = 0;
-
-	switch (ch_width) {
-	case CH_WIDTH_20MHZ:
-		/* HT20 */
-		pchan_matrix = ht20_chan;
-		nchan_matrix = QDF_ARRAY_SIZE(ht20_chan);
-		break;
-	case CH_WIDTH_40MHZ:
-		/* HT40 */
-		pchan_matrix = ht40_chan;
-		nchan_matrix = QDF_ARRAY_SIZE(ht40_chan);
-		break;
-	case CH_WIDTH_80MHZ:
-		/* HT80 */
-		pchan_matrix = ht80_chan;
-		nchan_matrix = QDF_ARRAY_SIZE(ht80_chan);
-		break;
-	default:
-		/* handle exception and fall back to HT20 table */
-		pchan_matrix = ht20_chan;
-		nchan_matrix = QDF_ARRAY_SIZE(ht20_chan);
-		break;
-	}
-
-	for (i = 0; i < nchan_matrix; i++) {
-		/* find the SAP channel to map the leakage matrix */
-		if (NOL_channel == pchan_matrix[i].channel) {
-			target_chan_matrix = pchan_matrix[i].chan_matrix;
-			break;
-		}
-	}
-
-	if (!target_chan_matrix) {
-		return false;
-	} else {
-		*pTarget_chnl_mtrx = target_chan_matrix;
-		return true;
-	}
-}
-#endif
-
 /*
  * dfs_find_target_channel_in_channel_matrix_for_freq() - finds the leakage
  * matrix.
@@ -839,76 +778,6 @@ dfs_find_target_channel_in_channel_matrix_for_freq(enum phy_ch_width chan_width,
 }
 #endif
 
-#ifdef CONFIG_CHAN_NUM_API
-QDF_STATUS
-dfs_mark_leaking_ch(struct wlan_dfs *dfs,
-		enum phy_ch_width ch_width,
-		uint8_t temp_ch_lst_sz,
-		uint8_t *temp_ch_lst)
-{
-	struct dfs_tx_leak_info *target_chan_matrix = NULL;
-	uint32_t         num_channel = (CHAN_ENUM_5720 - CHAN_ENUM_5180) + 1;
-	uint32_t         j = 0;
-	uint32_t         k = 0;
-	uint8_t          dfs_nol_channel;
-	struct dfs_nolelem *nol;
-
-	nol = dfs->dfs_nol;
-	while (nol) {
-		dfs_nol_channel = wlan_reg_freq_to_chan(dfs->dfs_pdev_obj,
-							nol->nol_freq);
-		if (false == dfs_find_target_channel_in_channel_matrix(
-					ch_width, dfs_nol_channel,
-					&target_chan_matrix)) {
-			/*
-			 * should never happen, we should always find a table
-			 * here, if we don't, need a fix here!
-			 */
-			dfs_err(dfs, WLAN_DEBUG_DFS_RANDOM_CHAN,
-				"Couldn't find target channel matrix!");
-			QDF_ASSERT(0);
-			return QDF_STATUS_E_FAILURE;
-		}
-		/*
-		 * following is based on assumption that both temp_ch_lst
-		 * and target channel matrix are in increasing order of
-		 * ch_id
-		 */
-		for (j = 0, k = 0; j < temp_ch_lst_sz && k < num_channel;) {
-			if (temp_ch_lst[j] == 0) {
-				j++;
-				continue;
-			}
-			if (target_chan_matrix[k].leak_chan != temp_ch_lst[j]) {
-				k++;
-				continue;
-			}
-			/*
-			 * check leakage from candidate channel
-			 * to NOL channel
-			 */
-			if (target_chan_matrix[k].leak_lvl <=
-				dfs->tx_leakage_threshold) {
-				/*
-				 * candidate channel will have
-				 * bad leakage in NOL channel,
-				 * remove from temp list
-				 */
-				dfs_debug(dfs, WLAN_DEBUG_DFS_RANDOM_CHAN,
-					"dfs: channel: %d will have bad leakage due to channel: %d\n",
-					dfs_nol_channel, temp_ch_lst[j]);
-				temp_ch_lst[j] = 0;
-			}
-			j++;
-			k++;
-		}
-		nol = nol->nol_next;
-	} /* end of loop that selects each NOL */
-
-	return QDF_STATUS_SUCCESS;
-}
-#endif
-
 #ifdef CONFIG_CHAN_FREQ_API
 
 #ifdef CONFIG_BAND_6GHZ
@@ -985,16 +854,6 @@ dfs_mark_leaking_chan_for_freq(struct wlan_dfs *dfs,
 }
 #endif
 #else
-#ifdef CONFIG_CHAN_NUM_API
-QDF_STATUS
-dfs_mark_leaking_ch(struct wlan_dfs *dfs,
-		enum phy_ch_width ch_width,
-		uint8_t temp_ch_lst_sz,
-		uint8_t *temp_ch_lst)
-{
-	return QDF_STATUS_SUCCESS;
-}
-#endif
 #ifdef CONFIG_CHAN_FREQ_API
 QDF_STATUS
 dfs_mark_leaking_chan_for_freq(struct wlan_dfs *dfs,

+ 0 - 29
umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h

@@ -599,25 +599,6 @@ QDF_STATUS utils_dfs_update_cur_chan_flags(struct wlan_objmgr_pdev *pdev,
 		uint16_t flagext);
 
 #ifdef QCA_MCL_DFS_SUPPORT
-/**
- * utils_dfs_mark_leaking_ch() - to mark channel leaking in to nol
- * @pdev: Pointer to pdev structure.
- * @ch_width: channel width
- * @temp_ch_lst_sz: the target channel list
- * @temp_ch_lst: the target channel list
- *
- * This function removes the channels from temp channel list that
- * (if selected as target channel) will cause leakage in one of
- * the NOL channels
- *
- * Return: QDF_STATUS
- */
-#ifdef CONFIG_CHAN_NUM_API
-QDF_STATUS utils_dfs_mark_leaking_ch(struct wlan_objmgr_pdev *pdev,
-	enum phy_ch_width ch_width,
-	uint8_t temp_ch_lst_sz,
-	uint8_t *temp_ch_lst);
-#endif
 /**
  * utils_dfs_mark_leaking_chan_for_freq() - to mark channel leaking in to nol
  * @pdev: Pointer to pdev structure.
@@ -650,16 +631,6 @@ QDF_STATUS utils_dfs_mark_leaking_chan_for_freq(struct wlan_objmgr_pdev *pdev,
  */
 bool utils_dfs_can_ignore_radar_event(struct wlan_objmgr_pdev *pdev);
 #else
-#ifdef CONFIG_CHAN_NUM_API
-static inline QDF_STATUS utils_dfs_mark_leaking_ch
-	(struct wlan_objmgr_pdev *pdev,
-	enum phy_ch_width ch_width,
-	uint8_t temp_ch_lst_sz,
-	uint8_t *temp_ch_lst)
-{
-	return QDF_STATUS_SUCCESS;
-}
-#endif
 #ifdef CONFIG_CHAN_FREQ_API
 static inline QDF_STATUS utils_dfs_mark_leaking_chan_for_freq
 	(struct wlan_objmgr_pdev *pdev,

+ 0 - 18
umac/dfs/dispatcher/src/wlan_dfs_utils_api.c

@@ -1148,24 +1148,6 @@ uint32_t utils_dfs_chan_to_freq(uint8_t chan)
 qdf_export_symbol(utils_dfs_chan_to_freq);
 
 #ifdef QCA_MCL_DFS_SUPPORT
-#ifdef CONFIG_CHAN_NUM_API
-QDF_STATUS utils_dfs_mark_leaking_ch(struct wlan_objmgr_pdev *pdev,
-	enum phy_ch_width ch_width,
-	uint8_t temp_ch_lst_sz,
-	uint8_t *temp_ch_lst)
-{
-	struct wlan_dfs *dfs = NULL;
-
-	dfs = wlan_pdev_get_dfs_obj(pdev);
-	if (!dfs) {
-		dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS,  "null dfs");
-		return  QDF_STATUS_E_FAILURE;
-	}
-
-	return dfs_mark_leaking_ch(dfs, ch_width, temp_ch_lst_sz, temp_ch_lst);
-}
-qdf_export_symbol(utils_dfs_mark_leaking_ch);
-#endif
 
 #ifdef CONFIG_CHAN_FREQ_API
 QDF_STATUS utils_dfs_mark_leaking_chan_for_freq(struct wlan_objmgr_pdev *pdev,