aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2013-10-30 07:09:39 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-04-09 04:55:54 -0400
commit11335a550b6ac924634f0b77b7a84b6c4f3d8477 (patch)
tree1965611691bbdcba3b4ee6a5dc97c5128ae36972 /net/mac80211/ieee80211_i.h
parent77eeba974fad3046d48697f004de43cae3706927 (diff)
mac80211: implement chanctx reservation
In order to support channel switch with multiple vifs and multiple contexts, we implement a concept of channel context reservation. This allows us to reserve a channel context to be used later. The reservation functionality is not tied directly to channel switch and may be used in other situations (eg. reserving a channel context during IBSS join). We first check if an existing compatible context exists and if it does, we reserve it. If there is no compatible context we create a new one and reserve it. Additionally, split ieee80211_vif_copy_chanctx_to_vlans() so we can call it while already holding the chanctx mutex. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index c422f81d93ae..3dd21116332f 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -756,6 +756,10 @@ struct ieee80211_sub_if_data {
756 bool csa_radar_required; 756 bool csa_radar_required;
757 struct cfg80211_chan_def csa_chandef; 757 struct cfg80211_chan_def csa_chandef;
758 758
759 /* context reservation -- protected with chanctx_mtx */
760 struct ieee80211_chanctx *reserved_chanctx;
761 struct cfg80211_chan_def reserved_chandef;
762
759 /* used to reconfigure hardware SM PS */ 763 /* used to reconfigure hardware SM PS */
760 struct work_struct recalc_smps; 764 struct work_struct recalc_smps;
761 765
@@ -1771,6 +1775,15 @@ ieee80211_vif_use_channel(struct ieee80211_sub_if_data *sdata,
1771 const struct cfg80211_chan_def *chandef, 1775 const struct cfg80211_chan_def *chandef,
1772 enum ieee80211_chanctx_mode mode); 1776 enum ieee80211_chanctx_mode mode);
1773int __must_check 1777int __must_check
1778ieee80211_vif_reserve_chanctx(struct ieee80211_sub_if_data *sdata,
1779 const struct cfg80211_chan_def *chandef,
1780 enum ieee80211_chanctx_mode mode);
1781int __must_check
1782ieee80211_vif_use_reserved_context(struct ieee80211_sub_if_data *sdata,
1783 u32 *changed);
1784int ieee80211_vif_unreserve_chanctx(struct ieee80211_sub_if_data *sdata);
1785
1786int __must_check
1774ieee80211_vif_change_bandwidth(struct ieee80211_sub_if_data *sdata, 1787ieee80211_vif_change_bandwidth(struct ieee80211_sub_if_data *sdata,
1775 const struct cfg80211_chan_def *chandef, 1788 const struct cfg80211_chan_def *chandef,
1776 u32 *changed); 1789 u32 *changed);