Skip to content

Commit

Permalink
cfg80211: explicitly initialize some fields in custom reg path
Browse files Browse the repository at this point in the history
Explicitly initialize the DFS state and beacon found state when handling
channels in the custom regulatory path.

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>
  • Loading branch information
Arik Nemtsov authored and Johannes Berg committed Nov 19, 2014
1 parent 2e18b38 commit c7ab508
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1598,6 +1598,9 @@ static void handle_channel_custom(struct wiphy *wiphy,
bw_flags |= IEEE80211_CHAN_NO_160MHZ;

chan->dfs_state_entered = jiffies;
chan->dfs_state = NL80211_DFS_USABLE;

chan->beacon_found = false;
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_reg_power = chan->max_power =
Expand Down

0 comments on commit c7ab508

Please sign in to comment.