FIX: [mac80211] mark also adjacent channels (like 144) as SRD

if it is a short range device channel

BugzId: 75271
This commit is contained in:
Patrick Walther 2021-10-20 16:19:49 +02:00
parent 5c9f467797
commit 1452f94997
1 changed files with 11 additions and 0 deletions

View File

@ -959,6 +959,17 @@ index b6caa2b..fbe581a 100644
}
if (chan->orig_mpwr) {
@@ -1932,6 +1932,10 @@ static void handle_channel_adjacent_rules(struct wiphy *wiphy,
chan->dfs_cac_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
}
+ if (chan->max_reg_power <= REG_CHANNEL_LOW_PWR_DBM) {
+ chan->flags |= IEEE80211_CHAN_SRD;
+ }
+
if (chan->orig_mpwr) {
/* Devices that use REGULATORY_COUNTRY_IE_FOLLOW_POWER
* will always follow the passed country IE power settings.
@@ -2522,6 +2533,10 @@ static void handle_channel_custom(struct wiphy *wiphy,
}