Skip to content

Commit f0992ac

Browse files
Fu, ZhonghuiKalle Valo
authored andcommitted
brcmfmac: prohibit ACPI power management for brcmfmac driver
ACPI will manage WiFi chip's power state during suspend/resume process on some tablet platforms(such as ASUS T100TA). This is not supported by brcmfmac driver now, and the context of WiFi chip will be damaged after resume. This patch informs ACPI not to manage WiFi chip's power state. Signed-off-by: Zhonghui Fu <[email protected]> Acked-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent bfe3d2b commit f0992ac

File tree

1 file changed

+9
-0
lines changed
  • drivers/net/wireless/brcm80211/brcmfmac

1 file changed

+9
-0
lines changed

drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <linux/suspend.h>
3434
#include <linux/errno.h>
3535
#include <linux/module.h>
36+
#include <linux/acpi.h>
3637
#include <net/cfg80211.h>
3738

3839
#include <defs.h>
@@ -1122,13 +1123,21 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
11221123
int err;
11231124
struct brcmf_sdio_dev *sdiodev;
11241125
struct brcmf_bus *bus_if;
1126+
struct device *dev;
1127+
struct acpi_device *adev;
11251128

11261129
brcmf_dbg(SDIO, "Enter\n");
11271130
brcmf_dbg(SDIO, "Class=%x\n", func->class);
11281131
brcmf_dbg(SDIO, "sdio vendor ID: 0x%04x\n", func->vendor);
11291132
brcmf_dbg(SDIO, "sdio device ID: 0x%04x\n", func->device);
11301133
brcmf_dbg(SDIO, "Function#: %d\n", func->num);
11311134

1135+
/* prohibit ACPI power management for this device */
1136+
dev = &func->dev;
1137+
adev = ACPI_COMPANION(dev);
1138+
if (adev)
1139+
adev->flags.power_manageable = 0;
1140+
11321141
/* Consume func num 1 but dont do anything with it. */
11331142
if (func->num == 1)
11341143
return 0;

0 commit comments

Comments
 (0)