From patchwork Sat Oct 26 20:34:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 3098931 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 18427BF924 for ; Sat, 26 Oct 2013 20:44:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4C637202C3 for ; Sat, 26 Oct 2013 20:44:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 837C120250 for ; Sat, 26 Oct 2013 20:44:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754079Ab3JZUnl (ORCPT ); Sat, 26 Oct 2013 16:43:41 -0400 Received: from mail-ee0-f51.google.com ([74.125.83.51]:39432 "EHLO mail-ee0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753601Ab3JZUke (ORCPT ); Sat, 26 Oct 2013 16:40:34 -0400 Received: by mail-ee0-f51.google.com with SMTP id d41so2706362eek.10 for ; Sat, 26 Oct 2013 13:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wWS6hNsmqu9idokTJYJPB7ZJrU5Z9IoPqtfdA56u0Yo=; b=d+iTAwU1zaB0EFvuS0KLDBtok0IFz1GBlOiQxbnBVRjamhucJdSUUowB7Vuwz+wmp0 nYap63e5qJHFKjhr0zAOQxm1v/N5OQjLmfUiARt6jdPcOci863IJBco6d3eheKh7s8SA 0c2rMPHsOcO+3m46w1fxLUz+oXr0/Z86yZfxo1Jkfb1rMn/xlxjz4AynaO/Yw8sg93LI VfQZdQVDakbGavD4EgnLslh+Skm+HxjwqVaq1EmzM5pfTj8nY92IQL3+wob6eHBUR8vl GZThRoX3MJKp8UMzRW8HVXyw7KtIowmh7shevyN7d2X0nfuECpIWpY3OE5+hbEz0CiBV r57Q== X-Received: by 10.15.111.202 with SMTP id cj50mr3931608eeb.71.1382820032625; Sat, 26 Oct 2013 13:40:32 -0700 (PDT) Received: from Pali-EliteBook.kolej.mff.cuni.cz (pali.kolej.mff.cuni.cz. [78.128.193.202]) by mx.google.com with ESMTPSA id i1sm35327553eeg.0.2013.10.26.13.40.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 26 Oct 2013 13:40:32 -0700 (PDT) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Luciano Coelho , "John W. Linville" , Johannes Berg , "David S. Miller" Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, freemangordon@abv.bg, aaro.koskinen@iki.fi, pavel@ucw.cz, sre@ring0.de, joni.lapilainen@gmail.com, pali.rohar@gmail.com, David Gnedt Subject: [PATCH 09/16] wl1251: disable power saving in monitor mode Date: Sat, 26 Oct 2013 22:34:08 +0200 Message-Id: <1382819655-30430-10-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1382819655-30430-1-git-send-email-pali.rohar@gmail.com> References: <1382819655-30430-1-git-send-email-pali.rohar@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: David Gnedt Force power saving off while monitor interface is present. Signed-off-by: David Gnedt --- drivers/net/wireless/ti/wl1251/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c index 727f2ee..62cb374 100644 --- a/drivers/net/wireless/ti/wl1251/main.c +++ b/drivers/net/wireless/ti/wl1251/main.c @@ -617,7 +617,8 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) goto out_sleep; } - if (conf->flags & IEEE80211_CONF_PS && !wl->psm_requested) { + if (conf->flags & IEEE80211_CONF_PS && !wl->psm_requested && + !wl->monitor_present) { wl1251_debug(DEBUG_PSM, "psm enabled"); wl->psm_requested = true; @@ -633,8 +634,8 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) ret = wl1251_ps_set_mode(wl, STATION_POWER_SAVE_MODE); if (ret < 0) goto out_sleep; - } else if (!(conf->flags & IEEE80211_CONF_PS) && - wl->psm_requested) { + } else if ((!(conf->flags & IEEE80211_CONF_PS) || wl->monitor_present) + && wl->psm_requested) { wl1251_debug(DEBUG_PSM, "psm disabled"); wl->psm_requested = false;