All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mihai Moldovan <ionic@ionic.de>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] Hardware or software limitation?
Date: Fri, 03 Aug 2012 10:04:23 +0200	[thread overview]
Message-ID: <501B8607.1040503@ionic.de> (raw)
In-Reply-To: <1343964291.53026.YahooMailClassic@web120701.mail.ne1.yahoo.com>

* On 03.08.2012 05:24 AM, Seth Baker wrote:
> Yes it makes AP mode not work when EEPROM and crda restrictions
> overlap differently. Can you direct me where to get the patch?

I can only provide you with one for 3.2, latter versions may require editing
(though probably not much.) But I'll assume you know your way around.

You will also need to specify a module parameter when loading ath9k (please
consult your distribution's documentation on how to do this.)

override_eeprom_regdomain=<your country ID here>

The country ID is computed as follows:

> PaulFertser> Get _your_ country code from regd.h, add 32768 and
> supply as a parameter.

Thus, for US, that should be 840 + 32768 = 33608, i.e.,
"override_eeprom_regdomain=33608".

For instance, I'm using "override_eeprom_regdomain=33044" for the German
regulatory entry.

Patch is attached.

Best regards and good luck,


Mihai


P.S.: sorry for the late response, I have to admit to have totally forgotten
about you. :(

-------------- next part --------------
diff -ur linux-3.2-orig/drivers/net/wireless/ath/ath9k/init.c linux-3.2/drivers/net/wireless/ath/ath9k/init.c
--- linux-3.2-orig/drivers/net/wireless/ath/ath9k/init.c	2012-08-03 09:49:22.872823189 +0200
+++ linux-3.2/drivers/net/wireless/ath/ath9k/init.c	2012-08-03 09:58:49.882804322 +0200
@@ -36,6 +36,11 @@
 module_param_named(nohwcrypt, ath9k_modparam_nohwcrypt, int, 0444);
 MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
 
+static int modparam_override_eeprom_regdomain = -1;
+module_param_named(override_eeprom_regdomain, 
+                   modparam_override_eeprom_regdomain, int, S_IRUGO);
+MODULE_PARM_DESC(override_eeprom_regdomain, "Override regdomain hardcoded in EEPROM with this value (DANGEROUS).");
+
 int led_blink;
 module_param_named(blink, led_blink, int, 0444);
 MODULE_PARM_DESC(blink, "Enable LED blink on activity");
@@ -666,6 +671,7 @@
 void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
 {
 	struct ath_hw *ah = sc->sc_ah;
+	struct ath_regulatory *regulatory = ath9k_hw_regulatory(sc->sc_ah);
 	struct ath_common *common = ath9k_hw_common(ah);
 
 	hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
@@ -725,6 +731,14 @@
 		hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
 			&sc->sbands[IEEE80211_BAND_5GHZ];
 
+	if (modparam_override_eeprom_regdomain != -1) {
+		printk(KERN_ERR "ath9k: DANGER! You're overriding EEPROM-defined regulatory domain.\n");
+		printk(KERN_ERR "ath9k: Your card was not certified to operate on the domain you chose.\n");
+		printk(KERN_ERR "ath9k: This might result in a violation of your local regulatory rules.\n");
+		printk(KERN_ERR "ath9k: Do not ever do that unless you really know what you are doing!\n");
+		regulatory->current_rd = modparam_override_eeprom_regdomain;
+	}
+
 	ath9k_reload_chainmask_settings(sc);
 
 	SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4506 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20120803/807898de/attachment.bin 

       reply	other threads:[~2012-08-03  8:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1343964291.53026.YahooMailClassic@web120701.mail.ne1.yahoo.com>
2012-08-03  8:04 ` Mihai Moldovan [this message]
2012-08-01 18:47 [ath9k-devel] Hardware or software limitation? Seth Baker
2012-08-03  1:19 ` Mihai Moldovan

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=501B8607.1040503@ionic.de \
    --to=ionic@ionic.de \
    --cc=ath9k-devel@lists.ath9k.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.