aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-08-25 04:58:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-29 16:24:09 -0400
commit36aedc903ea11a4188de0a118d26c9f20afdd272 (patch)
tree04fbd95246c146c635ad8c36929da44237aae290 /net/wireless/nl80211.c
parent7262d59366f972b898ea134639112d34bcac35b3 (diff)
mac80211/cfg80211: HT capabilities for NEW_STA
Allow userspace (e.g., hostapd) to set HT capabilities for associated STAs. This is based on a patch from Zhu Yi <yi.zhu@intel.com> (only the NL80211_ATTR_HT_CAPABILITY for NEW_STA part is included here). Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 47542ee01c57..4d6c02afd6f5 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -91,6 +91,9 @@ static struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] __read_mostly = {
91 [NL80211_ATTR_BSS_CTS_PROT] = { .type = NLA_U8 }, 91 [NL80211_ATTR_BSS_CTS_PROT] = { .type = NLA_U8 },
92 [NL80211_ATTR_BSS_SHORT_PREAMBLE] = { .type = NLA_U8 }, 92 [NL80211_ATTR_BSS_SHORT_PREAMBLE] = { .type = NLA_U8 },
93 [NL80211_ATTR_BSS_SHORT_SLOT_TIME] = { .type = NLA_U8 }, 93 [NL80211_ATTR_BSS_SHORT_SLOT_TIME] = { .type = NLA_U8 },
94
95 [NL80211_ATTR_HT_CAPABILITY] = { .type = NLA_BINARY,
96 .len = NL80211_HT_CAPABILITY_LEN },
94}; 97};
95 98
96/* message building helper */ 99/* message building helper */
@@ -1129,6 +1132,10 @@ static int nl80211_set_station(struct sk_buff *skb, struct genl_info *info)
1129 params.listen_interval = 1132 params.listen_interval =
1130 nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]); 1133 nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]);
1131 1134
1135 if (info->attrs[NL80211_ATTR_HT_CAPABILITY])
1136 params.ht_capa =
1137 nla_data(info->attrs[NL80211_ATTR_HT_CAPABILITY]);
1138
1132 if (parse_station_flags(info->attrs[NL80211_ATTR_STA_FLAGS], 1139 if (parse_station_flags(info->attrs[NL80211_ATTR_STA_FLAGS],
1133 &params.station_flags)) 1140 &params.station_flags))
1134 return -EINVAL; 1141 return -EINVAL;
@@ -1192,6 +1199,9 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
1192 params.listen_interval = 1199 params.listen_interval =
1193 nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]); 1200 nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]);
1194 params.aid = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]); 1201 params.aid = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]);
1202 if (info->attrs[NL80211_ATTR_HT_CAPABILITY])
1203 params.ht_capa =
1204 nla_data(info->attrs[NL80211_ATTR_HT_CAPABILITY]);
1195 1205
1196 if (parse_station_flags(info->attrs[NL80211_ATTR_STA_FLAGS], 1206 if (parse_station_flags(info->attrs[NL80211_ATTR_STA_FLAGS],
1197 &params.station_flags)) 1207 &params.station_flags))