2014-05-30 22:24:08

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 1/8] staging: vt6656: rename CARDbGetCurrentTSF to vnt_get_current_tsf

Drop card and rename to vnt_get_current_tsf

Signed-off-by: Malcolm Priestley <[email protected]>
---
Follow on to
staging: vt6656: rename CARDvAdjustTSF to vnt_adjust_tsf

drivers/staging/vt6656/card.c | 4 ++--
drivers/staging/vt6656/card.h | 2 +-
drivers/staging/vt6656/wmgr.c | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 24dd9f8..c746677 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -29,7 +29,7 @@
* CARDvSetLoopbackMode - Set Loopback mode
* CARDbSoftwareReset - Sortware reset NIC
* vnt_get_tsf_offset - Calculate TSFOffset
- * CARDbGetCurrentTSF - Read Current NIC TSF counter
+ * vnt_get_current_tsf - Read Current NIC TSF counter
* CARDqGetNextTBTT - Calculate Next Beacon TSF counter
* CARDvSetFirstNextTBTT - Set NIC Beacon time
* CARDvUpdateNextTBTT - Sync. NIC Beacon time
@@ -614,7 +614,7 @@ void vnt_adjust_tsf(struct vnt_private *priv, u8 rx_rate,
* Return Value: true if success; otherwise false
*
*/
-bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *current_tsf)
+bool vnt_get_current_tsf(struct vnt_private *priv, u64 *current_tsf)
{

*current_tsf = priv->qwCurrTSF;
diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h
index 75e4f5f..89bbc70 100644
--- a/drivers/staging/vt6656/card.h
+++ b/drivers/staging/vt6656/card.h
@@ -52,7 +52,7 @@ void vnt_update_top_rates(struct vnt_private *);
void vnt_add_basic_rate(struct vnt_private *, u16);
int vnt_ofdm_min_rate(struct vnt_private *);
void vnt_adjust_tsf(struct vnt_private *, u8, u64, u64);
-bool CARDbGetCurrentTSF(struct vnt_private *pDevice, u64 *pqwCurrTSF);
+bool vnt_get_current_tsf(struct vnt_private *, u64 *);
bool CARDbClearCurrentTSF(struct vnt_private *pDevice);
void CARDvSetFirstNextTBTT(struct vnt_private *pDevice, u16 wBeaconInterval);
void CARDvUpdateNextTBTT(struct vnt_private *pDevice, u64 qwTSF,
diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c
index d5d2273..55b92fe 100644
--- a/drivers/staging/vt6656/wmgr.c
+++ b/drivers/staging/vt6656/wmgr.c
@@ -1944,9 +1944,9 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
// endian issue ???
// Update TSF
if (bUpdateTSF) {
- CARDbGetCurrentTSF(pDevice, &qwCurrTSF);
+ vnt_get_current_tsf(pDevice, &qwCurrTSF);
vnt_adjust_tsf(pDevice, pRxPacket->byRxRate, qwTimestamp , pRxPacket->qwLocalTSF);
- CARDbGetCurrentTSF(pDevice, &qwCurrTSF);
+ vnt_get_current_tsf(pDevice, &qwCurrTSF);
CARDvUpdateNextTBTT(pDevice, qwTimestamp, pMgmt->wCurrBeaconPeriod);
}

@@ -2044,7 +2044,7 @@ void vMgrCreateOwnIBSS(struct vnt_private *pDevice, PCMD_STATUS pStatus)
pMgmt->wIBSSBeaconPeriod = DEFAULT_IBSS_BI;
MACvWriteBeaconInterval(pDevice, pMgmt->wIBSSBeaconPeriod);

- CARDbGetCurrentTSF(pDevice, &qwCurrTSF);
+ vnt_get_current_tsf(pDevice, &qwCurrTSF);
// clear TSF counter
CARDbClearCurrentTSF(pDevice);

--
1.9.1



2014-05-30 22:24:18

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 8/8] staging: vt6656: rename CARDvSetBSSMode to vnt_set_bss_mode

drop card and rename to vnt_set_bss_mode

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/card.c | 2 +-
drivers/staging/vt6656/card.h | 2 +-
drivers/staging/vt6656/main_usb.c | 2 +-
drivers/staging/vt6656/wcmd.c | 6 +++---
drivers/staging/vt6656/wmgr.c | 10 +++++-----
5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 366d7d5..ffd6a01 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -829,7 +829,7 @@ int vnt_radio_power_on(struct vnt_private *priv)
return ret;
}

-void CARDvSetBSSMode(struct vnt_private *priv)
+void vnt_set_bss_mode(struct vnt_private *priv)
{
if (priv->byRFType == RF_AIROHA7230 && priv->byBBType == BB_TYPE_11A)
MACvSetBBType(priv, BB_TYPE_11G);
diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h
index 150f870..8c6f67d 100644
--- a/drivers/staging/vt6656/card.h
+++ b/drivers/staging/vt6656/card.h
@@ -61,6 +61,6 @@ u64 vnt_get_tsf_offset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2);
int vnt_radio_power_off(struct vnt_private *);
int vnt_radio_power_on(struct vnt_private *);
u8 vnt_get_pkt_type(struct vnt_private *);
-void CARDvSetBSSMode(struct vnt_private *pDevice);
+void vnt_set_bss_mode(struct vnt_private *);

#endif /* __CARD_H__ */
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 09da861..bdb9de8 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -525,7 +525,7 @@ static int device_init_registers(struct vnt_private *pDevice)
}

BBvSetShortSlotTime(pDevice);
- CARDvSetBSSMode(pDevice);
+ vnt_set_bss_mode(pDevice);

pDevice->byBBVGACurrent = pDevice->abyBBVGA[0];
pDevice->byBBVGANew = pDevice->byBBVGACurrent;
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index 191e788..acd5be7 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -333,11 +333,11 @@ void vRunCommand(struct work_struct *work)
if ((pDevice->byBBType != BB_TYPE_11A) &&
(pMgmt->uScanChannel > CB_MAX_CHANNEL_24G)) {
pDevice->byBBType = BB_TYPE_11A;
- CARDvSetBSSMode(pDevice);
+ vnt_set_bss_mode(pDevice);
} else if ((pDevice->byBBType == BB_TYPE_11A) &&
(pMgmt->uScanChannel <= CB_MAX_CHANNEL_24G)) {
pDevice->byBBType = BB_TYPE_11G;
- CARDvSetBSSMode(pDevice);
+ vnt_set_bss_mode(pDevice);
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning.... channel: [%d]\n", pMgmt->uScanChannel);
// Set channel
@@ -377,7 +377,7 @@ void vRunCommand(struct work_struct *work)
// Set Baseband's sensitivity back.
if (pDevice->byBBType != pDevice->byScanBBType) {
pDevice->byBBType = pDevice->byScanBBType;
- CARDvSetBSSMode(pDevice);
+ vnt_set_bss_mode(pDevice);
}

BBvSetShortSlotTime(pDevice);
diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c
index 1646aaf..0ba292c 100644
--- a/drivers/staging/vt6656/wmgr.c
+++ b/drivers/staging/vt6656/wmgr.c
@@ -2081,7 +2081,7 @@ void vMgrCreateOwnIBSS(struct vnt_private *pDevice, PCMD_STATUS pStatus)
// vUpdateIFS() use pDevice->bShortSlotTime as parameter so it must be called
// after setting ShortSlotTime.
// CARDvSetBSSMode call vUpdateIFS()
- CARDvSetBSSMode(pDevice);
+ vnt_set_bss_mode(pDevice);

if (pMgmt->eConfigMode == WMAC_CONFIG_AP) {
MACvRegBitsOn(pDevice, MAC_REG_HOSTCR, HOSTCR_AP);
@@ -2601,7 +2601,7 @@ static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode,
pMgmt->eCurrentPHYMode = PHY_TYPE_11A;
pDevice->bShortSlotTime = true;
BBvSetShortSlotTime(pDevice);
- CARDvSetBSSMode(pDevice);
+ vnt_set_bss_mode(pDevice);
} else {
return;
}
@@ -2613,7 +2613,7 @@ static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode,
pMgmt->eCurrentPHYMode = PHY_TYPE_11B;
pDevice->bShortSlotTime = false;
BBvSetShortSlotTime(pDevice);
- CARDvSetBSSMode(pDevice);
+ vnt_set_bss_mode(pDevice);
} else {
return;
}
@@ -2624,12 +2624,12 @@ static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode,
pMgmt->eCurrentPHYMode = PHY_TYPE_11G;
pDevice->bShortSlotTime = true;
BBvSetShortSlotTime(pDevice);
- CARDvSetBSSMode(pDevice);
+ vnt_set_bss_mode(pDevice);
} else if (pDevice->eConfigPHYMode == PHY_TYPE_11B) {
pDevice->byBBType = BB_TYPE_11B;
pDevice->bShortSlotTime = false;
BBvSetShortSlotTime(pDevice);
- CARDvSetBSSMode(pDevice);
+ vnt_set_bss_mode(pDevice);
} else {
return;
}
--
1.9.1


2014-05-30 22:24:09

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 2/8] staging: vt6656: rename CARDbClearCurrentTSF to vnt_clear_current_tsf

Drop card and rename to vnt_clear_current_tsf

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/card.c | 4 ++--
drivers/staging/vt6656/card.h | 2 +-
drivers/staging/vt6656/wmgr.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index c746677..fdc7cd5 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -633,7 +633,7 @@ bool vnt_get_current_tsf(struct vnt_private *priv, u64 *current_tsf)
* Return Value: true if success; otherwise false
*
*/
-bool CARDbClearCurrentTSF(struct vnt_private *priv)
+bool vnt_clear_current_tsf(struct vnt_private *priv)
{

MACvRegBitsOn(priv, MAC_REG_TFTCTL, TFTCTL_TSFCNTRST);
@@ -694,7 +694,7 @@ void CARDvSetFirstNextTBTT(struct vnt_private *priv, u16 beacon_interval)
u64 next_tbtt = 0;
u8 data[8];

- CARDbClearCurrentTSF(priv);
+ vnt_clear_current_tsf(priv);

next_tbtt = CARDqGetNextTBTT(next_tbtt, beacon_interval);

diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h
index 89bbc70..78ff810 100644
--- a/drivers/staging/vt6656/card.h
+++ b/drivers/staging/vt6656/card.h
@@ -53,7 +53,7 @@ void vnt_add_basic_rate(struct vnt_private *, u16);
int vnt_ofdm_min_rate(struct vnt_private *);
void vnt_adjust_tsf(struct vnt_private *, u8, u64, u64);
bool vnt_get_current_tsf(struct vnt_private *, u64 *);
-bool CARDbClearCurrentTSF(struct vnt_private *pDevice);
+bool vnt_clear_current_tsf(struct vnt_private *);
void CARDvSetFirstNextTBTT(struct vnt_private *pDevice, u16 wBeaconInterval);
void CARDvUpdateNextTBTT(struct vnt_private *pDevice, u64 qwTSF,
u16 wBeaconInterval);
diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c
index 55b92fe..5b2e9e5 100644
--- a/drivers/staging/vt6656/wmgr.c
+++ b/drivers/staging/vt6656/wmgr.c
@@ -2046,7 +2046,7 @@ void vMgrCreateOwnIBSS(struct vnt_private *pDevice, PCMD_STATUS pStatus)

vnt_get_current_tsf(pDevice, &qwCurrTSF);
// clear TSF counter
- CARDbClearCurrentTSF(pDevice);
+ vnt_clear_current_tsf(pDevice);

// enable TSF counter
MACvRegBitsOn(pDevice,MAC_REG_TFTCTL,TFTCTL_TSFCNTREN);
--
1.9.1


2014-05-30 22:24:15

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 6/8] staging: vt6656: rename CARDbRadioPowerOff to vnt_radio_power_off

Drop card and rename to vnt_radio_power_off

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/card.c | 4 ++--
drivers/staging/vt6656/card.h | 2 +-
drivers/staging/vt6656/main_usb.c | 2 +-
drivers/staging/vt6656/wcmd.c | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 9ecf189..e2ed0f4 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -33,7 +33,7 @@
* vnt_get_next_tbtt - Calculate Next Beacon TSF counter
* vnt_reset_next_tbtt - Set NIC Beacon time
* vnt_update_next_tbtt - Sync. NIC Beacon time
- * CARDbRadioPowerOff - Turn Off NIC Radio Power
+ * vnt_radio_power_off - Turn Off NIC Radio Power
* CARDbRadioPowerOn - Turn On NIC Radio Power
* CARDbSetWEPMode - Set NIC Wep mode
* CARDbSetTxPower - Set NIC tx power
@@ -764,7 +764,7 @@ void vnt_update_next_tbtt(struct vnt_private *priv, u64 tsf,
* Return Value: true if success; otherwise false
*
*/
-int CARDbRadioPowerOff(struct vnt_private *priv)
+int vnt_radio_power_off(struct vnt_private *priv)
{
int ret = true;

diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h
index d5f7c68..614e6d6 100644
--- a/drivers/staging/vt6656/card.h
+++ b/drivers/staging/vt6656/card.h
@@ -58,7 +58,7 @@ void vnt_reset_next_tbtt(struct vnt_private *, u16);
void vnt_update_next_tbtt(struct vnt_private *, u64, u16);
u64 vnt_get_next_tbtt(u64, u16);
u64 vnt_get_tsf_offset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2);
-int CARDbRadioPowerOff(struct vnt_private *pDevice);
+int vnt_radio_power_off(struct vnt_private *);
int CARDbRadioPowerOn(struct vnt_private *pDevice);
u8 vnt_get_pkt_type(struct vnt_private *);
void CARDvSetBSSMode(struct vnt_private *pDevice);
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 636afc2..2378068 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -560,7 +560,7 @@ static int device_init_registers(struct vnt_private *pDevice)

if ((pDevice->bHWRadioOff == true) ||
(pDevice->bRadioControlOff == true)) {
- CARDbRadioPowerOff(pDevice);
+ vnt_radio_power_off(pDevice);
} else {
CARDbRadioPowerOn(pDevice);
}
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index cec6fc6..d1d6cf2 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -439,7 +439,7 @@ void vRunCommand(struct work_struct *work)
}
netif_stop_queue(pDevice->dev);
if (pDevice->bNeedRadioOFF == true)
- CARDbRadioPowerOff(pDevice);
+ vnt_radio_power_off(pDevice);

break;

@@ -798,7 +798,7 @@ void vRunCommand(struct work_struct *work)
memset(pItemSSID->abySSID, 0, WLAN_SSID_MAXLEN);

netif_stop_queue(pDevice->dev);
- CARDbRadioPowerOff(pDevice);
+ vnt_radio_power_off(pDevice);
MACvRegBitsOn(pDevice, MAC_REG_GPIOCTL1, GPIO3_INTMD);

vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_OFF);
--
1.9.1


2014-05-30 22:24:12

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 4/8] staging: vt6656: rename CARDvSetFirstNextTBTT to vnt_reset_next_tbtt

Drop card, set and first. The device resets the next tbtt rename
to vnt_reset_next_tbtt

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/card.c | 4 ++--
drivers/staging/vt6656/card.h | 2 +-
drivers/staging/vt6656/wmgr.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index ee013a3..7cb7bbc 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -31,7 +31,7 @@
* vnt_get_tsf_offset - Calculate TSFOffset
* vnt_get_current_tsf - Read Current NIC TSF counter
* vnt_get_next_tbtt - Calculate Next Beacon TSF counter
- * CARDvSetFirstNextTBTT - Set NIC Beacon time
+ * vnt_reset_next_tbtt - Set NIC Beacon time
* CARDvUpdateNextTBTT - Sync. NIC Beacon time
* CARDbRadioPowerOff - Turn Off NIC Radio Power
* CARDbRadioPowerOn - Turn On NIC Radio Power
@@ -689,7 +689,7 @@ u64 vnt_get_next_tbtt(u64 tsf, u16 beacon_interval)
* Return Value: none
*
*/
-void CARDvSetFirstNextTBTT(struct vnt_private *priv, u16 beacon_interval)
+void vnt_reset_next_tbtt(struct vnt_private *priv, u16 beacon_interval)
{
u64 next_tbtt = 0;
u8 data[8];
diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h
index d39a0a5..768515c 100644
--- a/drivers/staging/vt6656/card.h
+++ b/drivers/staging/vt6656/card.h
@@ -54,7 +54,7 @@ int vnt_ofdm_min_rate(struct vnt_private *);
void vnt_adjust_tsf(struct vnt_private *, u8, u64, u64);
bool vnt_get_current_tsf(struct vnt_private *, u64 *);
bool vnt_clear_current_tsf(struct vnt_private *);
-void CARDvSetFirstNextTBTT(struct vnt_private *pDevice, u16 wBeaconInterval);
+void vnt_reset_next_tbtt(struct vnt_private *, u16);
void CARDvUpdateNextTBTT(struct vnt_private *pDevice, u64 qwTSF,
u16 wBeaconInterval);
u64 vnt_get_next_tbtt(u64, u16);
diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c
index 5b2e9e5..28112ec 100644
--- a/drivers/staging/vt6656/wmgr.c
+++ b/drivers/staging/vt6656/wmgr.c
@@ -2051,7 +2051,7 @@ void vMgrCreateOwnIBSS(struct vnt_private *pDevice, PCMD_STATUS pStatus)
// enable TSF counter
MACvRegBitsOn(pDevice,MAC_REG_TFTCTL,TFTCTL_TSFCNTREN);
// set Next TBTT
- CARDvSetFirstNextTBTT(pDevice, pMgmt->wIBSSBeaconPeriod);
+ vnt_reset_next_tbtt(pDevice, pMgmt->wIBSSBeaconPeriod);

pMgmt->uIBSSChannel = pDevice->uChannel;

@@ -2584,7 +2584,7 @@ static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode,

// set Next TBTT
// Next TBTT = ((local_current_TSF / beacon_interval) + 1 ) * beacon_interval
- CARDvSetFirstNextTBTT(pDevice, pCurr->wBeaconInterval);
+ vnt_reset_next_tbtt(pDevice, pCurr->wBeaconInterval);

// set BSSID
MACvWriteBSSIDAddress(pDevice, pCurr->abyBSSID);
--
1.9.1


2014-05-30 22:24:13

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 5/8] staging: vt6656: rename CARDvUpdateNextTBTT to vnt_update_next_tbtt

Drop card and rename to vnt_update_next_tbtt

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/card.c | 4 ++--
drivers/staging/vt6656/card.h | 3 +--
drivers/staging/vt6656/wmgr.c | 4 ++--
3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 7cb7bbc..9ecf189 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -32,7 +32,7 @@
* vnt_get_current_tsf - Read Current NIC TSF counter
* vnt_get_next_tbtt - Calculate Next Beacon TSF counter
* vnt_reset_next_tbtt - Set NIC Beacon time
- * CARDvUpdateNextTBTT - Sync. NIC Beacon time
+ * vnt_update_next_tbtt - Sync. NIC Beacon time
* CARDbRadioPowerOff - Turn Off NIC Radio Power
* CARDbRadioPowerOn - Turn On NIC Radio Power
* CARDbSetWEPMode - Set NIC Wep mode
@@ -728,7 +728,7 @@ void vnt_reset_next_tbtt(struct vnt_private *priv, u16 beacon_interval)
* Return Value: none
*
*/
-void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 tsf,
+void vnt_update_next_tbtt(struct vnt_private *priv, u64 tsf,
u16 beacon_interval)
{
u8 data[8];
diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h
index 768515c..d5f7c68 100644
--- a/drivers/staging/vt6656/card.h
+++ b/drivers/staging/vt6656/card.h
@@ -55,8 +55,7 @@ void vnt_adjust_tsf(struct vnt_private *, u8, u64, u64);
bool vnt_get_current_tsf(struct vnt_private *, u64 *);
bool vnt_clear_current_tsf(struct vnt_private *);
void vnt_reset_next_tbtt(struct vnt_private *, u16);
-void CARDvUpdateNextTBTT(struct vnt_private *pDevice, u64 qwTSF,
- u16 wBeaconInterval);
+void vnt_update_next_tbtt(struct vnt_private *, u64, u16);
u64 vnt_get_next_tbtt(u64, u16);
u64 vnt_get_tsf_offset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2);
int CARDbRadioPowerOff(struct vnt_private *pDevice);
diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c
index 28112ec..1646aaf 100644
--- a/drivers/staging/vt6656/wmgr.c
+++ b/drivers/staging/vt6656/wmgr.c
@@ -1917,7 +1917,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)

MACvWriteBeaconInterval(pDevice, pMgmt->wCurrBeaconPeriod);
vnt_adjust_tsf(pDevice, pRxPacket->byRxRate, qwTimestamp, pRxPacket->qwLocalTSF);
- CARDvUpdateNextTBTT(pDevice, qwTimestamp, pMgmt->wCurrBeaconPeriod);
+ vnt_update_next_tbtt(pDevice, qwTimestamp, pMgmt->wCurrBeaconPeriod);

// Turn off bssid filter to avoid filter others adhoc station which bssid is different.
MACvWriteBSSIDAddress(pDevice, pMgmt->abyCurrBSSID);
@@ -1947,7 +1947,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
vnt_get_current_tsf(pDevice, &qwCurrTSF);
vnt_adjust_tsf(pDevice, pRxPacket->byRxRate, qwTimestamp , pRxPacket->qwLocalTSF);
vnt_get_current_tsf(pDevice, &qwCurrTSF);
- CARDvUpdateNextTBTT(pDevice, qwTimestamp, pMgmt->wCurrBeaconPeriod);
+ vnt_update_next_tbtt(pDevice, qwTimestamp, pMgmt->wCurrBeaconPeriod);
}

return;
--
1.9.1


2014-05-30 22:24:10

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 3/8] staging: vt6656: rename CARDqGetNextTBTT to vnt_get_next_tbtt

Drop card and rename to vnt_get_next_tbtt

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/card.c | 8 ++++----
drivers/staging/vt6656/card.h | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index fdc7cd5..ee013a3 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -30,7 +30,7 @@
* CARDbSoftwareReset - Sortware reset NIC
* vnt_get_tsf_offset - Calculate TSFOffset
* vnt_get_current_tsf - Read Current NIC TSF counter
- * CARDqGetNextTBTT - Calculate Next Beacon TSF counter
+ * vnt_get_next_tbtt - Calculate Next Beacon TSF counter
* CARDvSetFirstNextTBTT - Set NIC Beacon time
* CARDvUpdateNextTBTT - Sync. NIC Beacon time
* CARDbRadioPowerOff - Turn Off NIC Radio Power
@@ -657,7 +657,7 @@ bool vnt_clear_current_tsf(struct vnt_private *priv)
* Return Value: TSF value of next Beacon
*
*/
-u64 CARDqGetNextTBTT(u64 tsf, u16 beacon_interval)
+u64 vnt_get_next_tbtt(u64 tsf, u16 beacon_interval)
{
u32 beacon_int;

@@ -696,7 +696,7 @@ void CARDvSetFirstNextTBTT(struct vnt_private *priv, u16 beacon_interval)

vnt_clear_current_tsf(priv);

- next_tbtt = CARDqGetNextTBTT(next_tbtt, beacon_interval);
+ next_tbtt = vnt_get_next_tbtt(next_tbtt, beacon_interval);

data[0] = (u8)next_tbtt;
data[1] = (u8)(next_tbtt >> 8);
@@ -733,7 +733,7 @@ void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 tsf,
{
u8 data[8];

- tsf = CARDqGetNextTBTT(tsf, beacon_interval);
+ tsf = vnt_get_next_tbtt(tsf, beacon_interval);

data[0] = (u8)tsf;
data[1] = (u8)(tsf >> 8);
diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h
index 78ff810..d39a0a5 100644
--- a/drivers/staging/vt6656/card.h
+++ b/drivers/staging/vt6656/card.h
@@ -57,7 +57,7 @@ bool vnt_clear_current_tsf(struct vnt_private *);
void CARDvSetFirstNextTBTT(struct vnt_private *pDevice, u16 wBeaconInterval);
void CARDvUpdateNextTBTT(struct vnt_private *pDevice, u64 qwTSF,
u16 wBeaconInterval);
-u64 CARDqGetNextTBTT(u64 qwTSF, u16 wBeaconInterval);
+u64 vnt_get_next_tbtt(u64, u16);
u64 vnt_get_tsf_offset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2);
int CARDbRadioPowerOff(struct vnt_private *pDevice);
int CARDbRadioPowerOn(struct vnt_private *pDevice);
--
1.9.1


2014-05-30 22:24:16

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 7/8] staging: vt6656: rename CARDbRadioPowerOn to vnt_radio_power_on

Drop card and rename to vnt_radio_power_on

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/card.c | 4 ++--
drivers/staging/vt6656/card.h | 2 +-
drivers/staging/vt6656/main_usb.c | 2 +-
drivers/staging/vt6656/wcmd.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index e2ed0f4..366d7d5 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -34,7 +34,7 @@
* vnt_reset_next_tbtt - Set NIC Beacon time
* vnt_update_next_tbtt - Sync. NIC Beacon time
* vnt_radio_power_off - Turn Off NIC Radio Power
- * CARDbRadioPowerOn - Turn On NIC Radio Power
+ * vnt_radio_power_on - Turn On NIC Radio Power
* CARDbSetWEPMode - Set NIC Wep mode
* CARDbSetTxPower - Set NIC tx power
*
@@ -801,7 +801,7 @@ int vnt_radio_power_off(struct vnt_private *priv)
* Return Value: true if success; otherwise false
*
*/
-int CARDbRadioPowerOn(struct vnt_private *priv)
+int vnt_radio_power_on(struct vnt_private *priv)
{
int ret = true;

diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h
index 614e6d6..150f870 100644
--- a/drivers/staging/vt6656/card.h
+++ b/drivers/staging/vt6656/card.h
@@ -59,7 +59,7 @@ void vnt_update_next_tbtt(struct vnt_private *, u64, u16);
u64 vnt_get_next_tbtt(u64, u16);
u64 vnt_get_tsf_offset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2);
int vnt_radio_power_off(struct vnt_private *);
-int CARDbRadioPowerOn(struct vnt_private *pDevice);
+int vnt_radio_power_on(struct vnt_private *);
u8 vnt_get_pkt_type(struct vnt_private *);
void CARDvSetBSSMode(struct vnt_private *pDevice);

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 2378068..09da861 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -562,7 +562,7 @@ static int device_init_registers(struct vnt_private *pDevice)
(pDevice->bRadioControlOff == true)) {
vnt_radio_power_off(pDevice);
} else {
- CARDbRadioPowerOn(pDevice);
+ vnt_radio_power_on(pDevice);
}

DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"<----INIbInitAdapter Exit\n");
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index d1d6cf2..191e788 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -807,7 +807,7 @@ void vRunCommand(struct work_struct *work)
} else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" WLAN_CMD_RADIO_START_ON........................\n");
pDevice->bHWRadioOff = false;
- CARDbRadioPowerOn(pDevice);
+ vnt_radio_power_on(pDevice);
MACvRegBitsOff(pDevice, MAC_REG_GPIOCTL1, GPIO3_INTMD);

vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_ON);
--
1.9.1