Sfoglia il codice sorgente

hostapd: fix more dynamic reload issues

Signed-off-by: Felix Fietkau <[email protected]>
Felix Fietkau 2 anni fa
parent
commit
a63e118f77

+ 20 - 0
package/network/services/hostapd/patches/180-driver_nl80211-fix-setting-QoS-map-on-secondary-BSSs.patch

@@ -0,0 +1,20 @@
+From: Felix Fietkau <[email protected]>
+Date: Thu, 14 Sep 2023 10:53:50 +0200
+Subject: [PATCH] driver_nl80211: fix setting QoS map on secondary BSSs
+
+The setting is per-BSS, not per PHY
+
+Signed-off-by: Felix Fietkau <[email protected]>
+---
+
+--- a/src/drivers/driver_nl80211.c
++++ b/src/drivers/driver_nl80211.c
+@@ -11341,7 +11341,7 @@ static int nl80211_set_qos_map(void *pri
+ 	wpa_hexdump(MSG_DEBUG, "nl80211: Setting QoS Map",
+ 		    qos_map_set, qos_map_set_len);
+ 
+-	if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_SET_QOS_MAP)) ||
++	if (!(msg = nl80211_bss_msg(bss, 0, NL80211_CMD_SET_QOS_MAP)) ||
+ 	    nla_put(msg, NL80211_ATTR_QOS_MAP, qos_map_set_len, qos_map_set)) {
+ 		nlmsg_free(msg);
+ 		return -ENOBUFS;

+ 18 - 0
package/network/services/hostapd/patches/181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch

@@ -0,0 +1,18 @@
+From: Felix Fietkau <[email protected]>
+Date: Thu, 14 Sep 2023 11:28:03 +0200
+Subject: [PATCH] driver_nl80211: update drv->ifindex on removing the first
+ BSS
+
+Signed-off-by: Felix Fietkau <[email protected]>
+---
+
+--- a/src/drivers/driver_nl80211.c
++++ b/src/drivers/driver_nl80211.c
+@@ -8867,6 +8867,7 @@ static int wpa_driver_nl80211_if_remove(
+ 		if (drv->first_bss->next) {
+ 			drv->first_bss = drv->first_bss->next;
+ 			drv->ctx = drv->first_bss->ctx;
++			drv->ifindex = drv->first_bss->ifindex;
+ 			os_free(bss);
+ 		} else {
+ 			wpa_printf(MSG_DEBUG, "nl80211: No second BSS to reassign context to");

+ 2 - 2
package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch

@@ -29,7 +29,7 @@ Tested-by: Simon Wunderlich <[email protected]>
  struct wpa_driver_set_key_params {
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -11666,6 +11666,18 @@ static int nl80211_put_mesh_id(struct nl
+@@ -11667,6 +11667,18 @@ static int nl80211_put_mesh_id(struct nl
  }
  
  
@@ -48,7 +48,7 @@ Tested-by: Simon Wunderlich <[email protected]>
  static int nl80211_put_mesh_config(struct nl_msg *msg,
  				   struct wpa_driver_mesh_bss_params *params)
  {
-@@ -11727,6 +11739,7 @@ static int nl80211_join_mesh(struct i802
+@@ -11728,6 +11740,7 @@ static int nl80211_join_mesh(struct i802
  	    nl80211_put_basic_rates(msg, params->basic_rates) ||
  	    nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) ||
  	    nl80211_put_beacon_int(msg, params->beacon_int) ||

+ 3 - 3
package/network/services/hostapd/patches/601-ucode_support.patch

@@ -443,7 +443,7 @@
  	}
  
  	if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
-@@ -8874,6 +8871,50 @@ static int wpa_driver_nl80211_if_remove(
+@@ -8875,6 +8872,50 @@ static int wpa_driver_nl80211_if_remove(
  	return 0;
  }
  
@@ -494,7 +494,7 @@
  
  static int cookie_handler(struct nl_msg *msg, void *arg)
  {
-@@ -10512,6 +10553,37 @@ static int driver_nl80211_if_remove(void
+@@ -10513,6 +10554,37 @@ static int driver_nl80211_if_remove(void
  }
  
  
@@ -532,7 +532,7 @@
  static int driver_nl80211_send_mlme(void *priv, const u8 *data,
  				    size_t data_len, int noack,
  				    unsigned int freq,
-@@ -13696,6 +13768,8 @@ const struct wpa_driver_ops wpa_driver_n
+@@ -13697,6 +13769,8 @@ const struct wpa_driver_ops wpa_driver_n
  	.set_acl = wpa_driver_nl80211_set_acl,
  	.if_add = wpa_driver_nl80211_if_add,
  	.if_remove = driver_nl80211_if_remove,

+ 2 - 2
package/network/services/hostapd/patches/740-snoop_iface.patch

@@ -115,7 +115,7 @@
  	 * get_wowlan - Get wake-on-wireless status
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -12167,7 +12167,7 @@ static const char * drv_br_net_param_str
+@@ -12168,7 +12168,7 @@ static const char * drv_br_net_param_str
  
  
  static int wpa_driver_br_set_net_param(void *priv, enum drv_br_net_param param,
@@ -124,7 +124,7 @@
  {
  	struct i802_bss *bss = priv;
  	char path[128];
-@@ -12193,8 +12193,11 @@ static int wpa_driver_br_set_net_param(v
+@@ -12194,8 +12194,11 @@ static int wpa_driver_br_set_net_param(v
  			return -EINVAL;
  	}