From patchwork Mon Apr 13 07:45:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz.Dziedzic@tieto.com X-Patchwork-Id: 6206351 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D969D9F1AC for ; Mon, 13 Apr 2015 07:47:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0869F2024F for ; Mon, 13 Apr 2015 07:47:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 26BE120222 for ; Mon, 13 Apr 2015 07:47:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YhZ53-0007Uh-CX; Mon, 13 Apr 2015 07:46:53 +0000 Received: from mail-lb0-x230.google.com ([2a00:1450:4010:c04::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YhZ50-0007RM-4b for ath10k@lists.infradead.org; Mon, 13 Apr 2015 07:46:51 +0000 Received: by lbbuc2 with SMTP id uc2so52196526lbb.2 for ; Mon, 13 Apr 2015 00:46:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RivNNEYhyNwFvfTQwcBODIVU9ltVS3nhQrBSfBXPMl0=; b=wWTky/6wEhQQ83+QsrTWVgjGz6NLfPOy0u/eFvIGuvy+iCFVSWpdRaiB6pHTl9w0WN 6V9QWPMrgbe6oklPADAsc832zqQi/BcGejzBH89UdoDMq0mXeVe3XLjFmHFTq/2EAcS2 JfxYgXfjd8mdL7Z4UGGbwotC0vP9skwfV40T0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RivNNEYhyNwFvfTQwcBODIVU9ltVS3nhQrBSfBXPMl0=; b=UY1/ak/uea8VGsCujkErJPAh/iFSMZvRHAldy6zLUDadaWKLCElImDcvNO+tuVpj3k o2DqEHVGIhb2o1+uUg5K13RlpWH7hFIMi9PR8Xv/mznZeSL0znmrvaH5jl9Me+lZ5/cr TUDT2KFSGdRSz4q9V5WojRbJoM0wz7/baOBKgAoJCwK35WvxWnVJdzCiqv041u+QutI2 D/s1d7piYaW+YbnSKkDF6vNTY6Ppzq1pfKzOzgDzQt4tvORJFxIEyTFrgEeBGLokJH0z wsGrbg+mOct1EsGhzQwAAA6g/5vGL5rKOqOFtKOFLg1pZsTZ7GoT1S4i6XG2a5hRvTVd tc2A== X-Gm-Message-State: ALoCoQkFgA1rwNF2uH7VQOcNA3NwSSZXdDoHK961yQtKRzL6nCdu8h1Hc28WpaxDgmWAyab/H2afoXyn40cvZqYGIoZNJBteuYLwyhyk/vF0Dw8HOJVaZFi5Sdl2wRsep34prHojrPqvEN3+tQJc/bU0qf5mCgGzH1VJEFMqcfqOLwWMaphcz8zcHSi5/IASCinDF36Qm8uo X-Received: by 10.152.197.34 with SMTP id ir2mr12090284lac.36.1428911185985; Mon, 13 Apr 2015 00:46:25 -0700 (PDT) Received: from localhost.localdomain (apn-46-215-24-237.dynamic.gprs.plus.pl. [46.215.24.237]) by mx.google.com with ESMTPSA id ba4sm1461123lab.31.2015.04.13.00.46.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Apr 2015 00:46:24 -0700 (PDT) From: Janusz Dziedzic To: ath10k@lists.infradead.org Subject: [RFC 2/2] ath10k: don't disable PS when not connected Date: Mon, 13 Apr 2015 09:45:41 +0200 Message-Id: <1428911141-6534-2-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1428911141-6534-1-git-send-email-janusz.dziedzic@tieto.com> References: <1428911141-6534-1-git-send-email-janusz.dziedzic@tieto.com> X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150413_004650_385283_177EECC1 X-CRM114-Status: UNSURE ( 9.47 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: Janusz Dziedzic , linux-wireless@vger.kernel.org X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 Don't disable PS while we are not connected. In other case we will get higher power consumption. Signed-off-by: Janusz Dziedzic --- drivers/net/wireless/ath/ath10k/mac.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 52c5b1f..b896dd4 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -1730,7 +1730,13 @@ static int ath10k_mac_vif_setup_ps(struct ath10k_vif *arvif) enable_ps = false; } - if (enable_ps) { + if (!arvif->is_started) { + /* enable power save mode while not connected, + * in other case after iface up we will get + * higher power consumption - firmware design + */ + psmode = WMI_STA_PS_MODE_ENABLED; + } else if (enable_ps) { psmode = WMI_STA_PS_MODE_ENABLED; param = WMI_STA_PS_PARAM_INACTIVITY_TIME;