From patchwork Tue Nov 3 06:21:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 7540171 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 CAFAABEEA4 for ; Tue, 3 Nov 2015 06:23:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EEFDB207E2 for ; Tue, 3 Nov 2015 06:23:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0796B207F0 for ; Tue, 3 Nov 2015 06:23:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754754AbbKCGV5 (ORCPT ); Tue, 3 Nov 2015 01:21:57 -0500 Received: from wolverine01.qualcomm.com ([199.106.114.254]:18285 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754558AbbKCGV4 (ORCPT ); Tue, 3 Nov 2015 01:21:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1446531716; x=1478067716; h=from:to:cc:subject:date:message-id:mime-version; bh=p2XqJxFIZ5NFyJ+rg1iwqNJjNnh1QHowrLvnW0GJQzY=; b=GpCK8ptUimaqGJQuLIPxXK2qFqr2oM+RRj+V+yU5xaXA8ecNF+Q3wc/I 2F5U99ZyUyU8PAwvfDqFIOvxqorlT5/RHJT4QqHZELrnYQZaXSMwcHA/N argEtLzxhAzr6LDjHMbXOTtWBc8qUDojgpziDe/7/3OTRKatiC1uvVlV/ U=; X-IronPort-AV: E=McAfee;i="5700,7163,7973"; a="147472143" Received: from ironmsg04-l-new.qualcomm.com (HELO Ironmsg04-L.qualcomm.com) ([10.53.140.111]) by wolverine01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Nov 2015 22:21:55 -0800 X-IronPort-AV: E=Sophos;i="5.20,237,1444719600"; d="scan'208";a="1002342195" Received: from nasanexm01c.na.qualcomm.com ([10.85.0.83]) by Ironmsg04-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 02 Nov 2015 22:21:53 -0800 Received: from aphydexm01b.ap.qualcomm.com (10.252.127.11) by NASANEXM01C.na.qualcomm.com (10.85.0.83) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Mon, 2 Nov 2015 22:21:52 -0800 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; Tue, 3 Nov 2015 11:51:44 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Tue, 03 Nov 2015 11:51:37 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan , Subject: [PATCH] ath10k: fix invalid NSS for 4x4 devices Date: Tue, 3 Nov 2015 11:51:33 +0530 Message-ID: <1446531693-23453-1-git-send-email-rmanohar@qti.qualcomm.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01F.na.qualcomm.com (10.85.0.32) To aphydexm01b.ap.qualcomm.com (10.252.127.11) 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=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 The number of spatial streams that are derived from chain mask for 4x4 devices is using wrong bitmask and conditional check. This is affecting downlink throughput for QCA99x0 devices. Earlier cfg_tx_chainmask is not filled by default until user configured it and so get_nss_from_chainmask never be called. This issue is exposed by recent commit 166de3f1895d ("ath10k: remove supported chain mask"). By default maximum supported chain mask is filled in cfg_tx_chainmask. Cc: stable@vger.kernel.org Fixes: 5572a95b4b ("ath10k: apply chainmask settings to vdev on creation") Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index a7411fe..95a55405 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4225,7 +4225,7 @@ static int ath10k_config(struct ieee80211_hw *hw, u32 changed) static u32 get_nss_from_chainmask(u16 chain_mask) { - if ((chain_mask & 0x15) == 0x15) + if ((chain_mask & 0xf) == 0xf) return 4; else if ((chain_mask & 0x7) == 0x7) return 3;