staging: vt6656: datarate/dpc/hostap/power use new structures.
Use struct vnt_private struct vnt_manager Move vnt_manager from sMgmtObj to vnt_mgmt. This patch cleans up function declarations, definitions and local variables where appropriate replacing types defined in "type.h" with linux/types.h. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d56131def6
commit
45c73bb125
|
@ -188,28 +188,19 @@ RATEwGetRateIdx(
|
||||||
* Return Value: none
|
* Return Value: none
|
||||||
*
|
*
|
||||||
-*/
|
-*/
|
||||||
void RATEvParseMaxRate(
|
|
||||||
void *pDeviceHandler,
|
void RATEvParseMaxRate(struct vnt_private *pDevice,
|
||||||
PWLAN_IE_SUPP_RATES pItemRates,
|
PWLAN_IE_SUPP_RATES pItemRates, PWLAN_IE_SUPP_RATES pItemExtRates,
|
||||||
PWLAN_IE_SUPP_RATES pItemExtRates,
|
int bUpdateBasicRate, u16 *pwMaxBasicRate, u16 *pwMaxSuppRate,
|
||||||
BOOL bUpdateBasicRate,
|
u16 *pwSuppRate, u8 *pbyTopCCKRate, u8 *pbyTopOFDMRate)
|
||||||
PWORD pwMaxBasicRate,
|
|
||||||
PWORD pwMaxSuppRate,
|
|
||||||
PWORD pwSuppRate,
|
|
||||||
PBYTE pbyTopCCKRate,
|
|
||||||
PBYTE pbyTopOFDMRate
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
PSDevice pDevice = (PSDevice) pDeviceHandler;
|
int ii;
|
||||||
unsigned int ii;
|
u8 byHighSuppRate = 0, byRate = 0;
|
||||||
BYTE byHighSuppRate = 0;
|
u16 wOldBasicRate = pDevice->wBasicRate;
|
||||||
BYTE byRate = 0;
|
u32 uRateLen;
|
||||||
WORD wOldBasicRate = pDevice->wBasicRate;
|
|
||||||
unsigned int uRateLen;
|
|
||||||
|
|
||||||
|
if (pItemRates == NULL)
|
||||||
if (pItemRates == NULL)
|
return;
|
||||||
return;
|
|
||||||
|
|
||||||
*pwSuppRate = 0;
|
*pwSuppRate = 0;
|
||||||
uRateLen = pItemRates->len;
|
uRateLen = pItemRates->len;
|
||||||
|
@ -301,27 +292,24 @@ unsigned int uRateLen;
|
||||||
#define AUTORATE_TXCNT_THRESHOLD 20
|
#define AUTORATE_TXCNT_THRESHOLD 20
|
||||||
#define AUTORATE_INC_THRESHOLD 30
|
#define AUTORATE_INC_THRESHOLD 30
|
||||||
|
|
||||||
void
|
void RATEvTxRateFallBack(struct vnt_private *pDevice,
|
||||||
RATEvTxRateFallBack(
|
PKnownNodeDB psNodeDBTable)
|
||||||
void *pDeviceHandler,
|
|
||||||
PKnownNodeDB psNodeDBTable
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
PSDevice pDevice = (PSDevice) pDeviceHandler;
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
u16 wIdxDownRate = 0;
|
||||||
WORD wIdxDownRate = 0;
|
int ii;
|
||||||
unsigned int ii;
|
int bAutoRate[MAX_RATE] = {TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE,
|
||||||
BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE};
|
TRUE, TRUE, TRUE, TRUE, TRUE};
|
||||||
DWORD dwThroughputTbl[MAX_RATE] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540};
|
u32 dwThroughputTbl[MAX_RATE] = {10, 20, 55, 110, 60, 90, 120, 180,
|
||||||
DWORD dwThroughput = 0;
|
240, 360, 480, 540};
|
||||||
WORD wIdxUpRate = 0;
|
u32 dwThroughput = 0;
|
||||||
DWORD dwTxDiff = 0;
|
u16 wIdxUpRate = 0;
|
||||||
|
u32 dwTxDiff = 0;
|
||||||
|
|
||||||
if (pMgmt->eScanState != WMAC_NO_SCANNING) {
|
if (pMgmt->eScanState != WMAC_NO_SCANNING)
|
||||||
// Don't do Fallback when scanning Channel
|
return; /* Don't do Fallback when scanning Channel */
|
||||||
return;
|
|
||||||
}
|
psNodeDBTable->uTimeCount++;
|
||||||
psNodeDBTable->uTimeCount ++;
|
|
||||||
|
|
||||||
if (psNodeDBTable->uTxFail[MAX_RATE] > psNodeDBTable->uTxOk[MAX_RATE])
|
if (psNodeDBTable->uTxFail[MAX_RATE] > psNodeDBTable->uTxOk[MAX_RATE])
|
||||||
dwTxDiff = psNodeDBTable->uTxFail[MAX_RATE] - psNodeDBTable->uTxOk[MAX_RATE];
|
dwTxDiff = psNodeDBTable->uTxFail[MAX_RATE] - psNodeDBTable->uTxOk[MAX_RATE];
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#ifndef __DATARATE_H__
|
#ifndef __DATARATE_H__
|
||||||
#define __DATARATE_H__
|
#define __DATARATE_H__
|
||||||
|
|
||||||
|
|
||||||
/*--------------------- Export Definitions -------------------------*/
|
/*--------------------- Export Definitions -------------------------*/
|
||||||
|
|
||||||
#define FALLBACK_PKT_COLLECT_TR_H 50 // pkts
|
#define FALLBACK_PKT_COLLECT_TR_H 50 // pkts
|
||||||
|
@ -69,24 +70,13 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void RATEvParseMaxRate(struct vnt_private *, PWLAN_IE_SUPP_RATES pItemRates,
|
||||||
RATEvParseMaxRate(
|
PWLAN_IE_SUPP_RATES pItemExtRates, int bUpdateBasicRate,
|
||||||
void *pDeviceHandler,
|
u16 *pwMaxBasicRate, u16 *pwMaxSuppRate, u16 *pwSuppRate,
|
||||||
PWLAN_IE_SUPP_RATES pItemRates,
|
u8 *pbyTopCCKRate, u8 *pbyTopOFDMRate);
|
||||||
PWLAN_IE_SUPP_RATES pItemExtRates,
|
|
||||||
BOOL bUpdateBasicRate,
|
|
||||||
PWORD pwMaxBasicRate,
|
|
||||||
PWORD pwMaxSuppRate,
|
|
||||||
PWORD pwSuppRate,
|
|
||||||
PBYTE pbyTopCCKRate,
|
|
||||||
PBYTE pbyTopOFDMRate
|
|
||||||
);
|
|
||||||
|
|
||||||
void
|
void RATEvTxRateFallBack(struct vnt_private *pDevice,
|
||||||
RATEvTxRateFallBack(
|
PKnownNodeDB psNodeDBTable);
|
||||||
void *pDeviceHandler,
|
|
||||||
PKnownNodeDB psNodeDBTable
|
|
||||||
);
|
|
||||||
|
|
||||||
BYTE
|
BYTE
|
||||||
RATEuSetIE(
|
RATEuSetIE(
|
||||||
|
|
|
@ -84,61 +84,23 @@ s_vGetDASA(
|
||||||
PSEthernetHeader psEthHeader
|
PSEthernetHeader psEthHeader
|
||||||
);
|
);
|
||||||
|
|
||||||
static
|
static void s_vProcessRxMACHeader(struct vnt_private *pDevice,
|
||||||
void
|
u8 *pbyRxBufferAddr, u32 cbPacketSize, int bIsWEP, int bExtIV,
|
||||||
s_vProcessRxMACHeader (
|
u32 *pcbHeadSize);
|
||||||
PSDevice pDevice,
|
|
||||||
PBYTE pbyRxBufferAddr,
|
|
||||||
unsigned int cbPacketSize,
|
|
||||||
BOOL bIsWEP,
|
|
||||||
BOOL bExtIV,
|
|
||||||
unsigned int *pcbHeadSize
|
|
||||||
);
|
|
||||||
|
|
||||||
static BOOL s_bAPModeRxCtl(
|
static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame,
|
||||||
PSDevice pDevice,
|
s32 iSANodeIndex);
|
||||||
PBYTE pbyFrame,
|
|
||||||
signed int iSANodeIndex
|
|
||||||
);
|
|
||||||
|
|
||||||
|
static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb,
|
||||||
|
u32 FrameSize, u32 cbHeaderOffset, s32 iSANodeIndex, s32 iDANodeIndex);
|
||||||
|
|
||||||
|
static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame,
|
||||||
|
u32 FrameSize, u8 *pbyRsr, u8 *pbyNewRsr, PSKeyItem *pKeyOut,
|
||||||
|
s32 *pbExtIV, u16 *pwRxTSC15_0, u32 *pdwRxTSC47_16);
|
||||||
|
|
||||||
static BOOL s_bAPModeRxData (
|
static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame,
|
||||||
PSDevice pDevice,
|
u32 FrameSize, u8 *pbyRsr, int bOnFly, PSKeyItem pKey, u8 *pbyNewRsr,
|
||||||
struct sk_buff *skb,
|
s32 *pbExtIV, u16 *pwRxTSC15_0, u32 *pdwRxTSC47_16);
|
||||||
unsigned int FrameSize,
|
|
||||||
unsigned int cbHeaderOffset,
|
|
||||||
signed int iSANodeIndex,
|
|
||||||
signed int iDANodeIndex
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
static BOOL s_bHandleRxEncryption(
|
|
||||||
PSDevice pDevice,
|
|
||||||
PBYTE pbyFrame,
|
|
||||||
unsigned int FrameSize,
|
|
||||||
PBYTE pbyRsr,
|
|
||||||
PBYTE pbyNewRsr,
|
|
||||||
PSKeyItem * pKeyOut,
|
|
||||||
int * pbExtIV,
|
|
||||||
PWORD pwRxTSC15_0,
|
|
||||||
PDWORD pdwRxTSC47_16
|
|
||||||
);
|
|
||||||
|
|
||||||
static BOOL s_bHostWepRxEncryption(
|
|
||||||
|
|
||||||
PSDevice pDevice,
|
|
||||||
PBYTE pbyFrame,
|
|
||||||
unsigned int FrameSize,
|
|
||||||
PBYTE pbyRsr,
|
|
||||||
BOOL bOnFly,
|
|
||||||
PSKeyItem pKey,
|
|
||||||
PBYTE pbyNewRsr,
|
|
||||||
int * pbExtIV,
|
|
||||||
PWORD pwRxTSC15_0,
|
|
||||||
PDWORD pdwRxTSC47_16
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
/*--------------------- Export Variables --------------------------*/
|
/*--------------------- Export Variables --------------------------*/
|
||||||
|
|
||||||
|
@ -159,22 +121,16 @@ static BOOL s_bHostWepRxEncryption(
|
||||||
* Return Value: None
|
* Return Value: None
|
||||||
*
|
*
|
||||||
-*/
|
-*/
|
||||||
static
|
|
||||||
void
|
static void s_vProcessRxMACHeader(struct vnt_private *pDevice,
|
||||||
s_vProcessRxMACHeader (
|
u8 *pbyRxBufferAddr, u32 cbPacketSize, int bIsWEP, int bExtIV,
|
||||||
PSDevice pDevice,
|
u32 *pcbHeadSize)
|
||||||
PBYTE pbyRxBufferAddr,
|
|
||||||
unsigned int cbPacketSize,
|
|
||||||
BOOL bIsWEP,
|
|
||||||
BOOL bExtIV,
|
|
||||||
unsigned int *pcbHeadSize
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
PBYTE pbyRxBuffer;
|
u8 *pbyRxBuffer;
|
||||||
unsigned int cbHeaderSize = 0;
|
u32 cbHeaderSize = 0;
|
||||||
PWORD pwType;
|
u16 *pwType;
|
||||||
PS802_11Header pMACHeader;
|
PS802_11Header pMACHeader;
|
||||||
int ii;
|
int ii;
|
||||||
|
|
||||||
|
|
||||||
pMACHeader = (PS802_11Header) (pbyRxBufferAddr + cbHeaderSize);
|
pMACHeader = (PS802_11Header) (pbyRxBufferAddr + cbHeaderSize);
|
||||||
|
@ -310,56 +266,39 @@ s_vGetDASA (
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
|
||||||
|
unsigned long BytesToIndicate)
|
||||||
BOOL
|
|
||||||
RXbBulkInProcessData (
|
|
||||||
PSDevice pDevice,
|
|
||||||
PRCB pRCB,
|
|
||||||
unsigned long BytesToIndicate
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
|
struct net_device_stats *pStats = &pDevice->stats;
|
||||||
struct net_device_stats* pStats=&pDevice->stats;
|
struct sk_buff *skb;
|
||||||
struct sk_buff* skb;
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
struct vnt_rx_mgmt *pRxPacket = &pMgmt->sRxPacket;
|
||||||
PSRxMgmtPacket pRxPacket = &(pMgmt->sRxPacket);
|
PS802_11Header p802_11Header;
|
||||||
PS802_11Header p802_11Header;
|
u8 *pbyRsr, *pbyNewRsr, *pbyRSSI, *pbyFrame;
|
||||||
PBYTE pbyRsr;
|
|
||||||
PBYTE pbyNewRsr;
|
|
||||||
PBYTE pbyRSSI;
|
|
||||||
u64 *pqwTSFTime;
|
u64 *pqwTSFTime;
|
||||||
PBYTE pbyFrame;
|
u32 bDeFragRx = FALSE;
|
||||||
BOOL bDeFragRx = FALSE;
|
u32 cbHeaderOffset, cbIVOffset;
|
||||||
unsigned int cbHeaderOffset;
|
|
||||||
u32 FrameSize;
|
u32 FrameSize;
|
||||||
WORD wEtherType = 0;
|
u16 wEtherType = 0;
|
||||||
signed int iSANodeIndex = -1;
|
s32 iSANodeIndex = -1, iDANodeIndex = -1;
|
||||||
signed int iDANodeIndex = -1;
|
int ii;
|
||||||
unsigned int ii;
|
u8 *pbyRxSts, *pbyRxRate, *pbySQ, *pby3SQ;
|
||||||
unsigned int cbIVOffset;
|
u32 cbHeaderSize;
|
||||||
PBYTE pbyRxSts;
|
PSKeyItem pKey = NULL;
|
||||||
PBYTE pbyRxRate;
|
u16 wRxTSC15_0 = 0;
|
||||||
PBYTE pbySQ;
|
u32 dwRxTSC47_16 = 0;
|
||||||
PBYTE pby3SQ;
|
SKeyItem STempKey;
|
||||||
unsigned int cbHeaderSize;
|
/* signed long ldBm = 0; */
|
||||||
PSKeyItem pKey = NULL;
|
int bIsWEP = FALSE; int bExtIV = FALSE;
|
||||||
WORD wRxTSC15_0 = 0;
|
|
||||||
DWORD dwRxTSC47_16 = 0;
|
|
||||||
SKeyItem STempKey;
|
|
||||||
// 802.11h RPI
|
|
||||||
/* signed long ldBm = 0; */
|
|
||||||
BOOL bIsWEP = FALSE;
|
|
||||||
BOOL bExtIV = FALSE;
|
|
||||||
u32 dwWbkStatus;
|
u32 dwWbkStatus;
|
||||||
PRCB pRCBIndicate = pRCB;
|
PRCB pRCBIndicate = pRCB;
|
||||||
PBYTE pbyDAddress;
|
u8 *pbyDAddress;
|
||||||
PWORD pwPLCP_Length;
|
u16 *pwPLCP_Length;
|
||||||
BYTE abyVaildRate[MAX_RATE] = {2,4,11,22,12,18,24,36,48,72,96,108};
|
u8 abyVaildRate[MAX_RATE]
|
||||||
WORD wPLCPwithPadding;
|
= {2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108};
|
||||||
PS802_11Header pMACHeader;
|
u16 wPLCPwithPadding;
|
||||||
BOOL bRxeapol_key = FALSE;
|
PS802_11Header pMACHeader;
|
||||||
|
int bRxeapol_key = FALSE;
|
||||||
|
|
||||||
|
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---------- RXbBulkInProcessData---\n");
|
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---------- RXbBulkInProcessData---\n");
|
||||||
|
@ -985,16 +924,12 @@ RXbBulkInProcessData (
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame,
|
||||||
static BOOL s_bAPModeRxCtl (
|
s32 iSANodeIndex)
|
||||||
PSDevice pDevice,
|
|
||||||
PBYTE pbyFrame,
|
|
||||||
signed int iSANodeIndex
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
PS802_11Header p802_11Header;
|
struct vnt_manager *pMgmt = &(pDevice->sMgmtObj);
|
||||||
CMD_STATUS Status;
|
PS802_11Header p802_11Header;
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
CMD_STATUS Status;
|
||||||
|
|
||||||
|
|
||||||
if (IS_CTL_PSPOLL(pbyFrame) || !IS_TYPE_CONTROL(pbyFrame)) {
|
if (IS_CTL_PSPOLL(pbyFrame) || !IS_TYPE_CONTROL(pbyFrame)) {
|
||||||
|
@ -1096,24 +1031,16 @@ static BOOL s_bAPModeRxCtl (
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL s_bHandleRxEncryption (
|
static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame,
|
||||||
PSDevice pDevice,
|
u32 FrameSize, u8 *pbyRsr, u8 *pbyNewRsr, PSKeyItem *pKeyOut,
|
||||||
PBYTE pbyFrame,
|
s32 *pbExtIV, u16 *pwRxTSC15_0, u32 *pdwRxTSC47_16)
|
||||||
unsigned int FrameSize,
|
|
||||||
PBYTE pbyRsr,
|
|
||||||
PBYTE pbyNewRsr,
|
|
||||||
PSKeyItem * pKeyOut,
|
|
||||||
int * pbExtIV,
|
|
||||||
PWORD pwRxTSC15_0,
|
|
||||||
PDWORD pdwRxTSC47_16
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
unsigned int PayloadLen = FrameSize;
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
PBYTE pbyIV;
|
u32 PayloadLen = FrameSize;
|
||||||
BYTE byKeyIdx;
|
u8 *pbyIV;
|
||||||
PSKeyItem pKey = NULL;
|
u8 byKeyIdx;
|
||||||
BYTE byDecMode = KEY_CTL_WEP;
|
PSKeyItem pKey = NULL;
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
u8 byDecMode = KEY_CTL_WEP;
|
||||||
|
|
||||||
|
|
||||||
*pwRxTSC15_0 = 0;
|
*pwRxTSC15_0 = 0;
|
||||||
|
@ -1241,31 +1168,19 @@ static BOOL s_bHandleRxEncryption (
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame,
|
||||||
static BOOL s_bHostWepRxEncryption (
|
u32 FrameSize, u8 *pbyRsr, int bOnFly, PSKeyItem pKey, u8 *pbyNewRsr,
|
||||||
PSDevice pDevice,
|
s32 *pbExtIV, u16 *pwRxTSC15_0, u32 *pdwRxTSC47_16)
|
||||||
PBYTE pbyFrame,
|
|
||||||
unsigned int FrameSize,
|
|
||||||
PBYTE pbyRsr,
|
|
||||||
BOOL bOnFly,
|
|
||||||
PSKeyItem pKey,
|
|
||||||
PBYTE pbyNewRsr,
|
|
||||||
int * pbExtIV,
|
|
||||||
PWORD pwRxTSC15_0,
|
|
||||||
PDWORD pdwRxTSC47_16
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
unsigned int PayloadLen = FrameSize;
|
PS802_11Header pMACHeader;
|
||||||
PBYTE pbyIV;
|
u32 PayloadLen = FrameSize;
|
||||||
BYTE byKeyIdx;
|
u8 *pbyIV;
|
||||||
BYTE byDecMode = KEY_CTL_WEP;
|
u8 byKeyIdx;
|
||||||
PS802_11Header pMACHeader;
|
u8 byDecMode = KEY_CTL_WEP;
|
||||||
|
|
||||||
|
*pwRxTSC15_0 = 0;
|
||||||
|
*pdwRxTSC47_16 = 0;
|
||||||
*pwRxTSC15_0 = 0;
|
|
||||||
*pdwRxTSC47_16 = 0;
|
|
||||||
|
|
||||||
pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN;
|
pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN;
|
||||||
if ( WLAN_GET_FC_TODS(*(PWORD)pbyFrame) &&
|
if ( WLAN_GET_FC_TODS(*(PWORD)pbyFrame) &&
|
||||||
|
@ -1372,27 +1287,17 @@ static BOOL s_bHostWepRxEncryption (
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb,
|
||||||
|
u32 FrameSize, u32 cbHeaderOffset, s32 iSANodeIndex, s32 iDANodeIndex)
|
||||||
static BOOL s_bAPModeRxData (
|
|
||||||
PSDevice pDevice,
|
|
||||||
struct sk_buff *skb,
|
|
||||||
unsigned int FrameSize,
|
|
||||||
unsigned int cbHeaderOffset,
|
|
||||||
signed int iSANodeIndex,
|
|
||||||
signed int iDANodeIndex
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
{
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
struct sk_buff *skbcpy;
|
||||||
BOOL bRelayAndForward = FALSE;
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
BOOL bRelayOnly = FALSE;
|
int bRelayAndForward = FALSE;
|
||||||
BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
|
int bRelayOnly = FALSE;
|
||||||
WORD wAID;
|
u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
|
||||||
|
u16 wAID;
|
||||||
|
|
||||||
|
|
||||||
struct sk_buff* skbcpy = NULL;
|
|
||||||
|
|
||||||
if (FrameSize > CB_MAX_BUF_SIZE)
|
if (FrameSize > CB_MAX_BUF_SIZE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
// check DA
|
// check DA
|
||||||
|
@ -1468,11 +1373,10 @@ static BOOL s_bAPModeRxData (
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void RXvWorkItem(void *Context)
|
void RXvWorkItem(struct vnt_private *pDevice)
|
||||||
{
|
{
|
||||||
PSDevice pDevice = (PSDevice) Context;
|
int ntStatus;
|
||||||
int ntStatus;
|
PRCB pRCB = NULL;
|
||||||
PRCB pRCB=NULL;
|
|
||||||
|
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Polling Thread\n");
|
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Polling Thread\n");
|
||||||
spin_lock_irq(&pDevice->lock);
|
spin_lock_irq(&pDevice->lock);
|
||||||
|
@ -1492,13 +1396,9 @@ void RXvWorkItem(void *Context)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void RXvFreeRCB(PRCB pRCB, int bReAllocSkb)
|
||||||
RXvFreeRCB(
|
|
||||||
PRCB pRCB,
|
|
||||||
BOOL bReAllocSkb
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
PSDevice pDevice = (PSDevice)pRCB->pDevice;
|
struct vnt_private *pDevice = pRCB->pDevice;
|
||||||
|
|
||||||
|
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->RXvFreeRCB\n");
|
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->RXvFreeRCB\n");
|
||||||
|
@ -1537,12 +1437,11 @@ RXvFreeRCB(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RXvMngWorkItem(void *Context)
|
void RXvMngWorkItem(struct vnt_private *pDevice)
|
||||||
{
|
{
|
||||||
PSDevice pDevice = (PSDevice) Context;
|
PRCB pRCB = NULL;
|
||||||
PRCB pRCB=NULL;
|
struct vnt_rx_mgmt *pRxPacket;
|
||||||
PSRxMgmtPacket pRxPacket;
|
int bReAllocSkb = FALSE;
|
||||||
BOOL bReAllocSkb = FALSE;
|
|
||||||
|
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Mng Thread\n");
|
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Mng Thread\n");
|
||||||
|
|
||||||
|
|
|
@ -45,17 +45,9 @@ void RXvWorkItem(void *Context);
|
||||||
|
|
||||||
void RXvMngWorkItem(void *Context);
|
void RXvMngWorkItem(void *Context);
|
||||||
|
|
||||||
void
|
void RXvFreeRCB(PRCB pRCB, int bReAllocSkb);
|
||||||
RXvFreeRCB(
|
|
||||||
PRCB pRCB,
|
|
||||||
BOOL bReAllocSkb
|
|
||||||
);
|
|
||||||
|
|
||||||
BOOL
|
int RXbBulkInProcessData(struct vnt_private *, PRCB pRCB,
|
||||||
RXbBulkInProcessData(
|
unsigned long BytesToIndicate);
|
||||||
PSDevice pDevice,
|
|
||||||
PRCB pRCB,
|
|
||||||
unsigned long BytesToIndicate
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif /* __RXTX_H__ */
|
#endif /* __RXTX_H__ */
|
||||||
|
|
|
@ -60,13 +60,13 @@ static int msglevel =MSG_LEVEL_INFO;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
|
static int hostap_enable_hostapd(struct vnt_private *pDevice, int rtnl_locked)
|
||||||
{
|
{
|
||||||
PSDevice apdev_priv;
|
struct vnt_private *apdev_priv;
|
||||||
struct net_device *dev = pDevice->dev;
|
struct net_device *dev = pDevice->dev;
|
||||||
int ret;
|
int ret;
|
||||||
const struct net_device_ops apdev_netdev_ops = {
|
const struct net_device_ops apdev_netdev_ops = {
|
||||||
.ndo_start_xmit = pDevice->tx_80211,
|
.ndo_start_xmit = pDevice->tx_80211,
|
||||||
};
|
};
|
||||||
|
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name);
|
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name);
|
||||||
|
@ -120,7 +120,7 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int hostap_disable_hostapd(PSDevice pDevice, int rtnl_locked)
|
static int hostap_disable_hostapd(struct vnt_private *pDevice, int rtnl_locked)
|
||||||
{
|
{
|
||||||
|
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: disabling hostapd mode\n", pDevice->dev->name);
|
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: disabling hostapd mode\n", pDevice->dev->name);
|
||||||
|
@ -157,7 +157,8 @@ static int hostap_disable_hostapd(PSDevice pDevice, int rtnl_locked)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int vt6656_hostap_set_hostapd(PSDevice pDevice, int val, int rtnl_locked)
|
int vt6656_hostap_set_hostapd(struct vnt_private *pDevice,
|
||||||
|
int val, int rtnl_locked)
|
||||||
{
|
{
|
||||||
if (val < 0 || val > 1)
|
if (val < 0 || val > 1)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -187,8 +188,8 @@ int vt6656_hostap_set_hostapd(PSDevice pDevice, int val, int rtnl_locked)
|
||||||
* Return Value:
|
* Return Value:
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int hostap_remove_sta(PSDevice pDevice,
|
static int hostap_remove_sta(struct vnt_private *pDevice,
|
||||||
struct viawget_hostapd_param *param)
|
struct viawget_hostapd_param *param)
|
||||||
{
|
{
|
||||||
unsigned int uNodeIndex;
|
unsigned int uNodeIndex;
|
||||||
|
|
||||||
|
@ -215,16 +216,15 @@ static int hostap_remove_sta(PSDevice pDevice,
|
||||||
* Return Value:
|
* Return Value:
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int hostap_add_sta(PSDevice pDevice,
|
static int hostap_add_sta(struct vnt_private *pDevice,
|
||||||
struct viawget_hostapd_param *param)
|
struct viawget_hostapd_param *param)
|
||||||
{
|
{
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
unsigned int uNodeIndex;
|
unsigned int uNodeIndex;
|
||||||
|
|
||||||
|
if (!BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex))
|
||||||
|
BSSvCreateOneNode(pDevice, &uNodeIndex);
|
||||||
|
|
||||||
if (!BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) {
|
|
||||||
BSSvCreateOneNode((PSDevice)pDevice, &uNodeIndex);
|
|
||||||
}
|
|
||||||
memcpy(pMgmt->sNodeDBTable[uNodeIndex].abyMACAddr, param->sta_addr, WLAN_ADDR_LEN);
|
memcpy(pMgmt->sNodeDBTable[uNodeIndex].abyMACAddr, param->sta_addr, WLAN_ADDR_LEN);
|
||||||
pMgmt->sNodeDBTable[uNodeIndex].eNodeState = NODE_ASSOC;
|
pMgmt->sNodeDBTable[uNodeIndex].eNodeState = NODE_ASSOC;
|
||||||
pMgmt->sNodeDBTable[uNodeIndex].wCapInfo = param->u.add_sta.capability;
|
pMgmt->sNodeDBTable[uNodeIndex].wCapInfo = param->u.add_sta.capability;
|
||||||
|
@ -275,10 +275,10 @@ static int hostap_add_sta(PSDevice pDevice,
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int hostap_get_info_sta(PSDevice pDevice,
|
static int hostap_get_info_sta(struct vnt_private *pDevice,
|
||||||
struct viawget_hostapd_param *param)
|
struct viawget_hostapd_param *param)
|
||||||
{
|
{
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
unsigned int uNodeIndex;
|
unsigned int uNodeIndex;
|
||||||
|
|
||||||
if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) {
|
if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) {
|
||||||
|
@ -308,10 +308,10 @@ static int hostap_get_info_sta(PSDevice pDevice,
|
||||||
* Return Value:
|
* Return Value:
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int hostap_set_flags_sta(PSDevice pDevice,
|
static int hostap_set_flags_sta(struct vnt_private *pDevice,
|
||||||
struct viawget_hostapd_param *param)
|
struct viawget_hostapd_param *param)
|
||||||
{
|
{
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
unsigned int uNodeIndex;
|
unsigned int uNodeIndex;
|
||||||
|
|
||||||
if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) {
|
if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) {
|
||||||
|
@ -342,10 +342,10 @@ static int hostap_set_flags_sta(PSDevice pDevice,
|
||||||
* Return Value:
|
* Return Value:
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int hostap_set_generic_element(PSDevice pDevice,
|
static int hostap_set_generic_element(struct vnt_private *pDevice,
|
||||||
struct viawget_hostapd_param *param)
|
struct viawget_hostapd_param *param)
|
||||||
{
|
{
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -388,7 +388,7 @@ static int hostap_set_generic_element(PSDevice pDevice,
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void hostap_flush_sta(PSDevice pDevice)
|
static void hostap_flush_sta(struct vnt_private *pDevice)
|
||||||
{
|
{
|
||||||
// reserved node index =0 for multicast node.
|
// reserved node index =0 for multicast node.
|
||||||
BSSvClearNodeDBTable(pDevice, 1);
|
BSSvClearNodeDBTable(pDevice, 1);
|
||||||
|
@ -410,21 +410,20 @@ static void hostap_flush_sta(PSDevice pDevice)
|
||||||
* Return Value:
|
* Return Value:
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int hostap_set_encryption(PSDevice pDevice,
|
static int hostap_set_encryption(struct vnt_private *pDevice,
|
||||||
struct viawget_hostapd_param *param,
|
struct viawget_hostapd_param *param, int param_len)
|
||||||
int param_len)
|
|
||||||
{
|
{
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
DWORD dwKeyIndex = 0;
|
u32 dwKeyIndex = 0;
|
||||||
BYTE abyKey[MAX_KEY_LEN];
|
u8 abyKey[MAX_KEY_LEN];
|
||||||
BYTE abySeq[MAX_KEY_LEN];
|
u8 abySeq[MAX_KEY_LEN];
|
||||||
NDIS_802_11_KEY_RSC KeyRSC;
|
NDIS_802_11_KEY_RSC KeyRSC;
|
||||||
BYTE byKeyDecMode = KEY_CTL_WEP;
|
u8 byKeyDecMode = KEY_CTL_WEP;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int iNodeIndex = -1;
|
s32 iNodeIndex = -1;
|
||||||
int ii;
|
int ii;
|
||||||
BOOL bKeyTableFull = FALSE;
|
int bKeyTableFull = FALSE;
|
||||||
WORD wKeyCtl = 0;
|
u16 wKeyCtl = 0;
|
||||||
|
|
||||||
|
|
||||||
param->u.crypt.err = 0;
|
param->u.crypt.err = 0;
|
||||||
|
@ -647,14 +646,14 @@ static int hostap_set_encryption(PSDevice pDevice,
|
||||||
* Return Value:
|
* Return Value:
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int hostap_get_encryption(PSDevice pDevice,
|
static int hostap_get_encryption(struct vnt_private *pDevice,
|
||||||
struct viawget_hostapd_param *param,
|
struct viawget_hostapd_param *param,
|
||||||
int param_len)
|
int param_len)
|
||||||
{
|
{
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int ii;
|
int ii;
|
||||||
int iNodeIndex =0;
|
s32 iNodeIndex = 0;
|
||||||
|
|
||||||
|
|
||||||
param->u.crypt.err = 0;
|
param->u.crypt.err = 0;
|
||||||
|
@ -692,7 +691,7 @@ static int hostap_get_encryption(PSDevice pDevice,
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int vt6656_hostap_ioctl(PSDevice pDevice, struct iw_point *p)
|
int vt6656_hostap_ioctl(struct vnt_private *pDevice, struct iw_point *p)
|
||||||
{
|
{
|
||||||
struct viawget_hostapd_param *param;
|
struct viawget_hostapd_param *param;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
#define ARPHRD_IEEE80211 801
|
#define ARPHRD_IEEE80211 801
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int vt6656_hostap_set_hostapd(PSDevice pDevice, int val, int rtnl_locked);
|
int vt6656_hostap_set_hostapd(struct vnt_private *, int val, int rtnl_locked);
|
||||||
int vt6656_hostap_ioctl(PSDevice pDevice, struct iw_point *p);
|
int vt6656_hostap_ioctl(struct vnt_private *, struct iw_point *p);
|
||||||
|
|
||||||
#endif /* __HOSTAP_H__ */
|
#endif /* __HOSTAP_H__ */
|
||||||
|
|
|
@ -70,12 +70,10 @@ static int msglevel = MSG_LEVEL_INFO;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void PSvEnablePowerSaving(void *hDeviceContext,
|
void PSvEnablePowerSaving(struct vnt_private *pDevice, u16 wListenInterval)
|
||||||
WORD wListenInterval)
|
|
||||||
{
|
{
|
||||||
PSDevice pDevice = (PSDevice)hDeviceContext;
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
u16 wAID = pMgmt->wCurrAID | BIT14 | BIT15;
|
||||||
WORD wAID = pMgmt->wCurrAID | BIT14 | BIT15;
|
|
||||||
|
|
||||||
/* set period of power up before TBTT */
|
/* set period of power up before TBTT */
|
||||||
MACvWriteWord(pDevice, MAC_REG_PWBT, C_PWBT);
|
MACvWriteWord(pDevice, MAC_REG_PWBT, C_PWBT);
|
||||||
|
@ -136,10 +134,8 @@ void PSvEnablePowerSaving(void *hDeviceContext,
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void PSvDisablePowerSaving(void *hDeviceContext)
|
void PSvDisablePowerSaving(struct vnt_private *pDevice)
|
||||||
{
|
{
|
||||||
PSDevice pDevice = (PSDevice)hDeviceContext;
|
|
||||||
/* PSMgmtObject pMgmt = &(pDevice->sMgmtObj); */
|
|
||||||
|
|
||||||
/* disable power saving hw function */
|
/* disable power saving hw function */
|
||||||
CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_DISABLE_PS, 0,
|
CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_DISABLE_PS, 0,
|
||||||
|
@ -168,13 +164,11 @@ void PSvDisablePowerSaving(void *hDeviceContext)
|
||||||
* FALSE, if fail
|
* FALSE, if fail
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BOOL PSbConsiderPowerDown(void *hDeviceContext,
|
int PSbConsiderPowerDown(struct vnt_private *pDevice, int bCheckRxDMA,
|
||||||
BOOL bCheckRxDMA,
|
int bCheckCountToWakeUp)
|
||||||
BOOL bCheckCountToWakeUp)
|
|
||||||
{
|
{
|
||||||
PSDevice pDevice = (PSDevice)hDeviceContext;
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
u8 byData;
|
||||||
BYTE byData;
|
|
||||||
|
|
||||||
/* check if already in Doze mode */
|
/* check if already in Doze mode */
|
||||||
ControlvReadByte(pDevice, MESSAGE_REQUEST_MACREG,
|
ControlvReadByte(pDevice, MESSAGE_REQUEST_MACREG,
|
||||||
|
@ -225,15 +219,17 @@ BOOL PSbConsiderPowerDown(void *hDeviceContext,
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void PSvSendPSPOLL(void *hDeviceContext)
|
void PSvSendPSPOLL(struct vnt_private *pDevice)
|
||||||
{
|
{
|
||||||
PSDevice pDevice = (PSDevice)hDeviceContext;
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
struct vnt_tx_mgmt *pTxPacket = NULL;
|
||||||
PSTxMgmtPacket pTxPacket = NULL;
|
|
||||||
|
memset(pMgmt->pbyPSPacketPool, 0, sizeof(struct vnt_tx_mgmt)
|
||||||
|
+ WLAN_HDR_ADDR2_LEN);
|
||||||
|
pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyPSPacketPool;
|
||||||
|
pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
|
||||||
|
+ sizeof(struct vnt_tx_mgmt));
|
||||||
|
|
||||||
memset(pMgmt->pbyPSPacketPool, 0, sizeof(STxMgmtPacket) + WLAN_HDR_ADDR2_LEN);
|
|
||||||
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyPSPacketPool;
|
|
||||||
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
|
|
||||||
pTxPacket->p80211Header->sA2.wFrameCtl = cpu_to_le16(
|
pTxPacket->p80211Header->sA2.wFrameCtl = cpu_to_le16(
|
||||||
(
|
(
|
||||||
WLAN_SET_FC_FTYPE(WLAN_TYPE_CTL) |
|
WLAN_SET_FC_FTYPE(WLAN_TYPE_CTL) |
|
||||||
|
@ -263,11 +259,10 @@ void PSvSendPSPOLL(void *hDeviceContext)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BOOL PSbSendNullPacket(void *hDeviceContext)
|
int PSbSendNullPacket(struct vnt_private *pDevice)
|
||||||
{
|
{
|
||||||
PSDevice pDevice = (PSDevice)hDeviceContext;
|
struct vnt_tx_mgmt *pTxPacket = NULL;
|
||||||
PSTxMgmtPacket pTxPacket = NULL;
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
|
||||||
u16 flags = 0;
|
u16 flags = 0;
|
||||||
|
|
||||||
if (pDevice->bLinkPass == FALSE)
|
if (pDevice->bLinkPass == FALSE)
|
||||||
|
@ -278,9 +273,11 @@ BOOL PSbSendNullPacket(void *hDeviceContext)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(pMgmt->pbyPSPacketPool, 0, sizeof(STxMgmtPacket) + WLAN_NULLDATA_FR_MAXLEN);
|
memset(pMgmt->pbyPSPacketPool, 0, sizeof(struct vnt_tx_mgmt)
|
||||||
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyPSPacketPool;
|
+ WLAN_NULLDATA_FR_MAXLEN);
|
||||||
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
|
pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyPSPacketPool;
|
||||||
|
pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
|
||||||
|
+ sizeof(struct vnt_tx_mgmt));
|
||||||
|
|
||||||
flags = WLAN_SET_FC_FTYPE(WLAN_TYPE_DATA) |
|
flags = WLAN_SET_FC_FTYPE(WLAN_TYPE_DATA) |
|
||||||
WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_NULL);
|
WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_NULL);
|
||||||
|
@ -318,11 +315,10 @@ BOOL PSbSendNullPacket(void *hDeviceContext)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BOOL PSbIsNextTBTTWakeUp(void *hDeviceContext)
|
int PSbIsNextTBTTWakeUp(struct vnt_private *pDevice)
|
||||||
{
|
{
|
||||||
PSDevice pDevice = (PSDevice)hDeviceContext;
|
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||||
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
int bWakeUp = FALSE;
|
||||||
BOOL bWakeUp = FALSE;
|
|
||||||
|
|
||||||
if (pMgmt->wListenInterval >= 2) {
|
if (pMgmt->wListenInterval >= 2) {
|
||||||
if (pMgmt->wCountToWakeUp == 0)
|
if (pMgmt->wCountToWakeUp == 0)
|
||||||
|
|
|
@ -48,14 +48,12 @@
|
||||||
/* PSDevice pDevice */
|
/* PSDevice pDevice */
|
||||||
/* PSDevice hDeviceContext */
|
/* PSDevice hDeviceContext */
|
||||||
|
|
||||||
BOOL PSbConsiderPowerDown(void *hDeviceContext,
|
int PSbConsiderPowerDown(struct vnt_private *, int bCheckRxDMA,
|
||||||
BOOL bCheckRxDMA,
|
int bCheckCountToWakeUp);
|
||||||
BOOL bCheckCountToWakeUp);
|
void PSvDisablePowerSaving(struct vnt_private *);
|
||||||
|
void PSvEnablePowerSaving(struct vnt_private *, u16 wListenInterval);
|
||||||
void PSvDisablePowerSaving(void *hDeviceContext);
|
void PSvSendPSPOLL(struct vnt_private *);
|
||||||
void PSvEnablePowerSaving(void *hDeviceContext, WORD wListenInterval);
|
int PSbSendNullPacket(struct vnt_private *);
|
||||||
void PSvSendPSPOLL(void *hDeviceContext);
|
int PSbIsNextTBTTWakeUp(struct vnt_private *);
|
||||||
BOOL PSbSendNullPacket(void *hDeviceContext);
|
|
||||||
BOOL PSbIsNextTBTTWakeUp(void *hDeviceContext);
|
|
||||||
|
|
||||||
#endif /* __POWER_H__ */
|
#endif /* __POWER_H__ */
|
||||||
|
|
Loading…
Reference in New Issue