X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fhostap.git;a=blobdiff_plain;f=src%2Fap%2Fhw_features.c;h=0d856d5725e8dbcbc3dc1d4b86f82120f827c16b;hp=ba10752ebd7e0f2ed718987fcde0eb2720e797a4;hb=c4bab72d9675df0b4346ce50576730fc4accdc76;hpb=e0d9f5fc15562d6ed816ba683eabbe14fcf477e6 diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c index ba10752eb..0d856d572 100644 --- a/src/ap/hw_features.c +++ b/src/ap/hw_features.c @@ -879,10 +879,11 @@ static int hostapd_is_usable_chans(struct hostapd_iface *iface) if (!iface->conf->secondary_channel) return 1; + if (hostapd_is_usable_chan(iface, iface->freq + + iface->conf->secondary_channel * 20, 0)) + return 1; if (!iface->conf->ht40_plus_minus_allowed) - return hostapd_is_usable_chan( - iface, - iface->freq + iface->conf->secondary_channel * 20, 0); + return 0; /* Both HT40+ and HT40- are set, pick a valid secondary channel */ secondary_freq = iface->freq + 20;