Commit 9385d04f2872057a2029901190391fe192b18693

Authored by Chun-Yeow Yeoh
Committed by Johannes Berg
1 parent 5d8e4237d2

mac80211: allow re-open the blocked peer link in mesh

Peer link which is blocked using the "iw mesh0 station
set <MAC addr> plink_action block" is previously not able
to re-open using "iw mesh0 station set <MAC addr>
plink_action open". This patch is intended to solve this.

If the station plink state remains at OPN_SNT once open,
try block and open again should solve this problem.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

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

net/mac80211/mesh_plink.c
... ... @@ -537,7 +537,8 @@
537 537 spin_lock_bh(&sta->lock);
538 538 get_random_bytes(&llid, 2);
539 539 sta->llid = llid;
540   - if (sta->plink_state != NL80211_PLINK_LISTEN) {
  540 + if (sta->plink_state != NL80211_PLINK_LISTEN &&
  541 + sta->plink_state != NL80211_PLINK_BLOCKED) {
541 542 spin_unlock_bh(&sta->lock);
542 543 return -EBUSY;
543 544 }