diff options
author | Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> | 2013-09-03 13:43:18 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-10-01 07:05:59 -0400 |
commit | ff311bc11a7e2da95e1e17f99b7e4951c7060547 (patch) | |
tree | 319f900f3d9b540ef357cf7f048faa6652eb4b65 | |
parent | 1f4ffde845861acfe2eeaf6a2a965c02eecaad08 (diff) |
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>
-rw-r--r-- | net/wireless/nl80211.c | 3 |
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, | |||
5591 | if (err) | 5591 | if (err) |
5592 | return err; | 5592 | return err; |
5593 | 5593 | ||
5594 | if (netif_carrier_ok(dev)) | ||
5595 | return -EBUSY; | ||
5596 | |||
5594 | if (wdev->cac_started) | 5597 | if (wdev->cac_started) |
5595 | return -EBUSY; | 5598 | return -EBUSY; |
5596 | 5599 | ||