p54: fix sequence no. accounting off-by-one error
authorChristian Lamparter <chunkeey@googlemail.com>
Thu, 6 Jan 2011 22:47:52 +0000 (23:47 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 10 Jan 2011 20:40:53 +0000 (15:40 -0500)
P54_HDR_FLAG_DATA_OUT_SEQNR is meant to tell the
firmware that "the frame's sequence number has
already been set by the application."

Whereas IEEE80211_TX_CTL_ASSIGN_SEQ is set for
frames which lack a valid sequence number and
either the driver or firmware has to assign one.

Yup, it's the exact opposite!

Cc: <stable@kernel.org>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/p54/txrx.c

index 76b2318a7dc776a460c335133289953cff8806fc..f618b9623e5a6d38753a8ee010fb61f4f8777820 100644 (file)
@@ -618,7 +618,7 @@ static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
        else
                *burst_possible = false;
 
-       if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)
+       if (!(info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ))
                *flags |= P54_HDR_FLAG_DATA_OUT_SEQNR;
 
        if (info->flags & IEEE80211_TX_CTL_PSPOLL_RESPONSE)