From: Michal Kazior <kazikcz@gmail.com>
To: linux-wireless@vger.kernel.org,
"Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
Cc: Michal Kazior <kazikcz@gmail.com>
Subject: [PATCH] ath: sanitize 0xFFFF regdomain
Date: Sat, 23 Feb 2013 20:34:15 +0100 [thread overview]
Message-ID: <1361648055-15871-1-git-send-email-kazikcz@gmail.com> (raw)
Dbii F52N-PRO mini pci device reports an invalid
regdomain. This card has been reported to work on
MikroTik's RouterOS but failed on Linux:
[ 14.320000] ath: EEPROM regdomain: 0xffff
[ 14.320000] ath: EEPROM indicates we should expect a country code
[ 14.320000] ath: invalid regulatory domain/country code 0xbfff
[ 14.320000] ath: Invalid EEPROM contents
[ 14.320000] ath9k 0000:00:12.0: Failed to initialize device
[ 14.330000] ath9k: probe of 0000:00:12.0 failed with error -22
With the patch the device works fine.
Signed-off-by: Michal Kazior <kazikcz@gmail.com>
---
drivers/net/wireless/ath/regd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
index ccc4c71..48fb1b9 100644
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -533,10 +533,11 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
* 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.
+ * There is also at least one report of 0xFFFF being set.
*/
static void ath_regd_sanitize(struct ath_regulatory *reg)
{
- if (reg->current_rd != COUNTRY_ERD_FLAG)
+ if (reg->current_rd != COUNTRY_ERD_FLAG && reg->current_rd != 0xFFFF)
return;
printk(KERN_DEBUG "ath: EEPROM regdomain sanitized\n");
reg->current_rd = 0x64;
--
1.7.12.4
next reply other threads:[~2013-02-23 19:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-23 19:34 Michal Kazior [this message]
2013-02-23 19:45 ` [PATCH] ath: sanitize 0xFFFF regdomain Georgiewskiy Yuriy
2013-02-26 17:49 ` Michał Kazior
2013-02-26 18:12 ` Georgiewskiy Yuriy
2013-02-26 18:29 ` Luis R. Rodriguez
2013-02-26 19:28 ` Michał Kazior
2013-02-26 20:01 ` Luis R. Rodriguez
2013-02-27 0:27 ` Luis R. Rodriguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1361648055-15871-1-git-send-email-kazikcz@gmail.com \
--to=kazikcz@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@qca.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox