aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHolger Freyther <zecke@openmoko.org>2008-11-19 17:09:51 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:09:51 +0000
commit0f10bf13b6524f7d25313ad8c0cab3a7f2dfa407 (patch)
tree92344ef9a063904fe94b0b4d2f60f78dc863fd7a /drivers
parentb6095716b9e7d3d84c76bfb5008ea291847ebd0a (diff)
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.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c1
-rw-r--r--drivers/sdio/function/wlan/ar6000/hif/hif.c6
-rw-r--r--drivers/sdio/function/wlan/ar6000/include/hif.h5
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 a854c7c84ed..dacc00aedb5 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 f5a098672a1..3d6d792d974 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 f32388c2681..846a69f3633 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