wifi: mwifiex: Use IRQF_NO_AUTOEN flag in request_irq()

[ Upstream commit 9a98dd48b6d834d7a3fe5e8e7b8c3a1d006f9685 ]

disable_irq() after request_irq() still has a time gap in which
interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will
disable IRQ auto-enable when request IRQ.

Fixes: 853402a008 ("mwifiex: Enable WoWLAN for both sdio and pcie")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Acked-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20240910124314.698896-3-ruanjinjie@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Jinjie Ruan
2024-09-10 20:43:13 +08:00
committed by Greg Kroah-Hartman
parent 3496512fe8
commit 53cbeffdd7

View File

@@ -1638,7 +1638,8 @@ static void mwifiex_probe_of(struct mwifiex_adapter *adapter)
} }
ret = devm_request_irq(dev, adapter->irq_wakeup, ret = devm_request_irq(dev, adapter->irq_wakeup,
mwifiex_irq_wakeup_handler, IRQF_TRIGGER_LOW, mwifiex_irq_wakeup_handler,
IRQF_TRIGGER_LOW | IRQF_NO_AUTOEN,
"wifi_wake", adapter); "wifi_wake", adapter);
if (ret) { if (ret) {
dev_err(dev, "Failed to request irq_wakeup %d (%d)\n", dev_err(dev, "Failed to request irq_wakeup %d (%d)\n",
@@ -1646,7 +1647,6 @@ static void mwifiex_probe_of(struct mwifiex_adapter *adapter)
goto err_exit; goto err_exit;
} }
disable_irq(adapter->irq_wakeup);
if (device_init_wakeup(dev, true)) { if (device_init_wakeup(dev, true)) {
dev_err(dev, "fail to init wakeup for mwifiex\n"); dev_err(dev, "fail to init wakeup for mwifiex\n");
goto err_exit; goto err_exit;