summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/regd.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <rodrigue@qca.qualcomm.com>2011-12-08 19:29:23 +0100
committerJohn W. Linville <linville@tuxdriver.com>2011-12-13 21:30:55 +0100
commit43fcb430a4cfb7bd7c82600edeb3ca65f202a5f3 (patch)
tree053e9f280b171d116b38dd51415bd9265da2f09c /drivers/net/wireless/ath/regd.c
parentbcma: extract FEM info from SPROM (diff)
downloadlinux-43fcb430a4cfb7bd7c82600edeb3ca65f202a5f3.tar.xz
linux-43fcb430a4cfb7bd7c82600edeb3ca65f202a5f3.zip
ath: add a helper for processing reg data on init
This has no functional change. The helper can be used later for other things like country IE changes and following the CTL for different countries. Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/regd.c')
-rw-r--r--drivers/net/wireless/ath/regd.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
index 65ecb5bab25a..ed4966fdb8d3 100644
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -508,11 +508,7 @@ static void ath_regd_sanitize(struct ath_regulatory *reg)
reg->current_rd = 0x64;
}
-int
-ath_regd_init(struct ath_regulatory *reg,
- struct wiphy *wiphy,
- int (*reg_notifier)(struct wiphy *wiphy,
- struct regulatory_request *request))
+static int __ath_regd_init(struct ath_regulatory *reg)
{
struct country_code_to_enum_rd *country = NULL;
u16 regdmn;
@@ -583,7 +579,23 @@ ath_regd_init(struct ath_regulatory *reg,
printk(KERN_DEBUG "ath: Regpair used: 0x%0x\n",
reg->regpair->regDmnEnum);
+ return 0;
+}
+
+int
+ath_regd_init(struct ath_regulatory *reg,
+ struct wiphy *wiphy,
+ int (*reg_notifier)(struct wiphy *wiphy,
+ struct regulatory_request *request))
+{
+ int r;
+
+ r = __ath_regd_init(reg);
+ if (r)
+ return r;
+
ath_regd_init_wiphy(reg, wiphy, reg_notifier);
+
return 0;
}
EXPORT_SYMBOL(ath_regd_init);