netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	shemminger@linux-foundation.org
Subject: Re: [PATCH] net: Add DEVTYPE support for Ethernet based devices
Date: Tue, 01 Sep 2009 00:33:09 -0700	[thread overview]
Message-ID: <1251790389.1266.42.camel@localhost.localdomain> (raw)
In-Reply-To: <1251789924.5327.4.camel@johannes.local>

Hi Johannes,

> > The new SET_NETDEV_DEVTYPE() is a convenience helper to set the actual
> > device type. All device types are free form, but for convenience the
> > same strings as used with RFKILL are choosen.
> 
> > --- a/net/mac80211/iface.c
> > +++ b/net/mac80211/iface.c
> > @@ -754,6 +754,10 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
> >  	return 0;
> >  }
> >  
> > +static struct device_type wiphy_type = {
> > +	.name	= "wlan",
> > +};
> > +
> >  int ieee80211_if_add(struct ieee80211_local *local, const char *name,
> >  		     struct net_device **new_dev, enum nl80211_iftype type,
> >  		     struct vif_params *params)
> > @@ -785,6 +789,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
> >  
> >  	memcpy(ndev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN);
> >  	SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy));
> > +	SET_NETDEV_DEVTYPE(ndev, &wiphy_type);
> 
> Can't you move that into the NETDEV_REGISTER hook in cfg80211? That way
> orinoco, rndis and iwm don't need updating now.

I am not sure if that would work, but it is worth testing it. If it
works, I clearly would prefer this.

Regards

Marcel



  reply	other threads:[~2009-09-01  7:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-01  7:08 [PATCH] net: Add DEVTYPE support for Ethernet based devices Marcel Holtmann
2009-09-01  7:25 ` Johannes Berg
2009-09-01  7:33   ` Marcel Holtmann [this message]
2009-09-05  0:17 ` Marcel Holtmann
2009-09-05  3:27   ` David Miller
2009-09-05  4:34     ` Marcel Holtmann
2009-09-05  4:46       ` David Miller
2009-09-05  5:52         ` Marcel Holtmann
2009-09-05  5:55           ` David Miller
2009-09-05  4:49 ` Stephen Hemminger
2009-09-05  5:55   ` Marcel Holtmann
2009-09-11 19:37 ` David Miller

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=1251790389.1266.42.camel@localhost.localdomain \
    --to=marcel@holtmann.org \
    --cc=davem@davemloft.net \
    --cc=johannes@sipsolutions.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.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 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).