From patchwork Fri Feb 13 12:30:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 5824961 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8D19CBF440 for ; Fri, 13 Feb 2015 12:32:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6729920266 for ; Fri, 13 Feb 2015 12:32:11 +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 9FAA720263 for ; Fri, 13 Feb 2015 12:32:10 +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 1YMFPc-0008FQ-3k; Fri, 13 Feb 2015 12:32:00 +0000 Received: from mail-lb0-x22d.google.com ([2a00:1450:4010:c04::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YMFPX-0008At-SI for ath10k@lists.infradead.org; Fri, 13 Feb 2015 12:31:57 +0000 Received: by mail-lb0-f173.google.com with SMTP id n10so15241589lbv.4 for ; Fri, 13 Feb 2015 04:31:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id; bh=03pX98qqlR4CVv056XINGuSXnS7FM6ilcx8Bw7zQ+V8=; b=Ye/plc01q5AokMRkHh5lNxZMY2XaSvVgUePX0K8qSPNtXFlMout0DzSX6CKw8b3P0a xsCUCUoH+ubZ39j1vsDTzRcZM+jl7Xo/DmlqruB3E2qnUKRBpMxRYNL0yRx7NpAobRm9 33JitdN/CeMgBZ1Op8Eo5h23KLxlU1J8lxnAw= 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; bh=03pX98qqlR4CVv056XINGuSXnS7FM6ilcx8Bw7zQ+V8=; b=L4Q9uDEly2QYY3Udj/TiK3g4+msJPZEWt/UJ/HCcWYJQJxqAnODOxzu8LIfrfAfViN ynQy9XFeErv7sZHiPXjbR1b2dPvuC4TwX2or3StfbXofybAzKV36+ky5yHnD0eUwDXtm tfOkQe3bpK3K2REym/9NtlG8ab+iLFVYty52Cjw/jmbewOSgimGta3PBNNWiDbyiY58a 8szLOjEQrQXdyKmG46wT0PWQHlM0GPH7R1p7EHugenniX5Yi0agyhSWkgxixPG49JT3B Nsg1zKyiAGv2iI4ycX7IJrQAssRJKFJRrKjCKrRR0Mqj9ed1gJh5qG6ia725JclOatnm oIpA== X-Gm-Message-State: ALoCoQlYA/eWD9i+OjrJ4qstS3XAOHDnXhAQyfIGHqPaPJugpMl+xWGrOu7DO6ubQzKbrmByZqZWnm4Mbf6D99Tl63HoHSPn5aaJxAK5MiRF8VrBXyiM91sAk54PD15oXama+fy6GLcmuRYrlerez4sQSDpInF4crmmS1lHVIJmMfGffPoEs+M8= X-Received: by 10.152.28.227 with SMTP id e3mr3869644lah.117.1423830691931; Fri, 13 Feb 2015 04:31:31 -0800 (PST) Received: from bob.homerouter.cpe (apn-31-1-134-151.dynamic.gprs.plus.pl. [31.1.134.151]) by mx.google.com with ESMTPSA id s5sm1350872lag.9.2015.02.13.04.31.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Feb 2015 04:31:31 -0800 (PST) From: Michal Kazior To: ath10k@lists.infradead.org Subject: [PATCH 1/2] ath10k: workaround qca6174 sta powersave issue Date: Fri, 13 Feb 2015 13:30:15 +0100 Message-Id: <1423830616-7516-1-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.8.5.3 X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150213_043156_128443_806A59B1 X-CRM114-Status: UNSURE ( 9.15 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: linux-wireless@vger.kernel.org, Michal Kazior 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 qca6184 WLAN.RM.2.0-00073 has a bug in sta powersave state machine and requires peer param to be poked to enable the powersave. Calling this unconditionally should be safe for other chips/firmwares. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/mac.c | 12 ++++++++++++ drivers/net/wireless/ath/ath10k/wmi.h | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index d6d2f0f..8ed0ba6 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -1853,6 +1853,18 @@ static void ath10k_bss_assoc(struct ieee80211_hw *hw, } arvif->is_up = true; + + /* Workaround: Some firmware revisions (tested with qca6174 + * WLAN.RM.2.0-00073) have buggy powersave state machine and must be + * poked with peer param command. + */ + ret = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, arvif->bssid, + WMI_PEER_DUMMY_VAR, 1); + if (ret) { + ath10k_warn(ar, "failed to poke peer %pM param for ps workaround on vdev %i: %d\n", + arvif->bssid, arvif->vdev_id, ret); + return; + } } static void ath10k_bss_disassoc(struct ieee80211_hw *hw, diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 20ce360..c56de92 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -4436,7 +4436,8 @@ enum wmi_peer_param { WMI_PEER_AUTHORIZE = 0x3, WMI_PEER_CHAN_WIDTH = 0x4, WMI_PEER_NSS = 0x5, - WMI_PEER_USE_4ADDR = 0x6 + WMI_PEER_USE_4ADDR = 0x6, + WMI_PEER_DUMMY_VAR = 0xff, /* dummy parameter for STA PS workaround */ }; struct wmi_peer_set_param_cmd {