Message ID | 1378230201-25446-2-git-send-email-siwu@hrz.tu-chemnitz.de (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Tue, 2013-09-03 at 19:43 +0200, Simon Wunderlich wrote: > A CAC should fail if it is triggered while the interface is already > running. Applied, though this is a bit questionable - it forces every driver implementing this to have the same carrier semantics as mac80211. That might very well be a good thing, but those semantics aren't really documented. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index da8de5b..cbbef88 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;