staging: vt6655: device.h use change __device_info to vnt_private
PATCH 1/9 staging: vt6655: device.h use change __device_info to vnt_private
Coverting all functions to struct vnt_private in device.h and device_main.c
--- drivers/staging/vt6655/device.h | 19 +++-- drivers/staging/vt6655/device_main.c | 158 ++++++++++++++++++----------------- 2 files changed, 93 insertions(+), 84 deletions(-)
drivers/staging/vt6655/device.h +12 -7
@@ -337,9 +337,10 @@ typedef struct __device_opt {u32 flags; }OPTIONS , *POPTIONS ; -typedef struct __device_info { - struct __device_info *next; - struct __device_info *prev; +/* TODO Convert all functions to struct vnt_private and remove typedef */ +typedef struct vnt_private { + struct vnt_private *next; + struct vnt_private *prev; struct pci_dev *pcid;
@@ -744,7 +745,8 @@ typedef struct __device_info {bool bCommit; }DEVICE_INFO , *PSDevice; -static inline bool device_get_ip (PSDevice pInfo) { +static inline bool device_get_ip (struct vnt_private *pInfo) +{struct in_device *in_dev = (struct in_device *)pInfo->dev->ip_ptr;struct in_ifaddr *ifa;
@@ -770,7 +772,10 @@ static inline PDEVICE_TD_INFO alloc_td_info(void)/*--------------------- Export Functions --------------------------*/ -bool device_dma0_xmit (PSDevice pDevice,struct sk_buff *skb,unsigned int uNodeIndex); -bool device_alloc_frag_buf (PSDevice pDevice,PSDeFragControlBlock pDeF); -int Config_FileOperation (PSDevice pDevice,bool fwrite,unsigned char *Parameter); +bool device_dma0_xmit (struct vnt_private *pDevice, +struct sk_buff *skb,unsigned int uNodeIndex); +bool device_alloc_frag_buf (struct vnt_private *pDevice, +PSDeFragControlBlock pDeF); +int Config_FileOperation (struct vnt_private *pDevice, +bool fwrite,unsigned char *Parameter);#endif
drivers/staging/vt6655/device_main.c +81 -77
441 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 2/9 staging: vt6655: baseband replace PSDevice
Coverting all functions to struct vnt_private.
--- drivers/staging/vt6655/baseband.c | 30 +++++++++++++++--------------- drivers/staging/vt6655/baseband.h | 17 +++++++++-------- 2 files changed, 24 insertions(+), 23 deletions(-)
drivers/staging/vt6655/baseband.c +15 -15
@@ -1711,18 +1711,18 @@ static const unsigned short awcFrameTime[MAX_RATE] =static unsigned long -s_ulGetRatio (PSDevice pDevice); +s_ulGetRatio (struct vnt_private *pDevice);static void s_vChangeAntenna ( -PSDevice pDevice +struct vnt_private *pDevice );static void s_vChangeAntenna ( -PSDevice pDevice +struct vnt_private *pDevice ) {if (pDevice->dwRxAntennaSel ==0 ) {
@@ -1827,7 +1827,7 @@ BBuGetFrameTime(*/ void BBvCalculateParameter( - PSDevice pDevice, + struct vnt_private *pDevice, unsigned int cbFrameLength, unsigned short wRate, unsigned char byPacketType,
@@ -2115,7 +2115,7 @@ bool BBbIsRegBitsOff(void __iomem *dwIoBase, unsigned char byBBAddr, unsigned ch* */ -bool BBbVT3253Init (PSDevice pDevice) +bool BBbVT3253Init (struct vnt_private *pDevice) {bool bResult = true;int ii;
@@ -2310,7 +2310,7 @@ void BBvReadAllRegs(void __iomem *dwIoBase, unsigned char *pbyBBRegs)* */ -void BBvLoopbackOn (PSDevice pDevice) +void BBvLoopbackOn (struct vnt_private *pDevice) {unsigned char byData;void __iomem *dwIoBase = pDevice->PortOffset;
@@ -2363,7 +2363,7 @@ void BBvLoopbackOn(PSDevice pDevice)* Return Value: none * */ -void BBvLoopbackOff (PSDevice pDevice) +void BBvLoopbackOff (struct vnt_private *pDevice) {unsigned char byData;void __iomem *dwIoBase = pDevice->PortOffset;
@@ -2398,7 +2398,7 @@ void BBvLoopbackOff(PSDevice pDevice)* */ void -BBvSetShortSlotTime (PSDevice pDevice) +BBvSetShortSlotTime (struct vnt_private *pDevice) {unsigned char byBBRxConf =0 ;unsigned char byBBVGA =0 ;
@@ -2418,7 +2418,7 @@ BBvSetShortSlotTime(PSDevice pDevice)BBbWriteEmbedded (pDevice->PortOffset,0x0A , byBBRxConf);/* CR10 */ } -void BBvSetVGAGainOffset (PSDevice pDevice,unsigned char byData) +void BBvSetVGAGainOffset (struct vnt_private *pDevice,unsigned char byData) {unsigned char byBBRxConf =0 ;
@@ -2594,7 +2594,7 @@ BBvExitDeepSleep(void __iomem *dwIoBase, unsigned char byLocalID)static unsigned long -s_ulGetRatio (PSDevice pDevice) +s_ulGetRatio (struct vnt_private *pDevice) {unsigned long ulRatio =0 ;unsigned long ulMaxPacket;
@@ -2689,7 +2689,7 @@ s_ulGetRatio(PSDevice pDevice) }void -BBvClearAntDivSQ3Value (PSDevice pDevice) +BBvClearAntDivSQ3Value (struct vnt_private *pDevice) {unsigned int ii;
@@ -2713,8 +2713,8 @@ BBvClearAntDivSQ3Value(PSDevice pDevice)* */ -void -BBvAntennaDiversity (PSDevice pDevice,unsigned char byRxRate,unsigned char bySQ3) +void BBvAntennaDiversity (struct vnt_private *pDevice, +unsigned char byRxRate,unsigned char bySQ3) {if ((byRxRate >=MAX_RATE ) || (pDevice->wAntDiversityMaxRate >=MAX_RATE ))return ;
@@ -2798,7 +2798,7 @@ TimerSQ3CallBack(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "TimerSQ3CallBack..." );spin_lock_irq (&pDevice->lock);
@@ -2840,7 +2840,7 @@ TimerState1CallBack(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "TimerState1CallBack..." );
drivers/staging/vt6655/baseband.h +9 -8
@@ -78,7 +78,7 @@ BBuGetFrameTime( void BBvCalculateParameter( - PSDevice pDevice, + struct vnt_private *pDevice, unsigned int cbFrameLength, unsigned short wRate, unsigned char byPacketType,
@@ -91,15 +91,15 @@ bool BBbReadEmbedded(void __iomem *dwIoBase, unsigned char byBBAddr, unsigned chbool BBbWriteEmbedded (void __iomem *dwIoBase,unsigned char byBBAddr,unsigned char byData);void BBvReadAllRegs (void __iomem *dwIoBase,unsigned char *pbyBBRegs); -void BBvLoopbackOn (PSDevice pDevice); -void BBvLoopbackOff (PSDevice pDevice); -void BBvSetShortSlotTime (PSDevice pDevice); +void BBvLoopbackOn (struct vnt_private *pDevice); +void BBvLoopbackOff (struct vnt_private *pDevice); +void BBvSetShortSlotTime (struct vnt_private *pDevice);bool BBbIsRegBitsOn (void __iomem *dwIoBase,unsigned char byBBAddr,unsigned char byTestBits);bool BBbIsRegBitsOff (void __iomem *dwIoBase,unsigned char byBBAddr,unsigned char byTestBits); -void BBvSetVGAGainOffset (PSDevice pDevice,unsigned char byData); +void BBvSetVGAGainOffset (struct vnt_private *pDevice,unsigned char byData);// VT3253 Baseband -bool BBbVT3253Init (PSDevice pDevice); +bool BBbVT3253Init (struct vnt_private *pDevice);void BBvSoftwareReset (void __iomem *dwIoBase);void BBvPowerSaveModeON (void __iomem *dwIoBase);void BBvPowerSaveModeOFF (void __iomem *dwIoBase);
@@ -120,8 +120,9 @@ TimerState1CallBack(void *hDeviceContext ); -void BBvAntennaDiversity (PSDevice pDevice,unsigned char byRxRate,unsigned char bySQ3); +void BBvAntennaDiversity (struct vnt_private *pDevice, +unsigned char byRxRate,unsigned char bySQ3);void -BBvClearAntDivSQ3Value (PSDevice pDevice); +BBvClearAntDivSQ3Value (struct vnt_private *pDevice);#endif // __BASEBAND_H__
Signature · 1 line
1.9.1
PATCH 3/9 staging: vt6655: card change PSDevice to struct vnt_private
In reply to Malcolm PriestleyRepacing void *pDeviceHandler
--- drivers/staging/vt6655/card.c | 111 ++++++++++++++++-------------------------- drivers/staging/vt6655/card.h | 83 ++++++++++++++++--------------- 2 files changed, 84 insertions(+), 110 deletions(-)
drivers/staging/vt6655/card.c +43 -68
@@ -224,7 +224,8 @@ s_vCalculateOFDMRParameter(*/ static 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 short wLen =0 ;
@@ -348,9 +349,8 @@ s_vSetRSPINF(PSDevice pDevice, CARD_PHY_TYPE ePHYType, void *pvSupportRateIEs, v* 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 )return false;
@@ -370,9 +370,8 @@ bool CARDbIsShortPreamble(void *pDeviceHandler)* 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; }
@@ -389,9 +388,10 @@ bool CARDbIsShorSlotTime(void *pDeviceHandler)* 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 bySlot =0 ;unsigned char bySIFS =0 ;
@@ -573,9 +573,9 @@ bool CARDbSetPhyParameter(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigned* 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 ;if (qwBSSTimestamp != qwLocalTSF) {
@@ -603,9 +603,9 @@ bool CARDbUpdateTSF(void *pDeviceHandler, unsigned char byRxRate, u64 qwBSSTimes* 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 ;CARDbGetCurrentTSF (pDevice->PortOffset, &qwNextTBTT);//Get Local TSF counter
@@ -636,9 +636,8 @@ bool CARDbSetBeaconPeriod(void *pDeviceHandler, unsigned short wBeaconInterval)* 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 ) { pDevice->bStopBeacon = true;
@@ -690,9 +689,8 @@ bool CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType)* 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 ) { pDevice->bStopBeacon = false;
@@ -729,9 +727,9 @@ bool CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType)* 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);memcpy (pDevice->abyBSSID, pbyBSSID,WLAN_BSSID_LEN );
@@ -795,11 +793,10 @@ bool CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE e* */ bool CARDbSetTxDataRate ( -void *pDeviceHandler, +struct vnt_private *pDevice,unsigned short wDataRate ) { -PSDevice pDevice = (PSDevice ) pDeviceHandler; pDevice->wCurrentRate = wDataRate;return true;
@@ -821,10 +818,9 @@ bool CARDbSetTxDataRate(-*/ bool CARDbPowerDown ( -void *pDeviceHandler +struct vnt_private *pDevice ) { -PSDevice pDevice = (PSDevice )pDeviceHandler;unsigned int uIdx;// check if already in Doze mode
@@ -858,9 +854,8 @@ CARDbPowerDown(* Return Value: true if success; otherwise false * */ -bool CARDbRadioPowerOff (void *pDeviceHandler) +bool CARDbRadioPowerOff (struct vnt_private *pDevice) { -PSDevice pDevice = (PSDevice )pDeviceHandler;bool bResult = true;if (pDevice->bRadioOff == true)
@@ -904,9 +899,8 @@ bool CARDbRadioPowerOff(void *pDeviceHandler)* Return Value: true if success; otherwise false * */ -bool CARDbRadioPowerOn (void *pDeviceHandler) +bool CARDbRadioPowerOn (struct vnt_private *pDevice) { -PSDevice pDevice = (PSDevice ) pDeviceHandler;bool bResult = true;pr_debug ("chester power on\n" );
@@ -947,9 +941,8 @@ bool CARDbRadioPowerOn(void *pDeviceHandler)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);return true;
@@ -973,13 +966,12 @@ bool CARDbRemoveKey(void *pDeviceHandler, unsigned char *pbyBSSID)-*/ bool CARDbAdd_PMKID_Candidate ( -void *pDeviceHandler, +struct vnt_private *pDevice,unsigned char *pbyBSSID,bool bRSNCapExist,unsigned short wRSNCap ) { -PSDevice pDevice = (PSDevice ) pDeviceHandler;struct pmkid_candidate *pCandidateList;unsigned int ii =0 ;
@@ -1023,10 +1015,9 @@ CARDbAdd_PMKID_Candidate(void *CARDpGetCurrentAddress ( -void *pDeviceHandler +struct vnt_private *pDevice ) { -PSDevice pDevice = (PSDevice ) pDeviceHandler;return pDevice->abyCurrentNetAddr; }
@@ -1047,12 +1038,11 @@ CARDpGetCurrentAddress(-*/ bool CARDbStartMeasure ( -void *pDeviceHandler, +struct vnt_private *pDevice,void *pvMeasureEIDs,unsigned int uNumOfMeasureEIDs ) { -PSDevice pDevice = (PSDevice ) pDeviceHandler;PWLAN_IE_MEASURE_REQ pEID = (PWLAN_IE_MEASURE_REQ ) pvMeasureEIDs;u64 qwCurrTSF;u64 qwStartTSF;
@@ -1163,13 +1153,12 @@ CARDbStartMeasure(-*/ bool CARDbChannelSwitch ( -void *pDeviceHandler, +struct vnt_private *pDevice,unsigned char byMode,unsigned char byNewChannel,unsigned char byCount ) { -PSDevice pDevice = (PSDevice ) pDeviceHandler;bool bResult = true;if (byCount ==0 ) {
@@ -1205,7 +1194,7 @@ CARDbChannelSwitch(-*/ bool CARDbSetQuiet( - void *pDeviceHandler, + struct vnt_private *pDevice, bool bResetQuiet, unsigned char byQuietCount, unsigned char byQuietPeriod,
@@ -1213,7 +1202,6 @@ CARDbSetQuiet(unsigned short wQuietOffset ) { -PSDevice pDevice = (PSDevice ) pDeviceHandler;unsigned int ii =0 ;if (bResetQuiet) {
@@ -1258,10 +1246,9 @@ CARDbSetQuiet(-*/ bool CARDbStartQuiet ( -void *pDeviceHandler +struct vnt_private *pDevice ) { -PSDevice pDevice = (PSDevice ) pDeviceHandler;unsigned int ii =0 ;unsigned long dwStartTime =0xFFFFFFFF ;unsigned int uCurrentQuietIndex =0 ;
@@ -1358,12 +1345,11 @@ CARDbStartQuiet(-*/ void CARDvSetPowerConstraint ( -void *pDeviceHandler, +struct vnt_private *pDevice,unsigned char byChannel,char byPower ) { -PSDevice pDevice = (PSDevice ) pDeviceHandler;if (byChannel >CB_MAX_CHANNEL_24G ) {if (pDevice->bCountryInfo5G == true)
@@ -1392,12 +1378,11 @@ CARDvSetPowerConstraint(-*/ void CARDvGetPowerCapability ( -void *pDeviceHandler, +struct vnt_private *pDevice,unsigned char *pbyMinPower,unsigned char *pbyMaxPower ) { -PSDevice pDevice = (PSDevice ) pDeviceHandler;unsigned char byDec =0 ; *pbyMaxPower = pDevice->abyOFDMDefaultPwr[pDevice->byCurrentCh];
@@ -1427,10 +1412,9 @@ CARDvGetPowerCapability(*/ char CARDbyGetTransmitPower ( -void *pDeviceHandler +struct vnt_private *pDevice ) { -PSDevice pDevice = (PSDevice ) pDeviceHandler;return pDevice->byCurPwrdBm; }
@@ -1438,10 +1422,9 @@ CARDbyGetTransmitPower(//xxx void CARDvSafeResetTx ( -void *pDeviceHandler +struct vnt_private *pDevice ) { -PSDevice pDevice = (PSDevice ) pDeviceHandler;unsigned int uu;PSTxDesc pCurrTD;
@@ -1491,10 +1474,9 @@ CARDvSafeResetTx(-*/ void CARDvSafeResetRx ( -void *pDeviceHandler +struct vnt_private *pDevice ) { -PSDevice pDevice = (PSDevice ) pDeviceHandler;unsigned int uu;PSRxDesc pDesc;
@@ -1545,9 +1527,9 @@ CARDvSafeResetRx(* 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;while (ui >RATE_1M ) {
@@ -1572,9 +1554,9 @@ static unsigned short CARDwGetCCKControlRate(void *pDeviceHandler, unsigned shor* 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;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* 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 short wLen =0x0000 ;unsigned char byTxRate, byRsvTime;//For OFDM
@@ -1733,10 +1714,9 @@ void CARDvSetRSPINF(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)* Return Value: None. * */ -void vUpdateIFS (void *pDeviceHandler) +void vUpdateIFS (struct vnt_private *pDevice) { -//Set SIFS, DIFS, EIFS, SlotTime, CwMin -PSDevice pDevice = (PSDevice ) pDeviceHandler; +/* Set SIFS, DIFS, EIFS, SlotTime, CwMin */ unsigned char byMaxMin =0 ;
@@ -1785,9 +1765,8 @@ void vUpdateIFS(void *pDeviceHandler)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 ii;
@@ -1811,9 +1790,8 @@ void CARDvUpdateBasicTopRate(void *pDeviceHandler) 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); pDevice->wBasicRate |= wRate;
@@ -1824,9 +1802,8 @@ bool CARDbAddBasicRate(void *pDeviceHandler, unsigned short wRateIdx)return true; } -bool CARDbIsOFDMinBasicRate (void *pDeviceHandler) +bool CARDbIsOFDMinBasicRate (struct vnt_private *pDevice) { -PSDevice pDevice = (PSDevice )pDeviceHandler;int ii;for (ii =RATE_54M ; ii >=RATE_6M ; ii--) {
@@ -1836,9 +1813,8 @@ bool CARDbIsOFDMinBasicRate(void *pDeviceHandler)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 )return (unsigned char )pDevice->byBBType;
@@ -1889,9 +1865,8 @@ void CARDvSetLoopbackMode(void __iomem *dwIoBase, unsigned short wLoopbackMode)* Return Value: none * */ -bool CARDbSoftwareReset (void *pDeviceHandler) +bool CARDbSoftwareReset (struct vnt_private *pDevice) { -PSDevice pDevice = (PSDevice ) pDeviceHandler;// reset MAC if (!MACbSafeSoftwareReset (pDevice->PortOffset))
drivers/staging/vt6655/card.h +41 -42
142 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 4/9 staging: vt6655: channel/wcmd/wctl/wmgr use struct vnt_private *
In reply to Malcolm PriestleyReplacing PSDevice.
--- drivers/staging/vt6655/channel.c | 10 ++-- drivers/staging/vt6655/wcmd.c | 28 ++++----- drivers/staging/vt6655/wctl.c | 8 ++- drivers/staging/vt6655/wctl.h | 6 +- drivers/staging/vt6655/wmgr.c | 120 +++++++++++++++++++-------------------- 5 files changed, 87 insertions(+), 85 deletions(-)
drivers/staging/vt6655/channel.c +5 -5
@@ -416,7 +416,7 @@ bool channel_get_list(unsigned int uCountryCodeIdx, unsigned char *pbyChannelTabvoid init_channel_table (void *pDeviceHandler) { -PSDevice pDevice = (PSDevice ) pDeviceHandler; +struct vnt_private *pDevice = pDeviceHandler;bool bMultiBand = false;unsigned int ii;
@@ -521,7 +521,7 @@ unsigned char get_channel_number(void *pDeviceHandler, unsigned char byChannelIn*/ bool set_channel (void *pDeviceHandler,unsigned int uConnectionChannel) { -PSDevice pDevice = (PSDevice ) pDeviceHandler; +struct vnt_private *pDevice = pDeviceHandler;bool bResult = true;if (pDevice->byCurrentCh == uConnectionChannel)
@@ -583,7 +583,7 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel)void set_country_info (void *pDeviceHandler,CARD_PHY_TYPE ePHYType,void *pIE) { -PSDevice pDevice = (PSDevice ) pDeviceHandler; +struct vnt_private *pDevice = pDeviceHandler;unsigned int ii =0 ;unsigned int uu =0 ;unsigned int step =0 ;
@@ -632,7 +632,7 @@ void set_country_info(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, void *pIE)unsigned char set_support_channels (void *pDeviceHandler,unsigned char *pbyIEs) { -PSDevice pDevice = (PSDevice ) pDeviceHandler; +struct vnt_private *pDevice = pDeviceHandler;unsigned int ii;unsigned char byCount;PWLAN_IE_SUPP_CH pIE = (PWLAN_IE_SUPP_CH ) pbyIEs;
@@ -703,7 +703,7 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs)void set_country_IE (void *pDeviceHandler,void *pIE) { -PSDevice pDevice = (PSDevice ) pDeviceHandler; +struct vnt_private *pDevice = pDeviceHandler;unsigned int ii;PWLAN_IE_COUNTRY pIECountry = (PWLAN_IE_COUNTRY ) pIE;
drivers/staging/vt6655/wcmd.c +14 -14
@@ -65,13 +65,13 @@ static int msglevel = MSG_LEVEL_INFO;static void s_vProbeChannel ( -PSDevice pDevice +struct vnt_private *pDevice ); static PSTxMgmtPacket s_MgrMakeProbeRequest( - PSDevice pDevice, + struct vnt_private *pDevice, PSMgmtObject pMgmt, unsigned char *pScanBSSID, PWLAN_IE_SSID pSSID,
@@ -82,7 +82,7 @@ s_MgrMakeProbeRequest(static bool s_bCommandComplete ( -PSDevice pDevice +struct vnt_private *pDevice );/*--------------------- Export Variables --------------------------*/
@@ -104,7 +104,7 @@ s_bCommandComplete(*/ static void -vAdHocBeaconStop (PSDevice pDevice) +vAdHocBeaconStop (struct vnt_private *pDevice) {PSMgmtObject pMgmt = &(pDevice->sMgmtObj);bool bStop;
@@ -151,7 +151,7 @@ vAdHocBeaconStop(PSDevice pDevice)*/ static void -vAdHocBeaconRestart (PSDevice pDevice) +vAdHocBeaconRestart (struct vnt_private *pDevice) {PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
@@ -181,7 +181,7 @@ vAdHocBeaconRestart(PSDevice pDevice)static void s_vProbeChannel ( -PSDevice pDevice +struct vnt_private *pDevice ) {//1M, 2M, 5M, 11M, 18M, 24M, 36M, 54M
@@ -236,7 +236,7 @@ s_vProbeChannel( static PSTxMgmtPacket s_MgrMakeProbeRequest( - PSDevice pDevice, + struct vnt_private *pDevice, PSMgmtObject pMgmt, unsigned char *pScanBSSID, PWLAN_IE_SSID pSSID,
@@ -287,7 +287,7 @@ vCommandTimerWait(unsigned int MSecond ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;init_timer (&pDevice->sTimerCommand); pDevice->sTimerCommand.data = (unsigned long ) pDevice;
@@ -302,7 +302,7 @@ vCommandTimer(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;PWLAN_IE_SSID pItemSSID;PWLAN_IE_SSID pItemSSIDCurr;
@@ -801,7 +801,7 @@ vCommandTimer(static bool s_bCommandComplete ( -PSDevice pDevice +struct vnt_private *pDevice ) {PWLAN_IE_SSID pSSID;
@@ -875,7 +875,7 @@ bool bScheduleCommand(unsigned char *pbyItem0 ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;if (pDevice->cbFreeCmdQueue ==0 )return false;
@@ -944,7 +944,7 @@ bool bClearBSSID_SCAN(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;unsigned int uCmdDequeueIdx = pDevice->uCmdDequeueIdx;unsigned int ii;
@@ -966,7 +966,7 @@ vResetCommandTimer(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;//delete timer del_timer (&pDevice->sTimerCommand);
@@ -988,7 +988,7 @@ BSSvSecondTxData(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = &(pDevice->sMgmtObj); pDevice->nTxDataTimeCout++;
drivers/staging/vt6655/wctl.c +5 -3
@@ -105,7 +105,8 @@ bool WCTLbIsDuplicate(PSCache pCache, PS802_11Header pMACHeader)* Return Value: index number in Defragment Database * */ -unsigned int WCTLuSearchDFCB (PSDevice pDevice,PS802_11Header pMACHeader) +unsigned int WCTLuSearchDFCB (struct vnt_private *pDevice, +PS802_11Header pMACHeader) {unsigned int ii;
@@ -133,7 +134,7 @@ unsigned int WCTLuSearchDFCB(PSDevice pDevice, PS802_11Header pMACHeader)* Return Value: index number in Defragment Database * */ -unsigned int WCTLuInsertDFCB (PSDevice pDevice,PS802_11Header pMACHeader) +unsigned int WCTLuInsertDFCB (struct vnt_private *pDevice,PS802_11Header pMACHeader) {unsigned int ii;
@@ -169,7 +170,8 @@ unsigned int WCTLuInsertDFCB(PSDevice pDevice, PS802_11Header pMACHeader)* Return Value: true if it is valid fragment packet and we have resource to defragment; otherwise false * */ -bool WCTLbHandleFragment (PSDevice pDevice,PS802_11Header pMACHeader,unsigned int cbFrameLength,bool bWEP,bool bExtIV) +bool WCTLbHandleFragment (struct vnt_private *pDevice,PS802_11Header pMACHeader, +unsigned int cbFrameLength,bool bWEP,bool bExtIV) {unsigned int uHeaderSize;
drivers/staging/vt6655/wctl.h +3 -3
@@ -97,9 +97,9 @@ do { \/*--------------------- Export Functions --------------------------*/ bool WCTLbIsDuplicate (PSCache pCache,PS802_11Header pMACHeader); -bool WCTLbHandleFragment (PSDevice pDevice,PS802_11Header pMACHeader, +bool WCTLbHandleFragment (struct vnt_private *,PS802_11Header pMACHeader,unsigned int cbFrameLength,bool bWEP,bool bExtIV); -unsigned int WCTLuSearchDFCB (PSDevice pDevice,PS802_11Header pMACHeader); -unsigned int WCTLuInsertDFCB (PSDevice pDevice,PS802_11Header pMACHeader); +unsigned int WCTLuSearchDFCB (struct vnt_private *,PS802_11Header pMACHeader); +unsigned int WCTLuInsertDFCB (struct vnt_private *,PS802_11Header pMACHeader);#endif // __WCTL_H__
drivers/staging/vt6655/wmgr.c +60 -60
480 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 5/9 staging: vt6655: bssdb/datarate/dpc/power/rxtx use struct vnt_private
In reply to Malcolm PriestleyReplacing PSDevice.
--- drivers/staging/vt6655/bssdb.c | 32 +++++++++--------- drivers/staging/vt6655/datarate.c | 4 +-- drivers/staging/vt6655/dpc.c | 23 +++++++------ drivers/staging/vt6655/dpc.h | 2 +- drivers/staging/vt6655/power.c | 12 +++---- drivers/staging/vt6655/rxtx.c | 70 +++++++++++++++++++++------------------ drivers/staging/vt6655/rxtx.h | 22 +++++++----- 7 files changed, 88 insertions(+), 77 deletions(-)
drivers/staging/vt6655/bssdb.c +16 -16
@@ -117,7 +117,7 @@ BSSpSearchBSSList(CARD_PHY_TYPE ePhyType ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;unsigned char *pbyBSSID =NULL ;PWLAN_IE_SSID pSSID =NULL ;
@@ -240,7 +240,7 @@ BSSvClearBSSList(bool bKeepCurrBSSID ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;unsigned int ii;
@@ -280,7 +280,7 @@ BSSpAddrIsInBSSList(PWLAN_IE_SSID pSSID ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;PKnownBSS pBSSList =NULL ;unsigned int ii;
@@ -333,7 +333,7 @@ BSSbInsertToBSSList(void *pRxPacketContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;PSRxMgmtPacket pRxPacket = (PSRxMgmtPacket )pRxPacketContext;PKnownBSS pBSSList =NULL ;
@@ -540,7 +540,7 @@ BSSbUpdateToBSSList( ) {int ii; -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;PSRxMgmtPacket pRxPacket = (PSRxMgmtPacket )pRxPacketContext;long ldBm;
@@ -715,7 +715,7 @@ BSSDBbIsSTAInNodeDB(void *pMgmtObject, unsigned char *abyDstAddr,void BSSvCreateOneNode (void *hDeviceContext,unsigned int *puNodeIndex) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;unsigned int ii;unsigned int BigestCount =0 ;
@@ -777,7 +777,7 @@ BSSvRemoveOneNode(unsigned int uNodeIndex ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;unsigned char byMask[8 ] = {1 ,2 ,4 ,8 ,0x10 ,0x20 ,0x40 ,0x80 };struct sk_buff *skb;
@@ -810,7 +810,7 @@ BSSvUpdateAPNode(PWLAN_IE_SUPP_RATES pExtSuppRates ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;unsigned int uRateLen =WLAN_RATES_MAXLEN ;
@@ -861,7 +861,7 @@ BSSvAddMulticastNode(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;if (!pDevice->bEnableHostWEP)
@@ -904,7 +904,7 @@ BSSvSecondCallBack(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;unsigned int ii;PWLAN_IE_SSID pItemSSID, pCurrSSID;
@@ -1207,7 +1207,7 @@ BSSvUpdateNodeTxCounter(unsigned int uFIFOHeaderSize ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;unsigned int uNodeIndex =0 ;unsigned char byTxRetry = (byTsr0 &TSR0_NCR );
@@ -1360,7 +1360,7 @@ BSSvClearNodeDBTable( ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;struct sk_buff *skb;unsigned int ii;
@@ -1385,7 +1385,7 @@ void s_vCheckSensitivity(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PKnownBSS pBSSList =NULL ;PSMgmtObject pMgmt = pDevice->pMgmt;int ii;
@@ -1435,7 +1435,7 @@ BSSvClearAnyBSSJoinRecord(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;unsigned int ii;
@@ -1448,7 +1448,7 @@ void s_uCalculateLinkQual(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;unsigned long TxOkRatio, TxCnt;unsigned long RxOkRatio, RxCnt;unsigned long RssiRatio;
@@ -1488,7 +1488,7 @@ void s_vCheckPreEDThreshold(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PKnownBSS pBSSList =NULL ;PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
drivers/staging/vt6655/datarate.c +2 -2
@@ -195,7 +195,7 @@ RATEvParseMaxRate(unsigned char *pbyTopOFDMRate ) { -PSDevice pDevice = (PSDevice ) pDeviceHandler; +struct vnt_private *pDevice = pDeviceHandler;unsigned int ii;unsigned char byHighSuppRate =0 ;unsigned char byRate =0 ;
@@ -295,7 +295,7 @@ RATEvTxRateFallBack(PKnownNodeDB psNodeDBTable ) { -PSDevice pDevice = (PSDevice ) pDeviceHandler; +struct vnt_private *pDevice = pDeviceHandler;unsigned short wIdxDownRate =0 ;unsigned int ii;bool bAutoRate[MAX_RATE ] = {true, true, true, true, false, false, true, true, true, true, true, true};
drivers/staging/vt6655/dpc.c +12 -11
@@ -79,18 +79,18 @@ s_vGetDASA(unsigned char *pbyRxBufferAddr, unsigned int *pcbHeaderSize, PSEthernetHeader psEthHeader);static void -s_vProcessRxMACHeader (PSDevice pDevice,unsigned char *pbyRxBufferAddr, +s_vProcessRxMACHeader (struct vnt_private *pDevice,unsigned char *pbyRxBufferAddr,unsigned int cbPacketSize,bool bIsWEP,bool bExtIV,unsigned int *pcbHeadSize);static bool s_bAPModeRxCtl ( -PSDevice pDevice, +struct vnt_private *pDevice,unsigned char *pbyFrame,int iSANodeIndex ); static bool s_bAPModeRxData( - PSDevice pDevice, + struct vnt_private *pDevice, struct sk_buff *skb, unsigned int FrameSize, unsigned int cbHeaderOffset,
@@ -99,7 +99,7 @@ static bool s_bAPModeRxData( ); static bool s_bHandleRxEncryption( - PSDevice pDevice, + struct vnt_private *pDevice, unsigned char *pbyFrame, unsigned int FrameSize, unsigned char *pbyRsr,
@@ -112,7 +112,7 @@ static bool s_bHandleRxEncryption( static bool s_bHostWepRxEncryption( - PSDevice pDevice, + struct vnt_private *pDevice, unsigned char *pbyFrame, unsigned int FrameSize, unsigned char *pbyRsr,
@@ -145,7 +145,8 @@ static bool s_bHostWepRxEncryption(* -*/ static void -s_vProcessRxMACHeader (PSDevice pDevice,unsigned char *pbyRxBufferAddr, +s_vProcessRxMACHeader (struct vnt_private *pDevice, +unsigned char *pbyRxBufferAddr,unsigned int cbPacketSize,bool bIsWEP,bool bExtIV,unsigned int *pcbHeadSize) {
@@ -270,7 +271,7 @@ s_vGetDASA(unsigned char *pbyRxBufferAddr, unsigned int *pcbHeaderSize,bool device_receive_frame ( -PSDevice pDevice, +struct vnt_private *pDevice,PSRxDesc pCurrRD ) {
@@ -871,7 +872,7 @@ device_receive_frame( }static bool s_bAPModeRxCtl ( -PSDevice pDevice, +struct vnt_private *pDevice,unsigned char *pbyFrame,int iSANodeIndex )
@@ -969,7 +970,7 @@ static bool s_bAPModeRxCtl( } static bool s_bHandleRxEncryption( - PSDevice pDevice, + struct vnt_private *pDevice, unsigned char *pbyFrame, unsigned int FrameSize, unsigned char *pbyRsr,
@@ -1106,7 +1107,7 @@ static bool s_bHandleRxEncryption( } static bool s_bHostWepRxEncryption( - PSDevice pDevice, + struct vnt_private *pDevice, unsigned char *pbyFrame, unsigned int FrameSize, unsigned char *pbyRsr,
@@ -1226,7 +1227,7 @@ static bool s_bHostWepRxEncryption( } static bool s_bAPModeRxData( - PSDevice pDevice, + struct vnt_private *pDevice, struct sk_buff *skb, unsigned int FrameSize, unsigned int cbHeaderOffset,
drivers/staging/vt6655/dpc.h +1 -1
@@ -35,7 +35,7 @@bool device_receive_frame ( -PSDevice pDevice, +struct vnt_private *,PSRxDesc pCurrRD );
drivers/staging/vt6655/power.c +6 -6
@@ -74,7 +74,7 @@ PSvEnablePowerSaving(unsigned short wListenInterval ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;unsigned short wAID = pMgmt->wCurrAID |BIT14 |BIT15 ;
@@ -131,7 +131,7 @@ PSvDisablePowerSaving(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;// disable power saving hw function MACbPSWakeup (pDevice->PortOffset);
@@ -167,7 +167,7 @@ PSbConsiderPowerDown(bool bCheckCountToWakeUp ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;unsigned int uIdx;
@@ -229,7 +229,7 @@ PSvSendPSPOLL(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;PSTxMgmtPacket pTxPacket =NULL ;
@@ -266,7 +266,7 @@ PSbSendNullPacket(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSTxMgmtPacket pTxPacket =NULL ;PSMgmtObject pMgmt = pDevice->pMgmt;unsigned int uIdx;
@@ -336,7 +336,7 @@ PSbIsNextTBTTWakeUp(void *hDeviceContext ) { -PSDevice pDevice = (PSDevice )hDeviceContext; +struct vnt_private *pDevice = hDeviceContext;PSMgmtObject pMgmt = pDevice->pMgmt;bool bWakeUp = false;
drivers/staging/vt6655/rxtx.c +38 -32
212 lines not on this page · raw message
drivers/staging/vt6655/rxtx.h +13 -9
@@ -58,7 +58,7 @@ struct vnt_mic_hdr { void vGenerateMACHeader( - PSDevice pDevice, + struct vnt_private *, unsigned char *pbyBufferAddr, unsigned short wDuration, PSEthernetHeader psEthHeader,
@@ -70,20 +70,24 @@ vGenerateMACHeader(unsigned int cbGetFragCount ( -PSDevice pDevice, +struct vnt_private *,PSKeyItem pTransmitKey,unsigned int cbFrameBodySize,PSEthernetHeader psEthHeader );void -vGenerateFIFOHeader (PSDevice pDevice,unsigned char byPktTyp,unsigned char *pbyTxBufferAddr, -bool bNeedEncrypt,unsigned int cbPayloadSize,unsigned int uDMAIdx,PSTxDesc pHeadTD, -PSEthernetHeader psEthHeader,unsigned char *pPacket,PSKeyItem pTransmitKey, -unsigned int uNodeIndex,unsigned int *puMACfragNum,unsigned int *pcbHeaderSize); +vGenerateFIFOHeader (struct vnt_private *,unsigned char byPktTyp, +unsigned char *pbyTxBufferAddr,bool bNeedEncrypt, +unsigned int cbPayloadSize,unsigned int uDMAIdx, +PSTxDesc pHeadTD,PSEthernetHeader psEthHeader, +unsigned char *pPacket,PSKeyItem pTransmitKey, +unsigned int uNodeIndex,unsigned int *puMACfragNum, +unsigned int *pcbHeaderSize); -void vDMA0_tx_80211 (PSDevice pDevice,struct sk_buff *skb,unsigned char *pbMPDU,unsigned int cbMPDULen); -CMD_STATUS csMgmt_xmit (PSDevice pDevice,PSTxMgmtPacket pPacket); -CMD_STATUS csBeacon_xmit (PSDevice pDevice,PSTxMgmtPacket pPacket); +void vDMA0_tx_80211 (struct vnt_private *,struct sk_buff *skb, +unsigned char *pbMPDU,unsigned int cbMPDULen); +CMD_STATUS csMgmt_xmit (struct vnt_private *,PSTxMgmtPacket pPacket); +CMD_STATUS csBeacon_xmit (struct vnt_private *,PSTxMgmtPacket pPacket);#endif // __RXTX_H__
Signature · 1 line
1.9.1
PATCH 6/9 staging: vt6655: hostap/ioctl/iwctl use struct vnt_private
In reply to Malcolm PriestleyReplacing PSDevice.
--- drivers/staging/vt6655/hostap.c | 29 ++++++++++---------- drivers/staging/vt6655/hostap.h | 4 +-- drivers/staging/vt6655/ioctl.c | 2 +- drivers/staging/vt6655/ioctl.h | 2 +- drivers/staging/vt6655/iwctl.c | 60 ++++++++++++++++++++--------------------- 5 files changed, 49 insertions(+), 48 deletions(-)
drivers/staging/vt6655/hostap.c +15 -14
@@ -68,9 +68,9 @@ 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;int ret;const struct net_device_ops apdev_netdev_ops = {
@@ -130,7 +130,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);
@@ -172,7 +172,8 @@ static int hostap_disable_hostapd(PSDevice pDevice, int rtnl_locked)* */ -int vt6655_hostap_set_hostapd (PSDevice pDevice,int val,int rtnl_locked) +int vt6655_hostap_set_hostapd (struct vnt_private *pDevice, +int val,int rtnl_locked) {if (val <0 || val >1 )return -EINVAL ;
@@ -201,7 +202,7 @@ int vt6655_hostap_set_hostapd(PSDevice pDevice, int val, int rtnl_locked)* Return Value: * */ -static int hostap_remove_sta (PSDevice pDevice, +static int hostap_remove_sta (struct vnt_private *pDevice,struct viawget_hostapd_param *param) {unsigned int uNodeIndex;
@@ -227,14 +228,14 @@ static int hostap_remove_sta(PSDevice pDevice,* Return Value: * */ -static int hostap_add_sta (PSDevice pDevice, +static int hostap_add_sta (struct vnt_private *pDevice,struct viawget_hostapd_param *param) {PSMgmtObject pMgmt = pDevice->pMgmt;unsigned int uNodeIndex;if (!BSSDBbIsSTAInNodeDB (pMgmt, param->sta_addr, &uNodeIndex)) -BSSvCreateOneNode ((PSDevice )pDevice, &uNodeIndex); +BSSvCreateOneNode (pDevice, &uNodeIndex);memcpy (pMgmt->sNodeDBTable[uNodeIndex].abyMACAddr, param->sta_addr,WLAN_ADDR_LEN ); pMgmt->sNodeDBTable[uNodeIndex].eNodeState =NODE_ASSOC ;
@@ -285,7 +286,7 @@ 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) {PSMgmtObject pMgmt = pDevice->pMgmt;
@@ -314,7 +315,7 @@ static int hostap_get_info_sta(PSDevice pDevice,* 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) {PSMgmtObject pMgmt = pDevice->pMgmt;
@@ -345,7 +346,7 @@ static int hostap_set_flags_sta(PSDevice pDevice,* 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) {PSMgmtObject pMgmt = pDevice->pMgmt;
@@ -389,7 +390,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. BSSvClearNodeDBTable (pDevice,1 );
@@ -409,7 +410,7 @@ static void hostap_flush_sta(PSDevice pDevice)* Return Value: * */ -static int hostap_set_encryption (PSDevice pDevice, +static int hostap_set_encryption (struct vnt_private *pDevice,struct viawget_hostapd_param *param,int param_len) {
@@ -635,7 +636,7 @@ static int hostap_set_encryption(PSDevice pDevice,* Return Value: * */ -static int hostap_get_encryption (PSDevice pDevice, +static int hostap_get_encryption (struct vnt_private *pDevice,struct viawget_hostapd_param *param,int param_len) {
@@ -675,7 +676,7 @@ static int hostap_get_encryption(PSDevice pDevice,* Return Value: * */ -int vt6655_hostap_ioctl (PSDevice pDevice,struct iw_point *p) +int vt6655_hostap_ioctl (struct vnt_private *pDevice,struct iw_point *p) {struct viawget_hostapd_param *param;int ret =0 ;
drivers/staging/vt6655/hostap.h +2 -2
@@ -52,7 +52,7 @@#define ARPHRD_IEEE80211 801#endif -int vt6655_hostap_set_hostapd (PSDevice pDevice,int val,int rtnl_locked); -int vt6655_hostap_ioctl (PSDevice pDevice,struct iw_point *p); +int vt6655_hostap_set_hostapd (struct vnt_private *,int val,int rtnl_locked); +int vt6655_hostap_ioctl (struct vnt_private *,struct iw_point *p);#endif // __HOSTAP_H__
drivers/staging/vt6655/ioctl.c +1 -1
@@ -44,7 +44,7 @@ static int msglevel = MSG_LEVEL_INFO;SWPAResult wpa_Result;#endif -int private_ioctl (PSDevice pDevice,struct ifreq *rq) +int private_ioctl (struct vnt_private *pDevice,struct ifreq *rq) {PSCmdRequest pReq = (PSCmdRequest )rq;PSMgmtObject pMgmt = pDevice->pMgmt;
drivers/staging/vt6655/ioctl.h +1 -1
@@ -31,6 +31,6 @@#include "device.h" -int private_ioctl (PSDevice pDevice,struct ifreq *rq); +int private_ioctl (struct vnt_private *,struct ifreq *rq);#endif // __IOCTL_H__
drivers/staging/vt6655/iwctl.c +30 -30
240 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 7/9 staging: vt6655: rf/wpactl/wroute use struct vnt_private
In reply to Malcolm PriestleyReplacing PSDevice.
--- drivers/staging/vt6655/rf.c | 8 ++++---- drivers/staging/vt6655/rf.h | 8 ++++---- drivers/staging/vt6655/wpactl.c | 28 ++++++++++++++-------------- drivers/staging/vt6655/wpactl.h | 6 +++--- drivers/staging/vt6655/wroute.c | 2 +- drivers/staging/vt6655/wroute.h | 3 ++- 6 files changed, 28 insertions(+), 27 deletions(-)
drivers/staging/vt6655/rf.c +4 -4
@@ -746,7 +746,7 @@ static bool RFbAL2230SelectChannel(void __iomem *dwIoBase, unsigned char byChann* */ bool RFbInit ( -PSDevice pDevice +struct vnt_private *pDevice ) {bool bResult = true;
@@ -897,7 +897,7 @@ bool RFvWriteWakeProgSyn(void __iomem *dwIoBase, unsigned char byRFType, unsigne* */ bool RFbSetPower ( -PSDevice pDevice, +struct vnt_private *pDevice,unsigned int uRATE,unsigned int uCH )
@@ -978,7 +978,7 @@ bool RFbSetPower(*/ bool RFbRawSetPower ( -PSDevice pDevice, +struct vnt_private *pDevice,unsigned char byPwr,unsigned int uRATE )
@@ -1042,7 +1042,7 @@ bool RFbRawSetPower(-*/ void RFvRSSITodBm ( -PSDevice pDevice, +struct vnt_private *pDevice,unsigned char byCurrRSSI,long *pldBm )
drivers/staging/vt6655/rf.h +4 -4
@@ -77,19 +77,19 @@bool IFRFbWriteEmbedded (void __iomem *dwIoBase,unsigned long dwData);bool RFbSelectChannel (void __iomem *dwIoBase,unsigned char byRFType,unsigned char byChannel);bool RFbInit ( -PSDevice pDevice +struct vnt_private * );bool RFvWriteWakeProgSyn (void __iomem *dwIoBase,unsigned char byRFType,unsigned int uChannel); -bool RFbSetPower (PSDevice pDevice,unsigned int uRATE,unsigned int uCH); +bool RFbSetPower (struct vnt_private *,unsigned int uRATE,unsigned int uCH);bool RFbRawSetPower ( -PSDevice pDevice, +struct vnt_private *,unsigned char byPwr,unsigned int uRATE );void RFvRSSITodBm ( -PSDevice pDevice, +struct vnt_private *,unsigned char byCurrRSSI,long *pldBm );
drivers/staging/vt6655/wpactl.c +14 -14
@@ -83,13 +83,13 @@ static void wpadev_setup(struct net_device *dev)* */ -static int wpa_init_wpadev (PSDevice pDevice) +static int wpa_init_wpadev (struct vnt_private *pDevice) { -PSDevice wpadev_priv; +struct vnt_private *wpadev_priv;struct net_device *dev = pDevice->dev;int ret =0 ; - pDevice->wpadev =alloc_netdev (sizeof (PSDevice),"vntwpa" , wpadev_setup); + pDevice->wpadev =alloc_netdev (sizeof (*wpadev_priv),"vntwpa" , wpadev_setup);if (pDevice->wpadev ==NULL )return -ENOMEM ;
@@ -133,7 +133,7 @@ static int wpa_init_wpadev(PSDevice pDevice)* */ -static int wpa_release_wpadev (PSDevice pDevice) +static int wpa_release_wpadev (struct vnt_private *pDevice) {if (pDevice->skb) {dev_kfree_skb (pDevice->skb);
@@ -165,7 +165,7 @@ static int wpa_release_wpadev(PSDevice pDevice)* */ -int wpa_set_wpadev (PSDevice pDevice,int val) +int wpa_set_wpadev (struct vnt_private *pDevice,int val) {if (val)return wpa_init_wpadev (pDevice);
@@ -187,7 +187,7 @@ int wpa_set_wpadev(PSDevice pDevice, int val)* */ -int wpa_set_keys (PSDevice pDevice,void *ctx, +int wpa_set_keys (struct vnt_private *pDevice,void *ctx, bool fcpfkernel) __must_hold(&pDevice->lock) {struct viawget_wpa_param *param = ctx;
@@ -407,7 +407,7 @@ int wpa_set_keys(PSDevice pDevice, void *ctx,* */ -static int wpa_set_wpa (PSDevice pDevice, +static int wpa_set_wpa (struct vnt_private *pDevice,struct viawget_wpa_param *param) {PSMgmtObject pMgmt = pDevice->pMgmt;
@@ -432,7 +432,7 @@ static int wpa_set_wpa(PSDevice pDevice,* */ -static int wpa_set_disassociate (PSDevice pDevice, +static int wpa_set_disassociate (struct vnt_private *pDevice,struct viawget_wpa_param *param) {PSMgmtObject pMgmt = pDevice->pMgmt;
@@ -461,7 +461,7 @@ static int wpa_set_disassociate(PSDevice pDevice,* */ -static int wpa_set_scan (PSDevice pDevice, +static int wpa_set_scan (struct vnt_private *pDevice,struct viawget_wpa_param *param) {spin_lock_irq (&pDevice->lock);
@@ -486,7 +486,7 @@ static int wpa_set_scan(PSDevice pDevice,* */ -static int wpa_get_bssid (PSDevice pDevice, +static int wpa_get_bssid (struct vnt_private *pDevice,struct viawget_wpa_param *param) {PSMgmtObject pMgmt = pDevice->pMgmt;
@@ -510,7 +510,7 @@ static int wpa_get_bssid(PSDevice pDevice,* */ -static int wpa_get_ssid (PSDevice pDevice, +static int wpa_get_ssid (struct vnt_private *pDevice,struct viawget_wpa_param *param) {PSMgmtObject pMgmt = pDevice->pMgmt;
@@ -538,7 +538,7 @@ static int wpa_get_ssid(PSDevice pDevice,* */ -static int wpa_get_scan (PSDevice pDevice, +static int wpa_get_scan (struct vnt_private *pDevice,struct viawget_wpa_param *param) {struct viawget_scan_result *scan_buf;
@@ -655,7 +655,7 @@ static int wpa_get_scan(PSDevice pDevice,* */ -static int wpa_set_associate (PSDevice pDevice, +static int wpa_set_associate (struct vnt_private *pDevice,struct viawget_wpa_param *param) {PSMgmtObject pMgmt = pDevice->pMgmt;
@@ -799,7 +799,7 @@ static int wpa_set_associate(PSDevice pDevice,* */ -int wpa_ioctl (PSDevice pDevice,struct iw_point *p) +int wpa_ioctl (struct vnt_private *pDevice,struct iw_point *p) {struct viawget_wpa_param *param;int ret =0 ;
drivers/staging/vt6655/wpactl.h +3 -3
@@ -57,8 +57,8 @@ enum wpa_key_mgmt { KEY_MGMT_802_1X, KEY_MGMT_CCKM, KEY_MGMT_PSK, KEY_MGMT_NONE,/*--------------------- Export Functions --------------------------*/ -int wpa_set_wpadev (PSDevice pDevice,int val); -int wpa_ioctl (PSDevice pDevice,struct iw_point *p); -int wpa_set_keys (PSDevice pDevice,void *ctx,bool fcpfkernel); +int wpa_set_wpadev (struct vnt_private *,int val); +int wpa_ioctl (struct vnt_private *,struct iw_point *p); +int wpa_set_keys (struct vnt_private *,void *ctx,bool fcpfkernel);#endif // __WPACL_H__
drivers/staging/vt6655/wroute.c +1 -1
@@ -62,7 +62,7 @@ static int msglevel = MSG_LEVEL_INFO;* Return Value: true if packet duplicate; otherwise false * */ -bool ROUTEbRelay (PSDevice pDevice,unsigned char *pbySkbData, +bool ROUTEbRelay (struct vnt_private *pDevice,unsigned char *pbySkbData,unsigned int uDataLen,unsigned int uNodeIndex) {PSMgmtObject pMgmt = pDevice->pMgmt;
drivers/staging/vt6655/wroute.h +2 -1
@@ -39,6 +39,7 @@/*--------------------- Export Functions --------------------------*/ -bool ROUTEbRelay (PSDevice pDevice,unsigned char *pbySkbData,unsigned int uDataLen,unsigned int uNodeIndex); +bool ROUTEbRelay (struct vnt_private *pDevice,unsigned char *pbySkbData, +unsigned int uDataLen,unsigned int uNodeIndex);#endif /* __WROUTE_H__ */
Signature · 1 line
1.9.1
PATCH 8/9 staging: vt6655: device_main Replace DEVICE_INFO with size of pointer
In reply to Malcolm Priestley--- drivers/staging/vt6655/device_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/vt6655/device_main.c +2 -2
@@ -839,7 +839,7 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)return -ENODEV ; } - dev =alloc_etherdev (sizeof (DEVICE_INFO )); + dev =alloc_etherdev (sizeof (*pDevice)); pDevice =netdev_priv (dev);
@@ -999,7 +999,7 @@ static void vt6655_init_info(struct pci_dev *pcid, {struct vnt_private *p; -memset (*ppDevice,0 ,sizeof (DEVICE_INFO )); +memset (*ppDevice,0 ,sizeof (**ppDevice));if (pDevice_Infos ==NULL ) { pDevice_Infos = *ppDevice;
Signature · 1 line
1.9.1
PATCH 9/9 staging: vt6655: remove typedef from struct vnt_private
In reply to Malcolm Priestley--- drivers/staging/vt6655/device.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/vt6655/device.h +2 -3
@@ -337,8 +337,7 @@ typedef struct __device_opt {u32 flags; }OPTIONS , *POPTIONS ; -/* TODO Convert all functions to struct vnt_private and remove typedef */ -typedef struct vnt_private { +struct vnt_private {struct vnt_private *next;struct vnt_private *prev;
@@ -743,7 +742,7 @@ typedef struct vnt_private {struct iw_statistics wstats;// wireless stats bool bCommit; -}DEVICE_INFO , *PSDevice; +};static inline bool device_get_ip (struct vnt_private *pInfo) {
Signature · 1 line
1.9.1