Explorar o código

mac80211: Update conf_is_ht() to work properly with 5/10MHz channels

The channels with 5/10MHz bandwidth are not HT. We have to
reflect this in conf_is_ht() function which returns whether the
particular channel is HT or not.

Signed-off-by: Rostislav Lisovy <rostislav.lisovy@fel.cvut.cz>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Rostislav Lisovy %!s(int64=11) %!d(string=hai) anos
pai
achega
041f607de1
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      include/net/mac80211.h

+ 3 - 1
include/net/mac80211.h

@@ -4585,7 +4585,9 @@ conf_is_ht40(struct ieee80211_conf *conf)
 static inline bool
 static inline bool
 conf_is_ht(struct ieee80211_conf *conf)
 conf_is_ht(struct ieee80211_conf *conf)
 {
 {
-	return conf->chandef.width != NL80211_CHAN_WIDTH_20_NOHT;
+	return (conf->chandef.width != NL80211_CHAN_WIDTH_5) &&
+		(conf->chandef.width != NL80211_CHAN_WIDTH_10) &&
+		(conf->chandef.width != NL80211_CHAN_WIDTH_20_NOHT);
 }
 }
 
 
 static inline enum nl80211_iftype
 static inline enum nl80211_iftype