[rt2x00-users] [PATCH] rt2x00: Set MIMO PS flag in tx descriptor for STAs in dynamic SMPS mode

Helmut Schaa helmut.schaa at googlemail.com
Tue Jul 27 17:59:12 AEST 2010


Am Dienstag 27 Juli 2010 schrieb Ivo Van Doorn:
> On Tue, Jul 27, 2010 at 9:46 AM, Helmut Schaa
> <helmut.schaa at googlemail.com> wrote:
> >
> > Signed-off-by: Helmut Schaa <helmut.schaa at googlemail.com>
> > ---
> >  drivers/net/wireless/rt2x00/rt2800lib.c   |    3 ++-
> >  drivers/net/wireless/rt2x00/rt2x00ht.c    |   10 ++++++++++
> >  drivers/net/wireless/rt2x00/rt2x00queue.h |    1 +
> >  3 files changed, 13 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> > index b66e0fd..833b157 100644
> > --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> > +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> > @@ -437,7 +437,8 @@ void rt2800_write_txwi(__le32 *txwi, struct txentry_desc *txdesc)
> >        rt2x00_desc_read(txwi, 0, &word);
> >        rt2x00_set_field32(&word, TXWI_W0_FRAG,
> >                           test_bit(ENTRY_TXD_MORE_FRAG, &txdesc->flags));
> > -       rt2x00_set_field32(&word, TXWI_W0_MIMO_PS, 0);
> > +       rt2x00_set_field32(&word, TXWI_W0_MIMO_PS,
> > +                          test_bit(ENTRY_TXD_HT_MIMO_PS, &txdesc->flags));
> >        rt2x00_set_field32(&word, TXWI_W0_CF_ACK, 0);
> >        rt2x00_set_field32(&word, TXWI_W0_TS,
> >                           test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags));
> > diff --git a/drivers/net/wireless/rt2x00/rt2x00ht.c b/drivers/net/wireless/rt2x00/rt2x00ht.c
> > index c004cd3..ad3c7ff 100644
> > --- a/drivers/net/wireless/rt2x00/rt2x00ht.c
> > +++ b/drivers/net/wireless/rt2x00/rt2x00ht.c
> > @@ -54,6 +54,16 @@ void rt2x00ht_create_tx_descriptor(struct queue_entry *entry,
> >         */
> >        if (txrate->flags & IEEE80211_TX_RC_MCS) {
> >                txdesc->mcs = txrate->idx;
> > +
> > +               /*
> > +                * MIMO PS should be set to 1 for STA's using dynamic SM PS
> > +                * when using more then one tx stream (>MCS7).
> > +                */
> > +               if (tx_info->control.sta && txdesc->mcs > 7 &&
> > +                   (tx_info->control.sta->ht_cap.cap &
> > +                    (WLAN_HT_CAP_SM_PS_DYNAMIC <<
> > +                     IEEE80211_HT_CAP_SM_PS_SHIFT)))
> > +                       __set_bit(ENTRY_TXD_HT_MIMO_PS, &txdesc->flags);
> >        } else {
> >                txdesc->mcs = rt2x00_get_rate_mcs(hwrate->mcs);
> >                if (txrate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)
> > diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h
> > index 191e777..2d7ea5e 100644
> > --- a/drivers/net/wireless/rt2x00/rt2x00queue.h
> > +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h
> > @@ -286,6 +286,7 @@ enum txentry_desc_flags {
> >        ENTRY_TXD_HT_AMPDU,
> >        ENTRY_TXD_HT_BW_40,
> >        ENTRY_TXD_HT_SHORT_GI,
> > +       ENTRY_TXD_HT_MIMO_PS,
> >  };
> 
> Please document this field, in the comment block above this
> enumeration.

Right, will resend soon.

Thanks,
Helmut





More information about the users mailing list