]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
nl80211/mac80211: Perform PLINK_ACTION on new station
authorJavier Cardona <javier@cozybit.com>
Thu, 7 Apr 2011 22:08:33 +0000 (15:08 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 12 Apr 2011 20:57:39 +0000 (16:57 -0400)
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>
net/mac80211/mesh_plink.c
net/wireless/nl80211.c

index 5d0dd9217e5fbb59b9c63a083f93e9f0c90de59a..b327e0e6c730ed223ce33af1c5b240540bd29481 100644 (file)
@@ -105,7 +105,7 @@ static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata,
        if (!sta)
                return NULL;
 
-       sta->flags = WLAN_STA_AUTHORIZED;
+       sta->flags = WLAN_STA_AUTHORIZED | WLAN_STA_AUTH;
        sta->sta.supp_rates[local->hw.conf.channel->band] = rates;
        rate_control_rate_init(sta);
 
index ce29a0d0e88e32fa2d713d61790e9e4e5b8bf44c..f4cb8efe2e5f9d67411ec3c5b4fa52fa2f61a811 100644 (file)
@@ -2349,11 +2349,16 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
                params.ht_capa =
                        nla_data(info->attrs[NL80211_ATTR_HT_CAPABILITY]);
 
+       if (info->attrs[NL80211_ATTR_STA_PLINK_ACTION])
+               params.plink_action =
+                   nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_ACTION]);
+
        if (parse_station_flags(info, &params))
                return -EINVAL;
 
        if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
            dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP_VLAN &&
+           dev->ieee80211_ptr->iftype != NL80211_IFTYPE_MESH_POINT &&
            dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO)
                return -EINVAL;