hostapd: only attempt to set qos map if supported by the driver
authorFelix Fietkau <nbd@nbd.name>
Thu, 23 Dec 2021 18:18:33 +0000 (19:18 +0100)
committerFelix Fietkau <nbd@nbd.name>
Thu, 23 Dec 2021 18:18:56 +0000 (19:18 +0100)
Fixes issues with brcmfmac

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch [new file with mode: 0644]

diff --git a/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch b/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch
new file mode 100644 (file)
index 0000000..8af5a0a
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/src/ap/ap_drv_ops.c
++++ b/src/ap/ap_drv_ops.c
+@@ -850,7 +850,8 @@ int hostapd_start_dfs_cac(struct hostapd
+ int hostapd_drv_set_qos_map(struct hostapd_data *hapd,
+                           const u8 *qos_map_set, u8 qos_map_set_len)
+ {
+-      if (!hapd->driver || !hapd->driver->set_qos_map || !hapd->drv_priv)
++      if (!hapd->driver || !hapd->driver->set_qos_map || !hapd->drv_priv ||
++          !(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_QOS_MAPPING))
+               return 0;
+       return hapd->driver->set_qos_map(hapd->drv_priv, qos_map_set,
+                                        qos_map_set_len);