Commit 2e18b38f authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Johannes Berg

cfg80211: update missing fields in custom regulatory path

Some channels fields were not being updated in the custom regulatory
path. Update them according to the code in handle_channel().
Signed-off-by: default avatarJonathan Doron <jonathanx.doron@intel.com>
Signed-off-by: default avatarArik Nemtsov <arikx.nemtsov@intel.com>
Acked-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 628c010f
...@@ -1597,10 +1597,20 @@ static void handle_channel_custom(struct wiphy *wiphy, ...@@ -1597,10 +1597,20 @@ static void handle_channel_custom(struct wiphy *wiphy,
if (max_bandwidth_khz < MHZ_TO_KHZ(160)) if (max_bandwidth_khz < MHZ_TO_KHZ(160))
bw_flags |= IEEE80211_CHAN_NO_160MHZ; bw_flags |= IEEE80211_CHAN_NO_160MHZ;
chan->dfs_state_entered = jiffies;
chan->flags |= map_regdom_flags(reg_rule->flags) | bw_flags; chan->flags |= map_regdom_flags(reg_rule->flags) | bw_flags;
chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain); chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain);
chan->max_reg_power = chan->max_power = chan->max_reg_power = chan->max_power =
(int) MBM_TO_DBM(power_rule->max_eirp); (int) MBM_TO_DBM(power_rule->max_eirp);
if (chan->flags & IEEE80211_CHAN_RADAR) {
if (reg_rule->dfs_cac_ms)
chan->dfs_cac_ms = reg_rule->dfs_cac_ms;
else
chan->dfs_cac_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
}
chan->max_power = chan->max_reg_power;
} }
static void handle_band_custom(struct wiphy *wiphy, static void handle_band_custom(struct wiphy *wiphy,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment