From patchwork Wed Mar 19 09:04:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gang ZHAO X-Patchwork-Id: 3858181 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E15C5BF549 for ; Wed, 19 Mar 2014 18:07:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1F95A200DC for ; Wed, 19 Mar 2014 18:07:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 47AC2200E1 for ; Wed, 19 Mar 2014 18:07:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758533AbaCSJEv (ORCPT ); Wed, 19 Mar 2014 05:04:51 -0400 Received: from mail-pb0-f52.google.com ([209.85.160.52]:59104 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758529AbaCSJEt (ORCPT ); Wed, 19 Mar 2014 05:04:49 -0400 Received: by mail-pb0-f52.google.com with SMTP id rr13so8660070pbb.11 for ; Wed, 19 Mar 2014 02:04:49 -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:in-reply-to:references :in-reply-to:references; bh=v5XBLqlbcwYrSXDo7TYjzxXDj+oc//A5FBzfu50sJzg=; b=UzOECfGxL74EUBEFa9W1auk8I8+RyVtzAkRYVc8dMnVqydxAAk0RC/er+Rtb842dy9 PwyfQvenBZtO+rfy3GARyNUYp4ZaCbLdiAPqt4OXxGgS3F+ltiqIRn0vlX63mGz194Zm N/rn3HqVUzrFUwLOQvhInw7xWe9GruTkBvZxsqJPzNzosRt/xIlUGDpRxakozZQUD3pP 8nSDire6bLVsr9tv8CVdR2vHG2mXuz5WCl4wTnYeA3MjzuItIOyUE8n4daX4/AA+cz/x 9Td5XZFrMIXGTShPQ4euAsZ1/mdPRdIfo5HKQeGQzYoN6N+6tztyrHRNNyLRzYSjVzCJ 2c1w== X-Received: by 10.67.2.34 with SMTP id bl2mr38383298pad.58.1395219889088; Wed, 19 Mar 2014 02:04:49 -0700 (PDT) Received: from localhost.localdomain ([175.153.40.115]) by mx.google.com with ESMTPSA id qq5sm60201510pbb.24.2014.03.19.02.04.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Mar 2014 02:04:48 -0700 (PDT) From: "Zhao, Gang" To: Cc: Johannes Berg Subject: [PATCH 2/3] cfg80211: remove macro ASSERT_RDEV_LOCK(rdev) Date: Wed, 19 Mar 2014 17:04:36 +0800 Message-Id: X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <195ce75d7f8c2db484ccea7453147289e880c148.1395219362.git.gamerh2o@gmail.com> References: <195ce75d7f8c2db484ccea7453147289e880c148.1395219362.git.gamerh2o@gmail.com> In-Reply-To: <195ce75d7f8c2db484ccea7453147289e880c148.1395219362.git.gamerh2o@gmail.com> References: <195ce75d7f8c2db484ccea7453147289e880c148.1395219362.git.gamerh2o@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Macro ASSERT_RDEV_LOCK(rdev) is equal to ASSERT_RTNL(), so replace it with ASSERT_RTNL() and remove it. Signed-off-by: Zhao, Gang --- net/wireless/core.h | 1 - net/wireless/sme.c | 1 - net/wireless/util.c | 3 +-- net/wireless/wext-sme.c | 2 +- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/net/wireless/core.h b/net/wireless/core.h index 766aabc..6ef60d3 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h @@ -166,7 +166,6 @@ static inline void wdev_unlock(struct wireless_dev *wdev) mutex_unlock(&wdev->mtx); } -#define ASSERT_RDEV_LOCK(rdev) ASSERT_RTNL() #define ASSERT_WDEV_LOCK(wdev) lockdep_assert_held(&(wdev)->mtx) static inline bool cfg80211_has_monitors_only(struct cfg80211_registered_device *rdev) diff --git a/net/wireless/sme.c b/net/wireless/sme.c index f04d4c3..acdcb4a8 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -64,7 +64,6 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev) int n_channels, err; ASSERT_RTNL(); - ASSERT_RDEV_LOCK(rdev); ASSERT_WDEV_LOCK(wdev); if (rdev->scan_req || rdev->scan_msg) diff --git a/net/wireless/util.c b/net/wireless/util.c index 57b3ce7..114bbdf 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -838,7 +838,6 @@ void cfg80211_process_rdev_events(struct cfg80211_registered_device *rdev) struct wireless_dev *wdev; ASSERT_RTNL(); - ASSERT_RDEV_LOCK(rdev); list_for_each_entry(wdev, &rdev->wdev_list, list) cfg80211_process_wdev_events(wdev); @@ -851,7 +850,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev, int err; enum nl80211_iftype otype = dev->ieee80211_ptr->iftype; - ASSERT_RDEV_LOCK(rdev); + ASSERT_RTNL(); /* don't support changing VLANs, you just re-create them */ if (otype == NL80211_IFTYPE_AP_VLAN) diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c index 14c9a25..86c331a 100644 --- a/net/wireless/wext-sme.c +++ b/net/wireless/wext-sme.c @@ -21,7 +21,7 @@ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev, const u8 *prev_bssid = NULL; int err, i; - ASSERT_RDEV_LOCK(rdev); + ASSERT_RTNL(); ASSERT_WDEV_LOCK(wdev); if (!netif_running(wdev->netdev))