summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/bcmdhd/dhd_linux.c
diff options
context:
space:
mode:
authorMursalin Akon <makon@nvidia.com>2012-01-24 14:24:08 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2012-03-24 02:07:28 -0700
commitc2b416dd50fc5f18ec715c4541d8cfb16fdc2ca0 (patch)
tree51c8c13bca70f373d35cd798f01d0d431dd93c6d /drivers/net/wireless/bcmdhd/dhd_linux.c
parenta991e02a74d822d6d3219a3ac533e0dec89a90bd (diff)
net: wireless: bcmdhd: set reference to physical device
Set the parent field of the netdevice, which causes sysfs to create a device subdirectory under the netdevice. Without this subdirectory the user-space NetworkManager cannot manage the network device. Implemented using void * to maintain current driver implementation of segregated OS-specific implementation. This CL contains changes similar to http://git-master/r/77889 which was done for bcm4329. Bug 924521 (cherry picked from commit 8ce30af25321844cb0e89a3c23f0a6521885b6db) Signed-off-by: Mursalin Akon <makon@nvidia.com> Change-Id: I78ef9883ae1f85dbd3ad18e0ee2dece1559c4da8 Reviewed-on: http://git-master/r/82875 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Allen Martin <amartin@nvidia.com> Rebase-Id: R029fa8773120ae9a3170e236bc1357254e465f2c
Diffstat (limited to 'drivers/net/wireless/bcmdhd/dhd_linux.c')
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_linux.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c
index a76194164c6d..7603405252f0 100644
--- a/drivers/net/wireless/bcmdhd/dhd_linux.c
+++ b/drivers/net/wireless/bcmdhd/dhd_linux.c
@@ -42,6 +42,7 @@
#include <linux/ethtool.h>
#include <linux/fcntl.h>
#include <linux/fs.h>
+#include <linux/device.h>
#include <asm/uaccess.h>
#include <asm/unaligned.h>
@@ -2559,7 +2560,7 @@ static struct net_device_ops dhd_ops_virt = {
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) */
dhd_pub_t *
-dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen)
+dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen, void *dev)
{
dhd_info_t *dhd = NULL;
struct net_device *net = NULL;
@@ -2580,6 +2581,7 @@ dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen)
}
dhd_state |= DHD_ATTACH_STATE_NET_ALLOC;
+ SET_NETDEV_DEV(net, (struct device *)dev);
/* Allocate primary dhd_info */
if (!(dhd = MALLOC(osh, sizeof(dhd_info_t)))) {
DHD_ERROR(("%s: OOM - alloc dhd_info\n", __FUNCTION__));