cfg80211: explicitly initialize some fields in custom reg path
authorArik Nemtsov <arik@wizery.com>
Sun, 16 Nov 2014 14:37:47 +0000 (16:37 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 19 Nov 2014 17:49:33 +0000 (18:49 +0100)
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>
net/wireless/reg.c

index a60f391b30a6bfcd6110b51edb54f9c21e418f31..32d8310b0f8571201032b585d2c52fc26ad4f39d 100644 (file)
@@ -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 =