[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1251789924.5327.4.camel@johannes.local>
Date: Tue, 01 Sep 2009 09:25:24 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Marcel Holtmann <marcel@...tmann.org>
Cc: netdev@...r.kernel.org, davem@...emloft.net,
shemminger@...ux-foundation.org
Subject: Re: [PATCH] net: Add DEVTYPE support for Ethernet based devices
On Tue, 2009-09-01 at 00:08 -0700, Marcel Holtmann wrote:
> 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.
johannes
Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)
Powered by blists - more mailing lists