From patchwork Fri Sep 25 08:01:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Natarajan X-Patchwork-Id: 7262871 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 B94B3BEEC1 for ; Fri, 25 Sep 2015 08:01:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E97A820B60 for ; Fri, 25 Sep 2015 08:01:57 +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 E5A3220B5F for ; Fri, 25 Sep 2015 08:01:56 +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 1ZfNx2-0000oq-JP; Fri, 25 Sep 2015 08:01:52 +0000 Received: from sabertooth02.qualcomm.com ([65.197.215.38]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZfNx0-0000gH-Az for ath10k@lists.infradead.org; Fri, 25 Sep 2015 08:01:50 +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=1443168111; x=1474704111; h=from:to:cc:subject:date:message-id:mime-version; bh=NS3W1Mq8mNefxNGD6DcguiTwnIqA6gUNaL7mDoejD/s=; b=HYuG7j+jofj6Psb7PjUSM7eXlcDXAdHUTqQcFT9QDvK75Lxd1ofZVZCl +LmU0I+UIcX7HKPFjn0IUldubcvri72lQC2baaUqFc6VUE8/+Oyv71Mhx 60IHZeLLiX7X3hBgM0EgDCqahcXYA53a0GW7XV8OE/fCDQjCsst0zIIEp A=; X-IronPort-AV: E=McAfee;i="5700,7163,7934"; a="98534959" Received: from ironmsg02-lv.qualcomm.com ([10.47.202.183]) by sabertooth02.qualcomm.com with ESMTP; 25 Sep 2015 01:01:28 -0700 X-IronPort-AV: E=Sophos;i="5.17,585,1437462000"; d="scan'208";a="33758307" Received: from nasanexm01e.na.qualcomm.com ([10.85.0.31]) by ironmsg02-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 25 Sep 2015 01:01:27 -0700 Received: from APHYDEXM01E.ap.qualcomm.com (10.252.127.13) by NASANEXM01E.na.qualcomm.com (10.85.0.31) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Fri, 25 Sep 2015 01:01:23 -0700 Received: from qcmail1.qualcomm.com (10.80.80.8) by APHYDEXM01E.ap.qualcomm.com (10.252.127.13) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Fri, 25 Sep 2015 01:01:15 -0700 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Fri, 25 Sep 2015 13:31:08 +0530 From: Vivek Natarajan To: Subject: [PATCH v2] ath10k: Use station's current operating mode from assoc request Date: Fri, 25 Sep 2015 13:31:08 +0530 Message-ID: <1443168068-5719-1-git-send-email-nataraja@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01F.na.qualcomm.com (10.85.0.32) To APHYDEXM01E.ap.qualcomm.com (10.252.127.13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150925_010150_480414_DE2038C0 X-CRM114-Status: UNSURE ( 8.15 ) 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, ath10k@lists.infradead.org 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,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 The current number of spatial streams used by the client is advertised as a separate IE in assoc request. Use this information to set the NSS operating mode. Fixes: 45c9abc059fa ("ath10k: implement more versatile set_bitrate_mask"). Signed-off-by: Vivek Natarajan --- v2: Fix commit message 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 bb44161..5acebf5 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -2169,7 +2169,7 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar, arg->peer_ht_rates.rates[i] = i; } else { arg->peer_ht_rates.num_rates = n; - arg->peer_num_spatial_streams = max_nss; + arg->peer_num_spatial_streams = min(sta->rx_nss, max_nss); } ath10k_dbg(ar, ATH10K_DBG_MAC, "mac ht peer %pM mcs cnt %d nss %d\n",