From patchwork Fri Sep 14 06:18:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chun-Yeow Yeoh X-Patchwork-Id: 1455851 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 5777DDF280 for ; Fri, 14 Sep 2012 06:22:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754453Ab2INGWa (ORCPT ); Fri, 14 Sep 2012 02:22:30 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:44891 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754243Ab2INGW3 (ORCPT ); Fri, 14 Sep 2012 02:22:29 -0400 Received: by pbbrr13 with SMTP id rr13so5139137pbb.19 for ; Thu, 13 Sep 2012 23:22:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=t2UHf0k5I1upSrTSNMSMogd52nHwndm4NaCmxaVAejs=; b=JzLiAqTMeujv00AdhTatnCjd0uPwXUbUvw+WqqkY/Z9bxs+9/nclhBYB02zBGhi9hz /kOqSYxVkGynHOiT4oBSYWXOlB2lpuK791XhVRC+FrTebjB4ORN+FqZTg6rJssuRjfUW ToDyrr0VmugacGqn/gJQ56iXiP0iE8qZ4nWZ2JN8RKMzxMGCxYqSjEDbPGHJKp95tuSX n8jYjdjXjHNdHk3X2RptrHbdOMAFfa1nCVVO5ithZcjy3k3qxh0maIYqvmsT45gaSPVS CLshceb/HBGGAZbygpDBVEGMJ5eQwngoRdY/zMx3o+fP2gof3NyoCQdypQMjVn9EfVIu e+fw== Received: by 10.68.234.65 with SMTP id uc1mr3813826pbc.89.1347603749003; Thu, 13 Sep 2012 23:22:29 -0700 (PDT) Received: from localhost.localdomain ([58.26.233.146]) by mx.google.com with ESMTPS id iq1sm495803pbc.37.2012.09.13.23.22.26 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 13 Sep 2012 23:22:28 -0700 (PDT) From: Chun-Yeow Yeoh To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, devel@lists.open80211s.org, Chun-Yeow Yeoh Subject: [PATCH] mac80211: allow re-open the blocked peer link in mesh Date: Fri, 14 Sep 2012 14:18:31 +0800 Message-Id: <1347603511-31165-1-git-send-email-yeohchunyeow@gmail.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Peer link which is blocked using the "iw mesh0 station set plink_action block" is previously not able to re-open using "iw mesh0 station set 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 --- net/mac80211/mesh_plink.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 9d7ad36..3ab34d8 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -537,7 +537,8 @@ int mesh_plink_open(struct sta_info *sta) spin_lock_bh(&sta->lock); get_random_bytes(&llid, 2); sta->llid = llid; - if (sta->plink_state != NL80211_PLINK_LISTEN) { + if (sta->plink_state != NL80211_PLINK_LISTEN && + sta->plink_state != NL80211_PLINK_BLOCKED) { spin_unlock_bh(&sta->lock); return -EBUSY; }