Commit 5bbdd6c6 authored by Thomas Pedersen's avatar Thomas Pedersen Committed by Johannes Berg

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: default avatarThomas Pedersen <thomas@cozybit.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent fc10302e
...@@ -844,6 +844,7 @@ mesh_process_plink_frame(struct ieee80211_sub_if_data *sdata, ...@@ -844,6 +844,7 @@ mesh_process_plink_frame(struct ieee80211_sub_if_data *sdata,
mpl_dbg(sdata, "Mesh plink: failed to init peer!\n"); mpl_dbg(sdata, "Mesh plink: failed to init peer!\n");
goto unlock_rcu; goto unlock_rcu;
} }
sta->plid = plid;
} }
mpl_dbg(sdata, "peer %pM in state %s got event %s\n", mgmt->sa, 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, ...@@ -857,7 +858,6 @@ mesh_process_plink_frame(struct ieee80211_sub_if_data *sdata,
break; break;
case OPN_ACPT: case OPN_ACPT:
sta->plink_state = NL80211_PLINK_OPN_RCVD; sta->plink_state = NL80211_PLINK_OPN_RCVD;
sta->plid = plid;
get_random_bytes(&llid, 2); get_random_bytes(&llid, 2);
sta->llid = llid; sta->llid = llid;
mesh_plink_timer_set(sta, mesh_plink_timer_set(sta,
...@@ -885,7 +885,6 @@ mesh_process_plink_frame(struct ieee80211_sub_if_data *sdata, ...@@ -885,7 +885,6 @@ mesh_process_plink_frame(struct ieee80211_sub_if_data *sdata,
case OPN_ACPT: case OPN_ACPT:
/* retry timer is left untouched */ /* retry timer is left untouched */
sta->plink_state = NL80211_PLINK_OPN_RCVD; sta->plink_state = NL80211_PLINK_OPN_RCVD;
sta->plid = plid;
action = WLAN_SP_MESH_PEERING_CONFIRM; action = WLAN_SP_MESH_PEERING_CONFIRM;
break; break;
case CNF_ACPT: case CNF_ACPT:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment