hostapd: slightly clean up patches

- move build/ifdef related changes together to the 200 patch range
- reduce adding/removing include statements across patches
- move patches away from the 99x patch range to simplify maintenance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2024-04-04 13:19:49 +02:00
parent 7b9996d107
commit 5aab43f933
17 changed files with 25 additions and 64 deletions

View File

@ -20,7 +20,7 @@ Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -3681,6 +3681,8 @@ int hostapd_remove_iface(struct hapd_int
@@ -3646,6 +3646,8 @@ int hostapd_remove_iface(struct hapd_int
void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
int reassoc)
{
@ -29,7 +29,7 @@ Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
if (hapd->tkip_countermeasures) {
hostapd_drv_sta_deauth(hapd, sta->addr,
WLAN_REASON_MICHAEL_MIC_FAILURE);
@@ -3688,10 +3690,16 @@ void hostapd_new_assoc_sta(struct hostap
@@ -3653,10 +3655,16 @@ void hostapd_new_assoc_sta(struct hostap
}
#ifdef CONFIG_IEEE80211BE
@ -51,7 +51,7 @@ Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
sta->post_csa_sa_query = 0;
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -1414,9 +1414,6 @@ bool ap_sta_set_authorized_flag(struct h
@@ -1412,9 +1412,6 @@ bool ap_sta_set_authorized_flag(struct h
mld_assoc_link_id = -2;
}
#endif /* CONFIG_IEEE80211BE */

View File

@ -26,7 +26,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -2344,6 +2344,9 @@ struct wpa_driver_capa {
@@ -2340,6 +2340,9 @@ struct wpa_driver_capa {
/** Maximum number of iterations in a single scan plan */
u32 max_sched_scan_plan_iterations;

View File

@ -116,7 +116,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
struct hapd_interfaces *interfaces = ctx;
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -6760,8 +6760,8 @@ union wpa_event_data {
@@ -6763,8 +6763,8 @@ union wpa_event_data {
* Driver wrapper code should call this function whenever an event is received
* from the driver.
*/
@ -127,7 +127,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
/**
* wpa_supplicant_event_global - Report a driver event for wpa_supplicant
@@ -6773,7 +6773,7 @@ void wpa_supplicant_event(void *ctx, enu
@@ -6776,7 +6776,7 @@ void wpa_supplicant_event(void *ctx, enu
* Same as wpa_supplicant_event(), but we search for the interface in
* wpa_global.
*/

View File

@ -5,7 +5,7 @@ Subject: [PATCH] hostapd: build with LTO enabled (using jobserver for parallel
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -1408,7 +1408,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
@@ -1405,7 +1405,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
@$(AR) cr $@ hostapd_multi.o $(OBJS)
hostapd: $(OBJS)
@ -14,7 +14,7 @@ Subject: [PATCH] hostapd: build with LTO enabled (using jobserver for parallel
@$(E) " LD " $@
ifdef CONFIG_WPA_TRACE
@@ -1419,7 +1419,7 @@ _OBJS_VAR := OBJS_c
@@ -1416,7 +1416,7 @@ _OBJS_VAR := OBJS_c
include ../src/objs.mk
hostapd_cli: $(OBJS_c)
@ -25,7 +25,7 @@ Subject: [PATCH] hostapd: build with LTO enabled (using jobserver for parallel
NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS)
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -2106,31 +2106,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
@@ -2103,31 +2103,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
@$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)

View File

@ -13,7 +13,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -13220,7 +13220,7 @@ char * wpa_supplicant_ctrl_iface_process
@@ -13214,7 +13214,7 @@ char * wpa_supplicant_ctrl_iface_process
if (wpas_ctrl_iface_coloc_intf_report(wpa_s, buf + 18))
reply_len = -1;
#endif /* CONFIG_WNM */
@ -22,7 +22,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
} else if (os_strncmp(buf, "DISASSOC_IMMINENT ", 18) == 0) {
if (ap_ctrl_iface_disassoc_imminent(wpa_s, buf + 18))
reply_len = -1;
@@ -13230,7 +13230,7 @@ char * wpa_supplicant_ctrl_iface_process
@@ -13224,7 +13224,7 @@ char * wpa_supplicant_ctrl_iface_process
} else if (os_strncmp(buf, "BSS_TM_REQ ", 11) == 0) {
if (ap_ctrl_iface_bss_tm_req(wpa_s, buf + 11))
reply_len = -1;

View File

@ -54,23 +54,3 @@ Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
static inline int wpa_key_mgmt_wpa_ieee8021x(int akm)
{
return !!(akm & (WPA_KEY_MGMT_IEEE8021X |
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -19,7 +19,6 @@
#define WPA_SUPPLICANT_DRIVER_VERSION 4
-#include "ap/sta_info.h"
#include "common/defs.h"
#include "common/ieee802_11_defs.h"
#include "common/wpa_common.h"
--- a/wpa_supplicant/config_ssid.h
+++ b/wpa_supplicant/config_ssid.h
@@ -10,7 +10,6 @@
#define CONFIG_SSID_H
#include "common/defs.h"
-#include "ap/sta_info.h"
#include "utils/list.h"
#include "eap_peer/eap_config.h"
#include "drivers/nl80211_copy.h"

View File

@ -24,7 +24,7 @@ This feature is useful on its own even without full interworking support
#ifdef CONFIG_HS20
static int hs20_parse_conn_capab(struct hostapd_bss_config *bss, char *buf,
@@ -4282,10 +4282,10 @@ static int hostapd_config_fill(struct ho
@@ -4260,10 +4260,10 @@ static int hostapd_config_fill(struct ho
bss->gas_frag_limit = val;
} else if (os_strcmp(buf, "gas_comeback_delay") == 0) {
bss->gas_comeback_delay = atoi(pos);
@ -38,7 +38,7 @@ This feature is useful on its own even without full interworking support
os_free(bss->dump_msk_file);
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -1578,6 +1578,7 @@ int hostapd_setup_bss(struct hostapd_dat
@@ -1548,6 +1548,7 @@ static int hostapd_setup_bss(struct host
wpa_printf(MSG_ERROR, "GAS server initialization failed");
return -1;
}
@ -46,7 +46,7 @@ This feature is useful on its own even without full interworking support
if (conf->qos_map_set_len &&
hostapd_drv_set_qos_map(hapd, conf->qos_map_set,
@@ -1585,7 +1586,6 @@ int hostapd_setup_bss(struct hostapd_dat
@@ -1555,7 +1556,6 @@ static int hostapd_setup_bss(struct host
wpa_printf(MSG_ERROR, "Failed to initialize QoS Map");
return -1;
}

View File

@ -11,7 +11,7 @@ if CONFIG_CTRL_IFACE_MIB is not defined.
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -757,7 +757,7 @@ static int wpa_ctrl_command_sta(struct w
@@ -753,7 +753,7 @@ static int wpa_ctrl_command_sta(struct w
}
buf[len] = '\0';

View File

@ -14,15 +14,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -19,6 +19,7 @@
#define WPA_SUPPLICANT_DRIVER_VERSION 4
+#include "ap/sta_info.h"
#include "common/defs.h"
#include "common/ieee802_11_defs.h"
#include "common/wpa_common.h"
@@ -971,6 +972,9 @@ struct wpa_driver_associate_params {
@@ -971,6 +971,9 @@ struct wpa_driver_associate_params {
* responsible for selecting with which BSS to associate. */
const u8 *bssid;
@ -151,18 +143,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
{ INT_RANGE(macsec_integ_only, 0, 1) },
--- a/wpa_supplicant/config_ssid.h
+++ b/wpa_supplicant/config_ssid.h
@@ -10,8 +10,10 @@
#define CONFIG_SSID_H
#include "common/defs.h"
+#include "ap/sta_info.h"
#include "utils/list.h"
#include "eap_peer/eap_config.h"
+#include "drivers/nl80211_copy.h"
#define DEFAULT_EAP_WORKAROUND ((unsigned int) -1)
@@ -879,6 +881,9 @@ struct wpa_ssid {
@@ -879,6 +879,9 @@ struct wpa_ssid {
*/
void *parent_cred;

View File

@ -314,7 +314,7 @@ probe/assoc/auth requests via object subscribe.
ap_free_sta(hapd, sta);
break;
}
@@ -1451,15 +1453,28 @@ void ap_sta_set_authorized_event(struct
@@ -1448,15 +1450,28 @@ void ap_sta_set_authorized_event(struct
os_snprintf(buf, sizeof(buf), MACSTR, MAC2STR(sta->addr));
if (authorized) {
@ -343,7 +343,7 @@ probe/assoc/auth requests via object subscribe.
#ifdef CONFIG_P2P
if (wpa_auth_get_ip_addr(sta->wpa_sm, ip_addr_buf) == 0) {
os_snprintf(ip_addr, sizeof(ip_addr),
@@ -1470,6 +1485,13 @@ void ap_sta_set_authorized_event(struct
@@ -1467,6 +1482,13 @@ void ap_sta_set_authorized_event(struct
}
#endif /* CONFIG_P2P */
@ -357,7 +357,7 @@ probe/assoc/auth requests via object subscribe.
keyid = ap_sta_wpa_get_keyid(hapd, sta);
if (keyid) {
os_snprintf(keyid_buf, sizeof(keyid_buf),
@@ -1488,17 +1510,19 @@ void ap_sta_set_authorized_event(struct
@@ -1485,17 +1507,19 @@ void ap_sta_set_authorized_event(struct
dpp_pkhash, SHA256_MAC_LEN);
}

View File

@ -206,7 +206,7 @@ as adding/removing interfaces.
void hostapd_interface_deinit_free(struct hostapd_iface *iface);
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -3853,6 +3853,25 @@ struct wpa_driver_ops {
@@ -3856,6 +3856,25 @@ struct wpa_driver_ops {
const char *ifname);
/**
@ -232,7 +232,7 @@ as adding/removing interfaces.
* set_sta_vlan - Bind a station into a specific interface (AP only)
* @priv: Private driver interface data
* @ifname: Interface (main or virtual BSS or VLAN)
@@ -6507,6 +6526,7 @@ union wpa_event_data {
@@ -6510,6 +6529,7 @@ union wpa_event_data {
/**
* struct ch_switch
@ -240,7 +240,7 @@ as adding/removing interfaces.
* @freq: Frequency of new channel in MHz
* @ht_enabled: Whether this is an HT channel
* @ch_offset: Secondary channel offset
@@ -6517,6 +6537,7 @@ union wpa_event_data {
@@ -6520,6 +6540,7 @@ union wpa_event_data {
* @punct_bitmap: Puncturing bitmap
*/
struct ch_switch {
@ -596,7 +596,7 @@ as adding/removing interfaces.
CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -5955,6 +5955,7 @@ void supplicant_event(void *ctx, enum wp
@@ -5949,6 +5949,7 @@ void supplicant_event(void *ctx, enum wp
event_to_string(event), event);
#endif /* CONFIG_NO_STDOUT_DEBUG */

View File

@ -112,7 +112,7 @@ untagged DHCP packets
hapd->x_snoop_initialized = false;
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -4275,7 +4275,7 @@ struct wpa_driver_ops {
@@ -4278,7 +4278,7 @@ struct wpa_driver_ops {
* Returns: 0 on success, negative (<0) on failure
*/
int (*br_set_net_param)(void *priv, enum drv_br_net_param param,