summaryrefslogtreecommitdiff
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>2013-09-03 19:43:18 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-10-01 13:05:59 +0200
commitff311bc11a7e2da95e1e17f99b7e4951c7060547 (patch)
tree319f900f3d9b540ef357cf7f048faa6652eb4b65 /net/wireless/nl80211.c
parent1f4ffde845861acfe2eeaf6a2a965c02eecaad08 (diff)
downloadlwn-ff311bc11a7e2da95e1e17f99b7e4951c7060547.tar.gz
lwn-ff311bc11a7e2da95e1e17f99b7e4951c7060547.zip
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>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c3
1 files changed, 3 insertions, 0 deletions
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;