nl80211: Add basic rate configuration for AP mode
Add a new attribute, NL80211_ATTR_BSS_BASIC_RATES, that can be used with NL80211_CMD_SET_BSS for userspace (e.g., hostapd) to set which rates are in the basic rate set. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
fe63bfa366
commit
90c97a040d
@@ -95,6 +95,8 @@ static struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] __read_mostly = {
|
||||
[NL80211_ATTR_BSS_CTS_PROT] = { .type = NLA_U8 },
|
||||
[NL80211_ATTR_BSS_SHORT_PREAMBLE] = { .type = NLA_U8 },
|
||||
[NL80211_ATTR_BSS_SHORT_SLOT_TIME] = { .type = NLA_U8 },
|
||||
[NL80211_ATTR_BSS_BASIC_RATES] = { .type = NLA_BINARY,
|
||||
.len = NL80211_MAX_SUPP_RATES },
|
||||
|
||||
[NL80211_ATTR_MESH_PARAMS] = { .type = NLA_NESTED },
|
||||
|
||||
@@ -1613,6 +1615,12 @@ static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info)
|
||||
if (info->attrs[NL80211_ATTR_BSS_SHORT_SLOT_TIME])
|
||||
params.use_short_slot_time =
|
||||
nla_get_u8(info->attrs[NL80211_ATTR_BSS_SHORT_SLOT_TIME]);
|
||||
if (info->attrs[NL80211_ATTR_BSS_BASIC_RATES]) {
|
||||
params.basic_rates =
|
||||
nla_data(info->attrs[NL80211_ATTR_BSS_BASIC_RATES]);
|
||||
params.basic_rates_len =
|
||||
nla_len(info->attrs[NL80211_ATTR_BSS_BASIC_RATES]);
|
||||
}
|
||||
|
||||
err = get_drv_dev_by_info_ifindex(info->attrs, &drv, &dev);
|
||||
if (err)
|
||||
|
Reference in New Issue
Block a user