From patchwork Sun Jan 30 13:36:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 517811 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 p0UDbPoE002447 for ; Sun, 30 Jan 2011 13:37:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753882Ab1A3NhR (ORCPT ); Sun, 30 Jan 2011 08:37:17 -0500 Received: from mail.atheros.com ([12.19.149.2]:13966 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753834Ab1A3NhQ (ORCPT ); Sun, 30 Jan 2011 08:37:16 -0500 Received: from mail.atheros.com ([10.10.20.108]) by sidewinder.atheros.com for ; Sun, 30 Jan 2011 05:36:56 -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; Sun, 30 Jan 2011 05:37:12 -0800 Received: by mail.atheros.com (sSMTP sendmail emulation); Sun, 30 Jan 2011 19:06:11 +0530 From: Rajkumar Manoharan To: CC: Rajkumar Manoharan Subject: [RFC] mac80211: disable ps if an AP type vif is present Date: Sun, 30 Jan 2011 19:06:11 +0530 Message-ID: <1296394571-3317-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]); Sun, 30 Jan 2011 13:37:40 +0000 (UTC) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 3221069..1fd6023 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -601,6 +601,12 @@ 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) || + (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)) && + !sdata->vif.p2p) { + count = 0; + break; + } if (sdata->vif.type != NL80211_IFTYPE_STATION) continue; found = sdata;