From 3193a96ad7df4b383ab4bf5bcadb3cc8eb3ab810 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Mon, 20 Jul 2009 08:32:47 -0700 Subject: [PATCH] --- yaml --- r: 155871 b: refs/heads/master c: 5d2214ac5e7f72c9ae70b2444649e8d1d3e1086d h: refs/heads/master i: 155869: 8b4862aaa6de3f48121fcb2dee55795d040e1094 155867: a17369526011a0aef7ed13c5197485e2edacf9e8 155863: 3bd5da7d71a831194a527eb927b8df9327d39d21 155855: 785aed128ae58da31ec799ba6d9e4780f8c952a5 155839: e3b19c19dea5dc58b46c1ab25acf13e25a92e6a8 v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/ath/regd.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 1f530d019477..1321ea5d9ffc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bfa99bfdda1ce8a60f1f0fba7a04162a66d4ecfa +refs/heads/master: 5d2214ac5e7f72c9ae70b2444649e8d1d3e1086d diff --git a/trunk/drivers/net/wireless/ath/regd.c b/trunk/drivers/net/wireless/ath/regd.c index eef370bd1211..bf3d25ba7be1 100644 --- a/trunk/drivers/net/wireless/ath/regd.c +++ b/trunk/drivers/net/wireless/ath/regd.c @@ -474,6 +474,21 @@ ath_regd_init_wiphy(struct ath_regulatory *reg, return 0; } +/* + * Some users have reported their EEPROM programmed with + * 0x8000 set, this is not a supported regulatory domain + * but since we have more than one user with it we need + * a solution for them. We default to 0x64, which is the + * default Atheros world regulatory domain. + */ +static void ath_regd_sanitize(struct ath_regulatory *reg) +{ + if (reg->current_rd != COUNTRY_ERD_FLAG) + return; + printk(KERN_DEBUG "ath: EEPROM regdomain sanitized\n"); + reg->current_rd = 0x64; +} + int ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy, @@ -486,6 +501,8 @@ ath_regd_init(struct ath_regulatory *reg, if (!reg) return -EINVAL; + ath_regd_sanitize(reg); + printk(KERN_DEBUG "ath: EEPROM regdomain: 0x%0x\n", reg->current_rd); if (!ath_regd_is_eeprom_valid(reg)) {