All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Dan Williams <dcbw@redhat.com>, Frans Leerink <f.leerink@xs4all.nl>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] prism54: set netdev type to "wlan"
Date: Fri, 08 Nov 2013 20:20:49 -0600	[thread overview]
Message-ID: <527D9C01.5070306@lwfinger.net> (raw)
In-Reply-To: <1383939584.29096.10.camel@dcbw.foobar.com>

On 11/08/2013 01:39 PM, Dan Williams wrote:
> 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>

Should this be sent to Stable?

Larry

> ---
> 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;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


  reply	other threads:[~2013-11-09  2:20 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 ` [PATCH] prism54: set netdev type to "wlan" Dan Williams
2013-11-09  2:20   ` Larry Finger [this message]
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=527D9C01.5070306@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=dcbw@redhat.com \
    --cc=f.leerink@xs4all.nl \
    --cc=linux-wireless@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.