diff mbox

[v3,04/13] mac80211: add support for radar detection for reservations

Message ID 1396262371-6466-5-git-send-email-michal.kazior@tieto.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Michal Kazior March 31, 2014, 10:39 a.m. UTC
Initial chanctx reservation code wasn't aware of
radar detection requirements. This is necessary
for chanctx reservations to be used for channel
switching in the future.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 net/mac80211/chan.c        | 5 ++++-
 net/mac80211/ieee80211_i.h | 4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)

Comments

Johannes Berg April 8, 2014, 1:25 p.m. UTC | #1
On Mon, 2014-03-31 at 12:39 +0200, Michal Kazior wrote:
> Initial chanctx reservation code wasn't aware of
> radar detection requirements. This is necessary
> for chanctx reservations to be used for channel
> switching in the future.

>  int ieee80211_vif_reserve_chanctx(struct ieee80211_sub_if_data *sdata,
>  				  const struct cfg80211_chan_def *chandef,
> -				  enum ieee80211_chanctx_mode mode)
> +				  enum ieee80211_chanctx_mode mode,
> +				  bool radar_required)

Does this not have any callers?

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michal Kazior April 9, 2014, 7:05 a.m. UTC | #2
On 8 April 2014 15:25, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Mon, 2014-03-31 at 12:39 +0200, Michal Kazior wrote:
>> Initial chanctx reservation code wasn't aware of
>> radar detection requirements. This is necessary
>> for chanctx reservations to be used for channel
>> switching in the future.
>
>>  int ieee80211_vif_reserve_chanctx(struct ieee80211_sub_if_data *sdata,
>>                                 const struct cfg80211_chan_def *chandef,
>> -                               enum ieee80211_chanctx_mode mode)
>> +                               enum ieee80211_chanctx_mode mode,
>> +                               bool radar_required)
>
> Does this not have any callers?

Not yet.


Micha?
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 90cac10..cc85ad8 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -743,7 +743,8 @@  int ieee80211_vif_unreserve_chanctx(struct ieee80211_sub_if_data *sdata)
 
 int ieee80211_vif_reserve_chanctx(struct ieee80211_sub_if_data *sdata,
 				  const struct cfg80211_chan_def *chandef,
-				  enum ieee80211_chanctx_mode mode)
+				  enum ieee80211_chanctx_mode mode,
+				  bool radar_required)
 {
 	struct ieee80211_local *local = sdata->local;
 	struct ieee80211_chanctx_conf *conf;
@@ -787,6 +788,7 @@  int ieee80211_vif_reserve_chanctx(struct ieee80211_sub_if_data *sdata,
 	new_ctx->refcount++;
 	sdata->reserved_chanctx = new_ctx;
 	sdata->reserved_chandef = *chandef;
+	sdata->reserved_radar_required = radar_required;
 out:
 	mutex_unlock(&local->chanctx_mtx);
 	return ret;
@@ -831,6 +833,7 @@  int ieee80211_vif_use_reserved_context(struct ieee80211_sub_if_data *sdata,
 	/* unref our reservation */
 	ctx->refcount--;
 	sdata->reserved_chanctx = NULL;
+	sdata->radar_required = sdata->reserved_radar_required;
 
 	if (old_ctx == ctx) {
 		/* This is our own context, just change it */
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 41d9e49..a96e375 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -760,6 +760,7 @@  struct ieee80211_sub_if_data {
 	/* context reservation -- protected with chanctx_mtx */
 	struct ieee80211_chanctx *reserved_chanctx;
 	struct cfg80211_chan_def reserved_chandef;
+	bool reserved_radar_required;
 
 	/* used to reconfigure hardware SM PS */
 	struct work_struct recalc_smps;
@@ -1785,7 +1786,8 @@  ieee80211_vif_use_channel(struct ieee80211_sub_if_data *sdata,
 int __must_check
 ieee80211_vif_reserve_chanctx(struct ieee80211_sub_if_data *sdata,
 			      const struct cfg80211_chan_def *chandef,
-			      enum ieee80211_chanctx_mode mode);
+			      enum ieee80211_chanctx_mode mode,
+			      bool radar_required);
 int __must_check
 ieee80211_vif_use_reserved_context(struct ieee80211_sub_if_data *sdata,
 				   u32 *changed);