diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2026-04-28 12:25:30 +0300 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2026-05-05 15:49:02 +0300 |
| commit | f6ced3745ad1a0e5691b9323651e39e05371fe2f (patch) | |
| tree | 085d288f14d164e05453772d2211f125424ecade | |
| parent | c5254002ca4bd9f80c35fc521c6f577bb044844e (diff) | |
| download | linux-f6ced3745ad1a0e5691b9323651e39e05371fe2f.tar.xz | |
wifi: mac80211: move ieee80211_chandef_usable() up
For UHR DBE this is going to be needed in the AP channel
determination function, move it there.
Link: https://patch.msgid.link/20260428112708.266c56537f81.I0d7266f2961e5bca4bd9f9503c4b1953d92255b1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| -rw-r--r-- | net/mac80211/mlme.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index d2f16f49931d..f8ed8a8ce0b1 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -149,6 +149,21 @@ static int ecw2cw(int ecw) return (1 << ecw) - 1; } +static bool ieee80211_chandef_usable(struct ieee80211_sub_if_data *sdata, + const struct cfg80211_chan_def *chandef, + u32 prohibited_flags) +{ + if (!cfg80211_chandef_usable(sdata->local->hw.wiphy, + chandef, prohibited_flags)) + return false; + + if (chandef->punctured && + ieee80211_hw_check(&sdata->local->hw, DISALLOW_PUNCTURING)) + return false; + + return true; +} + struct ieee80211_determine_ap_chan_data { /* input data */ struct ieee80211_channel *channel; @@ -851,21 +866,6 @@ static void ieee80211_get_rates(struct ieee80211_supported_band *sband, } } -static bool ieee80211_chandef_usable(struct ieee80211_sub_if_data *sdata, - const struct cfg80211_chan_def *chandef, - u32 prohibited_flags) -{ - if (!cfg80211_chandef_usable(sdata->local->hw.wiphy, - chandef, prohibited_flags)) - return false; - - if (chandef->punctured && - ieee80211_hw_check(&sdata->local->hw, DISALLOW_PUNCTURING)) - return false; - - return true; -} - static int ieee80211_chandef_num_subchans(const struct cfg80211_chan_def *c) { if (c->width == NL80211_CHAN_WIDTH_80P80) |
