Commit b9788755 authored by William Durand's avatar William Durand Committed by Greg Kroah-Hartman

staging: rtl8192e: rename RxIndicateSeq to rx_indicate_seq in rx_ts_record struct

Rename RxIndicateSeq to rx_indicate_seq to silence a checkpatch warning
about CamelCase.
Signed-off-by: default avatarWilliam Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210301215335.767-3-will+git@drnd.meSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 58ea1b1d
...@@ -43,7 +43,7 @@ struct tx_ts_record { ...@@ -43,7 +43,7 @@ struct tx_ts_record {
struct rx_ts_record { struct rx_ts_record {
struct ts_common_info ts_common_info; struct ts_common_info ts_common_info;
u16 RxIndicateSeq; u16 rx_indicate_seq;
u16 RxTimeoutIndicateSeq; u16 RxTimeoutIndicateSeq;
struct list_head RxPendingPktList; struct list_head RxPendingPktList;
struct timer_list RxPktPendingTimer; struct timer_list RxPktPendingTimer;
......
...@@ -36,18 +36,18 @@ static void RxPktPendingTimeout(struct timer_list *t) ...@@ -36,18 +36,18 @@ static void RxPktPendingTimeout(struct timer_list *t)
list_entry(pRxTs->RxPendingPktList.prev, list_entry(pRxTs->RxPendingPktList.prev,
struct rx_reorder_entry, List); struct rx_reorder_entry, List);
if (index == 0) if (index == 0)
pRxTs->RxIndicateSeq = pReorderEntry->SeqNum; pRxTs->rx_indicate_seq = pReorderEntry->SeqNum;
if (SN_LESS(pReorderEntry->SeqNum, if (SN_LESS(pReorderEntry->SeqNum,
pRxTs->RxIndicateSeq) || pRxTs->rx_indicate_seq) ||
SN_EQUAL(pReorderEntry->SeqNum, SN_EQUAL(pReorderEntry->SeqNum,
pRxTs->RxIndicateSeq)) { pRxTs->rx_indicate_seq)) {
list_del_init(&pReorderEntry->List); list_del_init(&pReorderEntry->List);
if (SN_EQUAL(pReorderEntry->SeqNum, if (SN_EQUAL(pReorderEntry->SeqNum,
pRxTs->RxIndicateSeq)) pRxTs->rx_indicate_seq))
pRxTs->RxIndicateSeq = pRxTs->rx_indicate_seq =
(pRxTs->RxIndicateSeq + 1) % 4096; (pRxTs->rx_indicate_seq + 1) % 4096;
netdev_dbg(ieee->dev, netdev_dbg(ieee->dev,
"%s(): Indicate SeqNum: %d\n", "%s(): Indicate SeqNum: %d\n",
...@@ -81,7 +81,7 @@ static void RxPktPendingTimeout(struct timer_list *t) ...@@ -81,7 +81,7 @@ static void RxPktPendingTimeout(struct timer_list *t)
} }
if (bPktInBuf && (pRxTs->RxTimeoutIndicateSeq == 0xffff)) { if (bPktInBuf && (pRxTs->RxTimeoutIndicateSeq == 0xffff)) {
pRxTs->RxTimeoutIndicateSeq = pRxTs->RxIndicateSeq; pRxTs->RxTimeoutIndicateSeq = pRxTs->rx_indicate_seq;
mod_timer(&pRxTs->RxPktPendingTimer, jiffies + mod_timer(&pRxTs->RxPktPendingTimer, jiffies +
msecs_to_jiffies(ieee->pHTInfo->RxReorderPendingTime) msecs_to_jiffies(ieee->pHTInfo->RxReorderPendingTime)
); );
...@@ -124,7 +124,7 @@ static void ResetTxTsEntry(struct tx_ts_record *pTS) ...@@ -124,7 +124,7 @@ static void ResetTxTsEntry(struct tx_ts_record *pTS)
static void ResetRxTsEntry(struct rx_ts_record *pTS) static void ResetRxTsEntry(struct rx_ts_record *pTS)
{ {
ResetTsCommonInfo(&pTS->ts_common_info); ResetTsCommonInfo(&pTS->ts_common_info);
pTS->RxIndicateSeq = 0xffff; pTS->rx_indicate_seq = 0xffff;
pTS->RxTimeoutIndicateSeq = 0xffff; pTS->RxTimeoutIndicateSeq = 0xffff;
ResetBaEntry(&pTS->RxAdmittedBARecord); ResetBaEntry(&pTS->RxAdmittedBARecord);
} }
......
...@@ -560,7 +560,7 @@ void rtllib_FlushRxTsPendingPkts(struct rtllib_device *ieee, ...@@ -560,7 +560,7 @@ void rtllib_FlushRxTsPendingPkts(struct rtllib_device *ieee,
} }
rtllib_indicate_packets(ieee, ieee->RfdArray, RfdCnt); rtllib_indicate_packets(ieee, ieee->RfdArray, RfdCnt);
pTS->RxIndicateSeq = 0xffff; pTS->rx_indicate_seq = 0xffff;
} }
static void RxReorderIndicatePacket(struct rtllib_device *ieee, static void RxReorderIndicatePacket(struct rtllib_device *ieee,
...@@ -576,21 +576,21 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee, ...@@ -576,21 +576,21 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
unsigned long flags; unsigned long flags;
netdev_dbg(ieee->dev, netdev_dbg(ieee->dev,
"%s(): Seq is %d, pTS->RxIndicateSeq is %d, WinSize is %d\n", "%s(): Seq is %d, pTS->rx_indicate_seq is %d, WinSize is %d\n",
__func__, SeqNum, pTS->RxIndicateSeq, WinSize); __func__, SeqNum, pTS->rx_indicate_seq, WinSize);
spin_lock_irqsave(&(ieee->reorder_spinlock), flags); spin_lock_irqsave(&(ieee->reorder_spinlock), flags);
WinEnd = (pTS->RxIndicateSeq + WinSize - 1) % 4096; WinEnd = (pTS->rx_indicate_seq + WinSize - 1) % 4096;
/* Rx Reorder initialize condition.*/ /* Rx Reorder initialize condition.*/
if (pTS->RxIndicateSeq == 0xffff) if (pTS->rx_indicate_seq == 0xffff)
pTS->RxIndicateSeq = SeqNum; pTS->rx_indicate_seq = SeqNum;
/* Drop out the packet which SeqNum is smaller than WinStart */ /* Drop out the packet which SeqNum is smaller than WinStart */
if (SN_LESS(SeqNum, pTS->RxIndicateSeq)) { if (SN_LESS(SeqNum, pTS->rx_indicate_seq)) {
netdev_dbg(ieee->dev, netdev_dbg(ieee->dev,
"Packet Drop! IndicateSeq: %d, NewSeq: %d\n", "Packet Drop! IndicateSeq: %d, NewSeq: %d\n",
pTS->RxIndicateSeq, SeqNum); pTS->rx_indicate_seq, SeqNum);
pHTInfo->RxReorderDropCounter++; pHTInfo->RxReorderDropCounter++;
{ {
int i; int i;
...@@ -608,18 +608,18 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee, ...@@ -608,18 +608,18 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
* 1. Incoming SeqNum is equal to WinStart =>Window shift 1 * 1. Incoming SeqNum is equal to WinStart =>Window shift 1
* 2. Incoming SeqNum is larger than the WinEnd => Window shift N * 2. Incoming SeqNum is larger than the WinEnd => Window shift N
*/ */
if (SN_EQUAL(SeqNum, pTS->RxIndicateSeq)) { if (SN_EQUAL(SeqNum, pTS->rx_indicate_seq)) {
pTS->RxIndicateSeq = (pTS->RxIndicateSeq + 1) % 4096; pTS->rx_indicate_seq = (pTS->rx_indicate_seq + 1) % 4096;
bMatchWinStart = true; bMatchWinStart = true;
} else if (SN_LESS(WinEnd, SeqNum)) { } else if (SN_LESS(WinEnd, SeqNum)) {
if (SeqNum >= (WinSize - 1)) if (SeqNum >= (WinSize - 1))
pTS->RxIndicateSeq = SeqNum + 1 - WinSize; pTS->rx_indicate_seq = SeqNum + 1 - WinSize;
else else
pTS->RxIndicateSeq = 4095 - pTS->rx_indicate_seq = 4095 -
(WinSize - (SeqNum + 1)) + 1; (WinSize - (SeqNum + 1)) + 1;
netdev_dbg(ieee->dev, netdev_dbg(ieee->dev,
"Window Shift! IndicateSeq: %d, NewSeq: %d\n", "Window Shift! IndicateSeq: %d, NewSeq: %d\n",
pTS->RxIndicateSeq, SeqNum); pTS->rx_indicate_seq, SeqNum);
} }
/* Indication process. /* Indication process.
...@@ -636,7 +636,7 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee, ...@@ -636,7 +636,7 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
/* Current packet is going to be indicated.*/ /* Current packet is going to be indicated.*/
netdev_dbg(ieee->dev, netdev_dbg(ieee->dev,
"Packets indication! IndicateSeq: %d, NewSeq: %d\n", "Packets indication! IndicateSeq: %d, NewSeq: %d\n",
pTS->RxIndicateSeq, SeqNum); pTS->rx_indicate_seq, SeqNum);
ieee->prxbIndicateArray[0] = prxb; ieee->prxbIndicateArray[0] = prxb;
index = 1; index = 1;
} else { } else {
...@@ -658,7 +658,7 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee, ...@@ -658,7 +658,7 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
netdev_dbg(ieee->dev, netdev_dbg(ieee->dev,
"%s(): Duplicate packet is dropped. IndicateSeq: %d, NewSeq: %d\n", "%s(): Duplicate packet is dropped. IndicateSeq: %d, NewSeq: %d\n",
__func__, pTS->RxIndicateSeq, __func__, pTS->rx_indicate_seq,
SeqNum); SeqNum);
list_add_tail(&pReorderEntry->List, list_add_tail(&pReorderEntry->List,
&ieee->RxReorder_Unused_List); &ieee->RxReorder_Unused_List);
...@@ -670,7 +670,7 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee, ...@@ -670,7 +670,7 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
} else { } else {
netdev_dbg(ieee->dev, netdev_dbg(ieee->dev,
"Pkt insert into struct buffer. IndicateSeq: %d, NewSeq: %d\n", "Pkt insert into struct buffer. IndicateSeq: %d, NewSeq: %d\n",
pTS->RxIndicateSeq, SeqNum); pTS->rx_indicate_seq, SeqNum);
} }
} else { } else {
/* Packets are dropped if there are not enough reorder /* Packets are dropped if there are not enough reorder
...@@ -701,8 +701,8 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee, ...@@ -701,8 +701,8 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
list_entry(pTS->RxPendingPktList.prev, list_entry(pTS->RxPendingPktList.prev,
struct rx_reorder_entry, struct rx_reorder_entry,
List); List);
if (SN_LESS(pReorderEntry->SeqNum, pTS->RxIndicateSeq) || if (SN_LESS(pReorderEntry->SeqNum, pTS->rx_indicate_seq) ||
SN_EQUAL(pReorderEntry->SeqNum, pTS->RxIndicateSeq)) { SN_EQUAL(pReorderEntry->SeqNum, pTS->rx_indicate_seq)) {
/* This protect struct buffer from overflow. */ /* This protect struct buffer from overflow. */
if (index >= REORDER_WIN_SIZE) { if (index >= REORDER_WIN_SIZE) {
netdev_err(ieee->dev, netdev_err(ieee->dev,
...@@ -714,8 +714,8 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee, ...@@ -714,8 +714,8 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
list_del_init(&pReorderEntry->List); list_del_init(&pReorderEntry->List);
if (SN_EQUAL(pReorderEntry->SeqNum, pTS->RxIndicateSeq)) if (SN_EQUAL(pReorderEntry->SeqNum, pTS->rx_indicate_seq))
pTS->RxIndicateSeq = (pTS->RxIndicateSeq + 1) % pTS->rx_indicate_seq = (pTS->rx_indicate_seq + 1) %
4096; 4096;
ieee->prxbIndicateArray[index] = pReorderEntry->prxb; ieee->prxbIndicateArray[index] = pReorderEntry->prxb;
...@@ -753,7 +753,7 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee, ...@@ -753,7 +753,7 @@ static void RxReorderIndicatePacket(struct rtllib_device *ieee,
if (bPktInBuf && pTS->RxTimeoutIndicateSeq == 0xffff) { if (bPktInBuf && pTS->RxTimeoutIndicateSeq == 0xffff) {
netdev_dbg(ieee->dev, "%s(): SET rx timeout timer\n", __func__); netdev_dbg(ieee->dev, "%s(): SET rx timeout timer\n", __func__);
pTS->RxTimeoutIndicateSeq = pTS->RxIndicateSeq; pTS->RxTimeoutIndicateSeq = pTS->rx_indicate_seq;
mod_timer(&pTS->RxPktPendingTimer, jiffies + mod_timer(&pTS->RxPktPendingTimer, jiffies +
msecs_to_jiffies(pHTInfo->RxReorderPendingTime)); msecs_to_jiffies(pHTInfo->RxReorderPendingTime));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment