Skip to content

Commit

Permalink
hostapd: update to version 2024-09-06
Browse files Browse the repository at this point in the history
Remove upstreamed from 2.11 release:
  060-nl80211-fix-crash-when-adding-an-interface-fails.patch

Rebase all other patches

Signed-off-by: Ivan Pavlov <[email protected]>
  • Loading branch information
AuthorReflex authored and AgustinLorenzo committed Sep 7, 2024
1 parent c2046de commit de7ebd0
Show file tree
Hide file tree
Showing 42 changed files with 186 additions and 200 deletions.
12 changes: 9 additions & 3 deletions package/network/services/hostapd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ PKG_RELEASE:=1

PKG_SOURCE_URL:=https://w1.fi/hostap.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2024-07-20
PKG_SOURCE_VERSION:=d945ddd368085f255e68328f2d3b020ceea359af
PKG_MIRROR_HASH:=647508a242f2969d8a815edb69d47b107f10d2415604e44b0451c48875ae46bd
PKG_SOURCE_DATE:=2024-09-06
PKG_SOURCE_VERSION:=2d92cae655f88a4c622ffea60731eb2e7ae36151
PKG_MIRROR_HASH:=ca2e667a298fb46f12185fbf67614ecd31252600a92cb8a22abd17220e0ad430

PKG_MAINTAINER:=Felix Fietkau <[email protected]>
PKG_LICENSE:=BSD-3-Clause
Expand All @@ -27,6 +27,7 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_WPA_RFKILL_SUPPORT \
CONFIG_DRIVER_11AC_SUPPORT \
CONFIG_DRIVER_11AX_SUPPORT \
CONFIG_DRIVER_11BE_SUPPORT \
CONFIG_WPA_ENABLE_WEP

PKG_BUILD_FLAGS:=gc-sections lto
Expand Down Expand Up @@ -79,13 +80,18 @@ ifneq ($(CONFIG_DRIVER_11AX_SUPPORT),)
HOSTAPD_IEEE80211AX:=y
endif

ifneq ($(CONFIG_DRIVER_11BE_SUPPORT),)
HOSTAPD_IEEE80211BE:=y
endif

CORE_DEPENDS = +ucode +libubus +libucode +ucode-mod-fs +ucode-mod-nl80211 +ucode-mod-rtnl +ucode-mod-ubus +ucode-mod-uloop +libblobmsg-json +libudebug
OPENSSL_DEPENDS = +PACKAGE_$(1):libopenssl +PACKAGE_$(1):libopenssl-legacy

DRIVER_MAKEOPTS= \
CONFIG_ACS=y CONFIG_DRIVER_NL80211=y \
CONFIG_IEEE80211AC=$(HOSTAPD_IEEE80211AC) \
CONFIG_IEEE80211AX=$(HOSTAPD_IEEE80211AX) \
CONFIG_IEEE80211BE=$(HOSTAPD_IEEE80211BE) \
CONFIG_MBO=$(CONFIG_WPA_MBO_SUPPORT) \
CONFIG_UCODE=y CONFIG_APUP=y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Signed-off-by: Peter Oh <[email protected]>

--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2809,7 +2809,7 @@ static int drv_supports_vht(struct wpa_s
@@ -2831,7 +2831,7 @@ static int drv_supports_vht(struct wpa_s
}


Expand All @@ -23,7 +23,7 @@ Signed-off-by: Peter Oh <[email protected]>
{
int i;

@@ -2818,7 +2818,10 @@ static bool ibss_mesh_is_80mhz_avail(int
@@ -2840,7 +2840,10 @@ static bool ibss_mesh_is_80mhz_avail(int

chan = hw_get_channel_chan(mode, i, NULL);
if (!chan ||
Expand All @@ -35,7 +35,7 @@ Signed-off-by: Peter Oh <[email protected]>
return false;
}

@@ -2945,7 +2948,7 @@ static void ibss_mesh_select_40mhz(struc
@@ -2967,7 +2970,7 @@ static void ibss_mesh_select_40mhz(struc
const struct wpa_ssid *ssid,
struct hostapd_hw_modes *mode,
struct hostapd_freq_params *freq,
Expand All @@ -44,7 +44,7 @@ Signed-off-by: Peter Oh <[email protected]>
int chan_idx;
struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
int i, res;
@@ -2969,8 +2972,11 @@ static void ibss_mesh_select_40mhz(struc
@@ -2991,8 +2994,11 @@ static void ibss_mesh_select_40mhz(struc
return;

/* Check primary channel flags */
Expand All @@ -57,7 +57,7 @@ Signed-off-by: Peter Oh <[email protected]>

#ifdef CONFIG_HT_OVERRIDES
if (ssid->disable_ht40)
@@ -2996,8 +3002,11 @@ static void ibss_mesh_select_40mhz(struc
@@ -3018,8 +3024,11 @@ static void ibss_mesh_select_40mhz(struc
return;

/* Check secondary channel flags */
Expand All @@ -70,7 +70,7 @@ Signed-off-by: Peter Oh <[email protected]>

if (ht40 == -1) {
if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
@@ -3052,7 +3061,7 @@ static bool ibss_mesh_select_80_160mhz(s
@@ -3074,7 +3083,7 @@ static bool ibss_mesh_select_80_160mhz(s
const struct wpa_ssid *ssid,
struct hostapd_hw_modes *mode,
struct hostapd_freq_params *freq,
Expand All @@ -79,7 +79,7 @@ Signed-off-by: Peter Oh <[email protected]>
static const int bw80[] = {
5180, 5260, 5500, 5580, 5660, 5745, 5825,
5955, 6035, 6115, 6195, 6275, 6355, 6435,
@@ -3097,7 +3106,7 @@ static bool ibss_mesh_select_80_160mhz(s
@@ -3119,7 +3128,7 @@ static bool ibss_mesh_select_80_160mhz(s
goto skip_80mhz;

/* Use 40 MHz if channel not usable */
Expand All @@ -88,7 +88,7 @@ Signed-off-by: Peter Oh <[email protected]>
goto skip_80mhz;

chwidth = CONF_OPER_CHWIDTH_80MHZ;
@@ -3111,7 +3120,7 @@ static bool ibss_mesh_select_80_160mhz(s
@@ -3133,7 +3142,7 @@ static bool ibss_mesh_select_80_160mhz(s
if ((mode->he_capab[ieee80211_mode].phy_cap[
HE_PHYCAP_CHANNEL_WIDTH_SET_IDX] &
HE_PHYCAP_CHANNEL_WIDTH_SET_160MHZ_IN_5G) && is_6ghz &&
Expand All @@ -97,7 +97,7 @@ Signed-off-by: Peter Oh <[email protected]>
for (j = 0; j < ARRAY_SIZE(bw160); j++) {
if (freq->freq == bw160[j]) {
chwidth = CONF_OPER_CHWIDTH_160MHZ;
@@ -3139,10 +3148,12 @@ static bool ibss_mesh_select_80_160mhz(s
@@ -3161,10 +3170,12 @@ static bool ibss_mesh_select_80_160mhz(s
if (!chan)
continue;

Expand All @@ -113,15 +113,15 @@ Signed-off-by: Peter Oh <[email protected]>

/* Found a suitable second segment for 80+80 */
chwidth = CONF_OPER_CHWIDTH_80P80MHZ;
@@ -3197,6 +3208,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
@@ -3219,6 +3230,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
int obss_scan = 1;
u8 channel;
bool is_6ghz, is_24ghz;
+ bool dfs_enabled = wpa_s->conf->country[0] && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);

freq->freq = ssid->frequency;

@@ -3239,9 +3251,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
@@ -3261,9 +3273,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
freq->channel = channel;
/* Setup higher BW only for 5 GHz */
if (mode->mode == HOSTAPD_MODE_IEEE80211A) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Signed-off-by: Markus Theil <[email protected]>


enum dfs_channel_type {
@@ -527,9 +528,14 @@ dfs_get_valid_channel(struct hostapd_ifa
@@ -534,9 +535,14 @@ dfs_get_valid_channel(struct hostapd_ifa
int num_available_chandefs;
int chan_idx, chan_idx2;
int sec_chan_idx_80p80 = -1;
Expand All @@ -44,7 +44,7 @@ Signed-off-by: Markus Theil <[email protected]>
wpa_printf(MSG_DEBUG, "DFS: Selecting random channel");
*secondary_channel = 0;
*oper_centr_freq_seg0_idx = 0;
@@ -549,8 +555,20 @@ dfs_get_valid_channel(struct hostapd_ifa
@@ -556,8 +562,20 @@ dfs_get_valid_channel(struct hostapd_ifa
if (num_available_chandefs == 0)
return NULL;

Expand All @@ -68,7 +68,7 @@ Signed-off-by: Markus Theil <[email protected]>
chan_idx, num_available_chandefs);
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -11306,6 +11306,10 @@ static int nl80211_switch_channel(void *
@@ -11465,6 +11465,10 @@ static int nl80211_switch_channel(void *
if (ret)
goto error;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Subject: [PATCH] fix adding back stations after a missed deauth/disassoc

--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -4756,6 +4756,13 @@ static int add_associated_sta(struct hos
@@ -4783,6 +4783,13 @@ static int add_associated_sta(struct hos
* drivers to accept the STA parameter configuration. Since this is
* after a new FT-over-DS exchange, a new TK has been derived, so key
* reinstallation is not a concern for this case.
Expand All @@ -18,7 +18,7 @@ Subject: [PATCH] fix adding back stations after a missed deauth/disassoc
*/
wpa_printf(MSG_DEBUG, "Add associated STA " MACSTR
" (added_unassoc=%d auth_alg=%u ft_over_ds=%u reassoc=%d authorized=%d ft_tk=%d fils_tk=%d)",
@@ -4769,7 +4776,8 @@ static int add_associated_sta(struct hos
@@ -4796,7 +4803,8 @@ static int add_associated_sta(struct hos
(!(sta->flags & WLAN_STA_AUTHORIZED) ||
(reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) ||
(!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Signed-off-by: Stijn Tintel <[email protected]>

--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -3993,6 +3993,8 @@ int hostapd_remove_iface(struct hapd_int
@@ -4055,6 +4055,8 @@ int hostapd_remove_iface(struct hapd_int
void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
int reassoc)
{
Expand All @@ -29,7 +29,7 @@ Signed-off-by: Stijn Tintel <[email protected]>
if (hapd->tkip_countermeasures) {
hostapd_drv_sta_deauth(hapd, sta->addr,
WLAN_REASON_MICHAEL_MIC_FAILURE);
@@ -4000,10 +4002,16 @@ void hostapd_new_assoc_sta(struct hostap
@@ -4062,10 +4064,16 @@ void hostapd_new_assoc_sta(struct hostap
}

#ifdef CONFIG_IEEE80211BE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Signed-off-by: David Bauer <[email protected]>

--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -2355,6 +2355,9 @@ struct wpa_driver_capa {
@@ -2390,6 +2390,9 @@ struct wpa_driver_capa {
/** Maximum number of iterations in a single scan plan */
u32 max_sched_scan_plan_iterations;

Expand All @@ -51,7 +51,7 @@ Signed-off-by: David Bauer <[email protected]>
nla_get_u8(tb[NL80211_ATTR_MAX_MATCH_SETS]);
--- a/src/drivers/driver_nl80211_scan.c
+++ b/src/drivers/driver_nl80211_scan.c
@@ -221,7 +221,7 @@ nl80211_scan_common(struct i802_bss *bss
@@ -235,7 +235,7 @@ nl80211_scan_common(struct i802_bss *bss
wpa_printf(MSG_DEBUG, "nl80211: Passive scan requested");
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ Signed-off-by: Glenn Strauss <[email protected]>
raise HwsimSkip("Crypto library does not support Brainpool curves: " + tls)
capa = dev.request("GET_CAPABILITY dpp")
ver = 1
@@ -3902,6 +3903,9 @@ def test_dpp_proto_auth_req_no_i_proto_k
@@ -3925,6 +3926,9 @@ def test_dpp_proto_auth_req_no_i_proto_k

def test_dpp_proto_auth_req_invalid_i_proto_key(dev, apdev):
"""DPP protocol testing - invalid I-proto key in Auth Req"""
Expand All @@ -989,7 +989,7 @@ Signed-off-by: Glenn Strauss <[email protected]>
run_dpp_proto_auth_req_missing(dev, 66, "Invalid Initiator Protocol Key")

def test_dpp_proto_auth_req_no_i_nonce(dev, apdev):
@@ -3997,7 +4001,12 @@ def test_dpp_proto_auth_resp_no_r_proto_
@@ -4020,7 +4024,12 @@ def test_dpp_proto_auth_resp_no_r_proto_

def test_dpp_proto_auth_resp_invalid_r_proto_key(dev, apdev):
"""DPP protocol testing - invalid R-Proto Key in Auth Resp"""
Expand All @@ -1003,7 +1003,7 @@ Signed-off-by: Glenn Strauss <[email protected]>

def test_dpp_proto_auth_resp_no_r_nonce(dev, apdev):
"""DPP protocol testing - no R-nonce in Auth Resp"""
@@ -4359,11 +4368,17 @@ def test_dpp_proto_pkex_exchange_resp_in
@@ -4382,11 +4391,17 @@ def test_dpp_proto_pkex_exchange_resp_in

def test_dpp_proto_pkex_cr_req_invalid_bootstrap_key(dev, apdev):
"""DPP protocol testing - invalid Bootstrap Key in PKEX Commit-Reveal Request"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Signed-off-by: P Praneesh <[email protected]>
#endif /* CONFIG_IEEE80211AC */
--- a/src/ap/ieee802_11_ht.c
+++ b/src/ap/ieee802_11_ht.c
@@ -82,7 +82,9 @@ u8 * hostapd_eid_ht_capabilities(struct
@@ -127,7 +127,9 @@ no_update:
u8 * hostapd_eid_ht_operation(struct hostapd_data *hapd, u8 *eid)
{
struct ieee80211_ht_operation *oper;
Expand All @@ -50,9 +50,9 @@ Signed-off-by: P Praneesh <[email protected]>

if (!hapd->iconf->ieee80211n || hapd->conf->disable_11n ||
is_6ghz_op_class(hapd->iconf->op_class))
@@ -103,6 +105,13 @@ u8 * hostapd_eid_ht_operation(struct hos
oper->ht_param |= HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW |
HT_INFO_HT_PARAM_STA_CHNL_WIDTH;
@@ -143,6 +145,13 @@ u8 * hostapd_eid_ht_operation(struct hos
oper->operation_mode = host_to_le16(hapd->iface->ht_op_mode);
set_ht_param(hapd, oper);

+ vht_capabilities_info = host_to_le32(hapd->iface->current_mode->vht_capab);
+ chwidth = hostapd_get_oper_chwidth(hapd->iconf);
Expand Down Expand Up @@ -130,7 +130,7 @@ Signed-off-by: P Praneesh <[email protected]>
#undef VHT_CAP_CHECK_MAX
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -1398,6 +1398,8 @@ struct ieee80211_ampe_ie {
@@ -1401,6 +1401,8 @@ struct ieee80211_ampe_ie {
#define VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB ((u32) BIT(26) | BIT(27))
#define VHT_CAP_RX_ANTENNA_PATTERN ((u32) BIT(28))
#define VHT_CAP_TX_ANTENNA_PATTERN ((u32) BIT(29))
Expand Down
Loading

0 comments on commit de7ebd0

Please sign in to comment.