hostapd: fix more dynamic reload issues
authorFelix Fietkau <nbd@nbd.name>
Thu, 14 Sep 2023 11:35:17 +0000 (13:35 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 14 Sep 2023 17:13:36 +0000 (19:13 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/hostapd/patches/180-driver_nl80211-fix-setting-QoS-map-on-secondary-BSSs.patch [new file with mode: 0644]
package/network/services/hostapd/patches/181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch [new file with mode: 0644]
package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch
package/network/services/hostapd/patches/601-ucode_support.patch
package/network/services/hostapd/patches/740-snoop_iface.patch

diff --git a/package/network/services/hostapd/patches/180-driver_nl80211-fix-setting-QoS-map-on-secondary-BSSs.patch b/package/network/services/hostapd/patches/180-driver_nl80211-fix-setting-QoS-map-on-secondary-BSSs.patch
new file mode 100644 (file)
index 0000000..4929c58
--- /dev/null
@@ -0,0 +1,20 @@
+From: Felix Fietkau <nbd@nbd.name>
+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 <nbd@nbd.name>
+---
+
+--- 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;
diff --git a/package/network/services/hostapd/patches/181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch b/package/network/services/hostapd/patches/181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch
new file mode 100644 (file)
index 0000000..adfb21f
--- /dev/null
@@ -0,0 +1,18 @@
+From: Felix Fietkau <nbd@nbd.name>
+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 <nbd@nbd.name>
+---
+
+--- 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");
index f13e0569844a78c2fa7d02a88d896dc02a79531c..daa36c2f35cbb95636403daa555efc35e479668e 100644 (file)
@@ -29,7 +29,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
  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 <simon.wunderlich@openmesh.com>
  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) ||
index 0e5eb6f104d28f682afaec39fefa4e4585d5aab1..c8bbfd43d8337074cb6bee8b80d4df0cf2f96f23 100644 (file)
        }
  
        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;
  }
  
  
  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
  }
  
  
  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,
index 67312e03142edf4ff409aa3343ed6c4b8e7b4a6c..ce64513a421b42db9506ebf6a67f21e84ea7eeec 100644 (file)
         * 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,
  {
        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;
        }