diff options
author | Eliad Peller <eliad@wizery.com> | 2013-11-11 13:14:01 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-11-25 14:52:05 -0500 |
commit | 21f659bf1f93f7052b977d95cca560f02dc2edce (patch) | |
tree | 4c6634f65996b574b512f864fb77337ba34fbb1c /include/net/mac80211.h | |
parent | fbdd90ea830162960fb8fbe377dfef9a54d74d2f (diff) |
mac80211: add min required channel definition field
Add a new field to ieee80211_chanctx_conf to indicate
the min required channel configuration.
Tuning to a narrower channel might help reducing
the noise level and saving some power.
The min required channel definition is the max of
all min required channel definitions of the interfaces
bound to this channel context.
In AP mode, use 20MHz when there are no connected station.
When a new station is added/removed, calculate the new max
bandwidth supported by any of the stations (e.g. 80MHz when
80MHz and 40MHz stations are connected).
In other cases, simply use bss_conf.chandef as the
min required chandef.
Notify drivers about changes to this field by calling
drv_change_chanctx with a new CHANGE_MIN_WIDTH notification.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index cca02b2f5c7e..3cd408b326de 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -154,12 +154,14 @@ struct ieee80211_low_level_stats { | |||
154 | * @IEEE80211_CHANCTX_CHANGE_RADAR: radar detection flag changed | 154 | * @IEEE80211_CHANCTX_CHANGE_RADAR: radar detection flag changed |
155 | * @IEEE80211_CHANCTX_CHANGE_CHANNEL: switched to another operating channel, | 155 | * @IEEE80211_CHANCTX_CHANGE_CHANNEL: switched to another operating channel, |
156 | * this is used only with channel switching with CSA | 156 | * this is used only with channel switching with CSA |
157 | * @IEEE80211_CHANCTX_CHANGE_MIN_WIDTH: The min required channel width changed | ||
157 | */ | 158 | */ |
158 | enum ieee80211_chanctx_change { | 159 | enum ieee80211_chanctx_change { |
159 | IEEE80211_CHANCTX_CHANGE_WIDTH = BIT(0), | 160 | IEEE80211_CHANCTX_CHANGE_WIDTH = BIT(0), |
160 | IEEE80211_CHANCTX_CHANGE_RX_CHAINS = BIT(1), | 161 | IEEE80211_CHANCTX_CHANGE_RX_CHAINS = BIT(1), |
161 | IEEE80211_CHANCTX_CHANGE_RADAR = BIT(2), | 162 | IEEE80211_CHANCTX_CHANGE_RADAR = BIT(2), |
162 | IEEE80211_CHANCTX_CHANGE_CHANNEL = BIT(3), | 163 | IEEE80211_CHANCTX_CHANGE_CHANNEL = BIT(3), |
164 | IEEE80211_CHANCTX_CHANGE_MIN_WIDTH = BIT(4), | ||
163 | }; | 165 | }; |
164 | 166 | ||
165 | /** | 167 | /** |
@@ -169,6 +171,7 @@ enum ieee80211_chanctx_change { | |||
169 | * that contains it is visible in mac80211 only. | 171 | * that contains it is visible in mac80211 only. |
170 | * | 172 | * |
171 | * @def: the channel definition | 173 | * @def: the channel definition |
174 | * @min_def: the minimum channel definition currently required. | ||
172 | * @rx_chains_static: The number of RX chains that must always be | 175 | * @rx_chains_static: The number of RX chains that must always be |
173 | * active on the channel to receive MIMO transmissions | 176 | * active on the channel to receive MIMO transmissions |
174 | * @rx_chains_dynamic: The number of RX chains that must be enabled | 177 | * @rx_chains_dynamic: The number of RX chains that must be enabled |
@@ -180,6 +183,7 @@ enum ieee80211_chanctx_change { | |||
180 | */ | 183 | */ |
181 | struct ieee80211_chanctx_conf { | 184 | struct ieee80211_chanctx_conf { |
182 | struct cfg80211_chan_def def; | 185 | struct cfg80211_chan_def def; |
186 | struct cfg80211_chan_def min_def; | ||
183 | 187 | ||
184 | u8 rx_chains_static, rx_chains_dynamic; | 188 | u8 rx_chains_static, rx_chains_dynamic; |
185 | 189 | ||