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: 5824941 X-Patchwork-Delegate: kvalo@adurom.com 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E86A7BF440 for ; Fri, 13 Feb 2015 12:31:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EADFD20265 for ; Fri, 13 Feb 2015 12:31:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 60AA720263 for ; Fri, 13 Feb 2015 12:31:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752760AbbBMMbe (ORCPT ); Fri, 13 Feb 2015 07:31:34 -0500 Received: from mail-la0-f46.google.com ([209.85.215.46]:39334 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752753AbbBMMbd (ORCPT ); Fri, 13 Feb 2015 07:31:33 -0500 Received: by labgq15 with SMTP id gq15so16086222lab.6 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=Pecil1EWlYRJvQQ9hG5Xirm7O3eSsEeo6n9FQjApgsjzLF0xxGtxGH8FNdhgDdfXmq 52GYQJu41GEFvC1b0tuMi8dXYxjc3cKvmRsCUJrNpqnqSijlmwT6Ob+ux0lOzexRBfeL 65YWf0LV0GX1Rn85hxpCabGENJuOmNKZ1RWC7HEZei4z2GfgJxETmoqxQWl++SCHQJr4 9qVK9RcNUlM8XUj123/RcX0BhqSPxMx8rpOM1WI+mF9adcSIRv4pdNuYynI8vdQWmjz9 FEqVf0CIRllEg3hbPdjmIYK9uzFkraDhkVwJVwBTIbXRbBwxv4hxQ/FN4KHjaZr9BVg7 0KIQ== X-Gm-Message-State: ALoCoQma5+LUsDgoS++iEpeH55FmW+wjcoCxzjYwKPQGFgtA4A+u1zxsjL+lELWiBmLGqcVZJQ2PWDWgnzjYpOrpZDZWjzmFOVV/xeLowbIZNdoG9tFzE29exmkeNoT2nv7T5HNngErh 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 Cc: linux-wireless@vger.kernel.org, Michal Kazior 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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 {