|
@@ -846,8 +846,18 @@ static void handle_channel(struct wiphy *wiphy,
|
|
PTR_ERR(reg_rule) == -ERANGE)
|
|
PTR_ERR(reg_rule) == -ERANGE)
|
|
return;
|
|
return;
|
|
|
|
|
|
- REG_DBG_PRINT("Disabling freq %d MHz\n", chan->center_freq);
|
|
|
|
- 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;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1250,7 +1260,8 @@ 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;
|
|
}
|
|
}
|
|
|
|
|