[rt2x00-users] [RFC 2/6] rt2x00: Introduce sta_add/remove callbacks

Helmut Schaa helmut.schaa at googlemail.com
Mon Jun 6 23:24:34 AEST 2011


Am Montag, 6. Juni 2011 schrieb Ivo Van Doorn:
> Hi,
> 
> >  /*
> > + * Private structure for storing STA details
> > + * wcid: Wireless Client ID
> > + */
> > +struct rt2x00_sta {
> > +       int wcid;
> > +};
> 
> Just a small thing, but for rt2x00_intf and other small structures
> like that, we have
> a nice function to cast the private field of the mac80211 structure to
> our private object.
> 
> Something like:
> 
> static inline struct rt2x00_sta* sta_to_sta(struct ieee80211_sta *sta)
> {
>     return (struct rt2x00_sta *)sta->drv_priv;
> }

Makes sense.

Helmut




More information about the users mailing list