From patchwork Tue Feb 10 11:38:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Puzyniak X-Patchwork-Id: 5806581 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 E116BBF440 for ; Tue, 10 Feb 2015 11:36:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 182A520107 for ; Tue, 10 Feb 2015 11:36:19 +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 43ACA20103 for ; Tue, 10 Feb 2015 11:36:18 +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 1YL96z-00007Q-05; Tue, 10 Feb 2015 11:36:13 +0000 Received: from mail-la0-f47.google.com ([209.85.215.47]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YL96v-0008UK-TQ for ath10k@lists.infradead.org; Tue, 10 Feb 2015 11:36:11 +0000 Received: by labhz20 with SMTP id hz20so19501998lab.0 for ; Tue, 10 Feb 2015 03:35:47 -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=fZA1NmrqCKyePXyuGGecvchKYiYRHyRo7Lcmlj+qP9k=; b=uCS++kpQZlM4R4ra0wtnYl4Kn+WRt1g7ub0SZcK+E+gIGntPs0iSecy0QsA3q/k+u3 KMzlJJ0Bo5YZhzn7jYXT8JqeOpmWWdOSSih3muOtZaX9y4Dir4uVr+H0tJjUC+n6Qnsd 07Erl658VI21ztm53A3tBmwABuaGaaoXNTmZM= 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=fZA1NmrqCKyePXyuGGecvchKYiYRHyRo7Lcmlj+qP9k=; b=kJdXl/WFS2GebVOqhiewMc4SNJQPGsa0SssbMonyS0LRTIaoEbqAxUOD08BqUFElur v+z3Htt2lU0dnGfwWlL25Gy20rejS3W4XuV+GBA2HOkT5327BOBuuhY4IEho4O/92uHY p6c0S0vc7CLSD6g+L3cFZw9BYpVJD08BU5qLROGYQ+rTo9xzzhiMXjUYwJe5yzgMsOP7 cJqzUQ8TZFqxAalYoNRG4goq33Nh8EZRcSofl99pPfHFom6Q821vU7pYPL3bJPd8aSBe o4bVsP6FX4eJj4omazLsq+X5hY6k1e6f/6AvRVc7Pgaoj7teQK14bOZ4DVmiy83Fre/+ IBEw== X-Gm-Message-State: ALoCoQkKMbpNJVe+X8uZFkzx8fbkHh7u5ZMXvmWlq+4A4gBQ/vq+1/0SbqcDUV4IVWOhnXbgkRaWRQW6pyHP7jiNmBycbefpn+cd0Is6n1ZeW60i6P+n1u9uM+VrdQBZE9mRJ2iR6qa7ah4sy1DQwxcd+vNWCI6xgKCT4U77tpI8hwPZ3Ppb6So= X-Received: by 10.152.23.42 with SMTP id j10mr22385279laf.104.1423568147769; Tue, 10 Feb 2015 03:35:47 -0800 (PST) Received: from dell-lap.com (apn-31-1-134-151.dynamic.gprs.plus.pl. [31.1.134.151]) by mx.google.com with ESMTPSA id dl2sm415499lbb.32.2015.02.10.03.35.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Feb 2015 03:35:46 -0800 (PST) From: Marek Puzyniak To: ath10k@lists.infradead.org Subject: [PATCH v2] ath10k: fix wmm params per vdev Date: Tue, 10 Feb 2015 12:38:15 +0100 Message-Id: <1423568295-28734-1-git-send-email-marek.puzyniak@tieto.com> X-Mailer: git-send-email 2.1.4 X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150210_033610_131657_4198C8D5 X-CRM114-Status: UNSURE ( 7.49 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: Marek Puzyniak , 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=unavailable 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 During wmm tests changing wmm parameters did not change anything. This was because of mismatch in WMM params per vdev command. WMM params per vdev uses different command structure than wmm params per pdev command. Patch concerns qca6174. Signed-off-by: Marek Puzyniak --- v2: * removed txop units modification drivers/net/wireless/ath/ath10k/wmi-tlv.c | 15 +++++---------- drivers/net/wireless/ath/ath10k/wmi-tlv.h | 6 ++++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c index 71614ba..bdb3673 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c @@ -1604,14 +1604,12 @@ ath10k_wmi_tlv_op_gen_vdev_wmm_conf(struct ath10k *ar, u32 vdev_id, const struct wmi_wmm_params_all_arg *arg) { struct wmi_tlv_vdev_set_wmm_cmd *cmd; - struct wmi_wmm_params *wmm; struct wmi_tlv *tlv; struct sk_buff *skb; size_t len; void *ptr; - len = (sizeof(*tlv) + sizeof(*cmd)) + - (4 * (sizeof(*tlv) + sizeof(*wmm))); + len = sizeof(*tlv) + sizeof(*cmd); skb = ath10k_wmi_alloc_skb(ar, len); if (!skb) return ERR_PTR(-ENOMEM); @@ -1623,13 +1621,10 @@ ath10k_wmi_tlv_op_gen_vdev_wmm_conf(struct ath10k *ar, u32 vdev_id, cmd = (void *)tlv->value; cmd->vdev_id = __cpu_to_le32(vdev_id); - ptr += sizeof(*tlv); - ptr += sizeof(*cmd); - - ptr = ath10k_wmi_tlv_put_wmm(ptr, &arg->ac_be); - ptr = ath10k_wmi_tlv_put_wmm(ptr, &arg->ac_bk); - ptr = ath10k_wmi_tlv_put_wmm(ptr, &arg->ac_vi); - ptr = ath10k_wmi_tlv_put_wmm(ptr, &arg->ac_vo); + ath10k_wmi_set_wmm_param(&cmd->vdev_wmm_params[0].params, &arg->ac_be); + ath10k_wmi_set_wmm_param(&cmd->vdev_wmm_params[1].params, &arg->ac_bk); + ath10k_wmi_set_wmm_param(&cmd->vdev_wmm_params[2].params, &arg->ac_vi); + ath10k_wmi_set_wmm_param(&cmd->vdev_wmm_params[3].params, &arg->ac_vo); ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi tlv vdev wmm conf\n"); return skb; diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.h b/drivers/net/wireless/ath/ath10k/wmi-tlv.h index de68fe7..c54de47 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.h +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.h @@ -1302,8 +1302,14 @@ struct wmi_tlv_pdev_set_wmm_cmd { __le32 dg_type; /* no idea.. */ } __packed; +struct wmi_tlv_vdev_wmm_params { + __le32 dummy; + struct wmi_wmm_params params; +} __packed; + struct wmi_tlv_vdev_set_wmm_cmd { __le32 vdev_id; + struct wmi_tlv_vdev_wmm_params vdev_wmm_params[4]; } __packed; struct wmi_tlv_phyerr_ev {