From 8822215d4a793b5e8fd0b322ada79da56168fa71 Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Tue, 3 Jan 2023 06:29:21 -0800 Subject: [PATCH] Make the default country HX (HAM) (#614) --- patches/702-enable-country-hx.patch | 39 ++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/patches/702-enable-country-hx.patch b/patches/702-enable-country-hx.patch index 033cecc2..d04f69e1 100644 --- a/patches/702-enable-country-hx.patch +++ b/patches/702-enable-country-hx.patch @@ -1,7 +1,7 @@ Index: openwrt/package/firmware/wireless-regdb/patches/999-add-country-hx.patch =================================================================== --- /dev/null -+++ openwrt/package/firmware/wireless-regdb/patches/999-add-country-hx.patch ++++ b/package/firmware/wireless-regdb/patches/999-add-country-hx.patch @@ -0,0 +1,13 @@ +--- a/db.txt 2018-03-15 23:56:11.181999704 -0500 ++++ b/db.txt 2018-03-11 18:12:17.230049926 -0500 @@ -16,3 +16,40 @@ Index: openwrt/package/firmware/wireless-regdb/patches/999-add-country-hx.patch + country ID: DFS-JP + # ref: http://www.postel.go.id/content/ID/regulasi/standardisasi/kepdir/bwa%205,8%20ghz.pdf + (2402 - 2482 @ 20), (20) +--- /dev/null ++++ b/package/kernel/mac80211/patches/ath/302-add-country-hx.patch +@@ -0,0 +1,34 @@ ++--- a/drivers/net/wireless/ath/regd_common.h +++++ b/drivers/net/wireless/ath/regd_common.h ++@@ -498,6 +498,8 @@ ++ {CTRY_VIET_NAM, NULL1_WORLD, "VN"}, ++ {CTRY_YEMEN, NULL1_WORLD, "YE"}, ++ {CTRY_ZIMBABWE, ETSI1_WORLD, "ZW"}, +++ /* HAM */ +++ {CTRY_HAM_RADIO, WOR0_WORLD, "HX"}, ++ }; ++ ++ #endif ++--- a/drivers/net/wireless/ath/regd.h +++++ b/drivers/net/wireless/ath/regd.h ++@@ -254,7 +254,8 @@ ++ CTRY_JAPAN59 = 4059, ++ CTRY_AUSTRALIA2 = 5000, ++ CTRY_CANADA2 = 5001, ++- CTRY_BELGIUM2 = 5002 +++ CTRY_BELGIUM2 = 5002, +++ CTRY_HAM_RADIO = 5003 ++ }; ++ ++ bool ath_is_world_regd(struct ath_regulatory *reg); ++--- a/drivers/net/wireless/ath/regd.c +++++ b/drivers/net/wireless/ath/regd.c ++@@ -743,7 +743,7 @@ ++ regdmn == CTRY_DEFAULT) { ++ printk(KERN_DEBUG "ath: EEPROM indicates default " ++ "country code should be used\n"); ++- reg->country_code = CTRY_UNITED_STATES; +++ reg->country_code = CTRY_HAM_RADIO; ++ } ++ ++ if (reg->country_code == CTRY_DEFAULT) {