diff options
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 08d3da2c70ab..93ab840957a0 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -866,6 +866,10 @@ static void handle_channel(struct wiphy *wiphy, | |||
866 | 866 | ||
867 | if (freq_range->max_bandwidth_khz < MHZ_TO_KHZ(40)) | 867 | if (freq_range->max_bandwidth_khz < MHZ_TO_KHZ(40)) |
868 | bw_flags = IEEE80211_CHAN_NO_HT40; | 868 | bw_flags = IEEE80211_CHAN_NO_HT40; |
869 | if (freq_range->max_bandwidth_khz < MHZ_TO_KHZ(80)) | ||
870 | bw_flags |= IEEE80211_CHAN_NO_80MHZ; | ||
871 | if (freq_range->max_bandwidth_khz < MHZ_TO_KHZ(160)) | ||
872 | bw_flags |= IEEE80211_CHAN_NO_160MHZ; | ||
869 | 873 | ||
870 | if (lr->initiator == NL80211_REGDOM_SET_BY_DRIVER && | 874 | if (lr->initiator == NL80211_REGDOM_SET_BY_DRIVER && |
871 | request_wiphy && request_wiphy == wiphy && | 875 | request_wiphy && request_wiphy == wiphy && |
@@ -884,6 +888,9 @@ static void handle_channel(struct wiphy *wiphy, | |||
884 | return; | 888 | return; |
885 | } | 889 | } |
886 | 890 | ||
891 | chan->dfs_state = NL80211_DFS_USABLE; | ||
892 | chan->dfs_state_entered = jiffies; | ||
893 | |||
887 | chan->beacon_found = false; | 894 | chan->beacon_found = false; |
888 | chan->flags = flags | bw_flags | map_regdom_flags(reg_rule->flags); | 895 | chan->flags = flags | bw_flags | map_regdom_flags(reg_rule->flags); |
889 | chan->max_antenna_gain = | 896 | chan->max_antenna_gain = |
@@ -1261,6 +1268,10 @@ static void handle_channel_custom(struct wiphy *wiphy, | |||
1261 | 1268 | ||
1262 | if (freq_range->max_bandwidth_khz < MHZ_TO_KHZ(40)) | 1269 | if (freq_range->max_bandwidth_khz < MHZ_TO_KHZ(40)) |
1263 | bw_flags = IEEE80211_CHAN_NO_HT40; | 1270 | bw_flags = IEEE80211_CHAN_NO_HT40; |
1271 | if (freq_range->max_bandwidth_khz < MHZ_TO_KHZ(80)) | ||
1272 | bw_flags |= IEEE80211_CHAN_NO_80MHZ; | ||
1273 | if (freq_range->max_bandwidth_khz < MHZ_TO_KHZ(160)) | ||
1274 | bw_flags |= IEEE80211_CHAN_NO_160MHZ; | ||
1264 | 1275 | ||
1265 | chan->flags |= map_regdom_flags(reg_rule->flags) | bw_flags; | 1276 | chan->flags |= map_regdom_flags(reg_rule->flags) | bw_flags; |
1266 | chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain); | 1277 | chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain); |