]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Make sure ieee80211n_allowed_ht40_channel_pair() gets called
authorJouni Malinen <jouni.malinen@atheros.com>
Tue, 1 Feb 2011 14:09:26 +0000 (16:09 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 1 Feb 2011 14:09:26 +0000 (16:09 +0200)
We need to call this function after having completed the neighboring
channel scan to figure out whether HT40 can be used and if so, which
channel is the secondary channel.

src/ap/hw_features.c

index 0895162babfdbfd544ec547a3150cd2a7e2b8527..9b4c2a9e61b47db2f4db76394e823fe964aaa695 100644 (file)
@@ -424,6 +424,7 @@ static void ieee80211n_check_scan(struct hostapd_iface *iface)
 {
        struct wpa_scan_results *scan_res;
        int oper40;
+       int res;
 
        /* Check list of neighboring BSSes (from scan) to see whether 40 MHz is
         * allowed per IEEE 802.11n/D7.0, 11.14.3.2 */
@@ -452,7 +453,8 @@ static void ieee80211n_check_scan(struct hostapd_iface *iface)
                iface->conf->ht_capab &= ~HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET;
        }
 
-       hostapd_setup_interface_complete(iface, 0);
+       res = ieee80211n_allowed_ht40_channel_pair(iface);
+       hostapd_setup_interface_complete(iface, !res);
 }