]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Only attempt to set QoS map if supported by the driver
authorFelix Fietkau <nbd@nbd.name>
Thu, 4 Apr 2024 10:52:17 +0000 (12:52 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 15 Apr 2024 20:19:05 +0000 (23:19 +0300)
This fixes issues with full-MAC drivers like brcmfmac.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
src/ap/ap_drv_ops.c

index 0d493b837c9bac2ed79bcf5ad18fb335c49ef1e7..11fe39c2599f023f7507a3838cc88a9e7bce62c1 100644 (file)
@@ -1023,7 +1023,8 @@ int hostapd_start_dfs_cac(struct hostapd_iface *iface,
 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);