Advertise QoS Map support based on driver capability

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>
This commit is contained in:
Jouni Malinen 2013-12-23 11:05:20 +02:00 committed by Jouni Malinen
parent 049105b486
commit 429dd9aff1
3 changed files with 10 additions and 1 deletions

View 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;

View 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

View 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 */