From patchwork Wed Feb 9 12:16:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 543821 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 p19CH6po031319 for ; Wed, 9 Feb 2011 12:17:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754767Ab1BIMRD (ORCPT ); Wed, 9 Feb 2011 07:17:03 -0500 Received: from mail.atheros.com ([12.19.149.2]:27507 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751663Ab1BIMRB (ORCPT ); Wed, 9 Feb 2011 07:17:01 -0500 Received: from mail.atheros.com ([10.10.20.105]) by sidewinder.atheros.com for ; Wed, 09 Feb 2011 04:16:41 -0800 Received: from mail.atheros.com (10.12.4.12) by SC1EXHC-01.global.atheros.com (10.10.20.111) with Microsoft SMTP Server (TLS) id 8.2.213.0; Wed, 9 Feb 2011 04:17:00 -0800 Received: by mail.atheros.com (sSMTP sendmail emulation); Wed, 09 Feb 2011 17:46:40 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan Subject: [PATCH 1/2] mac80211: add monitor interface into PS disable list Date: Wed, 9 Feb 2011 17:46:38 +0530 Message-ID: <1297253799-9688-1-git-send-email-rmanoharan@atheros.com> X-Mailer: git-send-email 1.7.4 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]); Wed, 09 Feb 2011 12:17:07 +0000 (UTC) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index f77adf1..8fc6d35 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -630,13 +630,13 @@ 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. + if ((sdata->vif.type == NL80211_IFTYPE_AP) || + (sdata->vif.type == NL80211_IFTYPE_MONITOR)) { + /* If an AP/monitor vif is found, then disable PS + * by setting ps_sdata to NULL. */ - count = 0; - break; + local->ps_sdata = NULL; + goto change; } if (sdata->vif.type != NL80211_IFTYPE_STATION) continue;