Browse Source

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 <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Simon Wunderlich 12 years ago
parent
commit
ff311bc11a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      net/wireless/nl80211.c

+ 3 - 0
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;