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 /net/mac80211/sta_info.c | |
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 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 45b5f610674e..7b69d4c3db55 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -507,6 +507,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU) | |||
507 | 507 | ||
508 | set_sta_flag(sta, WLAN_STA_INSERTED); | 508 | set_sta_flag(sta, WLAN_STA_INSERTED); |
509 | 509 | ||
510 | ieee80211_recalc_min_chandef(sdata); | ||
510 | ieee80211_sta_debugfs_add(sta); | 511 | ieee80211_sta_debugfs_add(sta); |
511 | rate_control_add_sta_debugfs(sta); | 512 | rate_control_add_sta_debugfs(sta); |
512 | 513 | ||
@@ -869,6 +870,7 @@ int __must_check __sta_info_destroy(struct sta_info *sta) | |||
869 | 870 | ||
870 | rate_control_remove_sta_debugfs(sta); | 871 | rate_control_remove_sta_debugfs(sta); |
871 | ieee80211_sta_debugfs_remove(sta); | 872 | ieee80211_sta_debugfs_remove(sta); |
873 | ieee80211_recalc_min_chandef(sdata); | ||
872 | 874 | ||
873 | call_rcu(&sta->rcu_head, free_sta_rcu); | 875 | call_rcu(&sta->rcu_head, free_sta_rcu); |
874 | 876 | ||