Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: cfg80211: remove ieee80211_s1g_channel_width

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>

authored by

Lachlan Hodges and committed by
Johannes Berg
cbcd507f 31e7681d

-37
-10
include/net/cfg80211.h
··· 6819 6819 } 6820 6820 6821 6821 /** 6822 - * ieee80211_s1g_channel_width - get allowed channel width from @chan 6823 - * 6824 - * Only allowed for band NL80211_BAND_S1GHZ 6825 - * @chan: channel 6826 - * Return: The allowed channel width for this center_freq 6827 - */ 6828 - enum nl80211_chan_width 6829 - ieee80211_s1g_channel_width(const struct ieee80211_channel *chan); 6830 - 6831 - /** 6832 6822 * ieee80211_channel_to_freq_khz - convert channel number to frequency 6833 6823 * @chan: channel number 6834 6824 * @band: band, necessary due to channel number overlap
-27
net/wireless/util.c
··· 106 106 } 107 107 EXPORT_SYMBOL(ieee80211_channel_to_freq_khz); 108 108 109 - enum nl80211_chan_width 110 - ieee80211_s1g_channel_width(const struct ieee80211_channel *chan) 111 - { 112 - if (WARN_ON(!chan || chan->band != NL80211_BAND_S1GHZ)) 113 - return NL80211_CHAN_WIDTH_20_NOHT; 114 - 115 - /*S1G defines a single allowed channel width per channel. 116 - * Extract that width here. 117 - */ 118 - if (chan->flags & IEEE80211_CHAN_1MHZ) 119 - return NL80211_CHAN_WIDTH_1; 120 - else if (chan->flags & IEEE80211_CHAN_2MHZ) 121 - return NL80211_CHAN_WIDTH_2; 122 - else if (chan->flags & IEEE80211_CHAN_4MHZ) 123 - return NL80211_CHAN_WIDTH_4; 124 - else if (chan->flags & IEEE80211_CHAN_8MHZ) 125 - return NL80211_CHAN_WIDTH_8; 126 - else if (chan->flags & IEEE80211_CHAN_16MHZ) 127 - return NL80211_CHAN_WIDTH_16; 128 - 129 - pr_err("unknown channel width for channel at %dKHz?\n", 130 - ieee80211_channel_to_khz(chan)); 131 - 132 - return NL80211_CHAN_WIDTH_1; 133 - } 134 - EXPORT_SYMBOL(ieee80211_s1g_channel_width); 135 - 136 109 int ieee80211_freq_khz_to_channel(u32 freq) 137 110 { 138 111 /* TODO: just handle MHz for now */