Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e61421f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cfg80211: enforce disabling channels by custom or strict settings"

parents a282eba1 8cc6ab1c
Loading
Loading
Loading
Loading
+15 −1
Original line number Original line Diff line number Diff line
@@ -856,6 +856,18 @@ static void handle_channel(struct wiphy *wiphy,


		REG_DBG_PRINT("Disabling freq %d MHz\n", chan->center_freq);
		REG_DBG_PRINT("Disabling freq %d MHz\n", chan->center_freq);
		chan->flags |= IEEE80211_CHAN_DISABLED;
		chan->flags |= IEEE80211_CHAN_DISABLED;
		if (lr->initiator == NL80211_REGDOM_SET_BY_DRIVER &&
		    request_wiphy && request_wiphy == wiphy &&
		    request_wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) {
			REG_DBG_PRINT("Disabling freq %d MHz for good\n",
				      chan->center_freq);
			chan->orig_flags |= IEEE80211_CHAN_DISABLED;
			chan->flags = chan->orig_flags;
		} else {
			REG_DBG_PRINT("Disabling freq %d MHz\n",
				      chan->center_freq);
			chan->flags |= IEEE80211_CHAN_DISABLED;
			}
		return;
		return;
	}
	}


@@ -1255,7 +1267,9 @@ static void handle_channel_custom(struct wiphy *wiphy,
	if (IS_ERR(reg_rule)) {
	if (IS_ERR(reg_rule)) {
		REG_DBG_PRINT("Disabling freq %d MHz as custom regd has no rule that fits it\n",
		REG_DBG_PRINT("Disabling freq %d MHz as custom regd has no rule that fits it\n",
			      chan->center_freq);
			      chan->center_freq);
		chan->flags = IEEE80211_CHAN_DISABLED;
		chan->orig_flags |= IEEE80211_CHAN_DISABLED;
		chan->flags = chan->orig_flags;

		return;
		return;
	}
	}