netdev
[Top] [All Lists]

Re: [4/6] ipw2100: fix after "ieee80211_device alignment fix"

To: Pavel Machek <pavel@xxxxxxx>
Subject: Re: [4/6] ipw2100: fix after "ieee80211_device alignment fix"
From: Jirka Bohac <jbohac@xxxxxxx>
Date: Tue, 24 May 2005 21:18:33 +0200
Cc: Jiri Benc <jbenc@xxxxxxx>, NetDev <netdev@xxxxxxxxxxx>
In-reply-to: <20050524185820.GC2268@xxxxxxxxxx>
References: <20050524150711.01632672@xxxxxxxxxxxxxxx> <20050524151802.59124dde@xxxxxxxxxxxxxxx> <20050524185820.GC2268@xxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6i
On Tue, May 24, 2005 at 08:58:20PM +0200, Pavel Machek wrote:
> On Út 24-05-05 15:18:02, Jiri Benc wrote:
> > Fixes ipw2100 after ieee80211_device alignment fix
> > (patch [2/5] ieee80211: ieee80211_device alignment fix and cleanup)
> > 
> > 
> > Signed-off-by: Jiri Benc <jbenc@xxxxxxx>
> > Signed-off-by: Jirka Bohac <jbohac@xxxxxxx>
> > 
> > --- linux-2.6.12-rc2-mm3.01/drivers/net/wireless/ipw2100.c  2005-05-19 
> > 16:23:00.000000000 +0200
> > +++ linux-2.6.12-rc2-mm3.04/drivers/net/wireless/ipw2100.c  2005-05-19 
> > 17:35:48.000000000 +0200
> > @@ -1717,7 +1717,7 @@
> >  /* Called by register_netdev() */
> >  static int ipw2100_net_init(struct net_device *dev)
> >  {
> > -   struct ipw2100_priv *priv = ieee80211_priv(dev);
> > +   struct ipw2100_priv *priv = ieee80211_priv(netdev_priv(dev));
> >     return ipw2100_up(priv, 1);
> >  }
> 
> 
> Ugh, that is getting rather ugly. Perhaps inline function doing this
> should be introduced?

Ok, this is a little ugly, but this driver is slowly getting
re-written as work on the ieee80211 layer proceeds. 

Drivers will not be supposed to use references to struct net_device
internally. Instead, they should be using references to struct
ieee80211_device -- this will be their interface to the stack,
not net_device. So this patch is a quick fix for the driver to
work with the unfinished layer. This "call" will disappear when
the layer is finished.

Both ieee80211_priv() and netdev_priv() are inline.


Regards,


-- 
Jirka Bohac <jbohac@xxxxxxx>
SUSE Labs, SUSE CR


<Prev in Thread] Current Thread [Next in Thread>