All of
 help / color / mirror / Atom feed
From: Sriram R <>
Cc:, Sriram R <>
Subject: [PATCH] cfg80211: Fetch wiphy DFS domain if it is self-managed
Date: Thu, 26 Aug 2021 05:08:50 +0530	[thread overview]
Message-ID: <> (raw)

Currently during CAC start or other radar events, the DFS
domain is fetched from cfg based on global DFS setting.

But this could be different in case of self managed wiphy's
in case the self managed driver updates its database or supports
regions which has DFS domain set to UNSET in cfg80211 local

This avoids AP bringup failure for these self-managed drivers
when such conflict occurs.

Signed-off-by: Sriram R <>
 net/wireless/reg.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index c2d0ff7..78626e7 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -171,6 +171,7 @@ enum nl80211_dfs_regions reg_get_dfs_region(struct wiphy *wiphy)
 	const struct ieee80211_regdomain *regd = NULL;
 	const struct ieee80211_regdomain *wiphy_regd = NULL;
+	enum nl80211_dfs_regions dfs_region;
 	regd = get_cfg80211_regdom();
@@ -182,6 +183,13 @@ enum nl80211_dfs_regions reg_get_dfs_region(struct wiphy *wiphy)
 	if (!wiphy_regd)
 		goto out;
+	/* In case the wiphy is self managed, return its dfs domain */
+	if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED) {
+		dfs_region = wiphy_regd->dfs_region;
+		rcu_read_unlock();
+		return dfs_region;
+	}
 	if (wiphy_regd->dfs_region == regd->dfs_region)
 		goto out;

                 reply	other threads:[~2021-08-25 23:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.