author | ivan.nie <ivan.nie@amlogic.com> | 2018-08-31 02:48:36 (GMT) |
---|---|---|
committer | Xiaoliang Wang <xiaoliang.wang@amlogic.com> | 2019-04-17 14:52:11 (GMT) |
commit | 362ac04d1399a67e151487ee4ee592e625d0a9a5 (patch) | |
tree | baac6d68609b1c639561c4a4598aa2f972163017 | |
parent | c777ea7347c3b6226537aa168ff580a475a3118b (diff) | |
download | common-362ac04d1399a67e151487ee4ee592e625d0a9a5.zip common-362ac04d1399a67e151487ee4ee592e625d0a9a5.tar.gz common-362ac04d1399a67e151487ee4ee592e625d0a9a5.tar.bz2 |
wifi: get country code from bootargs
PD#172755
Change-Id: I163b6311356bb398ede18a9e7f2fab043d04c751
-rw-r--r-- | drivers/amlogic/wifi/wifi_dt.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/amlogic/wifi/wifi_dt.c b/drivers/amlogic/wifi/wifi_dt.c index 8a3219b..f81a62b 100644 --- a/drivers/amlogic/wifi/wifi_dt.c +++ b/drivers/amlogic/wifi/wifi_dt.c @@ -814,6 +814,29 @@ u8 *wifi_get_mac(void) } EXPORT_SYMBOL(wifi_get_mac); +char *country_code_ptr; +char wifi_country_code[20] = "null"; + +static int __init country_code_set(char *str) +{ + if (str != NULL) { + sprintf(wifi_country_code, "%s", str); + country_code_ptr = wifi_country_code; + } else { + country_code_ptr = NULL; + } + + return 0; +} + +__setup("androidboot.wificountrycode=", country_code_set); + +char *wifi_get_country_code(void) +{ + return country_code_ptr; +} +EXPORT_SYMBOL(wifi_get_country_code); + void extern_wifi_set_enable(int is_on) { |