From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Subject: [PATCH mt76 02/15] wifi: mt76: mt7915: fix double hif2 init on the non-WED path
Date: Mon, 27 Jul 2026 15:04:21 +0000 [thread overview]
Message-ID: <20260727150434.1778520-2-nbd@nbd.name> (raw)
In-Reply-To: <20260727150434.1778520-1-nbd@nbd.name>
mt7915_pci_init_hif2() was called unconditionally and again inside the
WED-inactive branch. The helper increments the global hif_idx, writes the
PCIe RECOG_ID register and takes a get_device() reference via
mt7915_pci_get_hif2(), while removal only drops one reference. On non-WED
dual-hif hardware this double-incremented hif_idx, wrote RECOG_ID twice and
leaked a device reference. Only the call inside the WED-inactive branch is
correct; drop the unconditional one. hif2 is already initialised to NULL.
Fixes: cacdd67812c6 ("mt76: mt7915: add mt7915_mmio_probe() as a common probing function")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
drivers/net/wireless/mediatek/mt76/mt7915/pci.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/pci.c b/drivers/net/wireless/mediatek/mt76/mt7915/pci.c
index f6b03211a879..12b3e2dd530a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/pci.c
@@ -135,7 +135,6 @@ static int mt7915_pci_probe(struct pci_dev *pdev,
mdev = &dev->mt76;
mt7915_wfsys_reset(dev);
- hif2 = mt7915_pci_init_hif2(pdev);
ret = mt7915_mmio_wed_init(dev, pdev, true, &irq);
if (ret < 0)
--
2.53.0
next prev parent reply other threads:[~2026-07-27 15:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 15:04 [PATCH mt76 01/15] wifi: mt76: mt7996: fix MIB TX aggregation counter registers for mt7990 Felix Fietkau
2026-07-27 15:04 ` Felix Fietkau [this message]
2026-07-27 15:04 ` [PATCH mt76 03/15] wifi: mt76: mt7915: fix ext PHY use-after-free on register error path Felix Fietkau
2026-07-27 15:04 ` [PATCH mt76 04/15] wifi: mt76: mt7915: release hif2 reference on probe IRQ failure Felix Fietkau
2026-07-27 15:04 ` [PATCH mt76 05/15] wifi: mt76: mt7996: fix reg addr remap when addr is 0 Felix Fietkau
2026-07-27 15:04 ` [PATCH mt76 06/15] wifi: mt76: mt7996: do not attach hif2 WED when the main WED attach failed Felix Fietkau
2026-07-27 15:04 ` [PATCH mt76 07/15] wifi: mt76: mt7996: do not leave state behind after a failed WED attach Felix Fietkau
2026-07-27 15:04 ` [PATCH mt76 08/15] wifi: mt76: mt7915: fix chainmask handling for non-dbdc phys on band 1 Felix Fietkau
2026-07-27 15:04 ` [PATCH mt76 09/15] wifi: mt76: mt7915: report RX chain signal for all RX paths Felix Fietkau
2026-07-27 15:04 ` [PATCH mt76 10/15] wifi: mt76: mt7996: remove repeater muar config Felix Fietkau
2026-07-27 15:04 ` [PATCH mt76 11/15] wifi: mt76: fix queue assignment for disassoc packets Felix Fietkau
2026-07-27 15:04 ` [PATCH mt76 12/15] wifi: mt76: mt7996: reject iTWT setup requests from MLD stations Felix Fietkau
2026-07-27 15:04 ` [PATCH mt76 13/15] wifi: mt76: mt7915: update SKU power limits after changing antennas Felix Fietkau
2026-07-27 15:04 ` [PATCH mt76 14/15] wifi: mt76: mt7996: add scan dwell time hw cap Felix Fietkau
2026-07-27 15:04 ` [PATCH mt76 15/15] wifi: mt76: mt7925: fix infinite loop in UNI event TLV parsing Felix Fietkau
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=20260727150434.1778520-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox