[rt2x00-users] [RFC 1/6] rt2x00: Move bssidx calculation into its own function
Helmut Schaa
helmut.schaa at googlemail.com
Mon Jun 6 23:22:34 EST 2011
Am Montag, 6. Juni 2011 schrieb Ivo Van Doorn:
> Hi,
>
> > --- a/drivers/net/wireless/rt2x00/rt2x00mac.c
> > +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
> > @@ -463,6 +463,19 @@ int rt2x00mac_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
> > }
> > EXPORT_SYMBOL_GPL(rt2x00mac_set_tim);
> >
> > +u32 rt2x00mac_get_bssidx(struct rt2x00_dev *rt2x00dev,
> > + struct ieee80211_vif *vif)
> > +{
> > + /*
> > + * When in STA mode, bssidx is always 0 otherwise local_address[5]
> > + * contains the bss number, see BSS_ID_MASK comments for details.
> > + */
> > + if (rt2x00dev->intf_sta_count)
> > + return 0;
> > + return vif->addr[5] & (rt2x00dev->ops->max_ap_intf - 1);
> > +}
> > +EXPORT_SYMBOL_GPL(rt2x00mac_get_bssidx);
>
> This function doesn't really belong in rt2x00mac, unless it won't be
> used outside of this file.
> So perhaps it can be an static inline function in rt2x00.h, or perhaps
> placed somewhere in rt2x00dev.c?
You're right. I'll make it an inline in rt2x00.h since it's quite short.
Thanks,
Helmut
More information about the users
mailing list