diff options
author | Rajkumar Manoharan <rmanoharan@atheros.com> | 2011-01-31 19:58:59 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-31 21:06:26 +0100 |
commit | 8c7914dec29f39a6a8ca348a5eeace40a59be65d (patch) | |
tree | 36691f711b67e10b5bbf3a114dea8a6a73fc8bf4 /net/mac80211 | |
parent | iwlwifi: correct frequency settings (diff) | |
download | linux-8c7914dec29f39a6a8ca348a5eeace40a59be65d.tar.xz linux-8c7914dec29f39a6a8ca348a5eeace40a59be65d.zip |
mac80211: disable power save if an infra AP vif exists
PS should not be enabled if an infra AP vif exists in
the interface list. So while recalculating PS,
AP vif type should be taken into account.
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/mlme.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 32210695b8b6..dfa752e5520b 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -601,6 +601,14 @@ void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency) list_for_each_entry(sdata, &local->interfaces, list) { if (!ieee80211_sdata_running(sdata)) continue; + if (sdata->vif.type == NL80211_IFTYPE_AP) { + /* If an AP vif is found, then disable PS + * by setting the count to zero thereby setting + * ps_sdata to NULL. + */ + count = 0; + break; + } if (sdata->vif.type != NL80211_IFTYPE_STATION) continue; found = sdata; |