aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2010-11-19 06:40:25 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-08 15:38:43 -0500
commit50b12f597be354a5a224f05c65c54c0667e57aec (patch)
treedb4c59639d3d1bc013a2c3d7e17c47db2f94efc0 /net/wireless/nl80211.c
parent7659a193f94c0003dd06e9e874d19bade1a8c952 (diff)
cfg80211: Add new BSS attribute ht_opmode
Add a new BSS attribute to allow hostapd to set the current HT opmode. Otherwise drivers won't be able to set up protection for HT rates in AP mode. Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 2cf03331d4a2..c3f80e565365 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -121,6 +121,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
121 [NL80211_ATTR_BSS_SHORT_SLOT_TIME] = { .type = NLA_U8 }, 121 [NL80211_ATTR_BSS_SHORT_SLOT_TIME] = { .type = NLA_U8 },
122 [NL80211_ATTR_BSS_BASIC_RATES] = { .type = NLA_BINARY, 122 [NL80211_ATTR_BSS_BASIC_RATES] = { .type = NLA_BINARY,
123 .len = NL80211_MAX_SUPP_RATES }, 123 .len = NL80211_MAX_SUPP_RATES },
124 [NL80211_ATTR_BSS_HT_OPMODE] = { .type = NLA_U16 },
124 125
125 [NL80211_ATTR_MESH_PARAMS] = { .type = NLA_NESTED }, 126 [NL80211_ATTR_MESH_PARAMS] = { .type = NLA_NESTED },
126 127
@@ -2462,6 +2463,7 @@ static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info)
2462 params.use_short_preamble = -1; 2463 params.use_short_preamble = -1;
2463 params.use_short_slot_time = -1; 2464 params.use_short_slot_time = -1;
2464 params.ap_isolate = -1; 2465 params.ap_isolate = -1;
2466 params.ht_opmode = -1;
2465 2467
2466 if (info->attrs[NL80211_ATTR_BSS_CTS_PROT]) 2468 if (info->attrs[NL80211_ATTR_BSS_CTS_PROT])
2467 params.use_cts_prot = 2469 params.use_cts_prot =
@@ -2480,6 +2482,9 @@ static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info)
2480 } 2482 }
2481 if (info->attrs[NL80211_ATTR_AP_ISOLATE]) 2483 if (info->attrs[NL80211_ATTR_AP_ISOLATE])
2482 params.ap_isolate = !!nla_get_u8(info->attrs[NL80211_ATTR_AP_ISOLATE]); 2484 params.ap_isolate = !!nla_get_u8(info->attrs[NL80211_ATTR_AP_ISOLATE]);
2485 if (info->attrs[NL80211_ATTR_BSS_HT_OPMODE])
2486 params.ht_opmode =
2487 nla_get_u16(info->attrs[NL80211_ATTR_BSS_HT_OPMODE]);
2483 2488
2484 if (!rdev->ops->change_bss) 2489 if (!rdev->ops->change_bss)
2485 return -EOPNOTSUPP; 2490 return -EOPNOTSUPP;