Search Linux Wireless

[PATCH] wifi: mac80211: fix error handling when channel_switch on S1G band

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When channel_switch is performed to a channel with a freq_offset,
such as 909.5 MHz, channel_switch fails with the "-EOPNOTSUPP" error.
Since freq_offset is used in the S1G band, it should not be treated
as an error only with the freq_offset condition.

Fixes: b6011960f392 ("mac80211: handle channel frequency offset")
Signed-off-by: JUN-KYU SHIN <jk.shin@xxxxxxxxxxxx>
---
 net/mac80211/cfg.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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;
 	}
-- 
2.25.1




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux