]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Advertise QoS Map support based on driver capability
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 23 Dec 2013 09:05:20 +0000 (11:05 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 23 Dec 2013 09:05:20 +0000 (11:05 +0200)
Do not assume the driver supports QoS Mapping, but instead, advertise
support for this only if CONFIG_INTERWORKING is defined and driver
indicates support for configuring QoS Map.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

src/drivers/driver.h
src/drivers/driver_nl80211.c
wpa_supplicant/wpa_supplicant.c

index a3602ed7820a51fb01fd0c4a44495d8fe9a27db5..78dcc25033394a19e6ffabf60958c87967f8f4aa 100644 (file)
@@ -910,6 +910,8 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS_RADAR                         0x10000000
 /* Driver supports a dedicated interface for P2P Device */
 #define WPA_DRIVER_FLAGS_DEDICATED_P2P_DEVICE          0x20000000
+/* Driver supports QoS Mapping */
+#define WPA_DRIVER_FLAGS_QOS_MAPPING                   0x40000000
        unsigned int flags;
 
        int max_scan_ssids;
index 67f7366e7d71322aab4bb5d79474d964aa91b63b..12f688a8bdd0f0b1a1deedddf413857ed8ac48d6 100644 (file)
@@ -3105,6 +3105,7 @@ struct wiphy_info_data {
        unsigned int p2p_client_supported:1;
        unsigned int p2p_concurrent:1;
        unsigned int channel_switch_supported:1;
+       unsigned int set_qos_map_supported:1;
 };
 
 
@@ -3265,6 +3266,9 @@ static void wiphy_info_supp_cmds(struct wiphy_info_data *info,
                case NL80211_CMD_CHANNEL_SWITCH:
                        info->channel_switch_supported = 1;
                        break;
+               case NL80211_CMD_SET_QOS_MAP:
+                       info->set_qos_map_supported = 1;
+                       break;
                }
        }
 }
@@ -3527,6 +3531,8 @@ static int wpa_driver_nl80211_capa(struct wpa_driver_nl80211_data *drv)
        drv->poll_command_supported = info.poll_command_supported;
        drv->data_tx_status = info.data_tx_status;
        drv->channel_switch_supported = info.channel_switch_supported;
+       if (info.set_qos_map_supported)
+               drv->capa.flags |= WPA_DRIVER_FLAGS_QOS_MAPPING;
 
        /*
         * If poll command and tx status are supported, mac80211 is new enough
index 2d6272b1c6fe83e89a880419da00334919ea39f8..6f1137a8f14914c275324b1d29f138e6881d2d9e 100644 (file)
@@ -1229,7 +1229,8 @@ static void wpas_ext_capab_byte(struct wpa_supplicant *wpa_s, u8 *pos, int idx)
                break;
        case 4: /* Bits 32-39 */
 #ifdef CONFIG_INTERWORKING
-               *pos |= 0x01; /* Bit 32 - QoS Map */
+               if (wpa_s->drv_flags / WPA_DRIVER_FLAGS_QOS_MAPPING)
+                       *pos |= 0x01; /* Bit 32 - QoS Map */
 #endif /* CONFIG_INTERWORKING */
                break;
        case 5: /* Bits 40-47 */