linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: Frans Leerink <f.leerink@xs4all.nl>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH] prism54: set netdev type to "wlan"
Date: Fri, 08 Nov 2013 13:39:44 -0600	[thread overview]
Message-ID: <1383939584.29096.10.camel@dcbw.foobar.com> (raw)
In-Reply-To: <2774683.Pvb2zYysB7@md8338-opensuse-12-3.site>

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>
---
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c
index 5970ff6..d498b02 100644
--- a/drivers/net/wireless/prism54/islpci_dev.c
+++ b/drivers/net/wireless/prism54/islpci_dev.c
@@ -807,27 +807,30 @@ static const struct net_device_ops islpci_netdev_ops = {
 	.ndo_start_xmit		= islpci_eth_transmit,
 	.ndo_tx_timeout		= islpci_eth_tx_timeout,
 	.ndo_set_mac_address 	= prism54_set_mac_address,
 	.ndo_change_mtu		= eth_change_mtu,
 	.ndo_validate_addr	= eth_validate_addr,
 };
 
+static struct device_type wlan_type = {
+	.name	= "wlan",
+};
+
 struct net_device *
 islpci_setup(struct pci_dev *pdev)
 {
 	islpci_private *priv;
 	struct net_device *ndev = alloc_etherdev(sizeof (islpci_private));
 
 	if (!ndev)
 		return ndev;
 
 	pci_set_drvdata(pdev, ndev);
-#if defined(SET_NETDEV_DEV)
 	SET_NETDEV_DEV(ndev, &pdev->dev);
-#endif
+	SET_NETDEV_DEVTYPE(ndev, &wlan_type);
 
 	/* setup the structure members */
 	ndev->base_addr = pci_resource_start(pdev, 0);
 	ndev->irq = pdev->irq;
 
 	/* initialize the function pointers */
 	ndev->netdev_ops = &islpci_netdev_ops;


  reply	other threads:[~2013-11-08 19:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-08 15:31 Bug report - Wrong naming of my Wireless Network card enp3s6, should have been wlp3s6 Frans Leerink
2013-11-08 19:39 ` Dan Williams [this message]
2013-11-09  2:20   ` [PATCH] prism54: set netdev type to "wlan" Larry Finger
2013-11-11 14:55     ` Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1383939584.29096.10.camel@dcbw.foobar.com \
    --to=dcbw@redhat.com \
    --cc=f.leerink@xs4all.nl \
    --cc=linux-wireless@vger.kernel.org \
    --subject='Re: [PATCH] prism54: set netdev type to "wlan"' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).