]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: cfg80211: remove ieee80211_s1g_channel_width
authorLachlan Hodges <lachlan.hodges@morsemicro.com>
Thu, 18 Sep 2025 05:19:13 +0000 (15:19 +1000)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 19 Sep 2025 09:56:07 +0000 (11:56 +0200)
With the introduction of proper S1G channel flags, this function is no
longer used. Remove it.

Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com>
Link: https://patch.msgid.link/20250918051913.500781-4-lachlan.hodges@morsemicro.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
net/wireless/util.c

index 2d612c760dd1064444bc2c3bf65372bca80863da..1c041ce7a03b4ad8bcceec5e2723440fe0ce559f 100644 (file)
@@ -6818,16 +6818,6 @@ ieee80211_channel_to_khz(const struct ieee80211_channel *chan)
        return MHZ_TO_KHZ(chan->center_freq) + chan->freq_offset;
 }
 
-/**
- * ieee80211_s1g_channel_width - get allowed channel width from @chan
- *
- * Only allowed for band NL80211_BAND_S1GHZ
- * @chan: channel
- * Return: The allowed channel width for this center_freq
- */
-enum nl80211_chan_width
-ieee80211_s1g_channel_width(const struct ieee80211_channel *chan);
-
 /**
  * ieee80211_channel_to_freq_khz - convert channel number to frequency
  * @chan: channel number
index d12d49134c88159f19c2226517d129f74f3ce764..f26440d18ad3b7969728e834a359b974a9213084 100644 (file)
@@ -106,33 +106,6 @@ u32 ieee80211_channel_to_freq_khz(int chan, enum nl80211_band band)
 }
 EXPORT_SYMBOL(ieee80211_channel_to_freq_khz);
 
-enum nl80211_chan_width
-ieee80211_s1g_channel_width(const struct ieee80211_channel *chan)
-{
-       if (WARN_ON(!chan || chan->band != NL80211_BAND_S1GHZ))
-               return NL80211_CHAN_WIDTH_20_NOHT;
-
-       /*S1G defines a single allowed channel width per channel.
-        * Extract that width here.
-        */
-       if (chan->flags & IEEE80211_CHAN_1MHZ)
-               return NL80211_CHAN_WIDTH_1;
-       else if (chan->flags & IEEE80211_CHAN_2MHZ)
-               return NL80211_CHAN_WIDTH_2;
-       else if (chan->flags & IEEE80211_CHAN_4MHZ)
-               return NL80211_CHAN_WIDTH_4;
-       else if (chan->flags & IEEE80211_CHAN_8MHZ)
-               return NL80211_CHAN_WIDTH_8;
-       else if (chan->flags & IEEE80211_CHAN_16MHZ)
-               return NL80211_CHAN_WIDTH_16;
-
-       pr_err("unknown channel width for channel at %dKHz?\n",
-              ieee80211_channel_to_khz(chan));
-
-       return NL80211_CHAN_WIDTH_1;
-}
-EXPORT_SYMBOL(ieee80211_s1g_channel_width);
-
 int ieee80211_freq_khz_to_channel(u32 freq)
 {
        /* TODO: just handle MHz for now */