All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Subject: [PATCH 2/3] wifi: mt76: mt7603: fix beacon interval after disabling a single vif
Date: Wed, 26 Jul 2023 11:17:03 +0200	[thread overview]
Message-ID: <20230726091704.25795-2-nbd@nbd.name> (raw)
In-Reply-To: <20230726091704.25795-1-nbd@nbd.name>

When disabling beacons on a vif, intval is 0. Ensure that dev->mt76.beacon_int
is not overwritten in this case, so that beacons continue to work for other
interfaces.

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

diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
index b65b0a88c1de..888678732f29 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
@@ -161,7 +161,8 @@ void mt7603_beacon_set_timer(struct mt7603_dev *dev, int idx, int intval)
 		return;
 	}
 
-	dev->mt76.beacon_int = intval;
+	if (intval)
+		dev->mt76.beacon_int = intval;
 	mt76_wr(dev, MT_TBTT,
 		FIELD_PREP(MT_TBTT_PERIOD, intval) | MT_TBTT_CAL_ENABLE);
 
-- 
2.41.0


  reply	other threads:[~2023-07-26  9:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26  9:17 [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915 Felix Fietkau
2023-07-26  9:17 ` Felix Fietkau [this message]
2023-07-26  9:17 ` [PATCH 3/3] wifi: mt76: mt7603: fix tx filter/flush function Felix Fietkau
2023-09-21  5:02 ` [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915 Oleksandr Natalenko
2023-09-21  7:19   ` Greg Kroah-Hartman
2023-09-21 16:03     ` Oleksandr Natalenko
2023-09-29 11:26       ` Linux regression tracking (Thorsten Leemhuis)
2023-09-22 11:22   ` Linux regression tracking #adding (Thorsten Leemhuis)
2023-10-13 13:21     ` Linux regression tracking #update (Thorsten Leemhuis)
2023-09-29 12:59   ` Nicolas Cavallari
2023-09-29 20:36     ` Oleksandr Natalenko

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=20230726091704.25795-2-nbd@nbd.name \
    --to=nbd@nbd.name \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.