aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorJavier Cardona <javier@cozybit.com>2011-04-07 18:08:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-12 16:57:39 -0400
commit96b78dff0321d881ef27d858a462c476e0444619 (patch)
treeef81668e545ec6373e0793c98add1533e2435f44 /net/wireless/nl80211.c
parent53e805111b69d55834f4e1ed0a31a97ea0b9e425 (diff)
nl80211/mac80211: Perform PLINK_ACTION on new station
Modify the NEW_STATION command to accept PLINK_ACTIONS, in case userspace wants to create stations and initiate a peer link right away (for authenticated stations) or create a blocked station (for debugging). 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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index ce29a0d0e88e..f4cb8efe2e5f 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2349,11 +2349,16 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
2349 params.ht_capa = 2349 params.ht_capa =
2350 nla_data(info->attrs[NL80211_ATTR_HT_CAPABILITY]); 2350 nla_data(info->attrs[NL80211_ATTR_HT_CAPABILITY]);
2351 2351
2352 if (info->attrs[NL80211_ATTR_STA_PLINK_ACTION])
2353 params.plink_action =
2354 nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_ACTION]);
2355
2352 if (parse_station_flags(info, &params)) 2356 if (parse_station_flags(info, &params))
2353 return -EINVAL; 2357 return -EINVAL;
2354 2358
2355 if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP && 2359 if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
2356 dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP_VLAN && 2360 dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP_VLAN &&
2361 dev->ieee80211_ptr->iftype != NL80211_IFTYPE_MESH_POINT &&
2357 dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO) 2362 dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO)
2358 return -EINVAL; 2363 return -EINVAL;
2359 2364