diff options
Diffstat (limited to 'drivers/staging/vt6655/card.c')
-rw-r--r-- | drivers/staging/vt6655/card.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index 05bf48a24f45..4ae8d9362edf 100644 --- a/drivers/staging/vt6655/card.c +++ b/drivers/staging/vt6655/card.c @@ -87,7 +87,7 @@ static unsigned char abyDefaultSuppRatesB[] = {WLAN_EID_SUPP_RATES, 4, 0x02, 0x0 /*--------------------- Static Variables --------------------------*/ -const unsigned short cwRXBCNTSFOff[MAX_RATE] = +static const unsigned short cwRXBCNTSFOff[MAX_RATE] = {17, 17, 17, 17, 34, 23, 17, 11, 8, 5, 4, 3}; /*--------------------- Static Functions --------------------------*/ @@ -351,6 +351,7 @@ s_vSetRSPINF(PSDevice pDevice, CARD_PHY_TYPE ePHYType, void *pvSupportRateIEs, v bool CARDbIsShortPreamble(void *pDeviceHandler) { PSDevice pDevice = (PSDevice) pDeviceHandler; + if (pDevice->byPreambleType == 0) return false; @@ -372,6 +373,7 @@ bool CARDbIsShortPreamble(void *pDeviceHandler) bool CARDbIsShorSlotTime(void *pDeviceHandler) { PSDevice pDevice = (PSDevice) pDeviceHandler; + return pDevice->bShortSlotTime; } @@ -908,7 +910,7 @@ bool CARDbRadioPowerOff(void *pDeviceHandler) pDevice->bRadioOff = true; //2007-0409-03,<Add> by chester - printk("chester power off\n"); + pr_debug("chester power off\n"); MACvRegBitsOn(pDevice->PortOffset, MAC_REG_GPIOCTL0, LED_ACTSET); //LED issue return bResult; } @@ -929,14 +931,17 @@ bool CARDbRadioPowerOn(void *pDeviceHandler) { PSDevice pDevice = (PSDevice) pDeviceHandler; bool bResult = true; - printk("chester power on\n"); + + pr_debug("chester power on\n"); if (pDevice->bRadioControlOff == true) { - if (pDevice->bHWRadioOff == true) printk("chester bHWRadioOff\n"); - if (pDevice->bRadioControlOff == true) printk("chester bRadioControlOff\n"); + if (pDevice->bHWRadioOff == true) + pr_debug("chester bHWRadioOff\n"); + if (pDevice->bRadioControlOff == true) + pr_debug("chester bRadioControlOff\n"); return false; } if (pDevice->bRadioOff == false) { - printk("chester pbRadioOff\n"); + pr_debug("chester pbRadioOff\n"); return true; } BBvExitDeepSleep(pDevice->PortOffset, pDevice->byLocalID); @@ -960,7 +965,7 @@ bool CARDbRadioPowerOn(void *pDeviceHandler) pDevice->bRadioOff = false; // 2007-0409-03,<Add> by chester - printk("chester power on\n"); + pr_debug("chester power on\n"); MACvRegBitsOff(pDevice->PortOffset, MAC_REG_GPIOCTL0, LED_ACTSET); //LED issue return bResult; } @@ -998,7 +1003,7 @@ CARDbAdd_PMKID_Candidate( ) { PSDevice pDevice = (PSDevice) pDeviceHandler; - PPMKID_CANDIDATE pCandidateList; + struct pmkid_candidate *pCandidateList; unsigned int ii = 0; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); @@ -1573,7 +1578,7 @@ CARDvSafeResetRx( * Return Value: response Control frame rate * */ -unsigned short CARDwGetCCKControlRate(void *pDeviceHandler, unsigned short wRateIdx) +static unsigned short CARDwGetCCKControlRate(void *pDeviceHandler, unsigned short wRateIdx) { PSDevice pDevice = (PSDevice) pDeviceHandler; unsigned int ui = (unsigned int) wRateIdx; @@ -1600,7 +1605,7 @@ unsigned short CARDwGetCCKControlRate(void *pDeviceHandler, unsigned short wRate * Return Value: response Control frame rate * */ -unsigned short CARDwGetOFDMControlRate(void *pDeviceHandler, unsigned short wRateIdx) +static unsigned short CARDwGetOFDMControlRate(void *pDeviceHandler, unsigned short wRateIdx) { PSDevice pDevice = (PSDevice) pDeviceHandler; unsigned int ui = (unsigned int) wRateIdx; @@ -1767,6 +1772,7 @@ void vUpdateIFS(void *pDeviceHandler) PSDevice pDevice = (PSDevice) pDeviceHandler; unsigned char byMaxMin = 0; + if (pDevice->byPacketType == PK_TYPE_11A) {//0000 0000 0000 0000,11a pDevice->uSlot = C_SLOT_SHORT; pDevice->uSIFS = C_SIFS_A; @@ -1888,7 +1894,7 @@ unsigned char CARDbyGetPktType(void *pDeviceHandler) * Return Value: none * */ -void CARDvSetLoopbackMode(unsigned long dwIoBase, unsigned short wLoopbackMode) +void CARDvSetLoopbackMode(void __iomem *dwIoBase, unsigned short wLoopbackMode) { switch (wLoopbackMode) { case CARD_LB_NONE: @@ -1977,7 +1983,7 @@ QWORD CARDqGetTSFOffset(unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2) * Return Value: true if success; otherwise false * */ -bool CARDbGetCurrentTSF(unsigned long dwIoBase, PQWORD pqwCurrTSF) +bool CARDbGetCurrentTSF(void __iomem *dwIoBase, PQWORD pqwCurrTSF) { unsigned short ww; unsigned char byData; @@ -2050,7 +2056,7 @@ QWORD CARDqGetNextTBTT(QWORD qwTSF, unsigned short wBeaconInterval) * Return Value: none * */ -void CARDvSetFirstNextTBTT(unsigned long dwIoBase, unsigned short wBeaconInterval) +void CARDvSetFirstNextTBTT(void __iomem *dwIoBase, unsigned short wBeaconInterval) { QWORD qwNextTBTT; @@ -2062,8 +2068,6 @@ void CARDvSetFirstNextTBTT(unsigned long dwIoBase, unsigned short wBeaconInterva VNSvOutPortD(dwIoBase + MAC_REG_NEXTTBTT, LODWORD(qwNextTBTT)); VNSvOutPortD(dwIoBase + MAC_REG_NEXTTBTT + 4, HIDWORD(qwNextTBTT)); MACvRegBitsOn(dwIoBase, MAC_REG_TFTCTL, TFTCTL_TBTTSYNCEN); - - return; } /* @@ -2081,15 +2085,13 @@ void CARDvSetFirstNextTBTT(unsigned long dwIoBase, unsigned short wBeaconInterva * Return Value: none * */ -void CARDvUpdateNextTBTT(unsigned long dwIoBase, QWORD qwTSF, unsigned short wBeaconInterval) +void CARDvUpdateNextTBTT(void __iomem *dwIoBase, QWORD qwTSF, unsigned short wBeaconInterval) { qwTSF = CARDqGetNextTBTT(qwTSF, wBeaconInterval); // Set NextTBTT VNSvOutPortD(dwIoBase + MAC_REG_NEXTTBTT, LODWORD(qwTSF)); VNSvOutPortD(dwIoBase + MAC_REG_NEXTTBTT + 4, HIDWORD(qwTSF)); MACvRegBitsOn(dwIoBase, MAC_REG_TFTCTL, TFTCTL_TBTTSYNCEN); - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Card:Update Next TBTT[%8xh:%8xh] \n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Card:Update Next TBTT[%8xh:%8xh]\n", (unsigned int) HIDWORD(qwTSF), (unsigned int) LODWORD(qwTSF)); - - return; } |