Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4231113pxk; Tue, 8 Sep 2020 14:19:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZnmX+7eZjT13V3zmpBE0fhG1+DXkezcubMyB+pGOvleByy0zJhe4swv/DZ7Tj+zFSI5gg X-Received: by 2002:a17:906:c55:: with SMTP id t21mr453796ejf.276.1599599998772; Tue, 08 Sep 2020 14:19:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599599998; cv=none; d=google.com; s=arc-20160816; b=u2zUQ8ZoIvcUAo7/k0fkHpx029ed8jYnYHqrcQqNOaubAeb+95GySzEy1bcLaiU3Qj Sx9wMZQPkZLuTSSZ0zVmoekQkvmsQq2hiyFGDExp/FzuaOyv5is9+INzjSmMFHVn74uk RfJvt3CVBnUyoCntcJhf6HBbWSK3VtGnIJ7zc2Fs7M3A3KNOeuLgCXPqAjUmQhA08bfi u/eyrqa59Fi+qYKO92YcV8OIxMfsKlY6XCno28cEakZ5QicaIYFdBMMOAL5pyB29ZJ2t a77q4XRGU5+hICC8Hb5Petv9WGFoflLhfMP/yx/Jvte0BGM1piW+WFHHf00RZqa7fKOR RPAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Fkk/NPSQizkeizGh4CR58dOAgw/4mXi/6NL0DFZpVXk=; b=kNH41BqlGlIuh0zgNmoMO6uYIB8wzAGdD+4pyH5PD2ccWQOH0KlHqXWU49MosdsxU8 eeQ1a8ejD5aVLbGlHarWFwE317BwQhtu71+BkE/No+5L/AOFzMO54cyhWTOk/EZdlDak nm469aUU80mQB5forQYcLOxzSfnB3XqHalULjhgwM21Z/rWYOsmlpa16dqKAe1O2stQ0 j+IuSds+1nDuAobfFIJOpOmKHXl5Y2SHP4v56NlRwVeWvhFJvYTQ11xy4cTxRcqfBMca gCPCVhdtJG21Rgd3nv6/+uXlLRfYudmZF3M7mWEyg1sSH0ScxJj7Qi445tjTQ1u/9AUb Uo+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=hMHqPrQ9; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a15si199756eds.350.2020.09.08.14.19.29; Tue, 08 Sep 2020 14:19:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=hMHqPrQ9; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730150AbgIHVSS (ORCPT + 99 others); Tue, 8 Sep 2020 17:18:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729037AbgIHVSD (ORCPT ); Tue, 8 Sep 2020 17:18:03 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A843CC061755 for ; Tue, 8 Sep 2020 14:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Fkk/NPSQizkeizGh4CR58dOAgw/4mXi/6NL0DFZpVXk=; b=hMHqPrQ9Ch0cQ5MNqf8gbGvFxR RdcVHVRA0eQPxoF9gBrz+YiZNZeQq+qwRKUhla8deSCPFr3f641FdLgxxEElrk3OXb/o2nDc2c6SZ QuGqJtRkJgho4mqjB2Hk1tTpmdHXIt97olXqwuaDfVgLbsGguZX3FbjS5T1KwO+Qd5NU=; Received: from p4ff13fcb.dip0.t-ipconnect.de ([79.241.63.203] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1kFl02-0002Cx-C3 for linux-wireless@vger.kernel.org; Tue, 08 Sep 2020 23:17:58 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 02/11] mt76: mt7615: fix antenna selection for testmode tx_frames Date: Tue, 8 Sep 2020 23:17:47 +0200 Message-Id: <20200908211756.15998-2-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908211756.15998-1-nbd@nbd.name> References: <20200908211756.15998-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Do not alter the tx/rx chain settings during channel setup, antennas are remapped by the testmode specific register writes already Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 8 -------- drivers/net/wireless/mediatek/mt76/mt7615/testmode.c | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c index 074cdefba8aa..967c0e80a4a8 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -2850,14 +2850,6 @@ int mt7615_mcu_set_chan_info(struct mt7615_phy *phy, int cmd) .center_chan2 = ieee80211_frequency_to_channel(freq2), }; -#ifdef CONFIG_NL80211_TESTMODE - if (dev->mt76.test.state == MT76_TM_STATE_TX_FRAMES && - dev->mt76.test.tx_antenna_mask) { - req.tx_streams = hweight8(dev->mt76.test.tx_antenna_mask); - req.rx_streams_mask = dev->mt76.test.tx_antenna_mask; - } -#endif - if (dev->mt76.hw->conf.flags & IEEE80211_CONF_OFFCHANNEL) req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD; else if ((chandef->chan->flags & IEEE80211_CHAN_RADAR) && diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/testmode.c b/drivers/net/wireless/mediatek/mt76/mt7615/testmode.c index 2cfa58d49832..1a67c244e96f 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/testmode.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/testmode.c @@ -193,7 +193,7 @@ mt7615_tm_set_tx_antenna(struct mt7615_dev *dev, bool en) for (i = 0; i < 4; i++) { mt76_rmw_field(dev, MT_WF_PHY_RFINTF3_0(i), MT_WF_PHY_RFINTF3_0_ANT, - td->tx_antenna_mask & BIT(i) ? 0 : 0xa); + (td->tx_antenna_mask & BIT(i)) ? 0 : 0xa); } -- 2.28.0