cfg80211: fix CAC_STARTED event handling
authorDmitry Lebed <dlebed@quantenna.com>
Mon, 26 Mar 2018 13:36:31 +0000 (16:36 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 29 Mar 2018 08:21:16 +0000 (10:21 +0200)
Exclude CAC_STARTED event from !wdev->cac_started check,
since cac_started will be set later in the same function.

Signed-off-by: Dmitry Lebed <dlebed@quantenna.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/mlme.c

index 6b6818d..12b3edf 100644 (file)
@@ -872,7 +872,7 @@ void cfg80211_cac_event(struct net_device *netdev,
 
        trace_cfg80211_cac_event(netdev, event);
 
-       if (WARN_ON(!wdev->cac_started))
+       if (WARN_ON(!wdev->cac_started && event != NL80211_RADAR_CAC_STARTED))
                return;
 
        if (WARN_ON(!wdev->chandef.chan))