Commit d052270b authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6655: card change PSDevice to struct vnt_private

Repacing void *pDeviceHandler
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 582d6c22
...@@ -224,7 +224,8 @@ s_vCalculateOFDMRParameter( ...@@ -224,7 +224,8 @@ s_vCalculateOFDMRParameter(
*/ */
static static
void void
s_vSetRSPINF(PSDevice pDevice, CARD_PHY_TYPE ePHYType, void *pvSupportRateIEs, void *pvExtSupportRateIEs) s_vSetRSPINF(struct vnt_private *pDevice, CARD_PHY_TYPE ePHYType,
void *pvSupportRateIEs, void *pvExtSupportRateIEs)
{ {
unsigned char byServ = 0, bySignal = 0; // For CCK unsigned char byServ = 0, bySignal = 0; // For CCK
unsigned short wLen = 0; unsigned short wLen = 0;
...@@ -348,9 +349,8 @@ s_vSetRSPINF(PSDevice pDevice, CARD_PHY_TYPE ePHYType, void *pvSupportRateIEs, v ...@@ -348,9 +349,8 @@ s_vSetRSPINF(PSDevice pDevice, CARD_PHY_TYPE ePHYType, void *pvSupportRateIEs, v
* Return Value: true if short preamble; otherwise false * Return Value: true if short preamble; otherwise false
* *
*/ */
bool CARDbIsShortPreamble(void *pDeviceHandler) bool CARDbIsShortPreamble(struct vnt_private *pDevice)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
if (pDevice->byPreambleType == 0) if (pDevice->byPreambleType == 0)
return false; return false;
...@@ -370,9 +370,8 @@ bool CARDbIsShortPreamble(void *pDeviceHandler) ...@@ -370,9 +370,8 @@ bool CARDbIsShortPreamble(void *pDeviceHandler)
* Return Value: true if short slot time; otherwise false * Return Value: true if short slot time; otherwise false
* *
*/ */
bool CARDbIsShorSlotTime(void *pDeviceHandler) bool CARDbIsShorSlotTime(struct vnt_private *pDevice)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
return pDevice->bShortSlotTime; return pDevice->bShortSlotTime;
} }
...@@ -389,9 +388,10 @@ bool CARDbIsShorSlotTime(void *pDeviceHandler) ...@@ -389,9 +388,10 @@ bool CARDbIsShorSlotTime(void *pDeviceHandler)
* Return Value: None. * Return Value: None.
* *
*/ */
bool CARDbSetPhyParameter(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigned short wCapInfo, unsigned char byERPField, void *pvSupportRateIEs, void *pvExtSupportRateIEs) bool CARDbSetPhyParameter(struct vnt_private *pDevice, CARD_PHY_TYPE ePHYType,
unsigned short wCapInfo, unsigned char byERPField,
void *pvSupportRateIEs, void *pvExtSupportRateIEs)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned char byCWMaxMin = 0; unsigned char byCWMaxMin = 0;
unsigned char bySlot = 0; unsigned char bySlot = 0;
unsigned char bySIFS = 0; unsigned char bySIFS = 0;
...@@ -573,9 +573,9 @@ bool CARDbSetPhyParameter(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigned ...@@ -573,9 +573,9 @@ bool CARDbSetPhyParameter(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigned
* Return Value: none * Return Value: none
* *
*/ */
bool CARDbUpdateTSF(void *pDeviceHandler, unsigned char byRxRate, u64 qwBSSTimestamp, u64 qwLocalTSF) bool CARDbUpdateTSF(struct vnt_private *pDevice, unsigned char byRxRate,
u64 qwBSSTimestamp, u64 qwLocalTSF)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
u64 qwTSFOffset = 0; u64 qwTSFOffset = 0;
if (qwBSSTimestamp != qwLocalTSF) { if (qwBSSTimestamp != qwLocalTSF) {
...@@ -603,9 +603,9 @@ bool CARDbUpdateTSF(void *pDeviceHandler, unsigned char byRxRate, u64 qwBSSTimes ...@@ -603,9 +603,9 @@ bool CARDbUpdateTSF(void *pDeviceHandler, unsigned char byRxRate, u64 qwBSSTimes
* Return Value: true if succeed; otherwise false * Return Value: true if succeed; otherwise false
* *
*/ */
bool CARDbSetBeaconPeriod(void *pDeviceHandler, unsigned short wBeaconInterval) bool CARDbSetBeaconPeriod(struct vnt_private *pDevice,
unsigned short wBeaconInterval)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
u64 qwNextTBTT = 0; u64 qwNextTBTT = 0;
CARDbGetCurrentTSF(pDevice->PortOffset, &qwNextTBTT); //Get Local TSF counter CARDbGetCurrentTSF(pDevice->PortOffset, &qwNextTBTT); //Get Local TSF counter
...@@ -636,9 +636,8 @@ bool CARDbSetBeaconPeriod(void *pDeviceHandler, unsigned short wBeaconInterval) ...@@ -636,9 +636,8 @@ bool CARDbSetBeaconPeriod(void *pDeviceHandler, unsigned short wBeaconInterval)
* Return Value: true if all data packet complete; otherwise false. * Return Value: true if all data packet complete; otherwise false.
* *
*/ */
bool CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType) bool CARDbStopTxPacket(struct vnt_private *pDevice, CARD_PKT_TYPE ePktType)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
if (ePktType == PKT_TYPE_802_11_ALL) { if (ePktType == PKT_TYPE_802_11_ALL) {
pDevice->bStopBeacon = true; pDevice->bStopBeacon = true;
...@@ -690,9 +689,8 @@ bool CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType) ...@@ -690,9 +689,8 @@ bool CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType)
* Return Value: true if success; false if failed. * Return Value: true if success; false if failed.
* *
*/ */
bool CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType) bool CARDbStartTxPacket(struct vnt_private *pDevice, CARD_PKT_TYPE ePktType)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
if (ePktType == PKT_TYPE_802_11_ALL) { if (ePktType == PKT_TYPE_802_11_ALL) {
pDevice->bStopBeacon = false; pDevice->bStopBeacon = false;
...@@ -729,9 +727,9 @@ bool CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType) ...@@ -729,9 +727,9 @@ bool CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType)
* Return Value: true if success; false if failed. * Return Value: true if success; false if failed.
* *
*/ */
bool CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE eOPMode) bool CARDbSetBSSID(struct vnt_private *pDevice,
unsigned char *pbyBSSID, CARD_OP_MODE eOPMode)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
MACvWriteBSSIDAddress(pDevice->PortOffset, pbyBSSID); MACvWriteBSSIDAddress(pDevice->PortOffset, pbyBSSID);
memcpy(pDevice->abyBSSID, pbyBSSID, WLAN_BSSID_LEN); memcpy(pDevice->abyBSSID, pbyBSSID, WLAN_BSSID_LEN);
...@@ -795,11 +793,10 @@ bool CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE e ...@@ -795,11 +793,10 @@ bool CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE e
* *
*/ */
bool CARDbSetTxDataRate( bool CARDbSetTxDataRate(
void *pDeviceHandler, struct vnt_private *pDevice,
unsigned short wDataRate unsigned short wDataRate
) )
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
pDevice->wCurrentRate = wDataRate; pDevice->wCurrentRate = wDataRate;
return true; return true;
...@@ -821,10 +818,9 @@ bool CARDbSetTxDataRate( ...@@ -821,10 +818,9 @@ bool CARDbSetTxDataRate(
-*/ -*/
bool bool
CARDbPowerDown( CARDbPowerDown(
void *pDeviceHandler struct vnt_private *pDevice
) )
{ {
PSDevice pDevice = (PSDevice)pDeviceHandler;
unsigned int uIdx; unsigned int uIdx;
// check if already in Doze mode // check if already in Doze mode
...@@ -858,9 +854,8 @@ CARDbPowerDown( ...@@ -858,9 +854,8 @@ CARDbPowerDown(
* Return Value: true if success; otherwise false * Return Value: true if success; otherwise false
* *
*/ */
bool CARDbRadioPowerOff(void *pDeviceHandler) bool CARDbRadioPowerOff(struct vnt_private *pDevice)
{ {
PSDevice pDevice = (PSDevice)pDeviceHandler;
bool bResult = true; bool bResult = true;
if (pDevice->bRadioOff == true) if (pDevice->bRadioOff == true)
...@@ -904,9 +899,8 @@ bool CARDbRadioPowerOff(void *pDeviceHandler) ...@@ -904,9 +899,8 @@ bool CARDbRadioPowerOff(void *pDeviceHandler)
* Return Value: true if success; otherwise false * Return Value: true if success; otherwise false
* *
*/ */
bool CARDbRadioPowerOn(void *pDeviceHandler) bool CARDbRadioPowerOn(struct vnt_private *pDevice)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
bool bResult = true; bool bResult = true;
pr_debug("chester power on\n"); pr_debug("chester power on\n");
...@@ -947,9 +941,8 @@ bool CARDbRadioPowerOn(void *pDeviceHandler) ...@@ -947,9 +941,8 @@ bool CARDbRadioPowerOn(void *pDeviceHandler)
return bResult; return bResult;
} }
bool CARDbRemoveKey(void *pDeviceHandler, unsigned char *pbyBSSID) bool CARDbRemoveKey(struct vnt_private *pDevice, unsigned char *pbyBSSID)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
KeybRemoveAllKey(&(pDevice->sKey), pbyBSSID, pDevice->PortOffset); KeybRemoveAllKey(&(pDevice->sKey), pbyBSSID, pDevice->PortOffset);
return true; return true;
...@@ -973,13 +966,12 @@ bool CARDbRemoveKey(void *pDeviceHandler, unsigned char *pbyBSSID) ...@@ -973,13 +966,12 @@ bool CARDbRemoveKey(void *pDeviceHandler, unsigned char *pbyBSSID)
-*/ -*/
bool bool
CARDbAdd_PMKID_Candidate( CARDbAdd_PMKID_Candidate(
void *pDeviceHandler, struct vnt_private *pDevice,
unsigned char *pbyBSSID, unsigned char *pbyBSSID,
bool bRSNCapExist, bool bRSNCapExist,
unsigned short wRSNCap unsigned short wRSNCap
) )
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
struct pmkid_candidate *pCandidateList; struct pmkid_candidate *pCandidateList;
unsigned int ii = 0; unsigned int ii = 0;
...@@ -1023,10 +1015,9 @@ CARDbAdd_PMKID_Candidate( ...@@ -1023,10 +1015,9 @@ CARDbAdd_PMKID_Candidate(
void * void *
CARDpGetCurrentAddress( CARDpGetCurrentAddress(
void *pDeviceHandler struct vnt_private *pDevice
) )
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
return pDevice->abyCurrentNetAddr; return pDevice->abyCurrentNetAddr;
} }
...@@ -1047,12 +1038,11 @@ CARDpGetCurrentAddress( ...@@ -1047,12 +1038,11 @@ CARDpGetCurrentAddress(
-*/ -*/
bool bool
CARDbStartMeasure( CARDbStartMeasure(
void *pDeviceHandler, struct vnt_private *pDevice,
void *pvMeasureEIDs, void *pvMeasureEIDs,
unsigned int uNumOfMeasureEIDs unsigned int uNumOfMeasureEIDs
) )
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
PWLAN_IE_MEASURE_REQ pEID = (PWLAN_IE_MEASURE_REQ) pvMeasureEIDs; PWLAN_IE_MEASURE_REQ pEID = (PWLAN_IE_MEASURE_REQ) pvMeasureEIDs;
u64 qwCurrTSF; u64 qwCurrTSF;
u64 qwStartTSF; u64 qwStartTSF;
...@@ -1163,13 +1153,12 @@ CARDbStartMeasure( ...@@ -1163,13 +1153,12 @@ CARDbStartMeasure(
-*/ -*/
bool bool
CARDbChannelSwitch( CARDbChannelSwitch(
void *pDeviceHandler, struct vnt_private *pDevice,
unsigned char byMode, unsigned char byMode,
unsigned char byNewChannel, unsigned char byNewChannel,
unsigned char byCount unsigned char byCount
) )
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
bool bResult = true; bool bResult = true;
if (byCount == 0) { if (byCount == 0) {
...@@ -1205,7 +1194,7 @@ CARDbChannelSwitch( ...@@ -1205,7 +1194,7 @@ CARDbChannelSwitch(
-*/ -*/
bool bool
CARDbSetQuiet( CARDbSetQuiet(
void *pDeviceHandler, struct vnt_private *pDevice,
bool bResetQuiet, bool bResetQuiet,
unsigned char byQuietCount, unsigned char byQuietCount,
unsigned char byQuietPeriod, unsigned char byQuietPeriod,
...@@ -1213,7 +1202,6 @@ CARDbSetQuiet( ...@@ -1213,7 +1202,6 @@ CARDbSetQuiet(
unsigned short wQuietOffset unsigned short wQuietOffset
) )
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned int ii = 0; unsigned int ii = 0;
if (bResetQuiet) { if (bResetQuiet) {
...@@ -1258,10 +1246,9 @@ CARDbSetQuiet( ...@@ -1258,10 +1246,9 @@ CARDbSetQuiet(
-*/ -*/
bool bool
CARDbStartQuiet( CARDbStartQuiet(
void *pDeviceHandler struct vnt_private *pDevice
) )
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned int ii = 0; unsigned int ii = 0;
unsigned long dwStartTime = 0xFFFFFFFF; unsigned long dwStartTime = 0xFFFFFFFF;
unsigned int uCurrentQuietIndex = 0; unsigned int uCurrentQuietIndex = 0;
...@@ -1358,12 +1345,11 @@ CARDbStartQuiet( ...@@ -1358,12 +1345,11 @@ CARDbStartQuiet(
-*/ -*/
void void
CARDvSetPowerConstraint( CARDvSetPowerConstraint(
void *pDeviceHandler, struct vnt_private *pDevice,
unsigned char byChannel, unsigned char byChannel,
char byPower char byPower
) )
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
if (byChannel > CB_MAX_CHANNEL_24G) { if (byChannel > CB_MAX_CHANNEL_24G) {
if (pDevice->bCountryInfo5G == true) if (pDevice->bCountryInfo5G == true)
...@@ -1392,12 +1378,11 @@ CARDvSetPowerConstraint( ...@@ -1392,12 +1378,11 @@ CARDvSetPowerConstraint(
-*/ -*/
void void
CARDvGetPowerCapability( CARDvGetPowerCapability(
void *pDeviceHandler, struct vnt_private *pDevice,
unsigned char *pbyMinPower, unsigned char *pbyMinPower,
unsigned char *pbyMaxPower unsigned char *pbyMaxPower
) )
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned char byDec = 0; unsigned char byDec = 0;
*pbyMaxPower = pDevice->abyOFDMDefaultPwr[pDevice->byCurrentCh]; *pbyMaxPower = pDevice->abyOFDMDefaultPwr[pDevice->byCurrentCh];
...@@ -1427,10 +1412,9 @@ CARDvGetPowerCapability( ...@@ -1427,10 +1412,9 @@ CARDvGetPowerCapability(
*/ */
char char
CARDbyGetTransmitPower( CARDbyGetTransmitPower(
void *pDeviceHandler struct vnt_private *pDevice
) )
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
return pDevice->byCurPwrdBm; return pDevice->byCurPwrdBm;
} }
...@@ -1438,10 +1422,9 @@ CARDbyGetTransmitPower( ...@@ -1438,10 +1422,9 @@ CARDbyGetTransmitPower(
//xxx //xxx
void void
CARDvSafeResetTx( CARDvSafeResetTx(
void *pDeviceHandler struct vnt_private *pDevice
) )
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned int uu; unsigned int uu;
PSTxDesc pCurrTD; PSTxDesc pCurrTD;
...@@ -1491,10 +1474,9 @@ CARDvSafeResetTx( ...@@ -1491,10 +1474,9 @@ CARDvSafeResetTx(
-*/ -*/
void void
CARDvSafeResetRx( CARDvSafeResetRx(
void *pDeviceHandler struct vnt_private *pDevice
) )
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned int uu; unsigned int uu;
PSRxDesc pDesc; PSRxDesc pDesc;
...@@ -1545,9 +1527,9 @@ CARDvSafeResetRx( ...@@ -1545,9 +1527,9 @@ CARDvSafeResetRx(
* Return Value: response Control frame rate * Return Value: response Control frame rate
* *
*/ */
static unsigned short CARDwGetCCKControlRate(void *pDeviceHandler, unsigned short wRateIdx) static unsigned short CARDwGetCCKControlRate(struct vnt_private *pDevice,
unsigned short wRateIdx)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned int ui = (unsigned int) wRateIdx; unsigned int ui = (unsigned int) wRateIdx;
while (ui > RATE_1M) { while (ui > RATE_1M) {
...@@ -1572,9 +1554,9 @@ static unsigned short CARDwGetCCKControlRate(void *pDeviceHandler, unsigned shor ...@@ -1572,9 +1554,9 @@ static unsigned short CARDwGetCCKControlRate(void *pDeviceHandler, unsigned shor
* Return Value: response Control frame rate * Return Value: response Control frame rate
* *
*/ */
static unsigned short CARDwGetOFDMControlRate(void *pDeviceHandler, unsigned short wRateIdx) static unsigned short CARDwGetOFDMControlRate(struct vnt_private *pDevice,
unsigned short wRateIdx)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned int ui = (unsigned int) wRateIdx; unsigned int ui = (unsigned int) wRateIdx;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BASIC RATE: %X\n", pDevice->wBasicRate); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BASIC RATE: %X\n", pDevice->wBasicRate);
...@@ -1608,9 +1590,8 @@ static unsigned short CARDwGetOFDMControlRate(void *pDeviceHandler, unsigned sho ...@@ -1608,9 +1590,8 @@ static unsigned short CARDwGetOFDMControlRate(void *pDeviceHandler, unsigned sho
* Return Value: None. * Return Value: None.
* *
*/ */
void CARDvSetRSPINF(void *pDeviceHandler, CARD_PHY_TYPE ePHYType) void CARDvSetRSPINF(struct vnt_private *pDevice, CARD_PHY_TYPE ePHYType)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned char byServ = 0x00, bySignal = 0x00; //For CCK unsigned char byServ = 0x00, bySignal = 0x00; //For CCK
unsigned short wLen = 0x0000; unsigned short wLen = 0x0000;
unsigned char byTxRate, byRsvTime; //For OFDM unsigned char byTxRate, byRsvTime; //For OFDM
...@@ -1733,10 +1714,9 @@ void CARDvSetRSPINF(void *pDeviceHandler, CARD_PHY_TYPE ePHYType) ...@@ -1733,10 +1714,9 @@ void CARDvSetRSPINF(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)
* Return Value: None. * Return Value: None.
* *
*/ */
void vUpdateIFS(void *pDeviceHandler) void vUpdateIFS(struct vnt_private *pDevice)
{ {
//Set SIFS, DIFS, EIFS, SlotTime, CwMin /* Set SIFS, DIFS, EIFS, SlotTime, CwMin */
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned char byMaxMin = 0; unsigned char byMaxMin = 0;
...@@ -1785,9 +1765,8 @@ void vUpdateIFS(void *pDeviceHandler) ...@@ -1785,9 +1765,8 @@ void vUpdateIFS(void *pDeviceHandler)
VNSvOutPortB(pDevice->PortOffset + MAC_REG_CWMAXMIN0, (unsigned char)byMaxMin); VNSvOutPortB(pDevice->PortOffset + MAC_REG_CWMAXMIN0, (unsigned char)byMaxMin);
} }
void CARDvUpdateBasicTopRate(void *pDeviceHandler) void CARDvUpdateBasicTopRate(struct vnt_private *pDevice)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned char byTopOFDM = RATE_24M, byTopCCK = RATE_1M; unsigned char byTopOFDM = RATE_24M, byTopCCK = RATE_1M;
unsigned char ii; unsigned char ii;
...@@ -1811,9 +1790,8 @@ void CARDvUpdateBasicTopRate(void *pDeviceHandler) ...@@ -1811,9 +1790,8 @@ void CARDvUpdateBasicTopRate(void *pDeviceHandler)
pDevice->byTopCCKBasicRate = byTopCCK; pDevice->byTopCCKBasicRate = byTopCCK;
} }
bool CARDbAddBasicRate(void *pDeviceHandler, unsigned short wRateIdx) bool CARDbAddBasicRate(struct vnt_private *pDevice, unsigned short wRateIdx)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned short wRate = (unsigned short)(1<<wRateIdx); unsigned short wRate = (unsigned short)(1<<wRateIdx);
pDevice->wBasicRate |= wRate; pDevice->wBasicRate |= wRate;
...@@ -1824,9 +1802,8 @@ bool CARDbAddBasicRate(void *pDeviceHandler, unsigned short wRateIdx) ...@@ -1824,9 +1802,8 @@ bool CARDbAddBasicRate(void *pDeviceHandler, unsigned short wRateIdx)
return true; return true;
} }
bool CARDbIsOFDMinBasicRate(void *pDeviceHandler) bool CARDbIsOFDMinBasicRate(struct vnt_private *pDevice)
{ {
PSDevice pDevice = (PSDevice)pDeviceHandler;
int ii; int ii;
for (ii = RATE_54M; ii >= RATE_6M; ii--) { for (ii = RATE_54M; ii >= RATE_6M; ii--) {
...@@ -1836,9 +1813,8 @@ bool CARDbIsOFDMinBasicRate(void *pDeviceHandler) ...@@ -1836,9 +1813,8 @@ bool CARDbIsOFDMinBasicRate(void *pDeviceHandler)
return false; return false;
} }
unsigned char CARDbyGetPktType(void *pDeviceHandler) unsigned char CARDbyGetPktType(struct vnt_private *pDevice)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
if (pDevice->byBBType == BB_TYPE_11A || pDevice->byBBType == BB_TYPE_11B) if (pDevice->byBBType == BB_TYPE_11A || pDevice->byBBType == BB_TYPE_11B)
return (unsigned char)pDevice->byBBType; return (unsigned char)pDevice->byBBType;
...@@ -1889,9 +1865,8 @@ void CARDvSetLoopbackMode(void __iomem *dwIoBase, unsigned short wLoopbackMode) ...@@ -1889,9 +1865,8 @@ void CARDvSetLoopbackMode(void __iomem *dwIoBase, unsigned short wLoopbackMode)
* Return Value: none * Return Value: none
* *
*/ */
bool CARDbSoftwareReset(void *pDeviceHandler) bool CARDbSoftwareReset(struct vnt_private *pDevice)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler;
// reset MAC // reset MAC
if (!MACbSafeSoftwareReset(pDevice->PortOffset)) if (!MACbSafeSoftwareReset(pDevice->PortOffset))
......
...@@ -77,49 +77,48 @@ typedef enum _CARD_OP_MODE { ...@@ -77,49 +77,48 @@ typedef enum _CARD_OP_MODE {
OP_MODE_UNKNOWN OP_MODE_UNKNOWN
} CARD_OP_MODE, *PCARD_OP_MODE; } CARD_OP_MODE, *PCARD_OP_MODE;
void CARDvSetRSPINF(void *pDeviceHandler, CARD_PHY_TYPE ePHYType); struct vnt_private;
void vUpdateIFS(void *pDeviceHandler);
void CARDvUpdateBasicTopRate(void *pDeviceHandler); void CARDvSetRSPINF(struct vnt_private *, CARD_PHY_TYPE ePHYType);
bool CARDbAddBasicRate(void *pDeviceHandler, unsigned short wRateIdx); void vUpdateIFS(struct vnt_private *);
bool CARDbIsOFDMinBasicRate(void *pDeviceHandler); void CARDvUpdateBasicTopRate(struct vnt_private *);
bool CARDbAddBasicRate(struct vnt_private *, unsigned short wRateIdx);
bool CARDbIsOFDMinBasicRate(struct vnt_private *);
void CARDvSetLoopbackMode(void __iomem *dwIoBase, unsigned short wLoopbackMode); void CARDvSetLoopbackMode(void __iomem *dwIoBase, unsigned short wLoopbackMode);
bool CARDbSoftwareReset(void *pDeviceHandler); bool CARDbSoftwareReset(struct vnt_private *);
void CARDvSetFirstNextTBTT(void __iomem *dwIoBase, unsigned short wBeaconInterval); void CARDvSetFirstNextTBTT(void __iomem *dwIoBase, unsigned short wBeaconInterval);
void CARDvUpdateNextTBTT(void __iomem *dwIoBase, u64 qwTSF, unsigned short wBeaconInterval); void CARDvUpdateNextTBTT(void __iomem *dwIoBase, u64 qwTSF, unsigned short wBeaconInterval);
bool CARDbGetCurrentTSF(void __iomem *dwIoBase, u64 *pqwCurrTSF); bool CARDbGetCurrentTSF(void __iomem *dwIoBase, u64 *pqwCurrTSF);
u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval); u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval);
u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2); u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2);
bool CARDbSetTxPower(void *pDeviceHandler, unsigned long ulTxPower); bool CARDbSetTxPower(struct vnt_private *, unsigned long ulTxPower);
unsigned char CARDbyGetPktType(void *pDeviceHandler); unsigned char CARDbyGetPktType(struct vnt_private *);
void CARDvSafeResetTx(void *pDeviceHandler); void CARDvSafeResetTx(struct vnt_private *);
void CARDvSafeResetRx(void *pDeviceHandler); void CARDvSafeResetRx(struct vnt_private *);
bool CARDbRadioPowerOff(struct vnt_private *);
bool CARDbRadioPowerOff(void *pDeviceHandler); bool CARDbRadioPowerOn(struct vnt_private *);
bool CARDbRadioPowerOn(void *pDeviceHandler); bool CARDbIsShortPreamble(struct vnt_private *);
bool CARDbIsShortPreamble(void *pDeviceHandler); bool CARDbIsShorSlotTime(struct vnt_private *);
bool CARDbIsShorSlotTime(void *pDeviceHandler); bool CARDbSetPhyParameter(struct vnt_private *, CARD_PHY_TYPE ePHYType,
bool CARDbSetPhyParameter(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigned short wCapInfo, unsigned char byERPField, void *pvSupportRateIEs, void *pvExtSupportRateIEs); unsigned short wCapInfo, unsigned char byERPField,
bool CARDbUpdateTSF(void *pDeviceHandler, unsigned char byRxRate, u64 qwBSSTimestamp, u64 qwLocalTSF); void *pvSupportRateIEs, void *pvExtSupportRateIEs);
bool CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType); bool CARDbUpdateTSF(struct vnt_private *, unsigned char byRxRate,
bool CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType); u64 qwBSSTimestamp, u64 qwLocalTSF);
bool CARDbSetBeaconPeriod(void *pDeviceHandler, unsigned short wBeaconInterval); bool CARDbStopTxPacket(struct vnt_private *, CARD_PKT_TYPE ePktType);
bool CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE eOPMode); bool CARDbStartTxPacket(struct vnt_private *, CARD_PKT_TYPE ePktType);
bool CARDbSetBeaconPeriod(struct vnt_private *, unsigned short wBeaconInterval);
bool bool CARDbSetBSSID(struct vnt_private *,
CARDbPowerDown( unsigned char *pbyBSSID, CARD_OP_MODE eOPMode);
void *pDeviceHandler
); bool CARDbPowerDown(struct vnt_private *);
bool CARDbSetTxDataRate( bool CARDbSetTxDataRate(struct vnt_private *, unsigned short wDataRate);
void *pDeviceHandler,
unsigned short wDataRate bool CARDbRemoveKey(struct vnt_private *, unsigned char *pbyBSSID);
);
bool CARDbRemoveKey(void *pDeviceHandler, unsigned char *pbyBSSID);
bool bool
CARDbAdd_PMKID_Candidate( CARDbAdd_PMKID_Candidate(
void *pDeviceHandler, struct vnt_private *,
unsigned char *pbyBSSID, unsigned char *pbyBSSID,
bool bRSNCapExist, bool bRSNCapExist,
unsigned short wRSNCap unsigned short wRSNCap
...@@ -127,19 +126,19 @@ CARDbAdd_PMKID_Candidate( ...@@ -127,19 +126,19 @@ CARDbAdd_PMKID_Candidate(
void * void *
CARDpGetCurrentAddress( CARDpGetCurrentAddress(
void *pDeviceHandler struct vnt_private *
); );
bool bool
CARDbStartMeasure( CARDbStartMeasure(
void *pDeviceHandler, struct vnt_private *,
void *pvMeasureEIDs, void *pvMeasureEIDs,
unsigned int uNumOfMeasureEIDs unsigned int uNumOfMeasureEIDs
); );
bool bool
CARDbChannelSwitch( CARDbChannelSwitch(
void *pDeviceHandler, struct vnt_private *,
unsigned char byMode, unsigned char byMode,
unsigned char byNewChannel, unsigned char byNewChannel,
unsigned char byCount unsigned char byCount
...@@ -147,7 +146,7 @@ CARDbChannelSwitch( ...@@ -147,7 +146,7 @@ CARDbChannelSwitch(
bool bool
CARDbSetQuiet( CARDbSetQuiet(
void *pDeviceHandler, struct vnt_private *,
bool bResetQuiet, bool bResetQuiet,
unsigned char byQuietCount, unsigned char byQuietCount,
unsigned char byQuietPeriod, unsigned char byQuietPeriod,
...@@ -157,26 +156,26 @@ CARDbSetQuiet( ...@@ -157,26 +156,26 @@ CARDbSetQuiet(
bool bool
CARDbStartQuiet( CARDbStartQuiet(
void *pDeviceHandler struct vnt_private *
); );
void void
CARDvSetPowerConstraint( CARDvSetPowerConstraint(
void *pDeviceHandler, struct vnt_private *,
unsigned char byChannel, unsigned char byChannel,
char byPower char byPower
); );
void void
CARDvGetPowerCapability( CARDvGetPowerCapability(
void *pDeviceHandler, struct vnt_private *,
unsigned char *pbyMinPower, unsigned char *pbyMinPower,
unsigned char *pbyMaxPower unsigned char *pbyMaxPower
); );
char char
CARDbyGetTransmitPower( CARDbyGetTransmitPower(
void *pDeviceHandler struct vnt_private *
); );
#endif // __CARD_H__ #endif // __CARD_H__
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