[rt2x00-users] [RFC] rt2x00: rt2800: add ba session definition to mac_wcid_entry

Helmut Schaa helmut.schaa at googlemail.com
Fri May 7 22:59:34 AEST 2010


Am Freitag 07 Mai 2010 schrieb Gertjan van Wingerde:
> On 05/07/10 14:39, Helmut Schaa wrote:
> > This updates the definition of mac_wcid_entry to also contain the
> > ba session mask. Every bit in the mask represents one TID that should
> > be blockacked by the device for the appropriate wicd.
> > 
> > Sending as RFC as it was quite difficult to understand what the
> > code in the ralink driver does ;) but I guess the below definition should
> > be correct.
> > 
> > What I've noticed as well is that the wicd entry is currently only
> > written when hw crypto is un use, right? We would need to change that
> > to get also written in case of ba sessions (via ampdu_action for example).
> > 
> > Signed-off-by: Helmut Schaa <helmut.schaa at googlemail.com>
> > ---
> >  drivers/net/wireless/rt2x00/rt2800.h |    5 +++--
> >  1 files changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
> > index 2aa0375..916c965 100644
> > --- a/drivers/net/wireless/rt2x00/rt2800.h
> > +++ b/drivers/net/wireless/rt2x00/rt2800.h
> > @@ -1340,7 +1340,8 @@
> >  
> >  /*
> >   * Security key table memory.
> > - * MAC_WCID_BASE: 8-bytes (use only 6 bytes) * 256 entry
> > + * MAC_WCID_BASE:
> > + * 8-bytes (6 bytes MAC address + 2 bytes BA session mask) * 256 entry
> >   * PAIRWISE_KEY_TABLE_BASE: 32-byte * 256 entry
> >   * MAC_IVEIV_TABLE_BASE: 8-byte * 256-entry
> >   * MAC_WCID_ATTRIBUTE_BASE: 4-byte * 256-entry
> > @@ -1369,7 +1370,7 @@
> >  
> >  struct mac_wcid_entry {
> >  	u8 mac[6];
> > -	u8 reserved[2];
> > +	u16 ba_session_mask;
> >  } __attribute__ ((packed));
> >  
> >  struct hw_key_entry {
> 
> Hmm, the data sheet specifies this as two 8-bit fields, in which the first one (the one
> immediately following the mac field) is for TIDs 0-7 and the second one is for TIDs 8-15.
> Perhaps it is better to look at this as:
> 	u8 ba_session_mask[2];
> As then it is less likely to forget about the bit ordering.

Ah, thanks for looking this up.

Helmut




More information about the users mailing list