]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Ensure ieee80211n_supported_ht_capab() gets called to check ht caps
authorNishant Sarmukadam <nishants@marvell.com>
Tue, 1 Feb 2011 14:04:59 +0000 (16:04 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 1 Feb 2011 14:04:59 +0000 (16:04 +0200)
ieee80211n_supported_ht_capab is called after ieee80211n_check_40mhz in
function hostapd_check_ht_capab. ieee80211n_check_40mhz can return 1 in
a valid scenario where the initialization is completed in a callback. In
this case ieee80211n_supported_ht_capab is skipped and hostapd does not
check the ht capabilities reported by the driver. Fix this issue making
sure ieee80211n_supported_ht_capab gets called.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
src/ap/hw_features.c

index 133ed748de1e6aa1de37bd8085585ad14f7c7283..0895162babfdbfd544ec547a3150cd2a7e2b8527 100644 (file)
@@ -585,13 +585,13 @@ int hostapd_check_ht_capab(struct hostapd_iface *iface)
 {
 #ifdef CONFIG_IEEE80211N
        int ret;
+       if (!ieee80211n_supported_ht_capab(iface))
+               return -1;
        ret = ieee80211n_check_40mhz(iface);
        if (ret)
                return ret;
        if (!ieee80211n_allowed_ht40_channel_pair(iface))
                return -1;
-       if (!ieee80211n_supported_ht_capab(iface))
-               return -1;
 #endif /* CONFIG_IEEE80211N */
 
        return 0;