aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/chan.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2014-04-09 09:29:25 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-04-25 11:08:15 -0400
commit093324816b91c9f4a3dd8c78930e43d0a2ef2508 (patch)
tree0cba2cad7238206a7d565dd10d57a2b2d5a08412 /net/mac80211/chan.c
parentc2b90ad8800db308cdc0db9750c7c0baa07f40d0 (diff)
mac80211: add support for radar detection for reservations
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> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/chan.c')
-rw-r--r--net/mac80211/chan.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index fcb2cd8ffd07..4ed229c0966a 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -742,7 +742,8 @@ int ieee80211_vif_unreserve_chanctx(struct ieee80211_sub_if_data *sdata)
742 742
743int ieee80211_vif_reserve_chanctx(struct ieee80211_sub_if_data *sdata, 743int ieee80211_vif_reserve_chanctx(struct ieee80211_sub_if_data *sdata,
744 const struct cfg80211_chan_def *chandef, 744 const struct cfg80211_chan_def *chandef,
745 enum ieee80211_chanctx_mode mode) 745 enum ieee80211_chanctx_mode mode,
746 bool radar_required)
746{ 747{
747 struct ieee80211_local *local = sdata->local; 748 struct ieee80211_local *local = sdata->local;
748 struct ieee80211_chanctx_conf *conf; 749 struct ieee80211_chanctx_conf *conf;
@@ -786,6 +787,7 @@ int ieee80211_vif_reserve_chanctx(struct ieee80211_sub_if_data *sdata,
786 new_ctx->refcount++; 787 new_ctx->refcount++;
787 sdata->reserved_chanctx = new_ctx; 788 sdata->reserved_chanctx = new_ctx;
788 sdata->reserved_chandef = *chandef; 789 sdata->reserved_chandef = *chandef;
790 sdata->reserved_radar_required = radar_required;
789out: 791out:
790 mutex_unlock(&local->chanctx_mtx); 792 mutex_unlock(&local->chanctx_mtx);
791 return ret; 793 return ret;
@@ -830,6 +832,7 @@ int ieee80211_vif_use_reserved_context(struct ieee80211_sub_if_data *sdata,
830 /* unref our reservation */ 832 /* unref our reservation */
831 ctx->refcount--; 833 ctx->refcount--;
832 sdata->reserved_chanctx = NULL; 834 sdata->reserved_chanctx = NULL;
835 sdata->radar_required = sdata->reserved_radar_required;
833 836
834 if (old_ctx == ctx) { 837 if (old_ctx == ctx) {
835 /* This is our own context, just change it */ 838 /* This is our own context, just change it */