linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ZHAO Gang <gamerh2o@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] cfg80211: remove function reg_process_beacons()
Date: Wed, 18 Dec 2013 20:56:38 +0800	[thread overview]
Message-ID: <db1bee094cd6ead618cb41fb7831503be0b4e3ef.1387371372.git.gamerh2o@gmail.com> (raw)

Since pointer last_request is initialized to &core_request_world, the
if check in reg_process_beacons() is useless, and
reg_process_beacons() is only called by wiphy_update_regulatory(), so
we can let wiphy_update_regulatory() calls wiphy_update_beacon_reg()
directly and remove unnecesssary reg_process_beacons().

Signed-off-by: ZHAO Gang <gamerh2o@gmail.com>
---
 net/wireless/reg.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index ec54e1a..b833bea 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1163,18 +1163,6 @@ static void wiphy_update_beacon_reg(struct wiphy *wiphy)
 	}
 }
 
-/* Reap the advantages of previously found beacons */
-static void reg_process_beacons(struct wiphy *wiphy)
-{
-	/*
-	 * Means we are just firing up cfg80211, so no beacons would
-	 * have been processed yet.
-	 */
-	if (!last_request)
-		return;
-	wiphy_update_beacon_reg(wiphy);
-}
-
 static bool is_ht40_allowed(struct ieee80211_channel *chan)
 {
 	if (!chan)
@@ -1281,7 +1269,7 @@ static void wiphy_update_regulatory(struct wiphy *wiphy,
 	for (band = 0; band < IEEE80211_NUM_BANDS; band++)
 		handle_band(wiphy, initiator, wiphy->bands[band]);
 
-	reg_process_beacons(wiphy);
+	wiphy_update_beacon_reg(wiphy);
 	reg_process_ht_flags(wiphy);
 	reg_call_notifier(wiphy, lr);
 }
-- 
1.8.3.1


                 reply	other threads:[~2013-12-18 13:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=db1bee094cd6ead618cb41fb7831503be0b4e3ef.1387371372.git.gamerh2o@gmail.com \
    --to=gamerh2o@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).