From patchwork Mon Jan 31 18:58:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 520781 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0VIxqQW008532 for ; Mon, 31 Jan 2011 18:59:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755820Ab1AaS7u (ORCPT ); Mon, 31 Jan 2011 13:59:50 -0500 Received: from mail.atheros.com ([12.19.149.2]:21259 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753573Ab1AaS7u (ORCPT ); Mon, 31 Jan 2011 13:59:50 -0500 Received: from mail.atheros.com ([10.10.20.108]) by sidewinder.atheros.com for ; Mon, 31 Jan 2011 10:59:30 -0800 Received: from mail.atheros.com (10.12.4.12) by SC1EXHC-02.global.atheros.com (10.10.20.106) with Microsoft SMTP Server (TLS) id 8.2.213.0; Mon, 31 Jan 2011 10:59:48 -0800 Received: by mail.atheros.com (sSMTP sendmail emulation); Tue, 01 Feb 2011 00:29:02 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan Subject: [PATCH v2] mac80211: disable power save if an infra AP vif exists Date: Tue, 1 Feb 2011 00:28:59 +0530 Message-ID: <1296500339-4252-1-git-send-email-rmanoharan@atheros.com> X-Mailer: git-send-email 1.7.3.5 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 31 Jan 2011 19:00:20 +0000 (UTC) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 3221069..dfa752e 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;