2014-06-04 17:26:24

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 01/15] staging: vt6656: PSvEnablePowerSaving remove camel case

camel case changes
pDevice -> priv
wListenInterval -> listen_interval
pMgmt -> mgmt
wAID -> aid

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/power.c | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c
index 8cc2596..718443f 100644
--- a/drivers/staging/vt6656/power.c
+++ b/drivers/staging/vt6656/power.c
@@ -58,60 +58,60 @@ static int msglevel = MSG_LEVEL_INFO;
*
*/

-void PSvEnablePowerSaving(struct vnt_private *pDevice, u16 wListenInterval)
+void PSvEnablePowerSaving(struct vnt_private *priv, u16 listen_interval)
{
- struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
- u16 wAID = pMgmt->wCurrAID | BIT14 | BIT15;
+ struct vnt_manager *mgmt = &priv->vnt_mgmt;
+ u16 aid = mgmt->wCurrAID | BIT14 | BIT15;

/* set period of power up before TBTT */
- vnt_mac_write_word(pDevice, MAC_REG_PWBT, C_PWBT);
+ vnt_mac_write_word(priv, MAC_REG_PWBT, C_PWBT);

- if (pDevice->op_mode != NL80211_IFTYPE_ADHOC) {
+ if (priv->op_mode != NL80211_IFTYPE_ADHOC) {
/* set AID */
- vnt_mac_write_word(pDevice, MAC_REG_AIDATIM, wAID);
+ vnt_mac_write_word(priv, MAC_REG_AIDATIM, aid);
}

/* Warren:06-18-2004,the sequence must follow
* PSEN->AUTOSLEEP->GO2DOZE
*/
/* enable power saving hw function */
- vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_PSEN);
+ vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_PSEN);

/* Set AutoSleep */
- vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
+ vnt_mac_reg_bits_on(priv, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);

/* Warren:MUST turn on this once before turn on AUTOSLEEP ,or the
* AUTOSLEEP doesn't work
*/
- vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_GO2DOZE);
+ vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_GO2DOZE);

- if (wListenInterval >= 2) {
+ if (listen_interval >= 2) {

/* clear always listen beacon */
- vnt_mac_reg_bits_off(pDevice, MAC_REG_PSCTL, PSCTL_ALBCN);
+ vnt_mac_reg_bits_off(priv, MAC_REG_PSCTL, PSCTL_ALBCN);

/* first time set listen next beacon */
- vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_LNBCN);
+ vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_LNBCN);

- pMgmt->wCountToWakeUp = wListenInterval;
+ mgmt->wCountToWakeUp = listen_interval;

} else {

/* always listen beacon */
- vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_ALBCN);
+ vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_ALBCN);

- pMgmt->wCountToWakeUp = 0;
+ mgmt->wCountToWakeUp = 0;
}

- pDevice->bEnablePSMode = true;
+ priv->bEnablePSMode = true;

/* We don't send null pkt in ad hoc mode
* since beacon will handle this.
*/
- if (pDevice->op_mode == NL80211_IFTYPE_STATION)
- PSbSendNullPacket(pDevice);
+ if (priv->op_mode == NL80211_IFTYPE_STATION)
+ PSbSendNullPacket(priv);

- pDevice->bPWBitOn = true;
+ priv->bPWBitOn = true;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PS:Power Saving Mode Enable...\n");
}

--
1.9.1



2014-06-04 17:26:43

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 12/15] staging: vt6656: rename FIRMWAREbBrach2Sram to vnt_firmware_branch_to_sram

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

diff --git a/drivers/staging/vt6656/firmware.c b/drivers/staging/vt6656/firmware.c
index 3990698..78e9283 100644
--- a/drivers/staging/vt6656/firmware.c
+++ b/drivers/staging/vt6656/firmware.c
@@ -91,7 +91,7 @@ out:
}
MODULE_FIRMWARE(FIRMWARE_NAME);

-int FIRMWAREbBrach2Sram(struct vnt_private *priv)
+int vnt_firmware_branch_to_sram(struct vnt_private *priv)
{
int status;

@@ -137,7 +137,7 @@ int FIRMWAREbCheckVersion(struct vnt_private *priv)

if (priv->wFirmwareVersion < FIRMWARE_VERSION) {
/* branch to loader for download new firmware */
- FIRMWAREbBrach2Sram(priv);
+ vnt_firmware_branch_to_sram(priv);
return false;
}
return true;
diff --git a/drivers/staging/vt6656/firmware.h b/drivers/staging/vt6656/firmware.h
index 961afb7..eb25932 100644
--- a/drivers/staging/vt6656/firmware.h
+++ b/drivers/staging/vt6656/firmware.h
@@ -33,7 +33,7 @@
#include "device.h"

int vnt_download_firmware(struct vnt_private *);
-int FIRMWAREbBrach2Sram(struct vnt_private *);
+int vnt_firmware_branch_to_sram(struct vnt_private *);
int FIRMWAREbCheckVersion(struct vnt_private *);

#endif /* __FIRMWARE_H__ */
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 0c9eb60..c5adc34 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -289,9 +289,9 @@ static int device_init_registers(struct vnt_private *pDevice)

if (!FIRMWAREbCheckVersion(pDevice)) {
if (vnt_download_firmware(pDevice) == true) {
- if (FIRMWAREbBrach2Sram(pDevice) == false) {
+ if (vnt_firmware_branch_to_sram(pDevice) == false) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
- " FIRMWAREbBrach2Sram fail\n");
+ " vnt_firmware_branch_to_sram fail\n");
return false;
}
} else {
--
1.9.1


2014-06-04 17:26:35

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 07/15] staging: vt6656: FIRMWAREbDownload remove camel case

camel case changes
pDevice -> priv
NdisStatus -> status
pBuffer -> buffer
wLength -> length

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/firmware.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/vt6656/firmware.c b/drivers/staging/vt6656/firmware.c
index 1159f0b..9e31e6c 100644
--- a/drivers/staging/vt6656/firmware.c
+++ b/drivers/staging/vt6656/firmware.c
@@ -43,14 +43,14 @@ static int msglevel = MSG_LEVEL_INFO;

#define FIRMWARE_CHUNK_SIZE 0x400

-int FIRMWAREbDownload(struct vnt_private *pDevice)
+int FIRMWAREbDownload(struct vnt_private *priv)
{
- struct device *dev = &pDevice->usb->dev;
+ struct device *dev = &priv->usb->dev;
const struct firmware *fw;
- int NdisStatus;
- void *pBuffer = NULL;
+ int status;
+ void *buffer = NULL;
bool result = false;
- u16 wLength;
+ u16 length;
int ii, rc;

DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Download firmware\n");
@@ -62,24 +62,24 @@ int FIRMWAREbDownload(struct vnt_private *pDevice)
goto out;
}

- pBuffer = kmalloc(FIRMWARE_CHUNK_SIZE, GFP_KERNEL);
- if (!pBuffer)
+ buffer = kmalloc(FIRMWARE_CHUNK_SIZE, GFP_KERNEL);
+ if (!buffer)
goto out;

for (ii = 0; ii < fw->size; ii += FIRMWARE_CHUNK_SIZE) {
- wLength = min_t(int, fw->size - ii, FIRMWARE_CHUNK_SIZE);
- memcpy(pBuffer, fw->data + ii, wLength);
+ length = min_t(int, fw->size - ii, FIRMWARE_CHUNK_SIZE);
+ memcpy(buffer, fw->data + ii, length);

- NdisStatus = vnt_control_out(pDevice,
+ status = vnt_control_out(priv,
0,
0x1200+ii,
0x0000,
- wLength,
- pBuffer);
+ length,
+ buffer);

DBG_PRT(MSG_LEVEL_DEBUG,
KERN_INFO"Download firmware...%d %zu\n", ii, fw->size);
- if (NdisStatus != STATUS_SUCCESS)
+ if (status != STATUS_SUCCESS)
goto free_fw;
}

@@ -88,7 +88,7 @@ free_fw:
release_firmware(fw);

out:
- kfree(pBuffer);
+ kfree(buffer);

return result;
}
--
1.9.1


2014-06-04 17:26:28

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 03/15] staging: vt6656: PSbIsNextTBTTWakeUp remove camel case

camel case changes
pDevice -> priv
pMgmt -> mgmt
bWakeup -> wake_up

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/power.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c
index b7c2720..7f60372 100644
--- a/drivers/staging/vt6656/power.c
+++ b/drivers/staging/vt6656/power.c
@@ -312,27 +312,27 @@ int PSbSendNullPacket(struct vnt_private *pDevice)
*
*/

-int PSbIsNextTBTTWakeUp(struct vnt_private *pDevice)
+int PSbIsNextTBTTWakeUp(struct vnt_private *priv)
{
- struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
- int bWakeUp = false;
+ struct vnt_manager *mgmt = &priv->vnt_mgmt;
+ int wake_up = false;

- if (pMgmt->wListenInterval >= 2) {
- if (pMgmt->wCountToWakeUp == 0)
- pMgmt->wCountToWakeUp = pMgmt->wListenInterval;
+ if (mgmt->wListenInterval >= 2) {
+ if (mgmt->wCountToWakeUp == 0)
+ mgmt->wCountToWakeUp = mgmt->wListenInterval;

- pMgmt->wCountToWakeUp--;
+ mgmt->wCountToWakeUp--;

- if (pMgmt->wCountToWakeUp == 1) {
+ if (mgmt->wCountToWakeUp == 1) {
/* Turn on wake up to listen next beacon */
- vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_LNBCN);
- pDevice->bPSRxBeacon = false;
- bWakeUp = true;
- } else if (!pDevice->bPSRxBeacon) {
+ vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_LNBCN);
+ priv->bPSRxBeacon = false;
+ wake_up = true;
+ } else if (!priv->bPSRxBeacon) {
/* Listen until RxBeacon */
- vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_LNBCN);
+ vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_LNBCN);
}
}
- return bWakeUp;
+ return wake_up;
}

--
1.9.1


2014-06-04 17:26:26

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 02/15] staging: vt6656: PSvDisablePowerSaving remove camel case

pDevice -> priv

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/power.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c
index 718443f..b7c2720 100644
--- a/drivers/staging/vt6656/power.c
+++ b/drivers/staging/vt6656/power.c
@@ -125,24 +125,24 @@ void PSvEnablePowerSaving(struct vnt_private *priv, u16 listen_interval)
*
*/

-void PSvDisablePowerSaving(struct vnt_private *pDevice)
+void PSvDisablePowerSaving(struct vnt_private *priv)
{

/* disable power saving hw function */
- vnt_control_out(pDevice, MESSAGE_TYPE_DISABLE_PS, 0,
+ vnt_control_out(priv, MESSAGE_TYPE_DISABLE_PS, 0,
0, 0, NULL);

/* clear AutoSleep */
- vnt_mac_reg_bits_off(pDevice, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
+ vnt_mac_reg_bits_off(priv, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);

/* set always listen beacon */
- vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_ALBCN);
- pDevice->bEnablePSMode = false;
+ vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_ALBCN);
+ priv->bEnablePSMode = false;

- if (pDevice->op_mode == NL80211_IFTYPE_STATION)
- PSbSendNullPacket(pDevice);
+ if (priv->op_mode == NL80211_IFTYPE_STATION)
+ PSbSendNullPacket(priv);

- pDevice->bPWBitOn = false;
+ priv->bPWBitOn = false;
}

/*
--
1.9.1


2014-06-04 17:26:41

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 11/15] staging: vt6656: rename FIRMWAREbDownload to vnt_download_firmware

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

diff --git a/drivers/staging/vt6656/firmware.c b/drivers/staging/vt6656/firmware.c
index 83680bc..3990698 100644
--- a/drivers/staging/vt6656/firmware.c
+++ b/drivers/staging/vt6656/firmware.c
@@ -40,7 +40,7 @@

#define FIRMWARE_CHUNK_SIZE 0x400

-int FIRMWAREbDownload(struct vnt_private *priv)
+int vnt_download_firmware(struct vnt_private *priv)
{
struct device *dev = &priv->usb->dev;
const struct firmware *fw;
diff --git a/drivers/staging/vt6656/firmware.h b/drivers/staging/vt6656/firmware.h
index e3b08db..961afb7 100644
--- a/drivers/staging/vt6656/firmware.h
+++ b/drivers/staging/vt6656/firmware.h
@@ -32,7 +32,7 @@

#include "device.h"

-int FIRMWAREbDownload(struct vnt_private *);
+int vnt_download_firmware(struct vnt_private *);
int FIRMWAREbBrach2Sram(struct vnt_private *);
int FIRMWAREbCheckVersion(struct vnt_private *);

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index ebb0955..0c9eb60 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -288,7 +288,7 @@ static int device_init_registers(struct vnt_private *pDevice)
memcpy(pDevice->abySNAP_Bridgetunnel, abySNAP_Bridgetunnel, ETH_ALEN);

if (!FIRMWAREbCheckVersion(pDevice)) {
- if (FIRMWAREbDownload(pDevice) == true) {
+ if (vnt_download_firmware(pDevice) == true) {
if (FIRMWAREbBrach2Sram(pDevice) == false) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
" FIRMWAREbBrach2Sram fail\n");
--
1.9.1


2014-06-04 17:26:38

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 09/15] staging: vt6656: FIRMWAREbCheckVersion remove camel case

camel case changes
pDevice -> priv
ntStatus -> status

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/firmware.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/vt6656/firmware.c b/drivers/staging/vt6656/firmware.c
index 7e66d8b..a74a42d 100644
--- a/drivers/staging/vt6656/firmware.c
+++ b/drivers/staging/vt6656/firmware.c
@@ -112,32 +112,32 @@ int FIRMWAREbBrach2Sram(struct vnt_private *priv)
return true;
}

-int FIRMWAREbCheckVersion(struct vnt_private *pDevice)
+int FIRMWAREbCheckVersion(struct vnt_private *priv)
{
- int ntStatus;
+ int status;

- ntStatus = vnt_control_in(pDevice,
+ status = vnt_control_in(priv,
MESSAGE_TYPE_READ,
0,
MESSAGE_REQUEST_VERSION,
2,
- (u8 *) &(pDevice->wFirmwareVersion));
+ (u8 *) &(priv->wFirmwareVersion));

DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n",
- pDevice->wFirmwareVersion);
- if (ntStatus != STATUS_SUCCESS) {
+ priv->wFirmwareVersion);
+ if (status != STATUS_SUCCESS) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Invalid.\n");
return false;
}
- if (pDevice->wFirmwareVersion == 0xFFFF) {
+ if (priv->wFirmwareVersion == 0xFFFF) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"In Loader.\n");
return false;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n",
- pDevice->wFirmwareVersion);
- if (pDevice->wFirmwareVersion < FIRMWARE_VERSION) {
+ priv->wFirmwareVersion);
+ if (priv->wFirmwareVersion < FIRMWARE_VERSION) {
/* branch to loader for download new firmware */
- FIRMWAREbBrach2Sram(pDevice);
+ FIRMWAREbBrach2Sram(priv);
return false;
}
return true;
--
1.9.1


2014-06-04 17:26:46

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 13/15] staging: vt6656: rename FIRMWAREbCheckVersion to vnt_check_firmware_version

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

diff --git a/drivers/staging/vt6656/firmware.c b/drivers/staging/vt6656/firmware.c
index 78e9283..f2250ee 100644
--- a/drivers/staging/vt6656/firmware.c
+++ b/drivers/staging/vt6656/firmware.c
@@ -109,7 +109,7 @@ int vnt_firmware_branch_to_sram(struct vnt_private *priv)
return true;
}

-int FIRMWAREbCheckVersion(struct vnt_private *priv)
+int vnt_check_firmware_version(struct vnt_private *priv)
{
int status;

diff --git a/drivers/staging/vt6656/firmware.h b/drivers/staging/vt6656/firmware.h
index eb25932..d594dbe 100644
--- a/drivers/staging/vt6656/firmware.h
+++ b/drivers/staging/vt6656/firmware.h
@@ -34,6 +34,6 @@

int vnt_download_firmware(struct vnt_private *);
int vnt_firmware_branch_to_sram(struct vnt_private *);
-int FIRMWAREbCheckVersion(struct vnt_private *);
+int vnt_check_firmware_version(struct vnt_private *);

#endif /* __FIRMWARE_H__ */
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index c5adc34..4662a3e 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -287,7 +287,7 @@ static int device_init_registers(struct vnt_private *pDevice)
memcpy(pDevice->abySNAP_RFC1042, abySNAP_RFC1042, ETH_ALEN);
memcpy(pDevice->abySNAP_Bridgetunnel, abySNAP_Bridgetunnel, ETH_ALEN);

- if (!FIRMWAREbCheckVersion(pDevice)) {
+ if (!vnt_check_firmware_version(pDevice)) {
if (vnt_download_firmware(pDevice) == true) {
if (vnt_firmware_branch_to_sram(pDevice) == false) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
--
1.9.1


2014-06-04 17:26:29

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 04/15] staging: vt6656: rename PSvEnablePowerSaving to vnt_enable_power_saving

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

diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index b45af4a..73b7794 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -1328,11 +1328,11 @@ int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info,
}
if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
pDevice->ePSMode = WMAC_POWER_FAST;
- PSvEnablePowerSaving((void *)pDevice, pMgmt->wListenInterval);
+ vnt_enable_power_saving(pDevice, pMgmt->wListenInterval);

} else if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_PERIOD) {
pDevice->ePSMode = WMAC_POWER_FAST;
- PSvEnablePowerSaving((void *)pDevice, pMgmt->wListenInterval);
+ vnt_enable_power_saving(pDevice, pMgmt->wListenInterval);
}

switch (wrq->flags & IW_POWER_MODE) {
diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c
index 7f60372..ae136b2 100644
--- a/drivers/staging/vt6656/power.c
+++ b/drivers/staging/vt6656/power.c
@@ -26,7 +26,7 @@
* Date: July 17, 2002
*
* Functions:
- * PSvEnablePowerSaving - Enable Power Saving Mode
+ * vnt_enable_power_saving - Enable Power Saving Mode
* PSvDiasblePowerSaving - Disable Power Saving Mode
* PSbConsiderPowerDown - Decide if we can Power Down
* PSvSendPSPOLL - Send PS-POLL packet
@@ -58,7 +58,7 @@ static int msglevel = MSG_LEVEL_INFO;
*
*/

-void PSvEnablePowerSaving(struct vnt_private *priv, u16 listen_interval)
+void vnt_enable_power_saving(struct vnt_private *priv, u16 listen_interval)
{
struct vnt_manager *mgmt = &priv->vnt_mgmt;
u16 aid = mgmt->wCurrAID | BIT14 | BIT15;
diff --git a/drivers/staging/vt6656/power.h b/drivers/staging/vt6656/power.h
index 7783582..0642f18 100644
--- a/drivers/staging/vt6656/power.h
+++ b/drivers/staging/vt6656/power.h
@@ -39,7 +39,7 @@
int PSbConsiderPowerDown(struct vnt_private *, int bCheckRxDMA,
int bCheckCountToWakeUp);
void PSvDisablePowerSaving(struct vnt_private *);
-void PSvEnablePowerSaving(struct vnt_private *, u16 wListenInterval);
+void vnt_enable_power_saving(struct vnt_private *, u16);
void PSvSendPSPOLL(struct vnt_private *);
int PSbSendNullPacket(struct vnt_private *);
int PSbIsNextTBTTWakeUp(struct vnt_private *);
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index ae773a6..55c5563 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -593,7 +593,7 @@ void vRunCommand(struct work_struct *work)
if (pMgmt->eCurrState == WMAC_STATE_ASSOC) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCurrState == WMAC_STATE_ASSOC\n");
if (pDevice->ePSMode != WMAC_POWER_CAM) {
- PSvEnablePowerSaving((void *) pDevice,
+ vnt_enable_power_saving(pDevice,
pMgmt->wListenInterval);
}
/*
--
1.9.1


2014-06-04 17:26:47

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 14/15] staging: vt6656: rename BBvCalculateParameter to vnt_get_phy_field

The function returns the phy fields rename to vnt_get_phy_field

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

diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index aada8e7..b74c412 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -27,7 +27,7 @@
*
* Functions:
* BBuGetFrameTime - Calculate data frame transmitting time
- * BBvCalculateParameter - Calculate PhyLength, PhyService and Phy Signal parameter for baseband Tx
+ * vnt_get_phy_field - Calculate PhyLength, PhyService and Phy Signal parameter for baseband Tx
* BBbVT3184Init - VIA VT3184 baseband chip init code
*
* Revision History:
@@ -705,7 +705,7 @@ unsigned int BBuGetFrameTime(u8 preamble_type, u8 pkt_type,
* Return Value: none
*
*/
-void BBvCalculateParameter(struct vnt_private *priv, u32 frame_length,
+void vnt_get_phy_field(struct vnt_private *priv, u32 frame_length,
u16 tx_rate, u8 pkt_type, struct vnt_phy_field *phy)
{
u32 bit_count;
diff --git a/drivers/staging/vt6656/baseband.h b/drivers/staging/vt6656/baseband.h
index 3044d6c..002e58e 100644
--- a/drivers/staging/vt6656/baseband.h
+++ b/drivers/staging/vt6656/baseband.h
@@ -91,7 +91,7 @@ struct vnt_phy_field {
unsigned int BBuGetFrameTime(u8 preamble_type, u8 pkt_type,
unsigned int frame_length, u16 tx_rate);

-void BBvCalculateParameter(struct vnt_private *, u32 frame_length,
+void vnt_get_phy_field(struct vnt_private *, u32 frame_length,
u16 tx_rate, u8 pkt_type, struct vnt_phy_field *);

void BBvSetShortSlotTime(struct vnt_private *);
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 9794116..8be3a89 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -300,19 +300,19 @@ void vnt_set_rspinf(struct vnt_private *priv, u8 bb_type)
int i;

/*RSPINF_b_1*/
- BBvCalculateParameter(priv, 14,
+ vnt_get_phy_field(priv, 14,
vnt_get_cck_rate(priv, RATE_1M), PK_TYPE_11B, &phy[0]);

/*RSPINF_b_2*/
- BBvCalculateParameter(priv, 14,
+ vnt_get_phy_field(priv, 14,
vnt_get_cck_rate(priv, RATE_2M), PK_TYPE_11B, &phy[1]);

/*RSPINF_b_5*/
- BBvCalculateParameter(priv, 14,
+ vnt_get_phy_field(priv, 14,
vnt_get_cck_rate(priv, RATE_5M), PK_TYPE_11B, &phy[2]);

/*RSPINF_b_11*/
- BBvCalculateParameter(priv, 14,
+ vnt_get_phy_field(priv, 14,
vnt_get_cck_rate(priv, RATE_11M), PK_TYPE_11B, &phy[3]);


diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 22cb642..9604b8e 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -494,8 +494,8 @@ static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context,
struct vnt_private *priv = tx_context->priv;

/* Get SignalField,ServiceField,Length */
- BBvCalculateParameter(priv, frame_len, rate, pkt_type, &buf->a);
- BBvCalculateParameter(priv, frame_len, priv->byTopCCKBasicRate,
+ vnt_get_phy_field(priv, frame_len, rate, pkt_type, &buf->a);
+ vnt_get_phy_field(priv, frame_len, priv->byTopCCKBasicRate,
PK_TYPE_11B, &buf->b);

/* Get Duration and TimeStamp */
@@ -518,9 +518,9 @@ static u16 vnt_rxtx_datahead_g_fb(struct vnt_usb_send_context *tx_context,
struct vnt_private *priv = tx_context->priv;

/* Get SignalField,ServiceField,Length */
- BBvCalculateParameter(priv, frame_len, rate, pkt_type, &buf->a);
+ vnt_get_phy_field(priv, frame_len, rate, pkt_type, &buf->a);

- BBvCalculateParameter(priv, frame_len, priv->byTopCCKBasicRate,
+ vnt_get_phy_field(priv, frame_len, priv->byTopCCKBasicRate,
PK_TYPE_11B, &buf->b);

/* Get Duration and TimeStamp */
@@ -546,7 +546,7 @@ static u16 vnt_rxtx_datahead_a_fb(struct vnt_usb_send_context *tx_context,
struct vnt_private *priv = tx_context->priv;

/* Get SignalField,ServiceField,Length */
- BBvCalculateParameter(priv, frame_len, rate, pkt_type, &buf->a);
+ vnt_get_phy_field(priv, frame_len, rate, pkt_type, &buf->a);
/* Get Duration and TimeStampOff */
buf->duration = s_uGetDataDuration(priv, pkt_type, need_ack);

@@ -567,7 +567,7 @@ static u16 vnt_rxtx_datahead_ab(struct vnt_usb_send_context *tx_context,
struct vnt_private *priv = tx_context->priv;

/* Get SignalField,ServiceField,Length */
- BBvCalculateParameter(priv, frame_len, rate, pkt_type, &buf->ab);
+ vnt_get_phy_field(priv, frame_len, rate, pkt_type, &buf->ab);
/* Get Duration and TimeStampOff */
buf->duration = s_uGetDataDuration(priv, pkt_type, need_ack);

@@ -608,9 +608,9 @@ static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context *tx_context,
struct vnt_private *priv = tx_context->priv;
u16 rts_frame_len = 20;

- BBvCalculateParameter(priv, rts_frame_len, priv->byTopCCKBasicRate,
+ vnt_get_phy_field(priv, rts_frame_len, priv->byTopCCKBasicRate,
PK_TYPE_11B, &buf->b);
- BBvCalculateParameter(priv, rts_frame_len,
+ vnt_get_phy_field(priv, rts_frame_len,
priv->byTopOFDMBasicRate, pkt_type, &buf->a);

buf->duration_bb = s_uGetRTSCTSDuration(priv, RTSDUR_BB, frame_len,
@@ -634,9 +634,9 @@ static u16 vnt_rxtx_rts_g_fb_head(struct vnt_usb_send_context *tx_context,
struct vnt_private *priv = tx_context->priv;
u16 rts_frame_len = 20;

- BBvCalculateParameter(priv, rts_frame_len, priv->byTopCCKBasicRate,
+ vnt_get_phy_field(priv, rts_frame_len, priv->byTopCCKBasicRate,
PK_TYPE_11B, &buf->b);
- BBvCalculateParameter(priv, rts_frame_len,
+ vnt_get_phy_field(priv, rts_frame_len,
priv->byTopOFDMBasicRate, pkt_type, &buf->a);


@@ -671,7 +671,7 @@ static u16 vnt_rxtx_rts_ab_head(struct vnt_usb_send_context *tx_context,
struct vnt_private *priv = tx_context->priv;
u16 rts_frame_len = 20;

- BBvCalculateParameter(priv, rts_frame_len,
+ vnt_get_phy_field(priv, rts_frame_len,
priv->byTopOFDMBasicRate, pkt_type, &buf->ab);

buf->duration = s_uGetRTSCTSDuration(priv, RTSDUR_AA, frame_len,
@@ -691,7 +691,7 @@ static u16 vnt_rxtx_rts_a_fb_head(struct vnt_usb_send_context *tx_context,
struct vnt_private *priv = tx_context->priv;
u16 rts_frame_len = 20;

- BBvCalculateParameter(priv, rts_frame_len,
+ vnt_get_phy_field(priv, rts_frame_len,
priv->byTopOFDMBasicRate, pkt_type, &buf->a);

buf->duration = s_uGetRTSCTSDuration(priv, RTSDUR_AA, frame_len,
@@ -766,7 +766,7 @@ static u16 s_vFillCTSHead(struct vnt_usb_send_context *tx_context,
/* Auto Fall back */
struct vnt_cts_fb *pBuf = &head->cts_g_fb;
/* Get SignalField,ServiceField,Length */
- BBvCalculateParameter(pDevice, uCTSFrameLen,
+ vnt_get_phy_field(pDevice, uCTSFrameLen,
pDevice->byTopCCKBasicRate, PK_TYPE_11B, &pBuf->b);
pBuf->duration_ba = s_uGetRTSCTSDuration(pDevice, CTSDUR_BA,
cbFrameLength, byPktType,
@@ -792,7 +792,7 @@ static u16 s_vFillCTSHead(struct vnt_usb_send_context *tx_context,
} else {
struct vnt_cts *pBuf = &head->cts_g;
/* Get SignalField,ServiceField,Length */
- BBvCalculateParameter(pDevice, uCTSFrameLen,
+ vnt_get_phy_field(pDevice, uCTSFrameLen,
pDevice->byTopCCKBasicRate, PK_TYPE_11B, &pBuf->b);
/* Get CTSDuration_ba */
pBuf->duration_ba = s_uGetRTSCTSDuration(pDevice,
@@ -1651,7 +1651,7 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice,
wCurrentRate = RATE_6M;

/* Get SignalField,ServiceField,Length */
- BBvCalculateParameter(pDevice, cbFrameSize, wCurrentRate,
+ vnt_get_phy_field(pDevice, cbFrameSize, wCurrentRate,
PK_TYPE_11A, &short_head->ab);

/* Get Duration and TimeStampOff */
@@ -1664,7 +1664,7 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice,
short_head->fifo_ctl |= FIFOCTL_11B;

/* Get SignalField,ServiceField,Length */
- BBvCalculateParameter(pDevice, cbFrameSize, wCurrentRate,
+ vnt_get_phy_field(pDevice, cbFrameSize, wCurrentRate,
PK_TYPE_11B, &short_head->ab);

/* Get Duration and TimeStampOff */
--
1.9.1


2014-06-04 17:26:33

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 06/15] staging: vt6656: rename PSbIsNextTBTTWakeUp to vnt_next_tbtt_wakeup

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

diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c
index e5462ed..cc28192 100644
--- a/drivers/staging/vt6656/power.c
+++ b/drivers/staging/vt6656/power.c
@@ -31,7 +31,7 @@
* PSbConsiderPowerDown - Decide if we can Power Down
* PSvSendPSPOLL - Send PS-POLL packet
* PSbSendNullPacket - Send Null packet
- * PSbIsNextTBTTWakeUp - Decide if we need to wake up at next Beacon
+ * vnt_next_tbtt_wakeup - Decide if we need to wake up at next Beacon
*
* Revision History:
*
@@ -312,7 +312,7 @@ int PSbSendNullPacket(struct vnt_private *pDevice)
*
*/

-int PSbIsNextTBTTWakeUp(struct vnt_private *priv)
+int vnt_next_tbtt_wakeup(struct vnt_private *priv)
{
struct vnt_manager *mgmt = &priv->vnt_mgmt;
int wake_up = false;
diff --git a/drivers/staging/vt6656/power.h b/drivers/staging/vt6656/power.h
index ef669b7..313f077 100644
--- a/drivers/staging/vt6656/power.h
+++ b/drivers/staging/vt6656/power.h
@@ -42,6 +42,6 @@ void vnt_disable_power_saving(struct vnt_private *);
void vnt_enable_power_saving(struct vnt_private *, u16);
void PSvSendPSPOLL(struct vnt_private *);
int PSbSendNullPacket(struct vnt_private *);
-int PSbIsNextTBTTWakeUp(struct vnt_private *);
+int vnt_next_tbtt_wakeup(struct vnt_private *);

#endif /* __POWER_H__ */
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index b2d7865..4c37908 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -826,7 +826,7 @@ void vRunCommand(struct work_struct *work)
break;

case WLAN_CMD_TBTT_WAKEUP_START:
- PSbIsNextTBTTWakeUp(pDevice);
+ vnt_next_tbtt_wakeup(pDevice);
break;

case WLAN_CMD_BECON_SEND_START:
--
1.9.1


2014-06-04 17:26:36

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 08/15] staging: vt6656: FIRMWAREbBrach2Sram remove camel case

camel case changes
pDevice -> priv
NdisStatus -> status

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/firmware.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vt6656/firmware.c b/drivers/staging/vt6656/firmware.c
index 9e31e6c..7e66d8b 100644
--- a/drivers/staging/vt6656/firmware.c
+++ b/drivers/staging/vt6656/firmware.c
@@ -94,19 +94,19 @@ out:
}
MODULE_FIRMWARE(FIRMWARE_NAME);

-int FIRMWAREbBrach2Sram(struct vnt_private *pDevice)
+int FIRMWAREbBrach2Sram(struct vnt_private *priv)
{
- int NdisStatus;
+ int status;

DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Branch to Sram\n");

- NdisStatus = vnt_control_out(pDevice,
+ status = vnt_control_out(priv,
1,
0x1200,
0x0000,
0,
NULL);
- if (NdisStatus != STATUS_SUCCESS)
+ if (status != STATUS_SUCCESS)
return false;
else
return true;
--
1.9.1


2014-06-04 17:26:49

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 15/15] staging: vt6656: rename BBuGetFrameTime to vnt_get_frame_time

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

diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index b74c412..d99aae5 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -26,7 +26,7 @@
* Date: Jun. 5, 2002
*
* Functions:
- * BBuGetFrameTime - Calculate data frame transmitting time
+ * vnt_get_frame_time - Calculate data frame transmitting time
* vnt_get_phy_field - Calculate PhyLength, PhyService and Phy Signal parameter for baseband Tx
* BBbVT3184Init - VIA VT3184 baseband chip init code
*
@@ -646,7 +646,7 @@ static const u16 awcFrameTime[MAX_RATE] =
* Return Value: FrameTime
*
*/
-unsigned int BBuGetFrameTime(u8 preamble_type, u8 pkt_type,
+unsigned int vnt_get_frame_time(u8 preamble_type, u8 pkt_type,
unsigned int frame_length, u16 tx_rate)
{
unsigned int frame_time;
diff --git a/drivers/staging/vt6656/baseband.h b/drivers/staging/vt6656/baseband.h
index 002e58e..4160695 100644
--- a/drivers/staging/vt6656/baseband.h
+++ b/drivers/staging/vt6656/baseband.h
@@ -88,7 +88,7 @@ struct vnt_phy_field {
__le16 len;
} __packed;

-unsigned int BBuGetFrameTime(u8 preamble_type, u8 pkt_type,
+unsigned int vnt_get_frame_time(u8 preamble_type, u8 pkt_type,
unsigned int frame_length, u16 tx_rate);

void vnt_get_phy_field(struct vnt_private *, u32 frame_length,
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 9604b8e..3c19288 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -344,15 +344,15 @@ static u32 s_uGetTxRsvTime(struct vnt_private *priv, u8 pkt_type,
{
u32 data_time, ack_time;

- data_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
+ data_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
frame_length, rate);

if (pkt_type == PK_TYPE_11B)
- ack_time = BBuGetFrameTime(priv->byPreambleType, pkt_type, 14,
- (u16)priv->byTopCCKBasicRate);
+ ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
+ 14, (u16)priv->byTopCCKBasicRate);
else
- ack_time = BBuGetFrameTime(priv->byPreambleType, pkt_type, 14,
- (u16)priv->byTopOFDMBasicRate);
+ ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
+ 14, (u16)priv->byTopOFDMBasicRate);

if (need_ack)
return data_time + priv->uSIFS + ack_time;
@@ -375,30 +375,30 @@ static __le16 s_uGetRTSCTSRsvTime(struct vnt_private *priv,

rrv_time = rts_time = cts_time = ack_time = data_time = 0;

- data_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
+ data_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
frame_length, current_rate);

if (rsv_type == 0) {
- rts_time = BBuGetFrameTime(priv->byPreambleType,
+ rts_time = vnt_get_frame_time(priv->byPreambleType,
pkt_type, 20, priv->byTopCCKBasicRate);
- cts_time = ack_time = BBuGetFrameTime(priv->byPreambleType,
+ cts_time = ack_time = vnt_get_frame_time(priv->byPreambleType,
pkt_type, 14, priv->byTopCCKBasicRate);
} else if (rsv_type == 1) {
- rts_time = BBuGetFrameTime(priv->byPreambleType,
+ rts_time = vnt_get_frame_time(priv->byPreambleType,
pkt_type, 20, priv->byTopCCKBasicRate);
- cts_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
+ cts_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
14, priv->byTopCCKBasicRate);
- ack_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
+ ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
14, priv->byTopOFDMBasicRate);
} else if (rsv_type == 2) {
- rts_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
+ rts_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
20, priv->byTopOFDMBasicRate);
- cts_time = ack_time = BBuGetFrameTime(priv->byPreambleType,
+ cts_time = ack_time = vnt_get_frame_time(priv->byPreambleType,
pkt_type, 14, priv->byTopOFDMBasicRate);
} else if (rsv_type == 3) {
- cts_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
+ cts_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
14, priv->byTopCCKBasicRate);
- ack_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
+ ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
14, priv->byTopOFDMBasicRate);

rrv_time = cts_time + ack_time + data_time + 2 * priv->uSIFS;
@@ -419,10 +419,10 @@ static __le16 s_uGetDataDuration(struct vnt_private *pDevice,

if (bNeedAck) {
if (byPktType == PK_TYPE_11B)
- uAckTime = BBuGetFrameTime(pDevice->byPreambleType,
+ uAckTime = vnt_get_frame_time(pDevice->byPreambleType,
byPktType, 14, pDevice->byTopCCKBasicRate);
else
- uAckTime = BBuGetFrameTime(pDevice->byPreambleType,
+ uAckTime = vnt_get_frame_time(pDevice->byPreambleType,
byPktType, 14, pDevice->byTopOFDMBasicRate);
return cpu_to_le16((u16)(pDevice->uSIFS + uAckTime));
}
@@ -442,8 +442,8 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice, u8 byDurType,
case RTSDUR_BA:
case RTSDUR_BA_F0:
case RTSDUR_BA_F1:
- uCTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType,
- 14, pDevice->byTopCCKBasicRate);
+ uCTSTime = vnt_get_frame_time(pDevice->byPreambleType,
+ byPktType, 14, pDevice->byTopCCKBasicRate);
uDurTime = uCTSTime + 2 * pDevice->uSIFS +
s_uGetTxRsvTime(pDevice, byPktType,
cbFrameLength, wRate, bNeedAck);
@@ -452,8 +452,8 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice, u8 byDurType,
case RTSDUR_AA:
case RTSDUR_AA_F0:
case RTSDUR_AA_F1:
- uCTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType,
- 14, pDevice->byTopOFDMBasicRate);
+ uCTSTime = vnt_get_frame_time(pDevice->byPreambleType,
+ byPktType, 14, pDevice->byTopOFDMBasicRate);
uDurTime = uCTSTime + 2 * pDevice->uSIFS +
s_uGetTxRsvTime(pDevice, byPktType,
cbFrameLength, wRate, bNeedAck);
--
1.9.1


2014-06-04 17:26:40

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 10/15] staging: vt6656: firmware.c replace DBG_PRT debug messages

Replace with dev_dbg

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/firmware.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/vt6656/firmware.c b/drivers/staging/vt6656/firmware.c
index a74a42d..83680bc 100644
--- a/drivers/staging/vt6656/firmware.c
+++ b/drivers/staging/vt6656/firmware.c
@@ -35,9 +35,6 @@
#include "firmware.h"
#include "usbpipe.h"

-static int msglevel = MSG_LEVEL_INFO;
-/* static int msglevel = MSG_LEVEL_DEBUG; */
-
#define FIRMWARE_VERSION 0x133 /* version 1.51 */
#define FIRMWARE_NAME "vntwusb.fw"

@@ -53,7 +50,7 @@ int FIRMWAREbDownload(struct vnt_private *priv)
u16 length;
int ii, rc;

- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Download firmware\n");
+ dev_dbg(dev, "---->Download firmware\n");

rc = request_firmware(&fw, FIRMWARE_NAME, dev);
if (rc) {
@@ -77,8 +74,8 @@ int FIRMWAREbDownload(struct vnt_private *priv)
length,
buffer);

- DBG_PRT(MSG_LEVEL_DEBUG,
- KERN_INFO"Download firmware...%d %zu\n", ii, fw->size);
+ dev_dbg(dev, "Download firmware...%d %zu\n", ii, fw->size);
+
if (status != STATUS_SUCCESS)
goto free_fw;
}
@@ -98,7 +95,7 @@ int FIRMWAREbBrach2Sram(struct vnt_private *priv)
{
int status;

- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Branch to Sram\n");
+ dev_dbg(&priv->usb->dev, "---->Branch to Sram\n");

status = vnt_control_out(priv,
1,
@@ -123,18 +120,21 @@ int FIRMWAREbCheckVersion(struct vnt_private *priv)
2,
(u8 *) &(priv->wFirmwareVersion));

- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n",
+ dev_dbg(&priv->usb->dev, "Firmware Version [%04x]\n",
priv->wFirmwareVersion);
+
if (status != STATUS_SUCCESS) {
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Invalid.\n");
+ dev_dbg(&priv->usb->dev, "Firmware Invalid.\n");
return false;
}
if (priv->wFirmwareVersion == 0xFFFF) {
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"In Loader.\n");
+ dev_dbg(&priv->usb->dev, "In Loader.\n");
return false;
}
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n",
+
+ dev_dbg(&priv->usb->dev, "Firmware Version [%04x]\n",
priv->wFirmwareVersion);
+
if (priv->wFirmwareVersion < FIRMWARE_VERSION) {
/* branch to loader for download new firmware */
FIRMWAREbBrach2Sram(priv);
--
1.9.1


2014-06-04 17:26:31

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 05/15] staging: vt6656: rename PSvDisablePowerSaving to vnt_disable_power_saving

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

diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index 73b7794..3e144ed 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -1323,7 +1323,7 @@ int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info,

if (wrq->disabled) {
pDevice->ePSMode = WMAC_POWER_CAM;
- PSvDisablePowerSaving(pDevice);
+ vnt_disable_power_saving(pDevice);
return rc;
}
if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c
index ae136b2..e5462ed 100644
--- a/drivers/staging/vt6656/power.c
+++ b/drivers/staging/vt6656/power.c
@@ -125,7 +125,7 @@ void vnt_enable_power_saving(struct vnt_private *priv, u16 listen_interval)
*
*/

-void PSvDisablePowerSaving(struct vnt_private *priv)
+void vnt_disable_power_saving(struct vnt_private *priv)
{

/* disable power saving hw function */
diff --git a/drivers/staging/vt6656/power.h b/drivers/staging/vt6656/power.h
index 0642f18..ef669b7 100644
--- a/drivers/staging/vt6656/power.h
+++ b/drivers/staging/vt6656/power.h
@@ -38,7 +38,7 @@

int PSbConsiderPowerDown(struct vnt_private *, int bCheckRxDMA,
int bCheckCountToWakeUp);
-void PSvDisablePowerSaving(struct vnt_private *);
+void vnt_disable_power_saving(struct vnt_private *);
void vnt_enable_power_saving(struct vnt_private *, u16);
void PSvSendPSPOLL(struct vnt_private *);
int PSbSendNullPacket(struct vnt_private *);
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index 55c5563..b2d7865 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -480,7 +480,7 @@ void vRunCommand(struct work_struct *work)
// set initial state
pMgmt->eCurrState = WMAC_STATE_IDLE;
pMgmt->eCurrMode = WMAC_MODE_STANDBY;
- PSvDisablePowerSaving((void *) pDevice);
+ vnt_disable_power_saving(pDevice);
BSSvClearNodeDBTable(pDevice, 0);
vMgrJoinBSSBegin((void *) pDevice, &Status);
// if Infra mode
--
1.9.1