summaryrefslogtreecommitdiff
path: root/target/linux/s3c24xx/patches-2.6.24/1166-Subject-PATCH-a6k-Everyone-calls-SET_NET_DEV-an.patch
blob: 5d5fbe92c0ddc346224f58d9612fe6420cbb30b8 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
From 9250c1fc7d6f62075d14ad8f396748490a55d61e Mon Sep 17 00:00:00 2001
From: Holger Freyther <zecke@openmoko.org>
Date: Thu, 19 Jun 2008 22:13:31 +0100
Subject: [PATCH] Subject: [PATCH] [a6k] Everyone calls SET_NET_DEV and hald needs that too,
 make it happy
      Call SET_NET_DEV to set a parent device. All other net drivers
      are doing this and hald needs a parent to add the network device.

---
 .../sdio/function/wlan/ar6000/ar6000/ar6000_drv.c  |    1 +
 drivers/sdio/function/wlan/ar6000/hif/hif.c        |    6 ++++++
 drivers/sdio/function/wlan/ar6000/include/hif.h    |    5 +++++
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c b/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c
index a854c7c..dacc00a 100644
--- a/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c
+++ b/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c
@@ -830,6 +830,7 @@ ar6000_avail_ev(HTC_HANDLE HTCHandle)
         sizeof(WMI_DATA_HDR) + HTC_HEADER_LEN;
 
     /* This runs the init function */
+    SET_NETDEV_DEV(dev, HIFGetOSDevice(ar->arHifDevice));
     if (register_netdev(dev)) {
         AR_DEBUG_PRINTF("ar6000_avail: register_netdev failed\n");
         ar6000_destroy(dev, 0);
diff --git a/drivers/sdio/function/wlan/ar6000/hif/hif.c b/drivers/sdio/function/wlan/ar6000/hif/hif.c
index f5a0986..3d6d792 100644
--- a/drivers/sdio/function/wlan/ar6000/hif/hif.c
+++ b/drivers/sdio/function/wlan/ar6000/hif/hif.c
@@ -779,6 +779,12 @@ delHifDevice(SDDEVICE *handle)
     hifDevice[0].handle = NULL;
 }
 
+struct device*
+HIFGetOSDevice(HIF_DEVICE *device)
+{
+    return &device->handle->Device.dev;
+}
+
 static void ResetAllCards(void)
 {
     UINT8       data;
diff --git a/drivers/sdio/function/wlan/ar6000/include/hif.h b/drivers/sdio/function/wlan/ar6000/include/hif.h
index f32388c..846a69f 100644
--- a/drivers/sdio/function/wlan/ar6000/include/hif.h
+++ b/drivers/sdio/function/wlan/ar6000/include/hif.h
@@ -284,6 +284,11 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
                    void *config, A_UINT32 configLen);
 
 
+struct device;
+struct device*
+HIFGetOSDevice(HIF_DEVICE *device);
+
+
 #ifdef __cplusplus
 }
 #endif
-- 
1.5.6.5