Debian Codegraph @

patches/ar9170_regdomain_override.patch

raw
1 PaulFertser> Get _your_ country code from regd.h, add 32768 and supply as a parameter.
2 [email protected]
3 --- linux-2.6.32-gentoo-r1-orig/drivers/net/wireless/ath/ar9170/main.c 2009-12-03 06:51:21.000000000 +0300
4 +++ linux-2.6.32-gentoo-r1/drivers/net/wireless/ath/ar9170/main.c 2010-01-16 02:20:36.000000000 +0300
5 @@ -53,6 +53,11 @@
6 module_param_named(ht, modparam_ht, bool, S_IRUGO);
7 MODULE_PARM_DESC(ht, "enable MPDU aggregation.");
8
9 +static int modparam_override_eeprom_regdomain = -1;
10 +module_param_named(override_eeprom_regdomain,
11 + modparam_override_eeprom_regdomain, int, S_IRUGO);
12 +MODULE_PARM_DESC(override_eeprom_regdomain, "Override regdomain hardcoded in EEPROM with this value (DANGEROUS).");
13 +
14 #define RATE(_bitrate, _hw_rate, _txpidx, _flags) { \
15 .bitrate = (_bitrate), \
16 .flags = (_flags), \
17 @@ -2687,6 +2692,14 @@
18 if (err)
19 goto err_out;
20
21 + if (modparam_override_eeprom_regdomain != -1) {
22 + dev_err(pdev, "DANGER! You're overriding EEPROM-defined regulatory domain.\n");
23 + dev_err(pdev, "Your card was not certified to operate on the domain you choosed.\n");
24 + dev_err(pdev, "This might result in a violation of your local regulatory rules.\n");
25 + dev_err(pdev, "Do not ever do that unless you really know what you do!\n");
26 + regulatory->current_rd = modparam_override_eeprom_regdomain;
27 + }
28 +
29 err = ath_regd_init(regulatory, ar->hw->wiphy,
30 ar9170_reg_notifier);
31 if (err)