Commit 5bbdd6c646547046e6c4e0fc9eef78d29a7c3984

Authored by Thomas Pedersen
Committed by Johannes Berg
1 parent fc10302ef1

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>

Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff

net/mac80211/mesh_plink.c
... ... @@ -844,6 +844,7 @@
844 844 mpl_dbg(sdata, "Mesh plink: failed to init peer!\n");
845 845 goto unlock_rcu;
846 846 }
  847 + sta->plid = plid;
847 848 }
848 849  
849 850 mpl_dbg(sdata, "peer %pM in state %s got event %s\n", mgmt->sa,
... ... @@ -857,7 +858,6 @@
857 858 break;
858 859 case OPN_ACPT:
859 860 sta->plink_state = NL80211_PLINK_OPN_RCVD;
860   - sta->plid = plid;
861 861 get_random_bytes(&llid, 2);
862 862 sta->llid = llid;
863 863 mesh_plink_timer_set(sta,
... ... @@ -885,7 +885,6 @@
885 885 case OPN_ACPT:
886 886 /* retry timer is left untouched */
887 887 sta->plink_state = NL80211_PLINK_OPN_RCVD;
888   - sta->plid = plid;
889 888 action = WLAN_SP_MESH_PEERING_CONFIRM;
890 889 break;
891 890 case CNF_ACPT: