aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorJavier Cardona <javier@cozybit.com>2011-05-03 19:57:11 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-11 14:44:46 -0400
commit9c3990aaec0ad9f686ef6480f6861f2df89b2a7a (patch)
tree5e073ffce0ce0aed45e9dfeb9f41efc140c770f7 /net/wireless/nl80211.c
parent0a35d36d6f019bde6c98812456798275b02e5aee (diff)
nl80211: Let userspace drive the peer link management states.
Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 64efc2d7a7ad..f698c1d116e4 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -174,6 +174,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
174 [NL80211_ATTR_OFFCHANNEL_TX_OK] = { .type = NLA_FLAG }, 174 [NL80211_ATTR_OFFCHANNEL_TX_OK] = { .type = NLA_FLAG },
175 [NL80211_ATTR_KEY_DEFAULT_TYPES] = { .type = NLA_NESTED }, 175 [NL80211_ATTR_KEY_DEFAULT_TYPES] = { .type = NLA_NESTED },
176 [NL80211_ATTR_WOWLAN_TRIGGERS] = { .type = NLA_NESTED }, 176 [NL80211_ATTR_WOWLAN_TRIGGERS] = { .type = NLA_NESTED },
177 [NL80211_ATTR_STA_PLINK_STATE] = { .type = NLA_U8 },
177}; 178};
178 179
179/* policy for the key attributes */ 180/* policy for the key attributes */
@@ -2247,6 +2248,7 @@ static int nl80211_set_station(struct sk_buff *skb, struct genl_info *info)
2247 memset(&params, 0, sizeof(params)); 2248 memset(&params, 0, sizeof(params));
2248 2249
2249 params.listen_interval = -1; 2250 params.listen_interval = -1;
2251 params.plink_state = PLINK_INVALID;
2250 2252
2251 if (info->attrs[NL80211_ATTR_STA_AID]) 2253 if (info->attrs[NL80211_ATTR_STA_AID])
2252 return -EINVAL; 2254 return -EINVAL;
@@ -2278,6 +2280,10 @@ static int nl80211_set_station(struct sk_buff *skb, struct genl_info *info)
2278 params.plink_action = 2280 params.plink_action =
2279 nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_ACTION]); 2281 nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_ACTION]);
2280 2282
2283 if (info->attrs[NL80211_ATTR_STA_PLINK_STATE])
2284 params.plink_state =
2285 nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_STATE]);
2286
2281 err = get_vlan(info, rdev, &params.vlan); 2287 err = get_vlan(info, rdev, &params.vlan);
2282 if (err) 2288 if (err)
2283 goto out; 2289 goto out;