From patchwork Wed Sep 16 07:49:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 7192361 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 B8258BEEC1 for ; Wed, 16 Sep 2015 07:49:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CC6AC20616 for ; Wed, 16 Sep 2015 07:49:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 02CFE2060B for ; Wed, 16 Sep 2015 07:49:53 +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 1Zc7TJ-000546-8K; Wed, 16 Sep 2015 07:49:41 +0000 Received: from sabertooth01.qualcomm.com ([65.197.215.72]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zc7TG-0004rC-RK for ath10k@lists.infradead.org; Wed, 16 Sep 2015 07:49:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1442389779; x=1473925779; h=from:to:cc:subject:date:message-id:mime-version; bh=R6Lh05JImoUwV6lmMRNTK2BYWz9Ycrf3wOvE4joX/2Q=; b=lhbX4E5LAaENWk5b8dEzai2/xJ6QOS9uGO3p3dyDF7kY+8RIrpgY2AxM 8Pgthfr+D0qwCpjn2da1sjIfSVEMgIV+dSUAXd7rLqdmXTVp+uYomCStH P+7ZMuyKVQthVcY1VhFCI9DX2R/4a1YBfKg+9IpQBGRLw1irvnMo2t1+V 8=; X-IronPort-AV: E=McAfee;i="5700,7163,7925"; a="96753159" Received: from ironmsg04-l.qualcomm.com ([172.30.48.19]) by sabertooth01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 16 Sep 2015 00:49:17 -0700 X-IronPort-AV: E=Sophos;i="5.17,537,1437462000"; d="scan'208";a="976808393" Received: from nasanexm02a.na.qualcomm.com ([10.85.0.41]) by Ironmsg04-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 16 Sep 2015 00:49:16 -0700 Received: from aphydexm01b.ap.qualcomm.com (10.252.127.11) by nasanexm02a.na.qualcomm.com (10.85.0.41) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Wed, 16 Sep 2015 00:49:14 -0700 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01b.ap.qualcomm.com (10.252.127.11) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Wed, 16 Sep 2015 13:19:07 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Wed, 16 Sep 2015 13:19:01 +0530 From: Rajkumar Manoharan To: Subject: [PATCH] ath10k: fix ldpc param for fixed rate Date: Wed, 16 Sep 2015 13:19:00 +0530 Message-ID: <1442389740-29053-1-git-send-email-rmanohar@qti.qualcomm.com> X-Mailer: git-send-email 2.5.2 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01C.na.qualcomm.com (10.85.0.83) To aphydexm01b.ap.qualcomm.com (10.252.127.11) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150916_004938_951370_F71FF33E X-CRM114-Status: UNSURE ( 9.09 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.0 (-------) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, Rajkumar Manoharan 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 ldpc is not configured for fixed rates. This blocks auto rate vs fixed rate performance comparison. Since firmware is considering ldpc vdev param for fixed rate selection, it has to be configured to enable ldpc for fixed rates. Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/mac.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 80fe43fa..b347b60 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -5936,7 +5936,7 @@ ath10k_mac_bitrate_mask_get_single_rate(struct ath10k *ar, } static int ath10k_mac_set_fixed_rate_params(struct ath10k_vif *arvif, - u8 rate, u8 nss, u8 sgi) + u8 rate, u8 nss, u8 sgi, u8 ldpc) { struct ath10k *ar = arvif->ar; u32 vdev_param; @@ -5969,6 +5969,13 @@ static int ath10k_mac_set_fixed_rate_params(struct ath10k_vif *arvif, return ret; } + vdev_param = ar->wmi.vdev_param->ldpc; + ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, ldpc); + if (ret) { + ath10k_warn(ar, "failed to set ldpc param %d: %d\n", ldpc, ret); + return ret; + } + return 0; } @@ -6032,6 +6039,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw, u8 rate; u8 nss; u8 sgi; + u8 ldpc; int single_nss; int ret; @@ -6041,6 +6049,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw, band = def.chan->band; ht_mcs_mask = mask->control[band].ht_mcs; vht_mcs_mask = mask->control[band].vht_mcs; + ldpc = !!(ar->ht_cap_info & WMI_HT_CAP_LDPC); sgi = mask->control[band].gi; if (sgi == NL80211_TXRATE_FORCE_LGI) @@ -6079,7 +6088,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw, mutex_lock(&ar->conf_mutex); - ret = ath10k_mac_set_fixed_rate_params(arvif, rate, nss, sgi); + ret = ath10k_mac_set_fixed_rate_params(arvif, rate, nss, sgi, ldpc); if (ret) { ath10k_warn(ar, "failed to set fixed rate params on vdev %i: %d\n", arvif->vdev_id, ret);