Skip to content

Commit

Permalink
nl80211: allow CAC only if no operation is going on
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Simon Wunderlich authored and Johannes Berg committed Oct 1, 2013
1 parent 1f4ffde commit ff311bc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ff311bc

Please sign in to comment.