aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2014-11-16 09:37:46 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-11-19 12:49:33 -0500
commit2e18b38fc8fb0323804e4a7812cb1a8ea78b9dd7 (patch)
treec266dd00141b933ca4ef118a06cc9a3b43d68ad3 /net
parent628c010f1f395459e6871e15b8dbd6f8c8045285 (diff)
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: Jonathan Doron <jonathanx.doron@intel.com> Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Acked-by: Luis R. Rodriguez <mcgrof@suse.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/reg.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 7449a8c0f9fd..a60f391b30a6 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1597,10 +1597,20 @@ static void handle_channel_custom(struct wiphy *wiphy,
1597 if (max_bandwidth_khz < MHZ_TO_KHZ(160)) 1597 if (max_bandwidth_khz < MHZ_TO_KHZ(160))
1598 bw_flags |= IEEE80211_CHAN_NO_160MHZ; 1598 bw_flags |= IEEE80211_CHAN_NO_160MHZ;
1599 1599
1600 chan->dfs_state_entered = jiffies;
1600 chan->flags |= map_regdom_flags(reg_rule->flags) | bw_flags; 1601 chan->flags |= map_regdom_flags(reg_rule->flags) | bw_flags;
1601 chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain); 1602 chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain);
1602 chan->max_reg_power = chan->max_power = 1603 chan->max_reg_power = chan->max_power =
1603 (int) MBM_TO_DBM(power_rule->max_eirp); 1604 (int) MBM_TO_DBM(power_rule->max_eirp);
1605
1606 if (chan->flags & IEEE80211_CHAN_RADAR) {
1607 if (reg_rule->dfs_cac_ms)
1608 chan->dfs_cac_ms = reg_rule->dfs_cac_ms;
1609 else
1610 chan->dfs_cac_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
1611 }
1612
1613 chan->max_power = chan->max_reg_power;
1604} 1614}
1605 1615
1606static void handle_band_custom(struct wiphy *wiphy, 1616static void handle_band_custom(struct wiphy *wiphy,