summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Pedersen <thomas@cozybit.com>2013-11-05 11:17:01 -0800
committerJohannes Berg <johannes.berg@intel.com>2013-11-25 20:50:20 +0100
commit5bbdd6c646547046e6c4e0fc9eef78d29a7c3984 (patch)
tree14530d304efff807f7a3ec39fd0273fe43b6974b
parentfc10302ef1d22ec559b94a22c3b6b1fc7180240e (diff)
downloadblackbird-obmc-linux-5bbdd6c646547046e6c4e0fc9eef78d29a7c3984.tar.gz
blackbird-obmc-linux-5bbdd6c646547046e6c4e0fc9eef78d29a7c3984.zip
mac80211: assign sta plid early
If we store the peer link ID right after initializing a new neighbor, there is no need to do it later in the peering FSM. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/mesh_plink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index e70f49018853..fa86d354f622 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -844,6 +844,7 @@ mesh_process_plink_frame(struct ieee80211_sub_if_data *sdata,
mpl_dbg(sdata, "Mesh plink: failed to init peer!\n");
goto unlock_rcu;
}
+ sta->plid = plid;
}
mpl_dbg(sdata, "peer %pM in state %s got event %s\n", mgmt->sa,
@@ -857,7 +858,6 @@ mesh_process_plink_frame(struct ieee80211_sub_if_data *sdata,
break;
case OPN_ACPT:
sta->plink_state = NL80211_PLINK_OPN_RCVD;
- sta->plid = plid;
get_random_bytes(&llid, 2);
sta->llid = llid;
mesh_plink_timer_set(sta,
@@ -885,7 +885,6 @@ mesh_process_plink_frame(struct ieee80211_sub_if_data *sdata,
case OPN_ACPT:
/* retry timer is left untouched */
sta->plink_state = NL80211_PLINK_OPN_RCVD;
- sta->plid = plid;
action = WLAN_SP_MESH_PEERING_CONFIRM;
break;
case CNF_ACPT:
OpenPOWER on IntegriCloud