]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Fix HT40 determination for ACS offload
authorJouni Malinen <j@w1.fi>
Thu, 4 Dec 2014 23:08:40 +0000 (01:08 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 4 Dec 2014 23:08:40 +0000 (01:08 +0200)
Commit 16689c7cfc99c66aecbf16eb2f4a8bc941cb5d0f ('hostapd: Allow ACS to
be offloaded to the driver') used incorrect operator to determine
whether HT40 was configured. Fix that to mask the ht_capab bit
correctly. (CID 77286)

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/ap_drv_ops.c

index 9ebcf8f2e4444a0e8b180406cad17daede7c3409..7486fdaa04b5db6dff40d387f8ee2ea6065d594b 100644 (file)
@@ -804,7 +804,7 @@ int hostapd_drv_do_acs(struct hostapd_data *hapd)
        os_memset(&params, 0, sizeof(params));
        params.hw_mode = hapd->iface->conf->hw_mode;
        params.ht_enabled = !!(hapd->iface->conf->ieee80211n);
-       params.ht40_enabled = !!(hapd->iface->conf->ht_capab |
+       params.ht40_enabled = !!(hapd->iface->conf->ht_capab &
                                 HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET);
        return hapd->driver->do_acs(hapd->drv_priv, &params);
 }