aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-09-11 08:34:12 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-10-17 05:02:09 -0400
commit04ecd2578e712c301fa1369d2a8f298a2b4b146a (patch)
tree81fc8135db27831f4456b61c3aeb5d332848b449 /include/net/mac80211.h
parent55de908ab292c03f1eb280f51170ddb9c6b57e31 (diff)
mac80211: track needed RX chains for channel contexts
On each channel that the device is operating on, it may need to listen using one or more chains depending on the SMPS settings of the interfaces using it. The previous channel context changes completely removed this ability (before, it was available as the SMPS mode). Add per-context tracking of the required static and dynamic RX chains and notify the driver on changes. To achieve this, track the chains and SMPS mode used on each virtual interface and update the channel context whenever this changes. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index d9d2119f082..3560881d17e 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -146,9 +146,11 @@ struct ieee80211_low_level_stats {
146/** 146/**
147 * enum ieee80211_chanctx_change - change flag for channel context 147 * enum ieee80211_chanctx_change - change flag for channel context
148 * @IEEE80211_CHANCTX_CHANGE_CHANNEL_TYPE: The channel type was changed 148 * @IEEE80211_CHANCTX_CHANGE_CHANNEL_TYPE: The channel type was changed
149 * @IEEE80211_CHANCTX_CHANGE_RX_CHAINS: The number of RX chains changed
149 */ 150 */
150enum ieee80211_chanctx_change { 151enum ieee80211_chanctx_change {
151 IEEE80211_CHANCTX_CHANGE_CHANNEL_TYPE = BIT(0), 152 IEEE80211_CHANCTX_CHANGE_CHANNEL_TYPE = BIT(0),
153 IEEE80211_CHANCTX_CHANGE_RX_CHAINS = BIT(1),
152}; 154};
153 155
154/** 156/**
@@ -159,6 +161,11 @@ enum ieee80211_chanctx_change {
159 * 161 *
160 * @channel: the channel to tune to 162 * @channel: the channel to tune to
161 * @channel_type: the channel (HT) type 163 * @channel_type: the channel (HT) type
164 * @rx_chains_static: The number of RX chains that must always be
165 * active on the channel to receive MIMO transmissions
166 * @rx_chains_dynamic: The number of RX chains that must be enabled
167 * after RTS/CTS handshake to receive SMPS MIMO transmissions;
168 * this will always be >= @rx_chains_always.
162 * @drv_priv: data area for driver use, will always be aligned to 169 * @drv_priv: data area for driver use, will always be aligned to
163 * sizeof(void *), size is determined in hw information. 170 * sizeof(void *), size is determined in hw information.
164 */ 171 */
@@ -166,6 +173,8 @@ struct ieee80211_chanctx_conf {
166 struct ieee80211_channel *channel; 173 struct ieee80211_channel *channel;
167 enum nl80211_channel_type channel_type; 174 enum nl80211_channel_type channel_type;
168 175
176 u8 rx_chains_static, rx_chains_dynamic;
177
169 u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); 178 u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *))));
170}; 179};
171 180
@@ -820,6 +829,8 @@ enum ieee80211_conf_flags {
820 * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed 829 * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed
821 * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed 830 * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed
822 * @IEEE80211_CONF_CHANGE_SMPS: Spatial multiplexing powersave mode changed 831 * @IEEE80211_CONF_CHANGE_SMPS: Spatial multiplexing powersave mode changed
832 * Note that this is only valid if channel contexts are not used,
833 * otherwise each channel context has the number of chains listed.
823 */ 834 */
824enum ieee80211_conf_changed { 835enum ieee80211_conf_changed {
825 IEEE80211_CONF_CHANGE_SMPS = BIT(1), 836 IEEE80211_CONF_CHANGE_SMPS = BIT(1),
@@ -885,7 +896,9 @@ enum ieee80211_smps_mode {
885 * 896 *
886 * @smps_mode: spatial multiplexing powersave mode; note that 897 * @smps_mode: spatial multiplexing powersave mode; note that
887 * %IEEE80211_SMPS_STATIC is used when the device is not 898 * %IEEE80211_SMPS_STATIC is used when the device is not
888 * configured for an HT channel 899 * configured for an HT channel.
900 * Note that this is only valid if channel contexts are not used,
901 * otherwise each channel context has the number of chains listed.
889 */ 902 */
890struct ieee80211_conf { 903struct ieee80211_conf {
891 u32 flags; 904 u32 flags;