staging: rtl8192x: sync the various rtl819x_TSProc.c files
The rtl8192e, rtl8192su, and rtl8192u drivers all share what appears to be a common private ieee80211 stack. Various patches have been applied to the rtl819x_TSProc.c file for some of the drivers but not the others. This sync's the files based on all the applied patches. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
9bf10920a0
commit
a09fcbd70e
@ -3,13 +3,6 @@
|
|||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include "rtl819x_TS.h"
|
#include "rtl819x_TS.h"
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
|
|
||||||
#define list_for_each_entry_safe(pos, n, head, member) \
|
|
||||||
for (pos = list_entry((head)->next, typeof(*pos), member), \
|
|
||||||
n = list_entry(pos->member.next, typeof(*pos), member); \
|
|
||||||
&pos->member != (head); \
|
|
||||||
pos = n, n = list_entry(n->member.next, typeof(*n), member))
|
|
||||||
#endif
|
|
||||||
void TsSetupTimeOut(unsigned long data)
|
void TsSetupTimeOut(unsigned long data)
|
||||||
{
|
{
|
||||||
// Not implement yet
|
// Not implement yet
|
||||||
@ -29,7 +22,6 @@ void TsInactTimeout(unsigned long data)
|
|||||||
* return: NULL
|
* return: NULL
|
||||||
* notice:
|
* notice:
|
||||||
********************************************************************************************************************/
|
********************************************************************************************************************/
|
||||||
#if 1
|
|
||||||
void RxPktPendingTimeout(unsigned long data)
|
void RxPktPendingTimeout(unsigned long data)
|
||||||
{
|
{
|
||||||
PRX_TS_RECORD pRxTs = (PRX_TS_RECORD)data;
|
PRX_TS_RECORD pRxTs = (PRX_TS_RECORD)data;
|
||||||
@ -90,25 +82,16 @@ void RxPktPendingTimeout(unsigned long data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ieee80211_indicate_packets(ieee, stats_IndicateArray, index);
|
ieee80211_indicate_packets(ieee, stats_IndicateArray, index);
|
||||||
bPktInBuf = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bPktInBuf && (pRxTs->RxTimeoutIndicateSeq==0xffff))
|
if(bPktInBuf && (pRxTs->RxTimeoutIndicateSeq==0xffff))
|
||||||
{
|
{
|
||||||
pRxTs->RxTimeoutIndicateSeq = pRxTs->RxIndicateSeq;
|
pRxTs->RxTimeoutIndicateSeq = pRxTs->RxIndicateSeq;
|
||||||
#if 0
|
|
||||||
if(timer_pending(&pRxTs->RxPktPendingTimer))
|
|
||||||
del_timer_sync(&pRxTs->RxPktPendingTimer);
|
|
||||||
pRxTs->RxPktPendingTimer.expires = jiffies + ieee->pHTInfo->RxReorderPendingTime;
|
|
||||||
add_timer(&pRxTs->RxPktPendingTimer);
|
|
||||||
#else
|
|
||||||
mod_timer(&pRxTs->RxPktPendingTimer, jiffies + MSECS(ieee->pHTInfo->RxReorderPendingTime));
|
mod_timer(&pRxTs->RxPktPendingTimer, jiffies + MSECS(ieee->pHTInfo->RxReorderPendingTime));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags);
|
spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags);
|
||||||
//PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK);
|
//PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/********************************************************************************************************************
|
/********************************************************************************************************************
|
||||||
*function: Add BA timer function
|
*function: Add BA timer function
|
||||||
@ -372,17 +355,11 @@ bool GetTs(
|
|||||||
IEEE80211_DEBUG(IEEE80211_DL_ERR, "get TS for Broadcast or Multicast\n");
|
IEEE80211_DEBUG(IEEE80211_DL_ERR, "get TS for Broadcast or Multicast\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
if(ieee->pStaQos->CurrentQosMode == QOS_DISABLE)
|
|
||||||
{ UP = 0; } //only use one TS
|
|
||||||
else if(ieee->pStaQos->CurrentQosMode & QOS_WMM)
|
|
||||||
{
|
|
||||||
#else
|
|
||||||
if (ieee->current_network.qos_data.supported == 0)
|
if (ieee->current_network.qos_data.supported == 0)
|
||||||
UP = 0;
|
UP = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#endif
|
|
||||||
// In WMM case: we use 4 TID only
|
// In WMM case: we use 4 TID only
|
||||||
if (!IsACValid(TID))
|
if (!IsACValid(TID))
|
||||||
{
|
{
|
||||||
@ -553,8 +530,8 @@ void RemoveTsEntry(
|
|||||||
void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr)
|
void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr)
|
||||||
{
|
{
|
||||||
PTS_COMMON_INFO pTS, pTmpTS;
|
PTS_COMMON_INFO pTS, pTmpTS;
|
||||||
|
|
||||||
printk("===========>RemovePeerTS,%pM\n", Addr);
|
printk("===========>RemovePeerTS,%pM\n", Addr);
|
||||||
#if 1
|
|
||||||
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
|
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
|
||||||
{
|
{
|
||||||
if (memcmp(pTS->Addr, Addr, 6) == 0)
|
if (memcmp(pTS->Addr, Addr, 6) == 0)
|
||||||
@ -595,13 +572,12 @@ void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr)
|
|||||||
list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List);
|
list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoveAllTS(struct ieee80211_device* ieee)
|
void RemoveAllTS(struct ieee80211_device* ieee)
|
||||||
{
|
{
|
||||||
PTS_COMMON_INFO pTS, pTmpTS;
|
PTS_COMMON_INFO pTS, pTmpTS;
|
||||||
#if 1
|
|
||||||
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
|
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
|
||||||
{
|
{
|
||||||
RemoveTsEntry(ieee, pTS, TX_DIR);
|
RemoveTsEntry(ieee, pTS, TX_DIR);
|
||||||
@ -629,7 +605,6 @@ void RemoveAllTS(struct ieee80211_device* ieee)
|
|||||||
list_del_init(&pTS->List);
|
list_del_init(&pTS->List);
|
||||||
list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List);
|
list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TsStartAddBaProcess(struct ieee80211_device* ieee, PTX_TS_RECORD pTxTS)
|
void TsStartAddBaProcess(struct ieee80211_device* ieee, PTX_TS_RECORD pTxTS)
|
||||||
@ -637,7 +612,6 @@ void TsStartAddBaProcess(struct ieee80211_device* ieee, PTX_TS_RECORD pTxTS)
|
|||||||
if(pTxTS->bAddBaReqInProgress == false)
|
if(pTxTS->bAddBaReqInProgress == false)
|
||||||
{
|
{
|
||||||
pTxTS->bAddBaReqInProgress = true;
|
pTxTS->bAddBaReqInProgress = true;
|
||||||
#if 1
|
|
||||||
if(pTxTS->bAddBaReqDelayed)
|
if(pTxTS->bAddBaReqDelayed)
|
||||||
{
|
{
|
||||||
IEEE80211_DEBUG(IEEE80211_DL_BA, "TsStartAddBaProcess(): Delayed Start ADDBA after 60 sec!!\n");
|
IEEE80211_DEBUG(IEEE80211_DL_BA, "TsStartAddBaProcess(): Delayed Start ADDBA after 60 sec!!\n");
|
||||||
@ -648,13 +622,7 @@ void TsStartAddBaProcess(struct ieee80211_device* ieee, PTX_TS_RECORD pTxTS)
|
|||||||
IEEE80211_DEBUG(IEEE80211_DL_BA,"TsStartAddBaProcess(): Immediately Start ADDBA now!!\n");
|
IEEE80211_DEBUG(IEEE80211_DL_BA,"TsStartAddBaProcess(): Immediately Start ADDBA now!!\n");
|
||||||
mod_timer(&pTxTS->TsAddBaTimer, jiffies+10); //set 10 ticks
|
mod_timer(&pTxTS->TsAddBaTimer, jiffies+10); //set 10 ticks
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
IEEE80211_DEBUG(IEEE80211_DL_ERR, "%s()==>BA timer is already added\n", __FUNCTION__);
|
IEEE80211_DEBUG(IEEE80211_DL_ERR, "%s()==>BA timer is already added\n", __FUNCTION__);
|
||||||
}
|
}
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
|
|
||||||
EXPORT_SYMBOL_NOVERS(RemovePeerTS);
|
|
||||||
#else
|
|
||||||
//EXPORT_SYMBOL(RemovePeerTS);
|
|
||||||
#endif
|
|
||||||
|
@ -22,7 +22,6 @@ void TsInactTimeout(unsigned long data)
|
|||||||
* return: NULL
|
* return: NULL
|
||||||
* notice:
|
* notice:
|
||||||
********************************************************************************************************************/
|
********************************************************************************************************************/
|
||||||
#if 1
|
|
||||||
void RxPktPendingTimeout(unsigned long data)
|
void RxPktPendingTimeout(unsigned long data)
|
||||||
{
|
{
|
||||||
PRX_TS_RECORD pRxTs = (PRX_TS_RECORD)data;
|
PRX_TS_RECORD pRxTs = (PRX_TS_RECORD)data;
|
||||||
@ -83,8 +82,6 @@ void RxPktPendingTimeout(unsigned long data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ieee80211_indicate_packets(ieee, stats_IndicateArray, index);
|
ieee80211_indicate_packets(ieee, stats_IndicateArray, index);
|
||||||
bPktInBuf = false;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bPktInBuf && (pRxTs->RxTimeoutIndicateSeq==0xffff))
|
if(bPktInBuf && (pRxTs->RxTimeoutIndicateSeq==0xffff))
|
||||||
@ -95,7 +92,6 @@ void RxPktPendingTimeout(unsigned long data)
|
|||||||
spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags);
|
spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags);
|
||||||
//PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK);
|
//PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/********************************************************************************************************************
|
/********************************************************************************************************************
|
||||||
*function: Add BA timer function
|
*function: Add BA timer function
|
||||||
@ -534,8 +530,8 @@ void RemoveTsEntry(
|
|||||||
void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr)
|
void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr)
|
||||||
{
|
{
|
||||||
PTS_COMMON_INFO pTS, pTmpTS;
|
PTS_COMMON_INFO pTS, pTmpTS;
|
||||||
|
|
||||||
printk("===========>RemovePeerTS,%pM\n", Addr);
|
printk("===========>RemovePeerTS,%pM\n", Addr);
|
||||||
#if 1
|
|
||||||
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
|
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
|
||||||
{
|
{
|
||||||
if (memcmp(pTS->Addr, Addr, 6) == 0)
|
if (memcmp(pTS->Addr, Addr, 6) == 0)
|
||||||
@ -576,13 +572,12 @@ void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr)
|
|||||||
list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List);
|
list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoveAllTS(struct ieee80211_device* ieee)
|
void RemoveAllTS(struct ieee80211_device* ieee)
|
||||||
{
|
{
|
||||||
PTS_COMMON_INFO pTS, pTmpTS;
|
PTS_COMMON_INFO pTS, pTmpTS;
|
||||||
#if 1
|
|
||||||
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
|
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
|
||||||
{
|
{
|
||||||
RemoveTsEntry(ieee, pTS, TX_DIR);
|
RemoveTsEntry(ieee, pTS, TX_DIR);
|
||||||
@ -610,7 +605,6 @@ void RemoveAllTS(struct ieee80211_device* ieee)
|
|||||||
list_del_init(&pTS->List);
|
list_del_init(&pTS->List);
|
||||||
list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List);
|
list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TsStartAddBaProcess(struct ieee80211_device* ieee, PTX_TS_RECORD pTxTS)
|
void TsStartAddBaProcess(struct ieee80211_device* ieee, PTX_TS_RECORD pTxTS)
|
||||||
@ -618,7 +612,6 @@ void TsStartAddBaProcess(struct ieee80211_device* ieee, PTX_TS_RECORD pTxTS)
|
|||||||
if(pTxTS->bAddBaReqInProgress == false)
|
if(pTxTS->bAddBaReqInProgress == false)
|
||||||
{
|
{
|
||||||
pTxTS->bAddBaReqInProgress = true;
|
pTxTS->bAddBaReqInProgress = true;
|
||||||
#if 1
|
|
||||||
if(pTxTS->bAddBaReqDelayed)
|
if(pTxTS->bAddBaReqDelayed)
|
||||||
{
|
{
|
||||||
IEEE80211_DEBUG(IEEE80211_DL_BA, "TsStartAddBaProcess(): Delayed Start ADDBA after 60 sec!!\n");
|
IEEE80211_DEBUG(IEEE80211_DL_BA, "TsStartAddBaProcess(): Delayed Start ADDBA after 60 sec!!\n");
|
||||||
@ -629,7 +622,6 @@ void TsStartAddBaProcess(struct ieee80211_device* ieee, PTX_TS_RECORD pTxTS)
|
|||||||
IEEE80211_DEBUG(IEEE80211_DL_BA,"TsStartAddBaProcess(): Immediately Start ADDBA now!!\n");
|
IEEE80211_DEBUG(IEEE80211_DL_BA,"TsStartAddBaProcess(): Immediately Start ADDBA now!!\n");
|
||||||
mod_timer(&pTxTS->TsAddBaTimer, jiffies+10); //set 10 ticks
|
mod_timer(&pTxTS->TsAddBaTimer, jiffies+10); //set 10 ticks
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
IEEE80211_DEBUG(IEEE80211_DL_ERR, "%s()==>BA timer is already added\n", __FUNCTION__);
|
IEEE80211_DEBUG(IEEE80211_DL_ERR, "%s()==>BA timer is already added\n", __FUNCTION__);
|
||||||
|
@ -87,10 +87,7 @@ void RxPktPendingTimeout(unsigned long data)
|
|||||||
if(bPktInBuf && (pRxTs->RxTimeoutIndicateSeq==0xffff))
|
if(bPktInBuf && (pRxTs->RxTimeoutIndicateSeq==0xffff))
|
||||||
{
|
{
|
||||||
pRxTs->RxTimeoutIndicateSeq = pRxTs->RxIndicateSeq;
|
pRxTs->RxTimeoutIndicateSeq = pRxTs->RxIndicateSeq;
|
||||||
if(timer_pending(&pRxTs->RxPktPendingTimer))
|
mod_timer(&pRxTs->RxPktPendingTimer, jiffies + MSECS(ieee->pHTInfo->RxReorderPendingTime));
|
||||||
del_timer_sync(&pRxTs->RxPktPendingTimer);
|
|
||||||
pRxTs->RxPktPendingTimer.expires = jiffies + ieee->pHTInfo->RxReorderPendingTime;
|
|
||||||
add_timer(&pRxTs->RxPktPendingTimer);
|
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags);
|
spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags);
|
||||||
//PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK);
|
//PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK);
|
||||||
@ -358,6 +355,7 @@ bool GetTs(
|
|||||||
IEEE80211_DEBUG(IEEE80211_DL_ERR, "get TS for Broadcast or Multicast\n");
|
IEEE80211_DEBUG(IEEE80211_DL_ERR, "get TS for Broadcast or Multicast\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ieee->current_network.qos_data.supported == 0)
|
if (ieee->current_network.qos_data.supported == 0)
|
||||||
UP = 0;
|
UP = 0;
|
||||||
else
|
else
|
||||||
@ -532,6 +530,7 @@ void RemoveTsEntry(
|
|||||||
void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr)
|
void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr)
|
||||||
{
|
{
|
||||||
PTS_COMMON_INFO pTS, pTmpTS;
|
PTS_COMMON_INFO pTS, pTmpTS;
|
||||||
|
|
||||||
printk("===========>RemovePeerTS,%pM\n", Addr);
|
printk("===========>RemovePeerTS,%pM\n", Addr);
|
||||||
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
|
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
|
||||||
{
|
{
|
||||||
@ -578,6 +577,7 @@ void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr)
|
|||||||
void RemoveAllTS(struct ieee80211_device* ieee)
|
void RemoveAllTS(struct ieee80211_device* ieee)
|
||||||
{
|
{
|
||||||
PTS_COMMON_INFO pTS, pTmpTS;
|
PTS_COMMON_INFO pTS, pTmpTS;
|
||||||
|
|
||||||
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
|
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
|
||||||
{
|
{
|
||||||
RemoveTsEntry(ieee, pTS, TX_DIR);
|
RemoveTsEntry(ieee, pTS, TX_DIR);
|
||||||
@ -626,4 +626,3 @@ void TsStartAddBaProcess(struct ieee80211_device* ieee, PTX_TS_RECORD pTxTS)
|
|||||||
else
|
else
|
||||||
IEEE80211_DEBUG(IEEE80211_DL_ERR, "%s()==>BA timer is already added\n", __FUNCTION__);
|
IEEE80211_DEBUG(IEEE80211_DL_ERR, "%s()==>BA timer is already added\n", __FUNCTION__);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(RemovePeerTS);
|
|
||||||
|
Loading…
Reference in New Issue
Block a user