Skip to content

Commit 36908c4

Browse files
computersforpeaceKalle Valo
authored andcommitted
mwifiex: uninit wakeup info when removing device
We manually init wakeup info, but we don't detach it on device removal. This means that if we (for example) rmmod + modprobe the driver, the device framework might return -EEXIST the second time, and we'll complain in the logs: [ 839.311881] mwifiex_pcie 0000:01:00.0: fail to init wakeup for mwifiex AFAICT, there's no other negative effect. But we can fix this by disabling wakeup on remove, similar to what a few other drivers do (e.g., the power supply framework). This code (and bug) has existed on SDIO for a while, but it got moved around and enabled for PCIe with commit 853402a ("mwifiex: Enable WoWLAN for both sdio and pcie"). Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent ba1c7e4 commit 36908c4

File tree

1 file changed

+3
-0
lines changed
  • drivers/net/wireless/marvell/mwifiex

1 file changed

+3
-0
lines changed

drivers/net/wireless/marvell/mwifiex/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,6 +1718,9 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter)
17181718
wiphy_unregister(adapter->wiphy);
17191719
wiphy_free(adapter->wiphy);
17201720

1721+
if (adapter->irq_wakeup >= 0)
1722+
device_init_wakeup(adapter->dev, false);
1723+
17211724
/* Unregister device */
17221725
mwifiex_dbg(adapter, INFO,
17231726
"info: unregister device\n");

0 commit comments

Comments
 (0)