From patchwork Thu Jul 12 18:49:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luis R. Rodriguez" X-Patchwork-Id: 1190311 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 1B623DFFFE for ; Thu, 12 Jul 2012 18:49:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934224Ab2GLStq (ORCPT ); Thu, 12 Jul 2012 14:49:46 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:56456 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932810Ab2GLStp (ORCPT ); Thu, 12 Jul 2012 14:49:45 -0400 Received: by mail-pb0-f46.google.com with SMTP id rp8so4121581pbb.19 for ; Thu, 12 Jul 2012 11:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=tYhKpsujZTA5olw7dnuOFGHw/Cbbtz3R0yWW1IuP+q4=; b=qXDpfPGZtpxoPFnoZQUsdQOX5xDxDEFWB1iA8bLZEobeO8CCSkKophdQRrx3D4Ievk L1iWNUlquESiSnLa+hk+YnquvPmInkSM1hEucZg1zmPrqZHL1xah68/7CJCrY6MUS/K2 P8/e0SmOihUZ2nMVGcyHkf+aOJN+RqFF21RtVVmVgL1odMmMoNYlg4i4gwwTIIWatWzZ 56H6lw9gO99SPtW2IAQzh6N4BHK6Dl5s788TPs16khpqTTGcL/A1BvxYOFRyNFgmdioP In63QQriS9Nsr+g/AKnMbbAk+52dl+DpQhGzZCHOXaQh1eZ264BZ9f03AqVy2udAjhbR 0E/w== Received: by 10.68.238.232 with SMTP id vn8mr7703866pbc.78.1342118985164; Thu, 12 Jul 2012 11:49:45 -0700 (PDT) Received: from mcgrof@gmail.com (c-24-7-61-223.hsd1.ca.comcast.net. [24.7.61.223]) by mx.google.com with ESMTPS id ip5sm4348781pbc.3.2012.07.12.11.49.43 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Jul 2012 11:49:44 -0700 (PDT) Received: by mcgrof@gmail.com (sSMTP sendmail emulation); Thu, 12 Jul 2012 11:49:42 -0700 From: "Luis R. Rodriguez" To: johannes@sipsolutions.net, linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, "Luis R. Rodriguez" Subject: [PATCH v5 4/5] cfg80211: make regulatory_update() static Date: Thu, 12 Jul 2012 11:49:20 -0700 Message-Id: <1342118961-13008-5-git-send-email-mcgrof@qca.qualcomm.com> X-Mailer: git-send-email 1.7.10.rc1.22.gf5241 In-Reply-To: <1342118961-13008-1-git-send-email-mcgrof@qca.qualcomm.com> References: <1342118961-13008-1-git-send-email-mcgrof@qca.qualcomm.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: "Luis R. Rodriguez" Now that we have wiphy_regulatory_register() we can tuck away the core's regulatory_update() call there and make it static. Signed-off-by: Luis R. Rodriguez --- net/wireless/core.c | 1 - net/wireless/reg.c | 6 ++++-- net/wireless/reg.h | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/wireless/core.c b/net/wireless/core.c index 9a64b65..693819b 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -543,7 +543,6 @@ int wiphy_register(struct wiphy *wiphy) /* set up regulatory info */ wiphy_regulatory_register(wiphy); - regulatory_update(wiphy, NL80211_REGDOM_SET_BY_CORE); list_add_rcu(&rdev->list, &cfg80211_rdev_list); cfg80211_rdev_list_generation++; diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 43b7750..b0a09b2 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1232,8 +1232,8 @@ static void wiphy_update_regulatory(struct wiphy *wiphy, wiphy->reg_notifier(wiphy, last_request); } -void regulatory_update(struct wiphy *wiphy, - enum nl80211_reg_initiator setby) +static void regulatory_update(struct wiphy *wiphy, + enum nl80211_reg_initiator setby) { mutex_lock(®_mutex); wiphy_update_regulatory(wiphy, setby); @@ -2385,6 +2385,8 @@ void wiphy_regulatory_register(struct wiphy *wiphy) reg_num_devs_support_basehint++; mutex_unlock(®_mutex); + + regulatory_update(wiphy, NL80211_REGDOM_SET_BY_CORE); } /* Caller must hold cfg80211_mutex */ diff --git a/net/wireless/reg.h b/net/wireless/reg.h index f36b15f..f023c8a 100644 --- a/net/wireless/reg.h +++ b/net/wireless/reg.h @@ -34,7 +34,6 @@ void regulatory_exit(void); int set_regdom(const struct ieee80211_regdomain *rd); -void regulatory_update(struct wiphy *wiphy, enum nl80211_reg_initiator setby); bool reg_last_request_cell_base(void); /**