diff options
author | Dan Williams <dcbw@redhat.com> | 2007-05-25 13:13:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-06-11 14:28:40 -0400 |
commit | 7732ca45c68f893689a8c0d8c6e2eb2bfefbc087 (patch) | |
tree | b894177055e35cd426cf36d923adfd8985e4e9ed /drivers/net/wireless/libertas/main.c | |
parent | 0681f989357416d7ef28ebaea4151ce70a6ae21c (diff) |
[PATCH] libertas: call SET_NETDEV_DEV from common code
Move usage of SET_NETDEV_DEV into common code since it has nothing
to do with bus-specific devices. Also fixes a bug where the mesh
device was getting SET_NETDEV_DEV called after register_netdevice,
resulting in no 'device' link in /sys/class/net/mshX/.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 0c39bcdbd44..b05a6f99a1b 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -763,7 +763,7 @@ static int wlan_service_main_thread(void *data) | |||
763 | * @param card A pointer to card | 763 | * @param card A pointer to card |
764 | * @return A pointer to wlan_private structure | 764 | * @return A pointer to wlan_private structure |
765 | */ | 765 | */ |
766 | wlan_private *libertas_add_card(void *card) | 766 | wlan_private *libertas_add_card(void *card, struct device *dmdev) |
767 | { | 767 | { |
768 | struct net_device *dev = NULL; | 768 | struct net_device *dev = NULL; |
769 | wlan_private *priv = NULL; | 769 | wlan_private *priv = NULL; |
@@ -808,6 +808,8 @@ wlan_private *libertas_add_card(void *card) | |||
808 | dev->flags |= IFF_BROADCAST | IFF_MULTICAST; | 808 | dev->flags |= IFF_BROADCAST | IFF_MULTICAST; |
809 | dev->set_multicast_list = wlan_set_multicast_list; | 809 | dev->set_multicast_list = wlan_set_multicast_list; |
810 | 810 | ||
811 | SET_NETDEV_DEV(dev, dmdev); | ||
812 | |||
811 | INIT_LIST_HEAD(&priv->adapter->cmdfreeq); | 813 | INIT_LIST_HEAD(&priv->adapter->cmdfreeq); |
812 | INIT_LIST_HEAD(&priv->adapter->cmdpendingq); | 814 | INIT_LIST_HEAD(&priv->adapter->cmdpendingq); |
813 | 815 | ||
@@ -891,7 +893,7 @@ EXPORT_SYMBOL_GPL(libertas_activate_card); | |||
891 | * @param priv A pointer to the wlan_private structure | 893 | * @param priv A pointer to the wlan_private structure |
892 | * @return 0 if successful, -X otherwise | 894 | * @return 0 if successful, -X otherwise |
893 | */ | 895 | */ |
894 | int libertas_add_mesh(wlan_private *priv) | 896 | int libertas_add_mesh(wlan_private *priv, struct device *dev) |
895 | { | 897 | { |
896 | struct net_device *mesh_dev = NULL; | 898 | struct net_device *mesh_dev = NULL; |
897 | int ret = 0; | 899 | int ret = 0; |
@@ -918,6 +920,8 @@ int libertas_add_mesh(wlan_private *priv) | |||
918 | memcpy(mesh_dev->dev_addr, priv->dev->dev_addr, | 920 | memcpy(mesh_dev->dev_addr, priv->dev->dev_addr, |
919 | sizeof(priv->dev->dev_addr)); | 921 | sizeof(priv->dev->dev_addr)); |
920 | 922 | ||
923 | SET_NETDEV_DEV(priv->mesh_dev, dev); | ||
924 | |||
921 | #ifdef WIRELESS_EXT | 925 | #ifdef WIRELESS_EXT |
922 | mesh_dev->wireless_handlers = (struct iw_handler_def *)&libertas_handler_def; | 926 | mesh_dev->wireless_handlers = (struct iw_handler_def *)&libertas_handler_def; |
923 | #endif | 927 | #endif |