Return-path: 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 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> (sfid-20131026_224425_257564_5778323E) 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 List-ID: 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; -- 1.7.10.4