summaryrefslogtreecommitdiff
path: root/package/network/services
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-07-26 13:47:00 +0200
committerFelix Fietkau <nbd@nbd.name>2016-07-27 17:22:39 +0200
commitda328f28659512419dd295a2c14419923734fa3e (patch)
tree797a68c4c259c9101ed01fe99e608e9efc9cdcf4 /package/network/services
parent86c0a569f41c848a7f2eac5b37f5f564c265c5ce (diff)
downloadmtk-20170518-da328f28659512419dd295a2c14419923734fa3e.zip
mtk-20170518-da328f28659512419dd295a2c14419923734fa3e.tar.gz
mtk-20170518-da328f28659512419dd295a2c14419923734fa3e.tar.bz2
hostapd: backport mesh/ibss HT20/HT40 related fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/network/services')
-rw-r--r--package/network/services/hostapd/patches/002-mesh-Set-correct-secondary-channel-offset-if-HT40-is.patch61
-rw-r--r--package/network/services/hostapd/patches/200-multicall.patch6
-rw-r--r--package/network/services/hostapd/patches/310-rescan_immediately.patch2
-rw-r--r--package/network/services/hostapd/patches/370-ap_sta_support.patch4
-rw-r--r--package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch2
-rw-r--r--package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch2
6 files changed, 69 insertions, 8 deletions
diff --git a/package/network/services/hostapd/patches/002-mesh-Set-correct-secondary-channel-offset-if-HT40-is.patch b/package/network/services/hostapd/patches/002-mesh-Set-correct-secondary-channel-offset-if-HT40-is.patch
new file mode 100644
index 0000000..2439220
--- /dev/null
+++ b/package/network/services/hostapd/patches/002-mesh-Set-correct-secondary-channel-offset-if-HT40-is.patch
@@ -0,0 +1,61 @@
+From: Masashi Honma <masashi.honma@gmail.com>
+Date: Tue, 26 Jul 2016 11:45:40 +0900
+Subject: [PATCH] mesh: Set correct secondary channel offset if HT40 is
+ disabled
+
+Previously, secondary channel offset could be non zero even though
+disable_ht40=1. This patch fixes it.
+
+Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
+---
+
+--- a/wpa_supplicant/wpa_supplicant.c
++++ b/wpa_supplicant/wpa_supplicant.c
+@@ -1901,20 +1901,27 @@ void ibss_mesh_setup_freq(struct wpa_sup
+ break;
+ }
+ }
++#ifdef CONFIG_HT_OVERRIDES
++ if (ssid->disable_ht40)
++ ht40 = 0;
++#endif /* CONFIG_HT_OVERRIDES */
+
+- /* Find secondary channel */
+- for (i = 0; i < mode->num_channels; i++) {
+- sec_chan = &mode->channels[i];
+- if (sec_chan->chan == channel + ht40 * 4)
+- break;
+- sec_chan = NULL;
+- }
+- if (!sec_chan)
+- return;
++ if (ht40) {
++ /* Find secondary channel */
++ for (i = 0; i < mode->num_channels; i++) {
++ sec_chan = &mode->channels[i];
++ if (sec_chan->chan == channel + ht40 * 4)
++ break;
++ sec_chan = NULL;
++ }
++ if (!sec_chan)
++ return;
+
+- /* Check secondary channel flags */
+- if (sec_chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
+- return;
++ /* Check secondary channel flags */
++ if (sec_chan->flag &
++ (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
++ return;
++ }
+
+ freq->channel = pri_chan->chan;
+
+@@ -1930,6 +1937,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
+ freq->sec_channel_offset = 1;
+ break;
+ default:
++ freq->sec_channel_offset = 0;
+ break;
+ }
+
diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch
index 7d83ee8..8b260c2 100644
--- a/package/network/services/hostapd/patches/200-multicall.patch
+++ b/package/network/services/hostapd/patches/200-multicall.patch
@@ -258,7 +258,7 @@
struct wpa_supplicant *wpa_s;
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -4982,7 +4982,6 @@ struct wpa_interface * wpa_supplicant_ma
+@@ -4990,7 +4990,6 @@ struct wpa_interface * wpa_supplicant_ma
return NULL;
}
@@ -266,7 +266,7 @@
/**
* wpa_supplicant_match_existing - Match existing interfaces
* @global: Pointer to global data from wpa_supplicant_init()
-@@ -5019,6 +5018,11 @@ static int wpa_supplicant_match_existing
+@@ -5027,6 +5026,11 @@ static int wpa_supplicant_match_existing
#endif /* CONFIG_MATCH_IFACE */
@@ -278,7 +278,7 @@
/**
* wpa_supplicant_add_iface - Add a new network interface
-@@ -5274,6 +5278,8 @@ struct wpa_global * wpa_supplicant_init(
+@@ -5282,6 +5286,8 @@ struct wpa_global * wpa_supplicant_init(
#ifndef CONFIG_NO_WPA_MSG
wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
#endif /* CONFIG_NO_WPA_MSG */
diff --git a/package/network/services/hostapd/patches/310-rescan_immediately.patch b/package/network/services/hostapd/patches/310-rescan_immediately.patch
index d9486ed..3f46cc4 100644
--- a/package/network/services/hostapd/patches/310-rescan_immediately.patch
+++ b/package/network/services/hostapd/patches/310-rescan_immediately.patch
@@ -1,6 +1,6 @@
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -3548,7 +3548,7 @@ wpa_supplicant_alloc(struct wpa_supplica
+@@ -3556,7 +3556,7 @@ wpa_supplicant_alloc(struct wpa_supplica
if (wpa_s == NULL)
return NULL;
wpa_s->scan_req = INITIAL_SCAN_REQ;
diff --git a/package/network/services/hostapd/patches/370-ap_sta_support.patch b/package/network/services/hostapd/patches/370-ap_sta_support.patch
index 6b70215..7a4ba0b 100644
--- a/package/network/services/hostapd/patches/370-ap_sta_support.patch
+++ b/package/network/services/hostapd/patches/370-ap_sta_support.patch
@@ -114,7 +114,7 @@
wpa_s->new_connection = 1;
wpa_drv_set_operstate(wpa_s, 0);
#ifndef IEEE8021X_EAPOL
-@@ -4638,6 +4691,20 @@ static int wpa_supplicant_init_iface(str
+@@ -4646,6 +4699,20 @@ static int wpa_supplicant_init_iface(str
sizeof(wpa_s->bridge_ifname));
}
@@ -135,7 +135,7 @@
/* RSNA Supplicant Key Management - INITIALIZE */
eapol_sm_notify_portEnabled(wpa_s->eapol, FALSE);
eapol_sm_notify_portValid(wpa_s->eapol, FALSE);
-@@ -4929,6 +4996,11 @@ static void wpa_supplicant_deinit_iface(
+@@ -4937,6 +5004,11 @@ static void wpa_supplicant_deinit_iface(
if (terminate)
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING);
diff --git a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
index 169b171..6a5866e 100644
--- a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
+++ b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
@@ -175,7 +175,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
* macsec_policy - Determines the policy for MACsec secure session
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2510,6 +2510,13 @@ static void wpas_start_assoc_cb(struct w
+@@ -2518,6 +2518,13 @@ static void wpas_start_assoc_cb(struct w
params.beacon_int = ssid->beacon_int;
else
params.beacon_int = wpa_s->conf->beacon_int;
diff --git a/package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch b/package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch
index a81465c..80fe49c 100644
--- a/package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch
+++ b/package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch
@@ -145,7 +145,7 @@ Signed-off-by: Antonio Quartulli <ordex@autistici.org>
/**
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2517,6 +2517,8 @@ static void wpas_start_assoc_cb(struct w
+@@ -2525,6 +2525,8 @@ static void wpas_start_assoc_cb(struct w
i++;
}
params.mcast_rate = ssid->mcast_rate;