diff options
Diffstat (limited to 'drivers/staging/rtl8192e/rtl819x_TSProc.c')
-rw-r--r-- | drivers/staging/rtl8192e/rtl819x_TSProc.c | 156 |
1 files changed, 78 insertions, 78 deletions
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c index 3206fdb3e6..7e73d31dcc 100644 --- a/drivers/staging/rtl8192e/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c @@ -12,7 +12,7 @@ static void RxPktPendingTimeout(struct timer_list *t) { struct rx_ts_record *ts = from_timer(ts, t, rx_pkt_pending_timer); struct rtllib_device *ieee = container_of(ts, struct rtllib_device, - RxTsRecord[ts->num]); + rx_ts_records[ts->num]); struct rx_reorder_entry *pReorderEntry = NULL; @@ -25,7 +25,7 @@ static void RxPktPendingTimeout(struct timer_list *t) while (!list_empty(&ts->rx_pending_pkt_list)) { pReorderEntry = (struct rx_reorder_entry *) list_entry(ts->rx_pending_pkt_list.prev, - struct rx_reorder_entry, List); + struct rx_reorder_entry, list); if (index == 0) ts->rx_indicate_seq = pReorderEntry->SeqNum; @@ -33,7 +33,7 @@ static void RxPktPendingTimeout(struct timer_list *t) ts->rx_indicate_seq) || SN_EQUAL(pReorderEntry->SeqNum, ts->rx_indicate_seq)) { - list_del_init(&pReorderEntry->List); + list_del_init(&pReorderEntry->list); if (SN_EQUAL(pReorderEntry->SeqNum, ts->rx_indicate_seq)) @@ -47,7 +47,7 @@ static void RxPktPendingTimeout(struct timer_list *t) pReorderEntry->prxb; index++; - list_add_tail(&pReorderEntry->List, + list_add_tail(&pReorderEntry->list, &ieee->RxReorder_Unused_List); } else { bPktInBuf = true; @@ -82,31 +82,31 @@ static void RxPktPendingTimeout(struct timer_list *t) static void TsAddBaProcess(struct timer_list *t) { - struct tx_ts_record *pTxTs = from_timer(pTxTs, t, TsAddBaTimer); - u8 num = pTxTs->num; - struct rtllib_device *ieee = container_of(pTxTs, struct rtllib_device, - TxTsRecord[num]); + struct tx_ts_record *ts = from_timer(ts, t, ts_add_ba_timer); + u8 num = ts->num; + struct rtllib_device *ieee = container_of(ts, struct rtllib_device, + tx_ts_records[num]); - rtllib_ts_init_add_ba(ieee, pTxTs, BA_POLICY_IMMEDIATE, false); + rtllib_ts_init_add_ba(ieee, ts, BA_POLICY_IMMEDIATE, false); netdev_dbg(ieee->dev, "%s(): ADDBA Req is started\n", __func__); } -static void ResetTsCommonInfo(struct ts_common_info *pTsCommonInfo) +static void ResetTsCommonInfo(struct ts_common_info *ts_common_info) { - eth_zero_addr(pTsCommonInfo->addr); - memset(&pTsCommonInfo->TSpec, 0, sizeof(struct qos_tsinfo)); + eth_zero_addr(ts_common_info->addr); + memset(&ts_common_info->tspec, 0, sizeof(struct qos_tsinfo)); } static void ResetTxTsEntry(struct tx_ts_record *ts) { - ResetTsCommonInfo(&ts->TsCommonInfo); - ts->TxCurSeq = 0; - ts->bAddBaReqInProgress = false; - ts->bAddBaReqDelayed = false; - ts->bUsingBa = false; - ts->bDisable_AddBa = false; - rtllib_reset_ba_entry(&ts->TxAdmittedBARecord); - rtllib_reset_ba_entry(&ts->TxPendingBARecord); + ResetTsCommonInfo(&ts->ts_common_info); + ts->tx_cur_seq = 0; + ts->add_ba_req_in_progress = false; + ts->add_ba_req_delayed = false; + ts->using_ba = false; + ts->disable_add_ba = false; + rtllib_reset_ba_entry(&ts->tx_admitted_ba_record); + rtllib_reset_ba_entry(&ts->tx_pending_ba_record); } static void ResetRxTsEntry(struct rx_ts_record *ts) @@ -119,8 +119,8 @@ static void ResetRxTsEntry(struct rx_ts_record *ts) void rtllib_ts_init(struct rtllib_device *ieee) { - struct tx_ts_record *pTxTS = ieee->TxTsRecord; - struct rx_ts_record *rxts = ieee->RxTsRecord; + struct tx_ts_record *pTxTS = ieee->tx_ts_records; + struct rx_ts_record *rxts = ieee->rx_ts_records; struct rx_reorder_entry *pRxReorderEntry = ieee->RxReorderEntry; u8 count = 0; @@ -130,15 +130,15 @@ void rtllib_ts_init(struct rtllib_device *ieee) for (count = 0; count < TOTAL_TS_NUM; count++) { pTxTS->num = count; - timer_setup(&pTxTS->TsAddBaTimer, TsAddBaProcess, 0); + timer_setup(&pTxTS->ts_add_ba_timer, TsAddBaProcess, 0); - timer_setup(&pTxTS->TxPendingBARecord.timer, rtllib_ba_setup_timeout, + timer_setup(&pTxTS->tx_pending_ba_record.timer, rtllib_ba_setup_timeout, 0); - timer_setup(&pTxTS->TxAdmittedBARecord.timer, + timer_setup(&pTxTS->tx_admitted_ba_record.timer, rtllib_tx_ba_inact_timeout, 0); ResetTxTsEntry(pTxTS); - list_add_tail(&pTxTS->TsCommonInfo.List, + list_add_tail(&pTxTS->ts_common_info.list, &ieee->Tx_TS_Unused_List); pTxTS++; } @@ -155,13 +155,13 @@ void rtllib_ts_init(struct rtllib_device *ieee) timer_setup(&rxts->rx_pkt_pending_timer, RxPktPendingTimeout, 0); ResetRxTsEntry(rxts); - list_add_tail(&rxts->ts_common_info.List, + list_add_tail(&rxts->ts_common_info.list, &ieee->Rx_TS_Unused_List); rxts++; } INIT_LIST_HEAD(&ieee->RxReorder_Unused_List); for (count = 0; count < REORDER_ENTRY_NUM; count++) { - list_add_tail(&pRxReorderEntry->List, + list_add_tail(&pRxReorderEntry->list, &ieee->RxReorder_Unused_List); if (count == (REORDER_ENTRY_NUM - 1)) break; @@ -196,31 +196,31 @@ static struct ts_common_info *SearchAdmitTRStream(struct rtllib_device *ieee, for (dir = 0; dir <= DIR_BI_DIR; dir++) { if (!search_dir[dir]) continue; - list_for_each_entry(pRet, psearch_list, List) { + list_for_each_entry(pRet, psearch_list, list) { if (memcmp(pRet->addr, addr, 6) == 0 && - pRet->TSpec.ucTSID == TID && - pRet->TSpec.ucDirection == dir) + pRet->tspec.ts_id == TID && + pRet->tspec.ucDirection == dir) break; } - if (&pRet->List != psearch_list) + if (&pRet->list != psearch_list) break; } - if (pRet && &pRet->List != psearch_list) + if (pRet && &pRet->list != psearch_list) return pRet; return NULL; } -static void MakeTSEntry(struct ts_common_info *pTsCommonInfo, u8 *addr, +static void MakeTSEntry(struct ts_common_info *ts_common_info, u8 *addr, struct qos_tsinfo *pTSPEC) { - if (!pTsCommonInfo) + if (!ts_common_info) return; - memcpy(pTsCommonInfo->addr, addr, 6); + memcpy(ts_common_info->addr, addr, 6); if (pTSPEC) - memcpy((u8 *)(&(pTsCommonInfo->TSpec)), (u8 *)pTSPEC, + memcpy((u8 *)(&(ts_common_info->tspec)), (u8 *)pTSPEC, sizeof(struct qos_tsinfo)); } @@ -228,8 +228,8 @@ bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS, u8 *addr, u8 TID, enum tr_select TxRxSelect, bool bAddNewTs) { u8 UP = 0; - struct qos_tsinfo TSpec; - struct qos_tsinfo *ts_info = &TSpec; + struct qos_tsinfo tspec; + struct qos_tsinfo *ts_info = &tspec; struct list_head *pUnusedList; struct list_head *pAddmitList; enum direction_value Dir; @@ -286,13 +286,13 @@ bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS, if (!list_empty(pUnusedList)) { (*ppTS) = list_entry(pUnusedList->next, - struct ts_common_info, List); - list_del_init(&(*ppTS)->List); + struct ts_common_info, list); + list_del_init(&(*ppTS)->list); if (TxRxSelect == TX_DIR) { struct tx_ts_record *tmp = container_of(*ppTS, struct tx_ts_record, - TsCommonInfo); + ts_common_info); ResetTxTsEntry(tmp); } else { struct rx_ts_record *ts = @@ -305,11 +305,11 @@ bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS, netdev_dbg(ieee->dev, "to init current TS, UP:%d, Dir:%d, addr: %pM ppTs=%p\n", UP, Dir, addr, *ppTS); - ts_info->ucTSID = UP; + ts_info->ts_id = UP; ts_info->ucDirection = Dir; - MakeTSEntry(*ppTS, addr, &TSpec); - list_add_tail(&((*ppTS)->List), pAddmitList); + MakeTSEntry(*ppTS, addr, &tspec); + list_add_tail(&((*ppTS)->list), pAddmitList); return true; } @@ -335,10 +335,10 @@ static void RemoveTsEntry(struct rtllib_device *ieee, while (!list_empty(&ts->rx_pending_pkt_list)) { pRxReorderEntry = (struct rx_reorder_entry *) list_entry(ts->rx_pending_pkt_list.prev, - struct rx_reorder_entry, List); + struct rx_reorder_entry, list); netdev_dbg(ieee->dev, "%s(): Delete SeqNum %d!\n", __func__, pRxReorderEntry->SeqNum); - list_del_init(&pRxReorderEntry->List); + list_del_init(&pRxReorderEntry->list); { int i = 0; struct rtllib_rxb *prxb = pRxReorderEntry->prxb; @@ -350,13 +350,13 @@ static void RemoveTsEntry(struct rtllib_device *ieee, kfree(prxb); prxb = NULL; } - list_add_tail(&pRxReorderEntry->List, + list_add_tail(&pRxReorderEntry->list, &ieee->RxReorder_Unused_List); } } else { struct tx_ts_record *pTxTS = (struct tx_ts_record *)pTs; - del_timer_sync(&pTxTS->TsAddBaTimer); + del_timer_sync(&pTxTS->ts_add_ba_timer); } } @@ -366,37 +366,37 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *addr) netdev_info(ieee->dev, "===========>%s, %pM\n", __func__, addr); - list_for_each_entry_safe(ts, pTmpTS, &ieee->Tx_TS_Pending_List, List) { + list_for_each_entry_safe(ts, pTmpTS, &ieee->Tx_TS_Pending_List, list) { if (memcmp(ts->addr, addr, 6) == 0) { RemoveTsEntry(ieee, ts, TX_DIR); - list_del_init(&ts->List); - list_add_tail(&ts->List, &ieee->Tx_TS_Unused_List); + list_del_init(&ts->list); + list_add_tail(&ts->list, &ieee->Tx_TS_Unused_List); } } - list_for_each_entry_safe(ts, pTmpTS, &ieee->Tx_TS_Admit_List, List) { + list_for_each_entry_safe(ts, pTmpTS, &ieee->Tx_TS_Admit_List, list) { if (memcmp(ts->addr, addr, 6) == 0) { netdev_info(ieee->dev, "====>remove Tx_TS_admin_list\n"); RemoveTsEntry(ieee, ts, TX_DIR); - list_del_init(&ts->List); - list_add_tail(&ts->List, &ieee->Tx_TS_Unused_List); + list_del_init(&ts->list); + list_add_tail(&ts->list, &ieee->Tx_TS_Unused_List); } } - list_for_each_entry_safe(ts, pTmpTS, &ieee->Rx_TS_Pending_List, List) { + list_for_each_entry_safe(ts, pTmpTS, &ieee->Rx_TS_Pending_List, list) { if (memcmp(ts->addr, addr, 6) == 0) { RemoveTsEntry(ieee, ts, RX_DIR); - list_del_init(&ts->List); - list_add_tail(&ts->List, &ieee->Rx_TS_Unused_List); + list_del_init(&ts->list); + list_add_tail(&ts->list, &ieee->Rx_TS_Unused_List); } } - list_for_each_entry_safe(ts, pTmpTS, &ieee->Rx_TS_Admit_List, List) { + list_for_each_entry_safe(ts, pTmpTS, &ieee->Rx_TS_Admit_List, list) { if (memcmp(ts->addr, addr, 6) == 0) { RemoveTsEntry(ieee, ts, RX_DIR); - list_del_init(&ts->List); - list_add_tail(&ts->List, &ieee->Rx_TS_Unused_List); + list_del_init(&ts->list); + list_add_tail(&ts->list, &ieee->Rx_TS_Unused_List); } } } @@ -406,43 +406,43 @@ void RemoveAllTS(struct rtllib_device *ieee) { struct ts_common_info *ts, *pTmpTS; - list_for_each_entry_safe(ts, pTmpTS, &ieee->Tx_TS_Pending_List, List) { + list_for_each_entry_safe(ts, pTmpTS, &ieee->Tx_TS_Pending_List, list) { RemoveTsEntry(ieee, ts, TX_DIR); - list_del_init(&ts->List); - list_add_tail(&ts->List, &ieee->Tx_TS_Unused_List); + list_del_init(&ts->list); + list_add_tail(&ts->list, &ieee->Tx_TS_Unused_List); } - list_for_each_entry_safe(ts, pTmpTS, &ieee->Tx_TS_Admit_List, List) { + list_for_each_entry_safe(ts, pTmpTS, &ieee->Tx_TS_Admit_List, list) { RemoveTsEntry(ieee, ts, TX_DIR); - list_del_init(&ts->List); - list_add_tail(&ts->List, &ieee->Tx_TS_Unused_List); + list_del_init(&ts->list); + list_add_tail(&ts->list, &ieee->Tx_TS_Unused_List); } - list_for_each_entry_safe(ts, pTmpTS, &ieee->Rx_TS_Pending_List, List) { + list_for_each_entry_safe(ts, pTmpTS, &ieee->Rx_TS_Pending_List, list) { RemoveTsEntry(ieee, ts, RX_DIR); - list_del_init(&ts->List); - list_add_tail(&ts->List, &ieee->Rx_TS_Unused_List); + list_del_init(&ts->list); + list_add_tail(&ts->list, &ieee->Rx_TS_Unused_List); } - list_for_each_entry_safe(ts, pTmpTS, &ieee->Rx_TS_Admit_List, List) { + list_for_each_entry_safe(ts, pTmpTS, &ieee->Rx_TS_Admit_List, list) { RemoveTsEntry(ieee, ts, RX_DIR); - list_del_init(&ts->List); - list_add_tail(&ts->List, &ieee->Rx_TS_Unused_List); + list_del_init(&ts->list); + list_add_tail(&ts->list, &ieee->Rx_TS_Unused_List); } } void TsStartAddBaProcess(struct rtllib_device *ieee, struct tx_ts_record *pTxTS) { - if (pTxTS->bAddBaReqInProgress == false) { - pTxTS->bAddBaReqInProgress = true; + if (pTxTS->add_ba_req_in_progress == false) { + pTxTS->add_ba_req_in_progress = true; - if (pTxTS->bAddBaReqDelayed) { + if (pTxTS->add_ba_req_delayed) { netdev_dbg(ieee->dev, "Start ADDBA after 60 sec!!\n"); - mod_timer(&pTxTS->TsAddBaTimer, jiffies + + mod_timer(&pTxTS->ts_add_ba_timer, jiffies + msecs_to_jiffies(TS_ADDBA_DELAY)); } else { netdev_dbg(ieee->dev, "Immediately Start ADDBA\n"); - mod_timer(&pTxTS->TsAddBaTimer, jiffies + 10); + mod_timer(&pTxTS->ts_add_ba_timer, jiffies + 10); } } else { netdev_dbg(ieee->dev, "BA timer is already added\n"); |