From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mihai Moldovan Date: Fri, 03 Aug 2012 10:04:23 +0200 Subject: [ath9k-devel] Hardware or software limitation? In-Reply-To: <1343964291.53026.YahooMailClassic@web120701.mail.ne1.yahoo.com> References: <1343964291.53026.YahooMailClassic@web120701.mail.ne1.yahoo.com> Message-ID: <501B8607.1040503@ionic.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org * 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= 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