Message ID | 20230626075818.1000-1-jk.shin@newratek.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Johannes Berg |
Headers | show |
Series | wifi: mac80211: fix error handling when channel_switch on S1G band | expand |
On Mon, 26 Jun 2023 16:58:18 +0900 JUN-KYU SHIN wrote: > On the S1G band, even if freq_offset exists in the > __ieee80211_channel_switch function, it is not treated as an error. Sounds like e bug fix to me. Could you describe the user visible impact in simpler terms, and add a Fixes tag?
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index f2d08dbccfb7..f251945cf6fd 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3909,8 +3909,9 @@ __ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, goto out; } - if (params->chandef.chan->freq_offset) { - /* this may work, but is untested */ + if (params->chandef.chan->freq_offset && + params->chandef.chan->band != NL80211_BAND_S1GHZ) { + /* Currently, offset is supported only on the S1G band. */ err = -EOPNOTSUPP; goto out; }
On the S1G band, even if freq_offset exists in the __ieee80211_channel_switch function, it is not treated as an error. Signed-off-by: JUN-KYU SHIN <jk.shin@newratek.com> --- net/mac80211/cfg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)