linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] wireless:  improve dfs-region intersection.
@ 2014-06-11 20:08 greearb
  2014-06-23 19:15 ` Luis R. Rodriguez
  0 siblings, 1 reply; 16+ messages in thread
From: greearb @ 2014-06-11 20:08 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo, Ben Greear

From: Ben Greear <greearb@candelatech.com>

If one is UN-SET, use the other.  Seems this would
be more correct that what we have now.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---

Someone that understands this code better than I
do should review this well before it is considered
for upstream.  I'm not sure it is actually needed.

 net/wireless/reg.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 785e516..b87035f 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -727,8 +727,15 @@ static enum nl80211_dfs_regions
 reg_intersect_dfs_region(const enum nl80211_dfs_regions dfs_region1,
 			 const enum nl80211_dfs_regions dfs_region2)
 {
-	if (dfs_region1 != dfs_region2)
+	if (dfs_region1 != dfs_region2) {
+		pr_info("intersect-dfs-region, region1: %d  region2: %d\n",
+			dfs_region1, dfs_region2);
+		if (dfs_region1 == NL80211_DFS_UNSET)
+			return dfs_region2;
+		if (dfs_region2 == NL80211_DFS_UNSET)
+			return dfs_region1;
 		return NL80211_DFS_UNSET;
+	}
 	return dfs_region1;
 }
 
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-06-26  6:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-11 20:08 [RFC] wireless: improve dfs-region intersection greearb
2014-06-23 19:15 ` Luis R. Rodriguez
2014-06-23 20:37   ` Ben Greear
2014-06-23 20:54     ` Luis R. Rodriguez
2014-06-23 21:20       ` Ben Greear
2014-06-24  0:44         ` Luis R. Rodriguez
2014-06-24  2:35           ` Ben Greear
2014-06-24  2:53             ` Luis R. Rodriguez
2014-06-25 16:48               ` Ben Greear
2014-06-25 17:20                 ` Luis R. Rodriguez
2014-06-25 17:34                   ` Ben Greear
2014-06-25 17:37                     ` Luis R. Rodriguez
2014-06-26  6:50                     ` Janusz Dziedzic
2014-06-24  5:47     ` Kalle Valo
2014-06-25 16:52       ` Luis R. Rodriguez
2014-06-25 17:56         ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).