* [PATCH 0/2] wifi: iwlegacy: Deadcoded functions
@ 2024-12-26 1:13 linux
2024-12-26 1:13 ` [PATCH 1/2] wifi: iwlegacy: Remove unused il3945_calc_db_from_ratio linux
2024-12-26 1:13 ` [PATCH 2/2] wifi: iwlegacy: Remove unused il_get_single_channel_number linux
0 siblings, 2 replies; 6+ messages in thread
From: linux @ 2024-12-26 1:13 UTC (permalink / raw)
To: stf_xl, kvalo, linux-wireless; +Cc: linux-kernel, Dr. David Alan Gilbert
From: "Dr. David Alan Gilbert" <linux@treblig.org>
Hi,
A couple of functions in iwlegacy that have been unused
since 2010ish.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Dr. David Alan Gilbert (2):
wifi: iwlegacy: Remove unused il3945_calc_db_from_ratio
wifi: iwlegacy: Remove unused il_get_single_channel_number
.../net/wireless/intel/iwlegacy/3945-mac.c | 38 -------------------
drivers/net/wireless/intel/iwlegacy/3945.h | 1 -
drivers/net/wireless/intel/iwlegacy/common.c | 31 ---------------
drivers/net/wireless/intel/iwlegacy/common.h | 1 -
4 files changed, 71 deletions(-)
--
2.47.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] wifi: iwlegacy: Remove unused il3945_calc_db_from_ratio
2024-12-26 1:13 [PATCH 0/2] wifi: iwlegacy: Deadcoded functions linux
@ 2024-12-26 1:13 ` linux
2025-01-03 8:59 ` Stanislaw Gruszka
2025-01-10 13:12 ` [1/2] wifi: iwlegacy: Remove unused il3945_calc_db_from_ratio() Kalle Valo
2024-12-26 1:13 ` [PATCH 2/2] wifi: iwlegacy: Remove unused il_get_single_channel_number linux
1 sibling, 2 replies; 6+ messages in thread
From: linux @ 2024-12-26 1:13 UTC (permalink / raw)
To: stf_xl, kvalo, linux-wireless; +Cc: linux-kernel, Dr. David Alan Gilbert
From: "Dr. David Alan Gilbert" <linux@treblig.org>
The last use of il3945_calc_db_from_ratio() was removed in 2010 by
commit ed1b6e99b5e6 ("iwlwifi: remove noise reporting")
when it was still called iwl3945_calc_db_from_ratio().
Remove it.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
.../net/wireless/intel/iwlegacy/3945-mac.c | 38 -------------------
drivers/net/wireless/intel/iwlegacy/3945.h | 1 -
2 files changed, 39 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
index 74fc76c00ebc..4013443698a2 100644
--- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
@@ -1127,44 +1127,6 @@ il3945_rx_queue_free(struct il_priv *il, struct il_rx_queue *rxq)
rxq->rb_stts = NULL;
}
-/* Convert linear signal-to-noise ratio into dB */
-static u8 ratio2dB[100] = {
-/* 0 1 2 3 4 5 6 7 8 9 */
- 0, 0, 6, 10, 12, 14, 16, 17, 18, 19, /* 00 - 09 */
- 20, 21, 22, 22, 23, 23, 24, 25, 26, 26, /* 10 - 19 */
- 26, 26, 26, 27, 27, 28, 28, 28, 29, 29, /* 20 - 29 */
- 29, 30, 30, 30, 31, 31, 31, 31, 32, 32, /* 30 - 39 */
- 32, 32, 32, 33, 33, 33, 33, 33, 34, 34, /* 40 - 49 */
- 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, /* 50 - 59 */
- 36, 36, 36, 36, 36, 36, 36, 37, 37, 37, /* 60 - 69 */
- 37, 37, 37, 37, 37, 38, 38, 38, 38, 38, /* 70 - 79 */
- 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, /* 80 - 89 */
- 39, 39, 39, 39, 39, 40, 40, 40, 40, 40 /* 90 - 99 */
-};
-
-/* Calculates a relative dB value from a ratio of linear
- * (i.e. not dB) signal levels.
- * Conversion assumes that levels are voltages (20*log), not powers (10*log). */
-int
-il3945_calc_db_from_ratio(int sig_ratio)
-{
- /* 1000:1 or higher just report as 60 dB */
- if (sig_ratio >= 1000)
- return 60;
-
- /* 100:1 or higher, divide by 10 and use table,
- * add 20 dB to make up for divide by 10 */
- if (sig_ratio >= 100)
- return 20 + (int)ratio2dB[sig_ratio / 10];
-
- /* We shouldn't see this */
- if (sig_ratio < 1)
- return 0;
-
- /* Use table for ratios 1:1 - 99:1 */
- return (int)ratio2dB[sig_ratio];
-}
-
/*
* il3945_rx_handle - Main entry function for receiving responses from uCode
*
diff --git a/drivers/net/wireless/intel/iwlegacy/3945.h b/drivers/net/wireless/intel/iwlegacy/3945.h
index ffbe11902628..fb1e33c89d0e 100644
--- a/drivers/net/wireless/intel/iwlegacy/3945.h
+++ b/drivers/net/wireless/intel/iwlegacy/3945.h
@@ -173,7 +173,6 @@ struct il3945_ibss_seq {
* for use by iwl-*.c
*
*****************************************************************************/
-int il3945_calc_db_from_ratio(int sig_ratio);
void il3945_rx_replenish(void *data);
void il3945_rx_queue_reset(struct il_priv *il, struct il_rx_queue *rxq);
unsigned int il3945_fill_beacon_frame(struct il_priv *il,
--
2.47.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] wifi: iwlegacy: Remove unused il_get_single_channel_number
2024-12-26 1:13 [PATCH 0/2] wifi: iwlegacy: Deadcoded functions linux
2024-12-26 1:13 ` [PATCH 1/2] wifi: iwlegacy: Remove unused il3945_calc_db_from_ratio linux
@ 2024-12-26 1:13 ` linux
2025-01-03 8:59 ` Stanislaw Gruszka
1 sibling, 1 reply; 6+ messages in thread
From: linux @ 2024-12-26 1:13 UTC (permalink / raw)
To: stf_xl, kvalo, linux-wireless; +Cc: linux-kernel, Dr. David Alan Gilbert
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(-)
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] wifi: iwlegacy: Remove unused il3945_calc_db_from_ratio
2024-12-26 1:13 ` [PATCH 1/2] wifi: iwlegacy: Remove unused il3945_calc_db_from_ratio linux
@ 2025-01-03 8:59 ` Stanislaw Gruszka
2025-01-10 13:12 ` [1/2] wifi: iwlegacy: Remove unused il3945_calc_db_from_ratio() Kalle Valo
1 sibling, 0 replies; 6+ messages in thread
From: Stanislaw Gruszka @ 2025-01-03 8:59 UTC (permalink / raw)
To: linux; +Cc: kvalo, linux-wireless, linux-kernel
On Thu, Dec 26, 2024 at 01:13:54AM +0000, linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>
> The last use of il3945_calc_db_from_ratio() was removed in 2010 by
> commit ed1b6e99b5e6 ("iwlwifi: remove noise reporting")
> when it was still called iwl3945_calc_db_from_ratio().
>
> Remove it.
>
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
> ---
> .../net/wireless/intel/iwlegacy/3945-mac.c | 38 -------------------
> drivers/net/wireless/intel/iwlegacy/3945.h | 1 -
> 2 files changed, 39 deletions(-)
>
> diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
> index 74fc76c00ebc..4013443698a2 100644
> --- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c
> +++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
> @@ -1127,44 +1127,6 @@ il3945_rx_queue_free(struct il_priv *il, struct il_rx_queue *rxq)
> rxq->rb_stts = NULL;
> }
>
> -/* Convert linear signal-to-noise ratio into dB */
> -static u8 ratio2dB[100] = {
> -/* 0 1 2 3 4 5 6 7 8 9 */
> - 0, 0, 6, 10, 12, 14, 16, 17, 18, 19, /* 00 - 09 */
> - 20, 21, 22, 22, 23, 23, 24, 25, 26, 26, /* 10 - 19 */
> - 26, 26, 26, 27, 27, 28, 28, 28, 29, 29, /* 20 - 29 */
> - 29, 30, 30, 30, 31, 31, 31, 31, 32, 32, /* 30 - 39 */
> - 32, 32, 32, 33, 33, 33, 33, 33, 34, 34, /* 40 - 49 */
> - 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, /* 50 - 59 */
> - 36, 36, 36, 36, 36, 36, 36, 37, 37, 37, /* 60 - 69 */
> - 37, 37, 37, 37, 37, 38, 38, 38, 38, 38, /* 70 - 79 */
> - 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, /* 80 - 89 */
> - 39, 39, 39, 39, 39, 40, 40, 40, 40, 40 /* 90 - 99 */
> -};
> -
> -/* Calculates a relative dB value from a ratio of linear
> - * (i.e. not dB) signal levels.
> - * Conversion assumes that levels are voltages (20*log), not powers (10*log). */
> -int
> -il3945_calc_db_from_ratio(int sig_ratio)
> -{
> - /* 1000:1 or higher just report as 60 dB */
> - if (sig_ratio >= 1000)
> - return 60;
> -
> - /* 100:1 or higher, divide by 10 and use table,
> - * add 20 dB to make up for divide by 10 */
> - if (sig_ratio >= 100)
> - return 20 + (int)ratio2dB[sig_ratio / 10];
> -
> - /* We shouldn't see this */
> - if (sig_ratio < 1)
> - return 0;
> -
> - /* Use table for ratios 1:1 - 99:1 */
> - return (int)ratio2dB[sig_ratio];
> -}
> -
> /*
> * il3945_rx_handle - Main entry function for receiving responses from uCode
> *
> diff --git a/drivers/net/wireless/intel/iwlegacy/3945.h b/drivers/net/wireless/intel/iwlegacy/3945.h
> index ffbe11902628..fb1e33c89d0e 100644
> --- a/drivers/net/wireless/intel/iwlegacy/3945.h
> +++ b/drivers/net/wireless/intel/iwlegacy/3945.h
> @@ -173,7 +173,6 @@ struct il3945_ibss_seq {
> * for use by iwl-*.c
> *
> *****************************************************************************/
> -int il3945_calc_db_from_ratio(int sig_ratio);
> void il3945_rx_replenish(void *data);
> void il3945_rx_queue_reset(struct il_priv *il, struct il_rx_queue *rxq);
> unsigned int il3945_fill_beacon_frame(struct il_priv *il,
> --
> 2.47.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] wifi: iwlegacy: Remove unused il_get_single_channel_number
2024-12-26 1:13 ` [PATCH 2/2] wifi: iwlegacy: Remove unused il_get_single_channel_number linux
@ 2025-01-03 8:59 ` Stanislaw Gruszka
0 siblings, 0 replies; 6+ messages in thread
From: Stanislaw Gruszka @ 2025-01-03 8:59 UTC (permalink / raw)
To: linux; +Cc: kvalo, linux-wireless, linux-kernel
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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [1/2] wifi: iwlegacy: Remove unused il3945_calc_db_from_ratio()
2024-12-26 1:13 ` [PATCH 1/2] wifi: iwlegacy: Remove unused il3945_calc_db_from_ratio linux
2025-01-03 8:59 ` Stanislaw Gruszka
@ 2025-01-10 13:12 ` Kalle Valo
1 sibling, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2025-01-10 13:12 UTC (permalink / raw)
To: linux; +Cc: stf_xl, linux-wireless, linux-kernel, Dr. David Alan Gilbert
linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>
> The last use of il3945_calc_db_from_ratio() was removed in 2010 by
> commit ed1b6e99b5e6 ("iwlwifi: remove noise reporting")
> when it was still called iwl3945_calc_db_from_ratio().
>
> Remove it.
>
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
2 patches applied to wireless-next.git, thanks.
413859e909a4 wifi: iwlegacy: Remove unused il3945_calc_db_from_ratio()
83ed80dd25f6 wifi: iwlegacy: Remove unused il_get_single_channel_number()
--
https://patchwork.kernel.org/project/linux-wireless/patch/20241226011355.135417-2-linux@treblig.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-01-10 13:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-26 1:13 [PATCH 0/2] wifi: iwlegacy: Deadcoded functions linux
2024-12-26 1:13 ` [PATCH 1/2] wifi: iwlegacy: Remove unused il3945_calc_db_from_ratio linux
2025-01-03 8:59 ` Stanislaw Gruszka
2025-01-10 13:12 ` [1/2] wifi: iwlegacy: Remove unused il3945_calc_db_from_ratio() Kalle Valo
2024-12-26 1:13 ` [PATCH 2/2] wifi: iwlegacy: Remove unused il_get_single_channel_number linux
2025-01-03 8:59 ` Stanislaw Gruszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).