staging: vt6656: camel case and clean up CARDvAdjustTSF

camel case changes
pDevice -> priv
byRxRate -> rx_rate
qwBSSTimestamp -> time_stamp
qwLocalTSF -> local_tsf
qwTSFOffset -> tsf_offset
pbyData -> data

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Malcolm Priestley 2014-05-24 14:37:01 +01:00 committed by Greg Kroah-Hartman
parent 3fd2a69c6e
commit 302361d475
1 changed files with 18 additions and 26 deletions

View File

@ -580,42 +580,34 @@ u64 CARDqGetTSFOffset(u8 rx_rate, u64 tsf1, u64 tsf2)
* *
* Parameters: * Parameters:
* In: * In:
* pDevice - The adapter to be sync. * priv - The adapter to be sync.
* qwBSSTimestamp - Rx BCN's TSF * time_stamp - Rx BCN's TSF
* qwLocalTSF - Local TSF * local_tsf - Local TSF
* Out: * Out:
* none * none
* *
* Return Value: none * Return Value: none
* *
*/ */
void CARDvAdjustTSF(struct vnt_private *pDevice, u8 byRxRate, void CARDvAdjustTSF(struct vnt_private *priv, u8 rx_rate,
u64 qwBSSTimestamp, u64 qwLocalTSF) u64 time_stamp, u64 local_tsf)
{ {
u64 qwTSFOffset = 0; u64 tsf_offset = 0;
u8 pbyData[8]; u8 data[8];
qwTSFOffset = CARDqGetTSFOffset(byRxRate, qwBSSTimestamp, qwLocalTSF); tsf_offset = CARDqGetTSFOffset(rx_rate, time_stamp, local_tsf);
// adjust TSF
// HW's TSF add TSF Offset reg
pbyData[0] = (u8)qwTSFOffset; data[0] = (u8)tsf_offset;
pbyData[1] = (u8)(qwTSFOffset >> 8); data[1] = (u8)(tsf_offset >> 8);
pbyData[2] = (u8)(qwTSFOffset >> 16); data[2] = (u8)(tsf_offset >> 16);
pbyData[3] = (u8)(qwTSFOffset >> 24); data[3] = (u8)(tsf_offset >> 24);
pbyData[4] = (u8)(qwTSFOffset >> 32); data[4] = (u8)(tsf_offset >> 32);
pbyData[5] = (u8)(qwTSFOffset >> 40); data[5] = (u8)(tsf_offset >> 40);
pbyData[6] = (u8)(qwTSFOffset >> 48); data[6] = (u8)(tsf_offset >> 48);
pbyData[7] = (u8)(qwTSFOffset >> 56); data[7] = (u8)(tsf_offset >> 56);
CONTROLnsRequestOut(pDevice,
MESSAGE_TYPE_SET_TSFTBTT,
MESSAGE_REQUEST_TSF,
0,
8,
pbyData
);
CONTROLnsRequestOut(priv, MESSAGE_TYPE_SET_TSFTBTT,
MESSAGE_REQUEST_TSF, 0, 8, data);
} }
/* /*
* Description: Read NIC TSF counter * Description: Read NIC TSF counter