Unverified Commit 6293e47f authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13024 wifi: cfg80211: Set correct chandef when starting CAC

parents d2182fca ea37b555
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -10048,7 +10048,20 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
	err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms);
	if (!err) {
		switch (wdev->iftype) {
		case NL80211_IFTYPE_AP:
		case NL80211_IFTYPE_P2P_GO:
			wdev->links[0].ap.chandef = chandef;
			break;
		case NL80211_IFTYPE_ADHOC:
			wdev->u.ibss.chandef = chandef;
			break;
		case NL80211_IFTYPE_MESH_POINT:
			wdev->u.mesh.chandef = chandef;
			break;
		default:
			break;
		}
		wdev->cac_started = true;
		wdev->cac_start_time = jiffies;
		wdev->cac_time_ms = cac_time_ms;