cfg80211: allow HT20 channels on devices incabable of HT40
RFC 1/1 cfg80211: allow HT20 channels on devices incabable of HT40
I was just trying to set up a rt2800 AP but hostapd was unable to set the channel when configuring 11n.
rt2800 doesn't support HT40 yet, that's why it doesn't set IEEE80211_HT_CAP_SUP_WIDTH_20_40 and cfg80211 refuses to set the channel when the device doesn't support IEEE80211_HT_CAP_SUP_WIDTH_20_40 even if a HT20 only channel should be set.
Did I miss anything or should it be allowed to set a HT20 channel on a HT capable device that doesn't allow HT40?
Signed-off-by Helmut Schaa <[email protected]>
--- net/wireless/chan.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
net/wireless/chan.c +3 -2
@@ -35,8 +35,9 @@ rdev_freq_to_chan(struct cfg80211_registered_device *rdev,if (!ht_cap->ht_supported)return NULL ; -if (!(ht_cap->cap &IEEE80211_HT_CAP_SUP_WIDTH_20_40 ) || - ht_cap->cap &IEEE80211_HT_CAP_40MHZ_INTOLERANT ) +if (channel_type !=NL80211_CHAN_HT20 && + (!(ht_cap->cap &IEEE80211_HT_CAP_SUP_WIDTH_20_40 ) || + ht_cap->cap &IEEE80211_HT_CAP_40MHZ_INTOLERANT ))return NULL ; }
Signature · 1 line
1.6.4.2