From ff311bc11a7e2da95e1e17f99b7e4951c7060547 Mon Sep 17 00:00:00 2001 From: Simon Wunderlich Date: Tue, 3 Sep 2013 19:43:18 +0200 Subject: [PATCH] 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 --- net/wireless/nl80211.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.5