aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/regd.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <rodrigue@qca.qualcomm.com>2011-12-08 13:29:23 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-12-13 15:30:55 -0500
commit43fcb430a4cfb7bd7c82600edeb3ca65f202a5f3 (patch)
tree053e9f280b171d116b38dd51415bd9265da2f09c /drivers/net/wireless/ath/regd.c
parentaee5ed563d56c713d2a51d6f16e08b83fd9665d5 (diff)
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)
508 reg->current_rd = 0x64; 508 reg->current_rd = 0x64;
509} 509}
510 510
511int 511static int __ath_regd_init(struct ath_regulatory *reg)
512ath_regd_init(struct ath_regulatory *reg,
513 struct wiphy *wiphy,
514 int (*reg_notifier)(struct wiphy *wiphy,
515 struct regulatory_request *request))
516{ 512{
517 struct country_code_to_enum_rd *country = NULL; 513 struct country_code_to_enum_rd *country = NULL;
518 u16 regdmn; 514 u16 regdmn;
@@ -583,7 +579,23 @@ ath_regd_init(struct ath_regulatory *reg,
583 printk(KERN_DEBUG "ath: Regpair used: 0x%0x\n", 579 printk(KERN_DEBUG "ath: Regpair used: 0x%0x\n",
584 reg->regpair->regDmnEnum); 580 reg->regpair->regDmnEnum);
585 581
582 return 0;
583}
584
585int
586ath_regd_init(struct ath_regulatory *reg,
587 struct wiphy *wiphy,
588 int (*reg_notifier)(struct wiphy *wiphy,
589 struct regulatory_request *request))
590{
591 int r;
592
593 r = __ath_regd_init(reg);
594 if (r)
595 return r;
596
586 ath_regd_init_wiphy(reg, wiphy, reg_notifier); 597 ath_regd_init_wiphy(reg, wiphy, reg_notifier);
598
587 return 0; 599 return 0;
588} 600}
589EXPORT_SYMBOL(ath_regd_init); 601EXPORT_SYMBOL(ath_regd_init);