nl80211: Add support for QoS Map configuration
This allows nl80211-based drivers to configure QoS Mapping in both AP and station modes. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
74ddd64b26
commit
049105b486
1 changed files with 32 additions and 0 deletions
|
@ -11394,6 +11394,37 @@ error:
|
|||
}
|
||||
|
||||
|
||||
static int nl80211_set_qos_map(void *priv, const u8 *qos_map_set,
|
||||
u8 qos_map_set_len)
|
||||
{
|
||||
struct i802_bss *bss = priv;
|
||||
struct wpa_driver_nl80211_data *drv = bss->drv;
|
||||
struct nl_msg *msg;
|
||||
int ret;
|
||||
|
||||
msg = nlmsg_alloc();
|
||||
if (!msg)
|
||||
return -ENOMEM;
|
||||
|
||||
wpa_hexdump(MSG_DEBUG, "nl80211: Setting QoS Map",
|
||||
qos_map_set, qos_map_set_len);
|
||||
|
||||
nl80211_cmd(drv, msg, 0, NL80211_CMD_SET_QOS_MAP);
|
||||
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
|
||||
NLA_PUT(msg, NL80211_ATTR_QOS_MAP, qos_map_set_len, qos_map_set);
|
||||
|
||||
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
|
||||
if (ret)
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Setting QoS Map failed");
|
||||
|
||||
return ret;
|
||||
|
||||
nla_put_failure:
|
||||
nlmsg_free(msg);
|
||||
return -ENOBUFS;
|
||||
}
|
||||
|
||||
|
||||
const struct wpa_driver_ops wpa_driver_nl80211_ops = {
|
||||
.name = "nl80211",
|
||||
.desc = "Linux nl80211/cfg80211",
|
||||
|
@ -11482,4 +11513,5 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
|
|||
#ifdef ANDROID
|
||||
.driver_cmd = wpa_driver_nl80211_driver_cmd,
|
||||
#endif /* ANDROID */
|
||||
.set_qos_map = nl80211_set_qos_map,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue