cfg80211: don't refuse HT20 channels on devices that don't support HT40
authorHelmut Schaa <helmut.schaa@googlemail.com>
Mon, 17 May 2010 15:30:59 +0000 (17:30 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 2 Jun 2010 20:13:17 +0000 (16:13 -0400)
Don't refuse HT20 channels on devices that don't support HT40.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/chan.c

index b01a6f6..d0c92dd 100644 (file)
@@ -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;
        }