diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-26 15:46:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-26 15:46:08 -0700 |
commit | 23908db413eccd77084b09c9b0a4451dfb0524c0 (patch) | |
tree | 646f21a92496bdc04175e95642b0ecb2dc3dd09e /drivers/staging/rtl8192e/rtl819x_TSProc.c | |
parent | 8d7804a2f03dbd34940fcb426450c730adf29dae (diff) | |
parent | 53a20e9e378ecd52f0afa4b60f8f8c81b6f97c27 (diff) | |
download | linux-23908db413eccd77084b09c9b0a4451dfb0524c0.tar.bz2 |
Merge tag 'staging-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver updates from Greg KH:
"Here's the big, really big, staging tree patches for 4.2-rc1.
Loads of stuff in here, almost all just coding style fixes / churn,
and a few new drivers as well, one of which I just disabled from the
build a few minutes ago due to way too many build warnings.
Other than the one "disable this driver" patch, all of these have been
in linux-next for quite a while with no reported issues"
* tag 'staging-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1163 commits)
staging: wilc1000: disable driver due to build warnings
Staging: rts5208: fix CHANGE_LINK_STATE value
Staging: sm750fb: ddk750_swi2c.c: Insert spaces before parenthesis
Staging: sm750fb: ddk750_swi2c.c: Place braces on correct lines
Staging: sm750fb: ddk750_swi2c.c: Insert spaces around operators
Staging: sm750fb: ddk750_swi2c.c: Replace spaces with tabs
Staging: sm750fb: ddk750_swi2c.h: Shorten lines to under 80 characters
Staging: sm750fb: ddk750_swi2c.h: Replace spaces with tabs
Staging: sm750fb: modedb.h: Shorten lines to under 80 characters
Staging: sm750fb: modedb.h: Replace spaces with tabs
staging: comedi: addi_apci_3120: rename 'this_board' variables
staging: comedi: addi_apci_1516: rename 'this_board' variables
staging: comedi: ni_atmio: cleanup ni_getboardtype()
staging: comedi: vmk80xx: sanity check context used to get the boardinfo
staging: comedi: vmk80xx: rename 'boardinfo' variables
staging: comedi: dt3000: rename 'this_board' variables
staging: comedi: adv_pci_dio: rename 'this_board' variables
staging: comedi: cb_pcidas64: rename 'thisboard' variables
staging: comedi: cb_pcidas: rename 'thisboard' variables
staging: comedi: me4000: rename 'thisboard' variables
...
Diffstat (limited to 'drivers/staging/rtl8192e/rtl819x_TSProc.c')
-rw-r--r-- | drivers/staging/rtl8192e/rtl819x_TSProc.c | 93 |
1 files changed, 44 insertions, 49 deletions
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c index 7d77d056228d..05aea4321b9d 100644 --- a/drivers/staging/rtl8192e/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c @@ -49,8 +49,10 @@ static void RxPktPendingTimeout(unsigned long data) if (index == 0) pRxTs->RxIndicateSeq = pReorderEntry->SeqNum; - if (SN_LESS(pReorderEntry->SeqNum, pRxTs->RxIndicateSeq) || - SN_EQUAL(pReorderEntry->SeqNum, pRxTs->RxIndicateSeq)) { + if (SN_LESS(pReorderEntry->SeqNum, + pRxTs->RxIndicateSeq) || + SN_EQUAL(pReorderEntry->SeqNum, + pRxTs->RxIndicateSeq)) { list_del_init(&pReorderEntry->List); if (SN_EQUAL(pReorderEntry->SeqNum, @@ -58,9 +60,9 @@ static void RxPktPendingTimeout(unsigned long data) pRxTs->RxIndicateSeq = (pRxTs->RxIndicateSeq + 1) % 4096; - RTLLIB_DEBUG(RTLLIB_DL_REORDER, - "%s(): Indicate SeqNum: %d\n", - __func__, pReorderEntry->SeqNum); + netdev_dbg(ieee->dev, + "%s(): Indicate SeqNum: %d\n", + __func__, pReorderEntry->SeqNum); ieee->stats_IndicateArray[index] = pReorderEntry->prxb; index++; @@ -78,8 +80,9 @@ static void RxPktPendingTimeout(unsigned long data) pRxTs->RxTimeoutIndicateSeq = 0xffff; if (index > REORDER_WIN_SIZE) { - RTLLIB_DEBUG(RTLLIB_DL_ERR, - "RxReorderIndicatePacket(): Rx Reorder struct buffer full!!\n"); + netdev_warn(ieee->dev, + "%s(): Rx Reorder struct buffer full\n", + __func__); spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags); return; @@ -91,7 +94,8 @@ static void RxPktPendingTimeout(unsigned long data) if (bPktInBuf && (pRxTs->RxTimeoutIndicateSeq == 0xffff)) { pRxTs->RxTimeoutIndicateSeq = pRxTs->RxIndicateSeq; mod_timer(&pRxTs->RxPktPendingTimer, jiffies + - msecs_to_jiffies(ieee->pHTInfo->RxReorderPendingTime)); + msecs_to_jiffies(ieee->pHTInfo->RxReorderPendingTime) + ); } spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags); } @@ -104,8 +108,7 @@ static void TsAddBaProcess(unsigned long data) TxTsRecord[num]); TsInitAddBA(ieee, pTxTs, BA_POLICY_IMMEDIATE, false); - RTLLIB_DEBUG(RTLLIB_DL_BA, - "TsAddBaProcess(): ADDBA Req is started!!\n"); + netdev_dbg(ieee->dev, "%s(): ADDBA Req is started\n", __func__); } static void ResetTsCommonInfo(struct ts_common_info *pTsCommonInfo) @@ -144,29 +147,29 @@ void TSInitialize(struct rtllib_device *ieee) struct rx_reorder_entry *pRxReorderEntry = ieee->RxReorderEntry; u8 count = 0; - RTLLIB_DEBUG(RTLLIB_DL_TS, "==========>%s()\n", __func__); + netdev_vdbg(ieee->dev, "%s()\n", __func__); INIT_LIST_HEAD(&ieee->Tx_TS_Admit_List); INIT_LIST_HEAD(&ieee->Tx_TS_Pending_List); INIT_LIST_HEAD(&ieee->Tx_TS_Unused_List); for (count = 0; count < TOTAL_TS_NUM; count++) { pTxTS->num = count; - _setup_timer(&pTxTS->TsCommonInfo.SetupTimer, + setup_timer(&pTxTS->TsCommonInfo.SetupTimer, TsSetupTimeOut, (unsigned long) pTxTS); - _setup_timer(&pTxTS->TsCommonInfo.InactTimer, + setup_timer(&pTxTS->TsCommonInfo.InactTimer, TsInactTimeout, (unsigned long) pTxTS); - _setup_timer(&pTxTS->TsAddBaTimer, + setup_timer(&pTxTS->TsAddBaTimer, TsAddBaProcess, (unsigned long) pTxTS); - _setup_timer(&pTxTS->TxPendingBARecord.Timer, + setup_timer(&pTxTS->TxPendingBARecord.Timer, BaSetupTimeOut, (unsigned long) pTxTS); - _setup_timer(&pTxTS->TxAdmittedBARecord.Timer, + setup_timer(&pTxTS->TxAdmittedBARecord.Timer, TxBaInactTimeout, (unsigned long) pTxTS); @@ -183,19 +186,19 @@ void TSInitialize(struct rtllib_device *ieee) pRxTS->num = count; INIT_LIST_HEAD(&pRxTS->RxPendingPktList); - _setup_timer(&pRxTS->TsCommonInfo.SetupTimer, + setup_timer(&pRxTS->TsCommonInfo.SetupTimer, TsSetupTimeOut, (unsigned long) pRxTS); - _setup_timer(&pRxTS->TsCommonInfo.InactTimer, + setup_timer(&pRxTS->TsCommonInfo.InactTimer, TsInactTimeout, (unsigned long) pRxTS); - _setup_timer(&pRxTS->RxAdmittedBARecord.Timer, + setup_timer(&pRxTS->RxAdmittedBARecord.Timer, RxBaInactTimeout, (unsigned long) pRxTS); - _setup_timer(&pRxTS->RxPktPendingTimer, + setup_timer(&pRxTS->RxPktPendingTimer, RxPktPendingTimeout, (unsigned long) pRxTS); @@ -269,10 +272,10 @@ static struct ts_common_info *SearchAdmitTRStream(struct rtllib_device *ieee, if (!search_dir[dir]) continue; list_for_each_entry(pRet, psearch_list, List) { - if (memcmp(pRet->Addr, Addr, 6) == 0) - if (pRet->TSpec.f.TSInfo.field.ucTSID == TID) - if (pRet->TSpec.f.TSInfo.field.ucDirection == dir) - break; + if (memcmp(pRet->Addr, Addr, 6) == 0 && + pRet->TSpec.f.TSInfo.field.ucTSID == TID && + pRet->TSpec.f.TSInfo.field.ucDirection == dir) + break; } if (&pRet->List != psearch_list) @@ -318,17 +321,15 @@ bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS, enum direction_value Dir; if (is_multicast_ether_addr(Addr)) { - RTLLIB_DEBUG(RTLLIB_DL_ERR, - "ERR! get TS for Broadcast or Multicast\n"); + netdev_warn(ieee->dev, "Get TS for Broadcast or Multicast\n"); return false; } if (ieee->current_network.qos_data.supported == 0) { UP = 0; } else { if (!IsACValid(TID)) { - RTLLIB_DEBUG(RTLLIB_DL_ERR, - "ERR! in %s(), TID(%d) is not valid\n", - __func__, TID); + netdev_warn(ieee->dev, "%s(): TID(%d) is not valid\n", + __func__, TID); return false; } @@ -357,8 +358,7 @@ bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS, return true; if (!bAddNewTs) { - RTLLIB_DEBUG(RTLLIB_DL_TS, - "add new TS failed(tid:%d)\n", UP); + netdev_dbg(ieee->dev, "add new TS failed(tid:%d)\n", UP); return false; } @@ -374,7 +374,6 @@ bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS, ((TxRxSelect == TX_DIR) ? DIR_DOWN : DIR_UP) : ((TxRxSelect == TX_DIR) ? DIR_UP : DIR_DOWN); - RTLLIB_DEBUG(RTLLIB_DL_TS, "to add Ts\n"); if (!list_empty(pUnusedList)) { (*ppTS) = list_entry(pUnusedList->next, struct ts_common_info, List); @@ -393,9 +392,9 @@ bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS, ResetRxTsEntry(tmp); } - RTLLIB_DEBUG(RTLLIB_DL_TS, - "to init current TS, UP:%d, Dir:%d, addr: %pM ppTs=%p\n", - UP, Dir, Addr, *ppTS); + netdev_dbg(ieee->dev, + "to init current TS, UP:%d, Dir:%d, addr: %pM ppTs=%p\n", + UP, Dir, Addr, *ppTS); pTSInfo->field.ucTrafficType = 0; pTSInfo->field.ucTSID = UP; pTSInfo->field.ucDirection = Dir; @@ -413,14 +412,14 @@ bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS, return true; } - RTLLIB_DEBUG(RTLLIB_DL_ERR, - "ERR!!in function %s() There is not enough dir=%d(0=up down=1) TS record to be used!!", - __func__, Dir); + netdev_warn(ieee->dev, + "There is not enough dir=%d(0=up down=1) TS record to be used!", + Dir); return false; } -static void RemoveTsEntry(struct rtllib_device *ieee, struct ts_common_info *pTs, - enum tr_select TxRxSelect) +static void RemoveTsEntry(struct rtllib_device *ieee, + struct ts_common_info *pTs, enum tr_select TxRxSelect) { del_timer_sync(&pTs->SetupTimer); del_timer_sync(&pTs->InactTimer); @@ -437,9 +436,8 @@ static void RemoveTsEntry(struct rtllib_device *ieee, struct ts_common_info *pTs pRxReorderEntry = (struct rx_reorder_entry *) list_entry(pRxTS->RxPendingPktList.prev, struct rx_reorder_entry, List); - RTLLIB_DEBUG(RTLLIB_DL_REORDER, - "%s(): Delete SeqNum %d!\n", __func__, - pRxReorderEntry->SeqNum); + netdev_dbg(ieee->dev, "%s(): Delete SeqNum %d!\n", + __func__, pRxReorderEntry->SeqNum); list_del_init(&pRxReorderEntry->List); { int i = 0; @@ -539,16 +537,13 @@ void TsStartAddBaProcess(struct rtllib_device *ieee, struct tx_ts_record *pTxTS) pTxTS->bAddBaReqInProgress = true; if (pTxTS->bAddBaReqDelayed) { - RTLLIB_DEBUG(RTLLIB_DL_BA, - "TsStartAddBaProcess(): Delayed Start ADDBA after 60 sec!!\n"); + netdev_dbg(ieee->dev, "Start ADDBA after 60 sec!!\n"); mod_timer(&pTxTS->TsAddBaTimer, jiffies + msecs_to_jiffies(TS_ADDBA_DELAY)); } else { - RTLLIB_DEBUG(RTLLIB_DL_BA, - "TsStartAddBaProcess(): Immediately Start ADDBA now!!\n"); + netdev_dbg(ieee->dev, "Immediately Start ADDBA\n"); mod_timer(&pTxTS->TsAddBaTimer, jiffies+10); } } else - RTLLIB_DEBUG(RTLLIB_DL_BA, "%s()==>BA timer is already added\n", - __func__); + netdev_dbg(ieee->dev, "BA timer is already added\n"); } |