Return-path: Received: from wolverine02.qualcomm.com ([199.106.114.251]:14738 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751166Ab1LHS3g (ORCPT ); Thu, 8 Dec 2011 13:29:36 -0500 Cc: , "Luis R. Rodriguez" , "Luis R. Rodriguez" From: Rajkumar Manoharan To: Subject: [PATCH RESEND 1/4] ath: add a helper for processing reg data on init Date: Thu, 8 Dec 2011 23:59:23 +0530 Message-ID: <1323368966-10001-1-git-send-email-rmanohar@qca.qualcomm.com> (sfid-20111208_192940_109871_A6A28726) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org List-ID: From: "Luis R. Rodriguez" 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 Acked-by: Luis R. Rodriguez --- drivers/net/wireless/ath/regd.c | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c index 65ecb5b..ed4966f 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); -- 1.7.8