linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] cfg80211: update missing fields in custom regulatory path
@ 2014-11-16 14:37 Arik Nemtsov
  2014-11-16 14:37 ` [PATCH 2/2] cfg80211: explicitly initialize some fields in custom reg path Arik Nemtsov
  2014-11-19 17:49 ` [PATCH 1/2] cfg80211: update missing fields in custom regulatory path Johannes Berg
  0 siblings, 2 replies; 3+ messages in thread
From: Arik Nemtsov @ 2014-11-16 14:37 UTC (permalink / raw)
  To: linux-wireless; +Cc: Luis R. Rodriguez, Arik Nemtsov

Some channels fields were not being updated in the custom regulatory
path. Update them according to the code in handle_channel().

Signed-off-by: Jonathan Doron <jonathanx.doron@intel.com>
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Acked-by: Luis R. Rodriguez <mcgrof@suse.com>
---
 net/wireless/reg.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 7449a8c..a60f391 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1597,10 +1597,20 @@ static void handle_channel_custom(struct wiphy *wiphy,
 	if (max_bandwidth_khz < MHZ_TO_KHZ(160))
 		bw_flags |= IEEE80211_CHAN_NO_160MHZ;
 
+	chan->dfs_state_entered = jiffies;
 	chan->flags |= map_regdom_flags(reg_rule->flags) | bw_flags;
 	chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain);
 	chan->max_reg_power = chan->max_power =
 		(int) MBM_TO_DBM(power_rule->max_eirp);
+
+	if (chan->flags & IEEE80211_CHAN_RADAR) {
+		if (reg_rule->dfs_cac_ms)
+			chan->dfs_cac_ms = reg_rule->dfs_cac_ms;
+		else
+			chan->dfs_cac_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
+	}
+
+	chan->max_power = chan->max_reg_power;
 }
 
 static void handle_band_custom(struct wiphy *wiphy,
-- 
1.9.1


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

* [PATCH 2/2] cfg80211: explicitly initialize some fields in custom reg path
  2014-11-16 14:37 [PATCH 1/2] cfg80211: update missing fields in custom regulatory path Arik Nemtsov
@ 2014-11-16 14:37 ` Arik Nemtsov
  2014-11-19 17:49 ` [PATCH 1/2] cfg80211: update missing fields in custom regulatory path Johannes Berg
  1 sibling, 0 replies; 3+ messages in thread
From: Arik Nemtsov @ 2014-11-16 14:37 UTC (permalink / raw)
  To: linux-wireless; +Cc: Luis R. Rodriguez, Arik Nemtsov

Explicitly initialize the DFS state and beacon found state when handling
channels in the custom regulatory path.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Acked-by: Luis R. Rodriguez <mcgrof@suse.com>
---
 net/wireless/reg.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index a60f391..32d8310 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1598,6 +1598,9 @@ static void handle_channel_custom(struct wiphy *wiphy,
 		bw_flags |= IEEE80211_CHAN_NO_160MHZ;
 
 	chan->dfs_state_entered = jiffies;
+	chan->dfs_state = NL80211_DFS_USABLE;
+
+	chan->beacon_found = false;
 	chan->flags |= map_regdom_flags(reg_rule->flags) | bw_flags;
 	chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain);
 	chan->max_reg_power = chan->max_power =
-- 
1.9.1


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

* Re: [PATCH 1/2] cfg80211: update missing fields in custom regulatory path
  2014-11-16 14:37 [PATCH 1/2] cfg80211: update missing fields in custom regulatory path Arik Nemtsov
  2014-11-16 14:37 ` [PATCH 2/2] cfg80211: explicitly initialize some fields in custom reg path Arik Nemtsov
@ 2014-11-19 17:49 ` Johannes Berg
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2014-11-19 17:49 UTC (permalink / raw)
  To: Arik Nemtsov; +Cc: linux-wireless, Luis R. Rodriguez

Applied both.

johannes


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

end of thread, other threads:[~2014-11-19 17:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-16 14:37 [PATCH 1/2] cfg80211: update missing fields in custom regulatory path Arik Nemtsov
2014-11-16 14:37 ` [PATCH 2/2] cfg80211: explicitly initialize some fields in custom reg path Arik Nemtsov
2014-11-19 17:49 ` [PATCH 1/2] cfg80211: update missing fields in custom regulatory path Johannes Berg

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).