summaryrefslogtreecommitdiff
path: root/package/kernel/mac80211/patches/861-b43-call-PCIe-up-and-down-functions.patch
blob: f09cc3ee89368c56f0342142e66e8be8453149ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
b43: call PCIe up and down functions

Tell the PCIe host core when the wifi is activated.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4670,6 +4670,19 @@ static void b43_wireless_core_exit(struc
 	b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_PSM_RUN,
 		      B43_MACCTL_PSM_JMP0);
 
+	switch (dev->dev->bus_type) {
+#ifdef CPTCFG_B43_BCMA
+	case B43_BUS_BCMA:
+		bcma_core_pci_down(dev->dev->bdev->bus);
+		break;
+#endif
+#ifdef CPTCFG_B43_SSB
+	case B43_BUS_SSB:
+		/* TODO */
+		break;
+#endif
+	}
+
 	b43_dma_free(dev);
 	b43_pio_free(dev);
 	b43_chip_exit(dev);
@@ -4709,6 +4722,7 @@ static int b43_wireless_core_init(struct
 	case B43_BUS_BCMA:
 		bcma_core_pci_irq_ctl(&dev->dev->bdev->bus->drv_pci[0],
 				      dev->dev->bdev, true);
+		bcma_core_pci_up(dev->dev->bdev->bus);
 		break;
 #endif
 #ifdef CPTCFG_B43_SSB