Search Linux Wireless

[PATCH 1/4] cfg80211: move alpha2 helpers on reg.c for use by others

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx>
---
 net/wireless/reg.c |   74 ++++++++++++++++++++++++++--------------------------
 1 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 2acd665..f825b6d 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -59,6 +59,43 @@ static int is_world_regdom(char *alpha2)
 	return 0;
 }
 
+static int is_alpha2_set(char *alpha2)
+{
+	if (alpha2[0] != 0 && alpha2[1] != 0)
+		return 1;
+	return 0;
+}
+
+static int is_alpha_upper(char letter)
+{
+	/* ASCII A - Z */
+	if (letter >= 65 && letter <= 90)
+		return 1;
+	return 0;
+}
+
+static int is_an_alpha2(char *alpha2)
+{
+	if (is_alpha_upper(alpha2[0]) && is_alpha_upper(alpha2[1]))
+		return 1;
+	return 0;
+}
+
+static int alpha2_equal(char *alpha2_x, char *alpha2_y)
+{
+	if (alpha2_x[0] == alpha2_y[0] &&
+		alpha2_x[1] == alpha2_y[1])
+		return 1;
+	return 0;
+}
+
+static int regdom_changed(char *alpha2)
+{
+	if (alpha2_equal(cfg80211_regdomain->alpha2, alpha2))
+		return 0;
+	return 1;
+}
+
 /* This lets us keep regulatory code, which is updated on a regulatory
  * basis to userspace. */
 static int call_crda(const char *alpha2)
@@ -140,43 +177,6 @@ int regulatory_hint(struct wiphy *wiphy, const char *alpha2,
 }
 EXPORT_SYMBOL(regulatory_hint);
 
-static int is_alpha2_set(char *alpha2)
-{
-	if (alpha2[0] != 0 && alpha2[1] != 0)
-		return 1;
-	return 0;
-}
-
-static int is_alpha_upper(char letter)
-{
-	/* ASCII A - Z */
-	if (letter >= 65 && letter <= 90)
-		return 1;
-	return 0;
-}
-
-static int is_an_alpha2(char *alpha2)
-{
-	if (is_alpha_upper(alpha2[0]) && is_alpha_upper(alpha2[1]))
-		return 1;
-	return 0;
-}
-
-static int alpha2_equal(char *alpha2_x, char *alpha2_y)
-{
-	if (alpha2_x[0] == alpha2_y[0] &&
-		alpha2_x[1] == alpha2_y[1])
-		return 1;
-	return 0;
-}
-
-static int regdom_changed(char *alpha2)
-{
-	if (alpha2_equal(cfg80211_regdomain->alpha2, alpha2))
-		return 0;
-	return 1;
-}
-
 /* caller must lock cfg80211_reg_mutex */
 static int __reg_is_valid_request(char *alpha2,
 	struct regulatory_request **request)
-- 
1.5.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux