diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-09-11 08:34:12 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-10-17 05:02:09 -0400 |
commit | 04ecd2578e712c301fa1369d2a8f298a2b4b146a (patch) | |
tree | 81fc8135db27831f4456b61c3aeb5d332848b449 /net/mac80211/cfg.c | |
parent | 55de908ab292c03f1eb280f51170ddb9c6b57e31 (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 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 09c90627fd19..03216b0408c7 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -884,6 +884,10 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, | |||
884 | if (old) | 884 | if (old) |
885 | return -EALREADY; | 885 | return -EALREADY; |
886 | 886 | ||
887 | /* TODO: make hostapd tell us what it wants */ | ||
888 | sdata->smps_mode = IEEE80211_SMPS_OFF; | ||
889 | sdata->needed_rx_chains = sdata->local->rx_chains; | ||
890 | |||
887 | err = ieee80211_vif_use_channel(sdata, params->channel, | 891 | err = ieee80211_vif_use_channel(sdata, params->channel, |
888 | params->channel_type, | 892 | params->channel_type, |
889 | IEEE80211_CHANCTX_SHARED); | 893 | IEEE80211_CHANCTX_SHARED); |
@@ -1673,6 +1677,10 @@ static int ieee80211_join_mesh(struct wiphy *wiphy, struct net_device *dev, | |||
1673 | if (err) | 1677 | if (err) |
1674 | return err; | 1678 | return err; |
1675 | 1679 | ||
1680 | /* can mesh use other SMPS modes? */ | ||
1681 | sdata->smps_mode = IEEE80211_SMPS_OFF; | ||
1682 | sdata->needed_rx_chains = sdata->local->rx_chains; | ||
1683 | |||
1676 | err = ieee80211_vif_use_channel(sdata, setup->channel, | 1684 | err = ieee80211_vif_use_channel(sdata, setup->channel, |
1677 | setup->channel_type, | 1685 | setup->channel_type, |
1678 | IEEE80211_CHANCTX_SHARED); | 1686 | IEEE80211_CHANCTX_SHARED); |
@@ -2052,13 +2060,12 @@ int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata, | |||
2052 | 2060 | ||
2053 | /* | 2061 | /* |
2054 | * If not associated, or current association is not an HT | 2062 | * If not associated, or current association is not an HT |
2055 | * association, there's no need to send an action frame. | 2063 | * association, there's no need to do anything, just store |
2064 | * the new value until we associate. | ||
2056 | */ | 2065 | */ |
2057 | if (!sdata->u.mgd.associated || | 2066 | if (!sdata->u.mgd.associated || |
2058 | sdata->vif.bss_conf.channel_type == NL80211_CHAN_NO_HT) { | 2067 | sdata->vif.bss_conf.channel_type == NL80211_CHAN_NO_HT) |
2059 | ieee80211_recalc_smps(sdata->local); | ||
2060 | return 0; | 2068 | return 0; |
2061 | } | ||
2062 | 2069 | ||
2063 | ap = sdata->u.mgd.associated->bssid; | 2070 | ap = sdata->u.mgd.associated->bssid; |
2064 | 2071 | ||