-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpatch-ath-regd-5.10.diff
More file actions
27 lines (23 loc) · 910 Bytes
/
Copy pathpatch-ath-regd-5.10.diff
File metadata and controls
27 lines (23 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- linux-source-5.10/drivers/net/wireless/ath/regd.c 2021-08-31 16:26:14.301899353 -0400
+++ linux-source-5.10-b/drivers/net/wireless/ath/regd.c 2021-08-25 21:00:09.898791698 -0400
@@ -23,6 +23,10 @@
#include "regd.h"
#include "regd_common.h"
+char *user_country_name = "";
+module_param_named(cn, user_country_name, charp, S_IRUGO);
+MODULE_PARM_DESC(cn, "Country Name");
+
static int __ath_regd_init(struct ath_regulatory *reg);
/*
@@ -697,7 +701,12 @@
}
regdmn = ath_regd_get_eepromRD(reg);
- reg->country_code = ath_regd_get_default_country(regdmn);
+ reg->country_code = ath_regd_find_country_by_name(user_country_name);
+ if (reg->country_code != (u16) -1) {
+ printk(KERN_DEBUG "ath: User Override Country Code\n");
+ } else {
+ reg->country_code = ath_regd_get_default_country(regdmn);
+ }
if (reg->country_code == CTRY_DEFAULT &&
regdmn == CTRY_DEFAULT) {