diff mbox series

[2/2] wifi: iwlegacy: Remove unused il_get_single_channel_number

Message ID 20241226011355.135417-3-linux@treblig.org
State New
Headers show
Series wifi: iwlegacy: Deadcoded functions | expand

Commit Message

Dr. David Alan Gilbert Dec. 26, 2024, 1:13 a.m. UTC
From: "Dr. David Alan Gilbert" <linux@treblig.org>

THe last use of il_get_single_channel_number() was removed in 2011 by
commit dd6d2a8aef69 ("iwlegacy: remove reset rf infrastructure")
when it was still called iwl_legacy_get_single_channel_number.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 drivers/net/wireless/intel/iwlegacy/common.c | 31 --------------------
 drivers/net/wireless/intel/iwlegacy/common.h |  1 -
 2 files changed, 32 deletions(-)

Comments

Stanislaw Gruszka Jan. 3, 2025, 8:59 a.m. UTC | #1
On Thu, Dec 26, 2024 at 01:13:55AM +0000, linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
> 
> THe last use of il_get_single_channel_number() was removed in 2011 by
> commit dd6d2a8aef69 ("iwlegacy: remove reset rf infrastructure")
> when it was still called iwl_legacy_get_single_channel_number.
> 
> Remove it.
> 
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>

> ---
>  drivers/net/wireless/intel/iwlegacy/common.c | 31 --------------------
>  drivers/net/wireless/intel/iwlegacy/common.h |  1 -
>  2 files changed, 32 deletions(-)
> 
> diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
> index 958dd4f9bc69..af4f42534ea0 100644
> --- a/drivers/net/wireless/intel/iwlegacy/common.c
> +++ b/drivers/net/wireless/intel/iwlegacy/common.c
> @@ -3915,37 +3915,6 @@ il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf)
>  }
>  EXPORT_SYMBOL(il_set_rxon_ht);
>  
> -/* Return valid, unused, channel for a passive scan to reset the RF */
> -u8
> -il_get_single_channel_number(struct il_priv *il, enum nl80211_band band)
> -{
> -	const struct il_channel_info *ch_info;
> -	int i;
> -	u8 channel = 0;
> -	u8 min, max;
> -
> -	if (band == NL80211_BAND_5GHZ) {
> -		min = 14;
> -		max = il->channel_count;
> -	} else {
> -		min = 0;
> -		max = 14;
> -	}
> -
> -	for (i = min; i < max; i++) {
> -		channel = il->channel_info[i].channel;
> -		if (channel == le16_to_cpu(il->staging.channel))
> -			continue;
> -
> -		ch_info = il_get_channel_info(il, band, channel);
> -		if (il_is_channel_valid(ch_info))
> -			break;
> -	}
> -
> -	return channel;
> -}
> -EXPORT_SYMBOL(il_get_single_channel_number);
> -
>  /*
>   * il_set_rxon_channel - Set the band and channel values in staging RXON
>   * @ch: requested channel as a pointer to struct ieee80211_channel
> diff --git a/drivers/net/wireless/intel/iwlegacy/common.h b/drivers/net/wireless/intel/iwlegacy/common.h
> index 725c2a88ddb7..92285412ab10 100644
> --- a/drivers/net/wireless/intel/iwlegacy/common.h
> +++ b/drivers/net/wireless/intel/iwlegacy/common.h
> @@ -1705,7 +1705,6 @@ int il_full_rxon_required(struct il_priv *il);
>  int il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch);
>  void il_set_flags_for_band(struct il_priv *il, enum nl80211_band band,
>  			   struct ieee80211_vif *vif);
> -u8 il_get_single_channel_number(struct il_priv *il, enum nl80211_band band);
>  void il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf);
>  bool il_is_ht40_tx_allowed(struct il_priv *il,
>  			   struct ieee80211_sta_ht_cap *ht_cap);
> -- 
> 2.47.1
>
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
index 958dd4f9bc69..af4f42534ea0 100644
--- a/drivers/net/wireless/intel/iwlegacy/common.c
+++ b/drivers/net/wireless/intel/iwlegacy/common.c
@@ -3915,37 +3915,6 @@  il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf)
 }
 EXPORT_SYMBOL(il_set_rxon_ht);
 
-/* Return valid, unused, channel for a passive scan to reset the RF */
-u8
-il_get_single_channel_number(struct il_priv *il, enum nl80211_band band)
-{
-	const struct il_channel_info *ch_info;
-	int i;
-	u8 channel = 0;
-	u8 min, max;
-
-	if (band == NL80211_BAND_5GHZ) {
-		min = 14;
-		max = il->channel_count;
-	} else {
-		min = 0;
-		max = 14;
-	}
-
-	for (i = min; i < max; i++) {
-		channel = il->channel_info[i].channel;
-		if (channel == le16_to_cpu(il->staging.channel))
-			continue;
-
-		ch_info = il_get_channel_info(il, band, channel);
-		if (il_is_channel_valid(ch_info))
-			break;
-	}
-
-	return channel;
-}
-EXPORT_SYMBOL(il_get_single_channel_number);
-
 /*
  * il_set_rxon_channel - Set the band and channel values in staging RXON
  * @ch: requested channel as a pointer to struct ieee80211_channel
diff --git a/drivers/net/wireless/intel/iwlegacy/common.h b/drivers/net/wireless/intel/iwlegacy/common.h
index 725c2a88ddb7..92285412ab10 100644
--- a/drivers/net/wireless/intel/iwlegacy/common.h
+++ b/drivers/net/wireless/intel/iwlegacy/common.h
@@ -1705,7 +1705,6 @@  int il_full_rxon_required(struct il_priv *il);
 int il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch);
 void il_set_flags_for_band(struct il_priv *il, enum nl80211_band band,
 			   struct ieee80211_vif *vif);
-u8 il_get_single_channel_number(struct il_priv *il, enum nl80211_band band);
 void il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf);
 bool il_is_ht40_tx_allowed(struct il_priv *il,
 			   struct ieee80211_sta_ht_cap *ht_cap);