From patchwork Tue Oct 27 12:21:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 7496701 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 B1BE0BF90C for ; Tue, 27 Oct 2015 12:22:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E648120920 for ; Tue, 27 Oct 2015 12:22:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E0A2D20928 for ; Tue, 27 Oct 2015 12:22:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754297AbbJ0MWK (ORCPT ); Tue, 27 Oct 2015 08:22:10 -0400 Received: from sabertooth02.qualcomm.com ([65.197.215.38]:53583 "EHLO sabertooth02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754284AbbJ0MWI (ORCPT ); Tue, 27 Oct 2015 08:22:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1445948528; x=1477484528; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=Ix9NATM/hXLzXt0TWCJXB7/fMIigY/b/+fXBYT7d6kQ=; b=sHF79CRyMTAH1Bg1PXoTJ3IJA01aI9QVM4n+iqQXB/qTqxt33pFm7hlK LiBeqoU2YDgN2zCvnm5zKVt1r+I80uBNnODzMaXNsCniqNsqOt2oK62R/ cUjsQTFaKyCzf66tr4EATlg23tbwqpM/yZTEaYzUyBpriJI5qrXOMW7Mw E=; X-IronPort-AV: E=McAfee;i="5700,7163,7966"; a="100639568" Received: from ironmsg03-r-new.qualcomm.com (HELO Ironmsg03-R.qualcomm.com) ([10.53.140.107]) by sabertooth02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Oct 2015 05:22:08 -0700 X-IronPort-AV: E=Sophos;i="5.20,204,1444719600"; d="scan'208";a="1022537925" Received: from nasanexm01c.na.qualcomm.com ([10.85.0.83]) by Ironmsg03-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 27 Oct 2015 05:22:06 -0700 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; Tue, 27 Oct 2015 05:21:52 -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; Tue, 27 Oct 2015 17:51:54 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Tue, 27 Oct 2015 17:51:37 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan Subject: [PATCH 2/4] ath10k: fill HT/VHT MCS rateset only for configured chainmask Date: Tue, 27 Oct 2015 17:51:12 +0530 Message-ID: <1445948474-16738-2-git-send-email-rmanohar@qti.qualcomm.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1445948474-16738-1-git-send-email-rmanohar@qti.qualcomm.com> References: <1445948474-16738-1-git-send-email-rmanohar@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01E.na.qualcomm.com (10.85.0.31) 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,RP_MATCHES_RCVD,T_DKIM_INVALID,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 HT/VHT MCS rateset should be filled only for configured chainmask rather that max supported chainmask. Fix that by checking configured chainmask while filling HT/VHT MCS rate map. Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/mac.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index b4eb9fd..4e799d4 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -6972,7 +6972,7 @@ static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar) mcs_map = 0; for (i = 0; i < 8; i++) { - if (i < ar->num_rf_chains) + if ((i < ar->num_rf_chains) && (ar->cfg_tx_chainmask & BIT(i))) mcs_map |= IEEE80211_VHT_MCS_SUPPORT_0_9 << (i*2); else mcs_map |= IEEE80211_VHT_MCS_NOT_SUPPORTED << (i*2); @@ -7039,8 +7039,10 @@ static struct ieee80211_sta_ht_cap ath10k_get_ht_cap(struct ath10k *ar) if (ar->vht_cap_info & WMI_VHT_CAP_MAX_MPDU_LEN_MASK) ht_cap.cap |= IEEE80211_HT_CAP_MAX_AMSDU; - for (i = 0; i < ar->num_rf_chains; i++) - ht_cap.mcs.rx_mask[i] = 0xFF; + for (i = 0; i < ar->num_rf_chains; i++) { + if (ar->cfg_rx_chainmask & BIT(i)) + ht_cap.mcs.rx_mask[i] = 0xFF; + } ht_cap.mcs.tx_params |= IEEE80211_HT_MCS_TX_DEFINED;