replace the hard coded value for the maximum sequence number of a ieee
802.11 frame by a Macro.

Signed-off-by: Hari Prasath Gujulan Elango <hguju...@visteon.com>
---
 drivers/staging/rtl8192e/rtllib_tx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_tx.c 
b/drivers/staging/rtl8192e/rtllib_tx.c
index 3b15963..6325ceb 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -326,7 +326,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device 
*ieee,
                        goto FORCED_AGG_SETTING;
                } else if (pTxTs->bUsingBa == false) {
                        if 
(SN_LESS(pTxTs->TxAdmittedBARecord.BaStartSeqCtrl.field.SeqNum,
-                          (pTxTs->TxCurSeq+1)%4096))
+                          (pTxTs->TxCurSeq+1)%IEEE80211_MAX_SEQ))
                                pTxTs->bUsingBa = true;
                        else
                                goto FORCED_AGG_SETTING;
@@ -525,7 +525,7 @@ u16 rtllib_query_seqnum(struct rtllib_device *ieee, struct 
sk_buff *skb,
                    skb->priority, TX_DIR, true))
                        return 0;
                seqnum = pTS->TxCurSeq;
-               pTS->TxCurSeq = (pTS->TxCurSeq+1)%4096;
+               pTS->TxCurSeq = (pTS->TxCurSeq+1)%IEEE80211_MAX_SEQ;
                return seqnum;
        }
        return 0;
-- 
1.9.1
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to