summary refs log tree commit diff
path: root/net
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>2012-12-19 10:53:03 -0800
committerJohannes Berg <johannes.berg@intel.com>2013-01-03 13:01:38 +0100
commit3195e489a878aaa3b735d4a1b7c5c79b3786efed (patch)
tree020eabf127c12d52f08c27473796162536028347 /net
parent3ebfa6e76beab01e644e1facd5fdb84d4274043e (diff)
downloadlinux-3195e489a878aaa3b735d4a1b7c5c79b3786efed.tar.gz
cfg80211: move reg_is_world_roaming()
This will be used later by other code. This has no
functional change.

Tested-by: Ben Greear <greearb@candelatech.com>
Reported-by: Ben Greear <greearb@candelatech.com>
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/reg.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 2a3ae4d1001d..b68eeef45e6c 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1009,6 +1009,22 @@ static bool ignore_reg_update(struct wiphy *wiphy,
 	return false;
 }
 
+static bool reg_is_world_roaming(struct wiphy *wiphy)
+{
+	const struct ieee80211_regdomain *cr = get_cfg80211_regdom();
+	const struct ieee80211_regdomain *wr = get_wiphy_regdom(wiphy);
+	struct regulatory_request *lr = get_last_request();
+
+	if (is_world_regdom(cr->alpha2) || (wr && is_world_regdom(wr->alpha2)))
+		return true;
+
+	if (lr && lr->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE &&
+	    wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY)
+		return true;
+
+	return false;
+}
+
 static void handle_reg_beacon(struct wiphy *wiphy, unsigned int chan_idx,
 			      struct reg_beacon *reg_beacon)
 {
@@ -1085,22 +1101,6 @@ static void wiphy_update_beacon_reg(struct wiphy *wiphy)
 	}
 }
 
-static bool reg_is_world_roaming(struct wiphy *wiphy)
-{
-	const struct ieee80211_regdomain *cr = get_cfg80211_regdom();
-	const struct ieee80211_regdomain *wr = get_wiphy_regdom(wiphy);
-	struct regulatory_request *lr = get_last_request();
-
-	if (is_world_regdom(cr->alpha2) || (wr && is_world_regdom(wr->alpha2)))
-		return true;
-
-	if (lr && lr->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE &&
-	    wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY)
-		return true;
-
-	return false;
-}
-
 /* Reap the advantages of previously found beacons */
 static void reg_process_beacons(struct wiphy *wiphy)
 {