fix(wifi): fix country code PK miss 2.4G permission

This commit is contained in:
yinqingzhao
2025-09-18 16:16:37 +08:00
committed by BOT
parent 9ef6d3eac4
commit 76d43feca4
2 changed files with 5 additions and 3 deletions

View File

@@ -868,8 +868,9 @@ const wifi_regulatory_t regulatory_data[] = {
}, },
/* ESP_WIFI_REGULATORY_TYPE_PK */ /* ESP_WIFI_REGULATORY_TYPE_PK */
{ {
1, /* Number of rules */ 2, /* Number of rules */
{ {
{ 1, 14, 2, 30, 0, 0 }, /* chan:1~14, max_bw:40M, max_power:30(dBm), dfs:0, reserved.*/
{ 149, 173, 3, 30, 0, 0 }, /* chan:149~173, max_bw:80M, max_power:30(dBm), dfs:0, reserved.*/ { 149, 173, 3, 30, 0, 0 }, /* chan:149~173, max_bw:80M, max_power:30(dBm), dfs:0, reserved.*/
} }
}, },
@@ -1389,8 +1390,9 @@ const wifi_regulatory_t regulatory_data[] = {
}, },
/* ESP_WIFI_REGULATORY_TYPE_PK */ /* ESP_WIFI_REGULATORY_TYPE_PK */
{ {
0, /* Number of rules */ 1, /* Number of rules */
{ {
{ 1, 14, 2, 30, 0, 0 }, /* chan:1~14, max_bw:40M, max_power:30(dBm), dfs:0, reserved.*/
} }
}, },
/* ESP_WIFI_REGULATORY_TYPE_TG */ /* ESP_WIFI_REGULATORY_TYPE_TG */

View File

@@ -626,7 +626,7 @@ class DBParser(object):
pname = self._powerdup[pname] pname = self._powerdup[pname]
b = self._bands[bname] b = self._bands[bname]
p = self._power[pname] p = self._power[pname]
if (b.start >= 2400 and b.end <= 2494) or (b.start >= 5150 and b.end <= 5895): if (b.start >= 2400 and b.end <= 2500) or (b.start >= 5000 and b.end <= 5900):
try: try:
channel_tuple = self.find_channel(b.start, b.end) channel_tuple = self.find_channel(b.start, b.end)
b.start = channel_tuple[0] b.start = channel_tuple[0]