From bbc758383fda43afbe9bba8e3dd69741179c748a Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Thu, 30 Jun 2016 15:57:27 +0200 Subject: [PATCH] hostapd: force 40MHz if set in configuration --- .../hostapd/hostapd/force-40mhz.patch | 26 +++++++++++++++++++ .../hostapd/hostapd_%.bbappend | 4 +++ 2 files changed, 30 insertions(+) create mode 100644 recipes-connectivity/hostapd/hostapd/force-40mhz.patch diff --git a/recipes-connectivity/hostapd/hostapd/force-40mhz.patch b/recipes-connectivity/hostapd/hostapd/force-40mhz.patch new file mode 100644 index 0000000..88723bc --- /dev/null +++ b/recipes-connectivity/hostapd/hostapd/force-40mhz.patch @@ -0,0 +1,26 @@ +diff --git a/../src/ap/hw_features.c b/../src/ap/hw_features.c +index 05431d3..7458d06 100644 +--- ../src/ap/hw_features.c ++++ ../src/ap/hw_features.c +@@ -306,10 +306,12 @@ static void ieee80211n_check_scan(struct hostapd_iface *iface) + iface->secondary_ch = iface->conf->secondary_channel; + if (!oper40) { + wpa_printf(MSG_INFO, "20/40 MHz operation not permitted on " +- "channel pri=%d sec=%d based on overlapping BSSes", ++ "channel pri=%d sec=%d based on overlapping BSSes " ++ "but will force now", + iface->conf->channel, + iface->conf->channel + + iface->conf->secondary_channel * 4); ++#if 0 + iface->conf->secondary_channel = 0; + if (iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX) { + /* +@@ -318,6 +320,7 @@ static void ieee80211n_check_scan(struct hostapd_iface *iface) + * are received from associating stations. + */ + } ++#endif + } + + res = ieee80211n_allowed_ht40_channel_pair(iface); diff --git a/recipes-connectivity/hostapd/hostapd_%.bbappend b/recipes-connectivity/hostapd/hostapd_%.bbappend index 72d991c..15992f6 100644 --- a/recipes-connectivity/hostapd/hostapd_%.bbappend +++ b/recipes-connectivity/hostapd/hostapd_%.bbappend @@ -1 +1,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append = " \ + file://force-40mhz.patch;patchdir=${S}/../ \ + "