Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19c60477 authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cfg80211: Use new wiphy flag WIPHY_FLAG_DFS_OFFLOAD" into msm-4.8

parents 7ace5b94 42839af7
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -319,7 +319,8 @@ static int cfg80211_get_chans_dfs_required(struct wiphy *wiphy,
		if (!c)
			return -EINVAL;

		if (c->flags & IEEE80211_CHAN_RADAR)
		if ((c->flags & IEEE80211_CHAN_RADAR) &&
		    !(wiphy->flags & WIPHY_FLAG_DFS_OFFLOAD))
			return 1;
	}
	return 0;
@@ -592,10 +593,15 @@ static bool cfg80211_secondary_chans_ok(struct wiphy *wiphy,

	for (freq = start_freq; freq <= end_freq; freq += 20) {
		c = ieee80211_get_channel(wiphy, freq);
		if (!c || c->flags & prohibited_flags)

		if (!c)
			return false;
		/* check for radar flags */
		if ((!(wiphy->flags & WIPHY_FLAG_DFS_OFFLOAD)) &&
		    (prohibited_flags & c->flags & IEEE80211_CHAN_RADAR) &&
		    (c->dfs_state != NL80211_DFS_AVAILABLE))
			return false;
	}

	return true;
}

+3 −0
Original line number Diff line number Diff line
@@ -7212,6 +7212,9 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
	if (netif_carrier_ok(dev))
		return -EBUSY;

	if (rdev->wiphy.flags & WIPHY_FLAG_DFS_OFFLOAD)
		return -EOPNOTSUPP;

	if (wdev->cac_started)
		return -EBUSY;