From patchwork Mon Oct 26 09:22:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: manikanta.pubbisetty@gmail.com X-Patchwork-Id: 7486401 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 156729F2F7 for ; Mon, 26 Oct 2015 09:22:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 33E7D206A3 for ; Mon, 26 Oct 2015 09:22:41 +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 61B3B206A1 for ; Mon, 26 Oct 2015 09:22:40 +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 1Zqdz4-0007da-MJ; Mon, 26 Oct 2015 09:22:30 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zqdz2-0007a2-UO for ath10k@lists.infradead.org; Mon, 26 Oct 2015 09:22:29 +0000 Received: by pacfa8 with SMTP id fa8so4148199pac.0 for ; Mon, 26 Oct 2015 02:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=JeH+hMoHuuiuiD1hmvXZ6k/ddV2CBuXyA8prWYwHbDE=; b=t4Qs46niymHaBkaX7oX/PEK2T1kn32A8WdCwdURh5wgxrIbB5ZS9rTF9+OhW/AT/Hr Bt3//y4XXfvUXBt61WeIT6BZGoqzwjjSjv0ayXDPGASFOea3SOwVCa8x0zBIMmZfvrpZ QVLD4g9j4pb2Qjj0ET3wDF3d2GiqBi2yKBA8uSD7b2G1pOiZiSFA6AP8NGKZ5Y9/q+Sj WqwqRW+0vrnqa6fulWfJqUv/DtdAJXSCEorVMNQ9yLy9tYXf5D4AeDJttDGhP3263mK1 /gqqzWkYj+uXRACKTDHjICaq+Fa+OXIZPuO7VUuYb3xxEsjTnv8v663FKYA/kimX6Wem G85Q== X-Received: by 10.66.124.135 with SMTP id mi7mr21343638pab.86.1445851327783; Mon, 26 Oct 2015 02:22:07 -0700 (PDT) Received: from localhost ([140.101.159.246]) by smtp.gmail.com with ESMTPSA id lo9sm32863021pab.19.2015.10.26.02.22.06 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 26 Oct 2015 02:22:06 -0700 (PDT) From: manikanta.pubbisetty@gmail.com To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: update antenna configuration after setting in fw Date: Mon, 26 Oct 2015 14:52:10 +0530 Message-Id: <1445851330-18736-1-git-send-email-manikanta.pubbisetty@gmail.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151026_022229_022387_338B1CD7 X-CRM114-Status: GOOD ( 11.28 ) X-Spam-Score: -2.7 (--) 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: Manikanta Pubbisetty , linux-wireless@vger.kernel.org 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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 From: Manikanta Pubbisetty Updating tx/rx antenna configuration in ath10k is done even before it is set in target. If setting of the tx/rx antenna config fails then we will maintain incorrect configuration in ath10k and APIs like get_antenna will provide incorrect information. This patch updates the antenna configuration in ath10k after it is set successfully in target. Signed-off-by: Manikanta Pubbisetty --- drivers/net/wireless/ath/ath10k/mac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 484c1a1..8d0ce37 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -3771,9 +3771,6 @@ static int __ath10k_set_antenna(struct ath10k *ar, u32 tx_ant, u32 rx_ant) ath10k_check_chain_mask(ar, tx_ant, "tx"); ath10k_check_chain_mask(ar, rx_ant, "rx"); - ar->cfg_tx_chainmask = tx_ant; - ar->cfg_rx_chainmask = rx_ant; - if ((ar->state != ATH10K_STATE_ON) && (ar->state != ATH10K_STATE_RESTARTED)) return 0; @@ -3794,6 +3791,9 @@ static int __ath10k_set_antenna(struct ath10k *ar, u32 tx_ant, u32 rx_ant) return ret; } + ar->cfg_tx_chainmask = tx_ant; + ar->cfg_rx_chainmask = rx_ant; + return 0; }