Skip to content

Commit

Permalink
hostapd: update to v2.10
Browse files Browse the repository at this point in the history
Upstreamed patches:
020-mesh-make-forwarding-configurable.patch
e6db1bc5da3fd7d5f4dba24aa102543b4749912f
550-WNM-allow-specifying-dialog-token.patch
979f19716539362f8ce60a77bf1b88fdcf5ba8e5
720-ACS-fix-channel-100-frequency.patch
2341585c349231af00cdef8d51458df01bc6965f
741-proxyarp-fix-compilation-with-Hotspot-2.0-disabled.patch
08bdf4f90de61a84ed8f4dd918272dd9d36e2e1f

Compile-tested: wpad-wolfssl hostapd-openssl
Run-tested: ath79-generic

Signed-off-by: David Bauer <mail@david-bauer.net>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
  • Loading branch information
blocktrron committed Feb 7, 2022
1 parent ae75541 commit adb8c09
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 447 deletions.
6 changes: 3 additions & 3 deletions package/network/services/hostapd/Makefile
Expand Up @@ -9,9 +9,9 @@ PKG_RELEASE:=$(AUTORELEASE)

PKG_SOURCE_URL:=http://w1.fi/hostap.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2021-05-22
PKG_SOURCE_VERSION:=b102f19bcc53c7f7db3951424d4d46709b4f1986
PKG_MIRROR_HASH:=cb3cb968883042fc582752be1607586696c18e6ecf9808c9a8ac50e204584367
PKG_SOURCE_DATE:=2022-01-16
PKG_SOURCE_VERSION:=cff80b4f7d3c0a47c052e8187d671710f48939e4
PKG_MIRROR_HASH:=712965bfa11a2e601d3e1c9a51a2cf3cffc6db89abafb3df3eb0cfd83c64705b

PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=BSD-3-Clause
Expand Down
Expand Up @@ -14,16 +14,37 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>

--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2395,6 +2395,8 @@ void ibss_mesh_setup_freq(struct wpa_sup
@@ -2409,7 +2409,7 @@ static int drv_supports_vht(struct wpa_s
}


-static bool ibss_mesh_is_80mhz_avail(int channel, struct hostapd_hw_modes *mode)
+static bool ibss_mesh_is_80mhz_avail(int channel, struct hostapd_hw_modes *mode, bool dfs_enabled)
{
int i;

@@ -2418,7 +2418,10 @@ static bool ibss_mesh_is_80mhz_avail(int

chan = hw_get_channel_chan(mode, i, NULL);
if (!chan ||
- chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
+ chan->flag & HOSTAPD_CHAN_DISABLED)
+ return false;
+
+ if (!dfs_enabled && chan->flag & (HOSTAPD_CHAN_RADAR | HOSTAPD_CHAN_NO_IR))
return false;
}

@@ -2447,6 +2450,8 @@ void ibss_mesh_setup_freq(struct wpa_sup
int chwidth, seg0, seg1;
u32 vht_caps = 0;
int is_24ghz;
+ int dfs_enabled = wpa_s->conf->country[0] &&
+ (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
bool is_24ghz, is_6ghz;
+ bool dfs_enabled = wpa_s->conf->country[0] &&
+ (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);

freq->freq = ssid->frequency;

@@ -2484,8 +2486,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
@@ -2543,8 +2548,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
return;

/* Check primary channel flags */
Expand All @@ -36,7 +57,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>

freq->channel = pri_chan->chan;

@@ -2518,8 +2523,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
@@ -2577,8 +2585,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
return;

/* Check secondary channel flags */
Expand All @@ -49,20 +70,25 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>

if (ht40 == -1) {
if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
@@ -2612,8 +2620,11 @@ skip_ht40:
return;
@@ -2667,7 +2678,7 @@ skip_to_6ghz:
return;

/* Back to HT configuration if channel not usable */
- if (chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
+ if (chan->flag & HOSTAPD_CHAN_DISABLED)
return;
+ if (chan->flag & (HOSTAPD_CHAN_RADAR | HOSTAPD_CHAN_NO_IR))
+ if (!dfs_enabled)
+ return;
}
/* Back to HT configuration if channel not usable */
- if (!ibss_mesh_is_80mhz_avail(channel, mode))
+ if (!ibss_mesh_is_80mhz_avail(channel, mode, dfs_enabled))
return;

chwidth = CHANWIDTH_80MHZ;
@@ -2633,10 +2644,12 @@ skip_ht40:
@@ -2681,7 +2692,7 @@ skip_to_6ghz:
* above; check the remaining four 20 MHz channels for the total
* of 160 MHz bandwidth.
*/
- if (!ibss_mesh_is_80mhz_avail(channel + 16, mode))
+ if (!ibss_mesh_is_80mhz_avail(channel + 16, mode, dfs_enabled))
return;

for (j = 0; j < ARRAY_SIZE(bw160); j++) {
@@ -2711,10 +2722,12 @@ skip_to_6ghz:
if (!chan)
continue;

Expand Down

This file was deleted.

15 changes: 9 additions & 6 deletions package/network/services/hostapd/patches/301-mesh-noscan.patch
Expand Up @@ -10,7 +10,7 @@
{ STR(id_str) },
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -768,6 +768,7 @@ static void wpa_config_write_network(FIL
@@ -769,6 +769,7 @@ static void wpa_config_write_network(FIL
#endif /* IEEE8021X_EAPOL */
INT(mode);
INT(no_auto_peer);
Expand All @@ -20,7 +20,7 @@
INT(enable_edmg);
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -474,6 +474,8 @@ static int wpa_supplicant_mesh_init(stru
@@ -506,6 +506,8 @@ static int wpa_supplicant_mesh_init(stru
frequency);
goto out_free;
}
Expand All @@ -31,22 +31,25 @@
/*
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2384,12 +2384,12 @@ void ibss_mesh_setup_freq(struct wpa_sup
@@ -2436,7 +2436,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode);
enum hostapd_hw_mode hw_mode;
struct hostapd_hw_modes *mode = NULL;
- int ht40plus[] = { 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157,
+ int ht40plus[] = { 1, 2, 3, 4, 5, 6, 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157,
184, 192 };
int vht80[] = { 36, 52, 100, 116, 132, 149 };
int bw80[] = { 5180, 5260, 5500, 5580, 5660, 5745, 5955,
6035, 6115, 6195, 6275, 6355, 6435, 6515,
@@ -2444,7 +2444,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
int bw160[] = { 5955, 6115, 6275, 6435, 6595, 6755, 6915 };
struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
u8 channel;
- int i, chan_idx, ht40 = -1, res, obss_scan = 1;
+ int i, chan_idx, ht40 = -1, res, obss_scan = !(ssid->noscan);
unsigned int j, k;
struct hostapd_freq_params vht_freq;
int chwidth, seg0, seg1;
@@ -2473,7 +2473,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
@@ -2535,7 +2535,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
#endif /* CONFIG_HE_OVERRIDES */

/* Setup higher BW only for 5 GHz */
Expand All @@ -57,7 +60,7 @@
for (chan_idx = 0; chan_idx < mode->num_channels; chan_idx++) {
--- a/wpa_supplicant/config_ssid.h
+++ b/wpa_supplicant/config_ssid.h
@@ -971,6 +971,8 @@ struct wpa_ssid {
@@ -979,6 +979,8 @@ struct wpa_ssid {
*/
int no_auto_peer;

Expand Down

0 comments on commit adb8c09

Please sign in to comment.