Skip to content

Commit ad03714

Browse files
Dan Williamsgregkh
authored andcommitted
prism54: set netdev type to "wlan"
commit 8e3ffa4 upstream. Userspace uses the netdev devtype for stuff like device naming and type detection. Be nice and set it. Remove the pointless #if/#endif around SET_NETDEV_DEV too. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 378c167 commit ad03714

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎drivers/net/wireless/prism54/islpci_dev.c‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,10 @@ static const struct net_device_ops islpci_netdev_ops = {
811811
.ndo_validate_addr = eth_validate_addr,
812812
};
813813

814+
static struct device_type wlan_type = {
815+
.name = "wlan",
816+
};
817+
814818
struct net_device *
815819
islpci_setup(struct pci_dev *pdev)
816820
{
@@ -821,9 +825,8 @@ islpci_setup(struct pci_dev *pdev)
821825
return ndev;
822826

823827
pci_set_drvdata(pdev, ndev);
824-
#if defined(SET_NETDEV_DEV)
825828
SET_NETDEV_DEV(ndev, &pdev->dev);
826-
#endif
829+
SET_NETDEV_DEVTYPE(ndev, &wlan_type);
827830

828831
/* setup the structure members */
829832
ndev->base_addr = pci_resource_start(pdev, 0);

0 commit comments

Comments
 (0)