linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Cc: kvalo@codeaurora.org
Subject: [PATCH 5/9] mt76: clear false CCA counters after changing gain settings
Date: Thu, 21 Jun 2018 11:17:57 +0200	[thread overview]
Message-ID: <20180621091801.41184-5-nbd@nbd.name> (raw)
In-Reply-To: <20180621091801.41184-1-nbd@nbd.name>

They will be read on the next calibration step without gain change and
must not count earlier events

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 drivers/net/wireless/mediatek/mt76/mt76x2_phy.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c b/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c
index a2c3f0e35f86..51fd7ddfa8f5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c
@@ -559,6 +559,9 @@ mt76x2_phy_update_channel_gain(struct mt76x2_dev *dev)
 	dev->cal.agc_gain_cur[1] = gain[1] - gain_delta;
 	dev->cal.agc_gain_adjust = 0;
 	mt76x2_phy_set_gain_val(dev);
+
+	/* clear false CCA counters */
+	mt76_rr(dev, MT_RX_STAT_1);
 }
 
 int mt76x2_phy_set_channel(struct mt76x2_dev *dev,
-- 
2.17.0

  parent reply	other threads:[~2018-06-21  9:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21  9:17 [PATCH 1/9] mt76: fix beacon timer drift Felix Fietkau
2018-06-21  9:17 ` [PATCH 2/9] mt76: fix threshold for gain adjustment Felix Fietkau
2018-06-21  9:17 ` [PATCH 3/9] mt76: fix swapped values for RXO-18 in gain control Felix Fietkau
2018-06-21  9:17 ` [PATCH 4/9] mt76: adjust AGC control register 26 based on gain for VHT80 Felix Fietkau
2018-06-21  9:17 ` Felix Fietkau [this message]
2018-06-21  9:17 ` [PATCH 6/9] mt76: fix variable gain adjustment range Felix Fietkau
2018-06-21  9:17 ` [PATCH 7/9] mt76: add a debugfs file to dump agc calibration information Felix Fietkau
2018-06-21  9:18 ` [PATCH 8/9] mt76: track ewma rssi for gain adjustment per station Felix Fietkau
2018-06-21  9:18 ` [PATCH 9/9] mt76: improve gain adjustment in noisy environments Felix Fietkau
2018-06-27 16:16 ` [1/9] mt76: fix beacon timer drift Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180621091801.41184-5-nbd@nbd.name \
    --to=nbd@nbd.name \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).