From: Simon Wunderlich Date: Tue, 3 Sep 2013 17:43:18 +0000 (+0200) Subject: nl80211: allow CAC only if no operation is going on X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ff311bc11a7e2da95e1e17f99b7e4951c7060547;p=linux-beck.git nl80211: allow CAC only if no operation is going on A CAC should fail if it is triggered while the interface is already running. Signed-off-by: Simon Wunderlich Signed-off-by: Mathias Kretschmer Signed-off-by: Johannes Berg --- diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index ae617112b8f5..2838206ddad3 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -5591,6 +5591,9 @@ static int nl80211_start_radar_detection(struct sk_buff *skb, if (err) return err; + if (netif_carrier_ok(dev)) + return -EBUSY; + if (wdev->cac_started) return -EBUSY;