Number of rcb
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 2 +-
drivers/staging/vt6656/main_usb.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index ffcbaca..6b8c97f 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -289,7 +289,7 @@ struct vnt_private {
/* Variables to track resources for the BULK In Pipe */
struct vnt_rcb *rcb[CB_MAX_RX_DESC];
- u32 cbRD;
+ u32 num_rcb;
/* Variables to track resources for the BULK Out Pipe */
struct vnt_usb_send_context *tx_context[CB_MAX_TX_DESC];
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 0802ecd..a612b15 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -114,9 +114,9 @@ static void device_set_options(struct vnt_private *priv)
/* Set number of RX buffers */
if (vnt_rx_buffers < CB_MIN_RX_DESC || vnt_rx_buffers > CB_MAX_RX_DESC)
- priv->cbRD = RX_DESC_DEF0;
+ priv->num_rcb = RX_DESC_DEF0;
else
- priv->cbRD = vnt_rx_buffers;
+ priv->num_rcb = vnt_rx_buffers;
priv->byShortRetryLimit = SHORT_RETRY_DEF;
priv->byLongRetryLimit = LONG_RETRY_DEF;
@@ -407,7 +407,7 @@ static void device_free_rx_bufs(struct vnt_private *priv)
struct vnt_rcb *rcb;
int ii;
- for (ii = 0; ii < priv->cbRD; ii++) {
+ for (ii = 0; ii < priv->num_rcb; ii++) {
rcb = priv->rcb[ii];
if (!rcb)
continue;
@@ -475,7 +475,7 @@ static bool device_alloc_bufs(struct vnt_private *priv)
tx_context->in_use = false;
}
- for (ii = 0; ii < priv->cbRD; ii++) {
+ for (ii = 0; ii < priv->num_rcb; ii++) {
priv->rcb[ii] = kzalloc(sizeof(struct vnt_rcb), GFP_KERNEL);
if (!priv->rcb[ii]) {
dev_err(&priv->usb->dev,
--
2.0.1
dwTxAntennaSel is always the same as dwRxAntennaSel
byAntennaCount is never used.
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 2 --
drivers/staging/vt6656/main_usb.c | 4 ----
2 files changed, 6 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 7c81105..ecf8da0 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -319,8 +319,6 @@ struct vnt_private {
/* Antenna Diversity */
int bTxRxAntInv;
u32 dwRxAntennaSel;
- u32 dwTxAntennaSel;
- u8 byAntennaCount;
u8 byRxAntennaMode;
u8 byTxAntennaMode;
u8 byRadioCtl;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index c0951bf..4ca6639 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -249,9 +249,7 @@ static int device_init_registers(struct vnt_private *priv)
antenna = (EEP_ANTENNA_AUX | EEP_ANTENNA_MAIN);
if (antenna == (EEP_ANTENNA_AUX | EEP_ANTENNA_MAIN)) {
- priv->byAntennaCount = 2;
priv->byTxAntennaMode = ANT_B;
- priv->dwTxAntennaSel = 1;
priv->dwRxAntennaSel = 1;
if (priv->bTxRxAntInv == true)
@@ -259,8 +257,6 @@ static int device_init_registers(struct vnt_private *priv)
else
priv->byRxAntennaMode = ANT_B;
} else {
- priv->byAntennaCount = 1;
- priv->dwTxAntennaSel = 0;
priv->dwRxAntennaSel = 0;
if (antenna & EEP_ANTENNA_AUX) {
--
2.0.1
Always needed as u8 type.
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 2 +-
drivers/staging/vt6656/main_usb.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 0c18e26..9f1216d 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -309,7 +309,7 @@ struct vnt_private {
u8 current_net_addr[ETH_ALEN];
u8 permanent_net_addr[ETH_ALEN];
- int bExistSWNetAddr;
+ u8 exist_sw_net_addr;
u64 qwCurrTSF;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 0bf207c..9aaa816 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -125,7 +125,7 @@ static void device_set_options(struct vnt_private *priv)
priv->byPacketType = priv->byBBType;
priv->byAutoFBCtrl = AUTO_FB_0;
priv->byPreambleType = 0;
- priv->bExistSWNetAddr = false;
+ priv->exist_sw_net_addr = false;
}
/*
@@ -163,7 +163,7 @@ static int device_init_registers(struct vnt_private *priv)
}
init_cmd->init_class = DEVICE_INIT_COLD;
- init_cmd->exist_sw_net_addr = (u8) priv->bExistSWNetAddr;
+ init_cmd->exist_sw_net_addr = priv->exist_sw_net_addr;
for (ii = 0; ii < 6; ii++)
init_cmd->sw_net_addr[ii] = priv->current_net_addr[ii];
init_cmd->short_retry_limit = priv->byShortRetryLimit;
--
2.0.1
Removing camel case
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 2 +-
drivers/staging/vt6656/firmware.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 416a55d..b9f4841 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -299,7 +299,7 @@ struct vnt_private {
struct vnt_interrupt_buffer int_buf;
/* Version control */
- u16 wFirmwareVersion;
+ u16 firmware_version;
u8 byLocalID;
u8 byRFType;
u8 byBBRxConf;
diff --git a/drivers/staging/vt6656/firmware.c b/drivers/staging/vt6656/firmware.c
index f2250ee..eae4f32d 100644
--- a/drivers/staging/vt6656/firmware.c
+++ b/drivers/staging/vt6656/firmware.c
@@ -118,24 +118,24 @@ int vnt_check_firmware_version(struct vnt_private *priv)
0,
MESSAGE_REQUEST_VERSION,
2,
- (u8 *) &(priv->wFirmwareVersion));
+ (u8 *)&priv->firmware_version);
dev_dbg(&priv->usb->dev, "Firmware Version [%04x]\n",
- priv->wFirmwareVersion);
+ priv->firmware_version);
if (status != STATUS_SUCCESS) {
dev_dbg(&priv->usb->dev, "Firmware Invalid.\n");
return false;
}
- if (priv->wFirmwareVersion == 0xFFFF) {
+ if (priv->firmware_version == 0xFFFF) {
dev_dbg(&priv->usb->dev, "In Loader.\n");
return false;
}
dev_dbg(&priv->usb->dev, "Firmware Version [%04x]\n",
- priv->wFirmwareVersion);
+ priv->firmware_version);
- if (priv->wFirmwareVersion < FIRMWARE_VERSION) {
+ if (priv->firmware_version < FIRMWARE_VERSION) {
/* branch to loader for download new firmware */
vnt_firmware_branch_to_sram(priv);
return false;
--
2.0.1
Although set these variables are not used.
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/card.c | 10 ++--------
drivers/staging/vt6656/device.h | 2 --
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 8820871..f3fd7d6 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -369,13 +369,11 @@ void vnt_update_ifs(struct vnt_private *priv)
priv->uSlot = C_SLOT_SHORT;
priv->uSIFS = C_SIFS_A;
priv->uDIFS = C_SIFS_A + 2 * C_SLOT_SHORT;
- priv->uCwMin = C_CWMIN_A;
max_min = 4;
} else if (priv->byPacketType == PK_TYPE_11B) {
priv->uSlot = C_SLOT_LONG;
priv->uSIFS = C_SIFS_BG;
priv->uDIFS = C_SIFS_BG + 2 * C_SLOT_LONG;
- priv->uCwMin = C_CWMIN_B;
max_min = 5;
} else {/* PK_TYPE_11GA & PK_TYPE_11GB */
bool ofdm_rate = false;
@@ -397,16 +395,12 @@ void vnt_update_ifs(struct vnt_private *priv)
}
}
- if (ofdm_rate == true) {
- priv->uCwMin = C_CWMIN_A;
+ if (ofdm_rate == true)
max_min = 4;
- } else {
- priv->uCwMin = C_CWMIN_B;
+ else
max_min = 5;
- }
}
- priv->uCwMax = C_CWMAX;
priv->uEIFS = C_EIFS;
switch (priv->rf_type) {
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index c4e83b5..f67173b 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -328,8 +328,6 @@ struct vnt_private {
u32 uDIFS; /* Current DIFS */
u32 uEIFS; /* Current EIFS */
u32 uSlot; /* Current SlotTime */
- u32 uCwMin; /* Current CwMin */
- u32 uCwMax; /* CwMax is fixed on 1023 */
/* Rate */
u8 byBBType; /* 0: 11A, 1:11B, 2:11G */
--
2.0.1
number of tx_context
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 2 +-
drivers/staging/vt6656/int.c | 2 +-
drivers/staging/vt6656/main_usb.c | 8 ++++----
drivers/staging/vt6656/rxtx.c | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 6b8c97f..416a55d 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -293,7 +293,7 @@ struct vnt_private {
/* Variables to track resources for the BULK Out Pipe */
struct vnt_usb_send_context *tx_context[CB_MAX_TX_DESC];
- u32 cbTD;
+ u32 num_tx_context;
/* Variables to track resources for the Interrupt In Pipe */
struct vnt_interrupt_buffer int_buf;
diff --git a/drivers/staging/vt6656/int.c b/drivers/staging/vt6656/int.c
index e404d9e..1ea2433 100644
--- a/drivers/staging/vt6656/int.c
+++ b/drivers/staging/vt6656/int.c
@@ -75,7 +75,7 @@ static int vnt_int_report_rate(struct vnt_private *priv, u8 pkt_no, u8 tsr)
u8 tx_retry = (tsr & 0xf0) >> 4;
s8 idx;
- if (pkt_no >= priv->cbTD)
+ if (pkt_no >= priv->num_tx_context)
return -EINVAL;
context = priv->tx_context[pkt_no];
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index a612b15..ba2467c 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -108,9 +108,9 @@ static void device_set_options(struct vnt_private *priv)
{
/* Set number of TX buffers */
if (vnt_tx_buffers < CB_MIN_TX_DESC || vnt_tx_buffers > CB_MAX_TX_DESC)
- priv->cbTD = TX_DESC_DEF0;
+ priv->num_tx_context = TX_DESC_DEF0;
else
- priv->cbTD = vnt_tx_buffers;
+ priv->num_tx_context = vnt_tx_buffers;
/* Set number of RX buffers */
if (vnt_rx_buffers < CB_MIN_RX_DESC || vnt_rx_buffers > CB_MAX_RX_DESC)
@@ -388,7 +388,7 @@ static void device_free_tx_bufs(struct vnt_private *priv)
struct vnt_usb_send_context *tx_context;
int ii;
- for (ii = 0; ii < priv->cbTD; ii++) {
+ for (ii = 0; ii < priv->num_tx_context; ii++) {
tx_context = priv->tx_context[ii];
/* deallocate URBs */
if (tx_context->urb) {
@@ -452,7 +452,7 @@ static bool device_alloc_bufs(struct vnt_private *priv)
struct vnt_rcb *rcb;
int ii;
- for (ii = 0; ii < priv->cbTD; ii++) {
+ for (ii = 0; ii < priv->num_tx_context; ii++) {
tx_context = kmalloc(sizeof(struct vnt_usb_send_context),
GFP_KERNEL);
if (tx_context == NULL) {
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index f3bbfba..c4b9ca2 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -81,7 +81,7 @@ static struct vnt_usb_send_context
dev_dbg(&priv->usb->dev, "%s\n", __func__);
- for (ii = 0; ii < priv->cbTD; ii++) {
+ for (ii = 0; ii < priv->num_tx_context; ii++) {
if (!priv->tx_context[ii])
return NULL;
@@ -97,7 +97,7 @@ static struct vnt_usb_send_context
}
}
- if (ii == priv->cbTD)
+ if (ii == priv->num_tx_context)
dev_dbg(&priv->usb->dev, "%s No Free Tx Context\n", __func__);
return NULL;
--
2.0.1
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/card.c | 4 ++--
drivers/staging/vt6656/device.h | 2 +-
drivers/staging/vt6656/int.c | 2 +-
drivers/staging/vt6656/main_usb.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 3b49ee9..8820871 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -583,7 +583,7 @@ void vnt_adjust_tsf(struct vnt_private *priv, u8 rx_rate,
bool vnt_get_current_tsf(struct vnt_private *priv, u64 *current_tsf)
{
- *current_tsf = priv->qwCurrTSF;
+ *current_tsf = priv->current_tsf;
return true;
}
@@ -604,7 +604,7 @@ bool vnt_clear_current_tsf(struct vnt_private *priv)
vnt_mac_reg_bits_on(priv, MAC_REG_TFTCTL, TFTCTL_TSFCNTRST);
- priv->qwCurrTSF = 0;
+ priv->current_tsf = 0;
return true;
}
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 9f1216d..7697a73 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -311,7 +311,7 @@ struct vnt_private {
u8 exist_sw_net_addr;
- u64 qwCurrTSF;
+ u64 current_tsf;
/* 802.11 MAC specific */
u32 uCurrRSSI;
diff --git a/drivers/staging/vt6656/int.c b/drivers/staging/vt6656/int.c
index 1ea2433..9c5fefc 100644
--- a/drivers/staging/vt6656/int.c
+++ b/drivers/staging/vt6656/int.c
@@ -162,7 +162,7 @@ void vnt_int_process_data(struct vnt_private *priv)
}
#endif
}
- priv->qwCurrTSF = le64_to_cpu(int_data->tsf);
+ priv->current_tsf = le64_to_cpu(int_data->tsf);
low_stats->dot11RTSSuccessCount += int_data->rts_success;
low_stats->dot11RTSFailureCount += int_data->rts_fail;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 9aaa816..c0951bf 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -924,7 +924,7 @@ static u64 vnt_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{
struct vnt_private *priv = hw->priv;
- return priv->qwCurrTSF;
+ return priv->current_tsf;
}
static void vnt_set_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
--
2.0.1
Zone types are nolonger handled by driver.
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/baseband.c | 4 ----
drivers/staging/vt6656/device.h | 2 --
2 files changed, 6 deletions(-)
diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index 71226c7..6af9fcb 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -394,12 +394,8 @@ int vnt_vt3184_init(struct vnt_private *priv)
if (status != STATUS_SUCCESS)
return false;
- priv->byZoneType = priv->abyEEPROM[EEP_OFS_ZONETYPE];
-
priv->rf_type = priv->abyEEPROM[EEP_OFS_RFTYPE];
- dev_dbg(&priv->usb->dev, "Zone Type %x\n", priv->byZoneType);
-
dev_dbg(&priv->usb->dev, "RF Type %d\n", priv->rf_type);
if ((priv->rf_type == RF_AL2230) ||
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 3152f93..183d9c9 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -304,8 +304,6 @@ struct vnt_private {
u8 rf_type;
u8 bb_rx_conf;
- u8 byZoneType;
-
struct vnt_cmd_card_init init_command;
struct vnt_rsp_card_init init_response;
u8 abyCurrentNetAddr[ETH_ALEN];
--
2.0.1
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 2 +-
drivers/staging/vt6656/dpc.c | 2 +-
drivers/staging/vt6656/rf.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 7697a73..7c81105 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -314,7 +314,7 @@ struct vnt_private {
u64 current_tsf;
/* 802.11 MAC specific */
- u32 uCurrRSSI;
+ u32 current_rssi;
/* Antenna Diversity */
int bTxRxAntInv;
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index 5d4c2c1..f8410ce1 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -153,7 +153,7 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb,
vnt_rf_rssi_to_dbm(priv, *rssi, &rx_dbm);
priv->byBBPreEDRSSI = (u8)rx_dbm + 1;
- priv->uCurrRSSI = priv->byBBPreEDRSSI;
+ priv->current_rssi = priv->byBBPreEDRSSI;
frame = skb_data + 8;
diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index c98cf60..3815db9 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -660,7 +660,7 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel)
static u8 vnt_rf_addpower(struct vnt_private *priv)
{
- s32 rssi = -priv->uCurrRSSI;
+ s32 rssi = -priv->current_rssi;
if (!rssi)
return 7;
--
2.0.1
Removing prefix and camel case
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 2 +-
drivers/staging/vt6656/main_usb.c | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 9287948..0c18e26 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -307,7 +307,7 @@ struct vnt_private {
struct vnt_cmd_card_init init_command;
struct vnt_rsp_card_init init_response;
u8 current_net_addr[ETH_ALEN];
- u8 abyPermanentNetAddr[ETH_ALEN];
+ u8 permanent_net_addr[ETH_ALEN];
int bExistSWNetAddr;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index e8e4de5..0bf207c 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -334,9 +334,8 @@ static int device_init_registers(struct vnt_private *priv)
}
/* get permanent network address */
- memcpy(priv->abyPermanentNetAddr, init_rsp->net_addr, 6);
- memcpy(priv->current_net_addr,
- priv->abyPermanentNetAddr, ETH_ALEN);
+ memcpy(priv->permanent_net_addr, init_rsp->net_addr, 6);
+ memcpy(priv->current_net_addr, priv->permanent_net_addr, ETH_ALEN);
/* if exist SW network address, use it */
dev_dbg(&priv->usb->dev, "Network address = %pM\n",
@@ -970,7 +969,7 @@ int vnt_init(struct vnt_private *priv)
if (!(device_init_registers(priv)))
return -EAGAIN;
- SET_IEEE80211_PERM_ADDR(priv->hw, priv->abyPermanentNetAddr);
+ SET_IEEE80211_PERM_ADDR(priv->hw, priv->permanent_net_addr);
vnt_init_bands(priv);
--
2.0.1
Remove camel case
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/baseband.c | 24 ++++++++++++------------
drivers/staging/vt6656/card.c | 12 ++++++------
drivers/staging/vt6656/channel.c | 2 +-
drivers/staging/vt6656/device.h | 2 +-
drivers/staging/vt6656/main_usb.c | 4 ++--
drivers/staging/vt6656/rf.c | 10 +++++-----
6 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index 91c24a3..b08d1ea 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -396,14 +396,14 @@ int vnt_vt3184_init(struct vnt_private *priv)
priv->byZoneType = priv->abyEEPROM[EEP_OFS_ZONETYPE];
- priv->byRFType = priv->abyEEPROM[EEP_OFS_RFTYPE];
+ priv->rf_type = priv->abyEEPROM[EEP_OFS_RFTYPE];
dev_dbg(&priv->usb->dev, "Zone Type %x\n", priv->byZoneType);
- dev_dbg(&priv->usb->dev, "RF Type %d\n", priv->byRFType);
+ dev_dbg(&priv->usb->dev, "RF Type %d\n", priv->rf_type);
- if ((priv->byRFType == RF_AL2230) ||
- (priv->byRFType == RF_AL2230S)) {
+ if ((priv->rf_type == RF_AL2230) ||
+ (priv->rf_type == RF_AL2230S)) {
priv->byBBRxConf = vnt_vt3184_al2230[10];
length = sizeof(vnt_vt3184_al2230);
addr = vnt_vt3184_al2230;
@@ -418,7 +418,7 @@ int vnt_vt3184_init(struct vnt_private *priv)
priv->ldBmThreshold[1] = -48;
priv->ldBmThreshold[2] = 0;
priv->ldBmThreshold[3] = 0;
- } else if (priv->byRFType == RF_AIROHA7230) {
+ } else if (priv->rf_type == RF_AIROHA7230) {
priv->byBBRxConf = vnt_vt3184_al2230[10];
length = sizeof(vnt_vt3184_al2230);
addr = vnt_vt3184_al2230;
@@ -435,8 +435,8 @@ int vnt_vt3184_init(struct vnt_private *priv)
priv->ldBmThreshold[1] = -48;
priv->ldBmThreshold[2] = 0;
priv->ldBmThreshold[3] = 0;
- } else if ((priv->byRFType == RF_VT3226) ||
- (priv->byRFType == RF_VT3226D0)) {
+ } else if ((priv->rf_type == RF_VT3226) ||
+ (priv->rf_type == RF_VT3226D0)) {
priv->byBBRxConf = vnt_vt3184_vt3226d0[10];
length = sizeof(vnt_vt3184_vt3226d0);
addr = vnt_vt3184_vt3226d0;
@@ -454,7 +454,7 @@ int vnt_vt3184_init(struct vnt_private *priv)
/* Fix VT3226 DFC system timing issue */
vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2,
SOFTPWRCTL_RFLEOPT);
- } else if (priv->byRFType == RF_VT3342A0) {
+ } else if (priv->rf_type == RF_VT3342A0) {
priv->byBBRxConf = vnt_vt3184_vt3226d0[10];
length = sizeof(vnt_vt3184_vt3226d0);
addr = vnt_vt3184_vt3226d0;
@@ -486,12 +486,12 @@ int vnt_vt3184_init(struct vnt_private *priv)
vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
MESSAGE_REQUEST_BBAGC, length_agc, array);
- if ((priv->byRFType == RF_VT3226) ||
- (priv->byRFType == RF_VT3342A0)) {
+ if ((priv->rf_type == RF_VT3226) ||
+ (priv->rf_type == RF_VT3342A0)) {
vnt_control_out_u8(priv, MESSAGE_REQUEST_MACREG,
MAC_REG_ITRTMSET, 0x23);
vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, 0x01);
- } else if (priv->byRFType == RF_VT3226D0) {
+ } else if (priv->rf_type == RF_VT3226D0) {
vnt_control_out_u8(priv, MESSAGE_REQUEST_MACREG,
MAC_REG_ITRTMSET, 0x11);
vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, 0x01);
@@ -586,7 +586,7 @@ void vnt_update_pre_ed_threshold(struct vnt_private *priv, int scanning)
u8 cr_201 = 0x0, cr_206 = 0x0;
u8 ed_inx = priv->byBBPreEDIndex;
- switch (priv->byRFType) {
+ switch (priv->rf_type) {
case RF_AL2230:
case RF_AL2230S:
case RF_AIROHA7230:
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 19a7931..3b49ee9 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -409,7 +409,7 @@ void vnt_update_ifs(struct vnt_private *priv)
priv->uCwMax = C_CWMAX;
priv->uEIFS = C_EIFS;
- switch (priv->byRFType) {
+ switch (priv->rf_type) {
case RF_VT3226D0:
if (priv->byBBType != BB_TYPE_11B) {
priv->uSIFS -= 1;
@@ -734,7 +734,7 @@ int vnt_radio_power_off(struct vnt_private *priv)
{
int ret = true;
- switch (priv->byRFType) {
+ switch (priv->rf_type) {
case RF_AL2230:
case RF_AL2230S:
case RF_AIROHA7230:
@@ -775,7 +775,7 @@ int vnt_radio_power_on(struct vnt_private *priv)
vnt_mac_reg_bits_on(priv, MAC_REG_HOSTCR, HOSTCR_RXON);
- switch (priv->byRFType) {
+ switch (priv->rf_type) {
case RF_AL2230:
case RF_AL2230S:
case RF_AIROHA7230:
@@ -794,7 +794,7 @@ int vnt_radio_power_on(struct vnt_private *priv)
void vnt_set_bss_mode(struct vnt_private *priv)
{
- if (priv->byRFType == RF_AIROHA7230 && priv->byBBType == BB_TYPE_11A)
+ if (priv->rf_type == RF_AIROHA7230 && priv->byBBType == BB_TYPE_11A)
vnt_mac_set_bb_type(priv, BB_TYPE_11G);
else
vnt_mac_set_bb_type(priv, priv->byBBType);
@@ -812,7 +812,7 @@ void vnt_set_bss_mode(struct vnt_private *priv)
vnt_set_rspinf(priv, (u8)priv->byBBType);
if (priv->byBBType == BB_TYPE_11A) {
- if (priv->byRFType == RF_AIROHA7230) {
+ if (priv->rf_type == RF_AIROHA7230) {
priv->abyBBVGA[0] = 0x20;
vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG,
@@ -822,7 +822,7 @@ void vnt_set_bss_mode(struct vnt_private *priv)
priv->abyBBVGA[2] = 0x10;
priv->abyBBVGA[3] = 0x10;
} else {
- if (priv->byRFType == RF_AIROHA7230) {
+ if (priv->rf_type == RF_AIROHA7230) {
priv->abyBBVGA[0] = 0x1c;
vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG,
diff --git a/drivers/staging/vt6656/channel.c b/drivers/staging/vt6656/channel.c
index 4a53f1a..8412d05 100644
--- a/drivers/staging/vt6656/channel.c
+++ b/drivers/staging/vt6656/channel.c
@@ -146,7 +146,7 @@ void vnt_init_bands(struct vnt_private *priv)
struct ieee80211_channel *ch;
int i;
- switch (priv->byRFType) {
+ switch (priv->rf_type) {
case RF_AIROHA7230:
case RF_VT3342A0:
default:
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index c1d0551..8b5793b 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -301,7 +301,7 @@ struct vnt_private {
/* Version control */
u16 firmware_version;
u8 local_id;
- u8 byRFType;
+ u8 rf_type;
u8 byBBRxConf;
u8 byZoneType;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 9974bab..c8b4914 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -290,10 +290,10 @@ static int device_init_registers(struct vnt_private *priv)
priv->byBBType = BB_TYPE_11G;
/* get RFType */
- priv->byRFType = init_rsp->rf_type;
+ priv->rf_type = init_rsp->rf_type;
/* load vt3266 calibration parameters in EEPROM */
- if (priv->byRFType == RF_VT3226D0) {
+ if (priv->rf_type == RF_VT3226D0) {
if ((priv->abyEEPROM[EEP_OFS_MAJOR_VER] == 0x1) &&
(priv->abyEEPROM[EEP_OFS_MINOR_VER] >= 0x4)) {
diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 28e64b4..c98cf60 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -665,7 +665,7 @@ static u8 vnt_rf_addpower(struct vnt_private *priv)
if (!rssi)
return 7;
- if (priv->byRFType == RF_VT3226D0) {
+ if (priv->rf_type == RF_VT3226D0) {
if (rssi < -70)
return 9;
else if (rssi < -65)
@@ -699,7 +699,7 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, u32 rate)
priv->byCurPwr = power;
- switch (priv->byRFType) {
+ switch (priv->rf_type) {
case RF_AL2230:
if (power >= AL2230_PWR_IDX_LEN)
return false;
@@ -811,7 +811,7 @@ void vnt_rf_rssi_to_dbm(struct vnt_private *priv, u8 rssi, long *dbm)
long a = 0;
u8 airoharf[4] = {0, 18, 0, 40};
- switch (priv->byRFType) {
+ switch (priv->rf_type) {
case RF_AL2230:
case RF_AL2230S:
case RF_AIROHA7230:
@@ -834,7 +834,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
u16 length, value;
u8 array[256];
- switch (priv->byRFType) {
+ switch (priv->rf_type) {
case RF_AL2230:
case RF_AL2230S:
length1 = CB_AL2230_INIT_SEQ * 3;
@@ -920,7 +920,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
addr3 += length;
}
- if (priv->byRFType == RF_AIROHA7230) {
+ if (priv->rf_type == RF_AIROHA7230) {
length1 = CB_AL7230_INIT_SEQ * 3;
length2 = CB_MAX_CHANNEL * 3;
addr1 = &(al7230_init_table_amode[0][0]);
--
2.0.1
Camel case changes
bTxRxAntInv -> tx_rx_ant_inv
dwRxAntennaSel -> rx_antenna_sel
byRxAntennaMode -> rx_antenna_mode
byTxAntennaMode -> tx_antenna_mode
byRadioCtl -> radio_ctl
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 10 +++++-----
drivers/staging/vt6656/main_usb.c | 38 +++++++++++++++++++-------------------
drivers/staging/vt6656/wcmd.c | 12 ++++++------
3 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index ecf8da0..c4e83b5 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -317,11 +317,11 @@ struct vnt_private {
u32 current_rssi;
/* Antenna Diversity */
- int bTxRxAntInv;
- u32 dwRxAntennaSel;
- u8 byRxAntennaMode;
- u8 byTxAntennaMode;
- u8 byRadioCtl;
+ int tx_rx_ant_inv;
+ u32 rx_antenna_sel;
+ u8 rx_antenna_mode;
+ u8 tx_antenna_mode;
+ u8 radio_ctl;
/* IFS & Cw */
u32 uSIFS; /* Current SIFS */
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 4ca6639..1137a19 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -239,9 +239,9 @@ static int device_init_registers(struct vnt_private *priv)
antenna = priv->abyEEPROM[EEP_OFS_ANTENNA];
if (antenna & EEP_ANTINV)
- priv->bTxRxAntInv = true;
+ priv->tx_rx_ant_inv = true;
else
- priv->bTxRxAntInv = false;
+ priv->tx_rx_ant_inv = false;
antenna &= (EEP_ANTENNA_AUX | EEP_ANTENNA_MAIN);
@@ -249,35 +249,35 @@ static int device_init_registers(struct vnt_private *priv)
antenna = (EEP_ANTENNA_AUX | EEP_ANTENNA_MAIN);
if (antenna == (EEP_ANTENNA_AUX | EEP_ANTENNA_MAIN)) {
- priv->byTxAntennaMode = ANT_B;
- priv->dwRxAntennaSel = 1;
+ priv->tx_antenna_mode = ANT_B;
+ priv->rx_antenna_sel = 1;
- if (priv->bTxRxAntInv == true)
- priv->byRxAntennaMode = ANT_A;
+ if (priv->tx_rx_ant_inv == true)
+ priv->rx_antenna_mode = ANT_A;
else
- priv->byRxAntennaMode = ANT_B;
+ priv->rx_antenna_mode = ANT_B;
} else {
- priv->dwRxAntennaSel = 0;
+ priv->rx_antenna_sel = 0;
if (antenna & EEP_ANTENNA_AUX) {
- priv->byTxAntennaMode = ANT_A;
+ priv->tx_antenna_mode = ANT_A;
- if (priv->bTxRxAntInv == true)
- priv->byRxAntennaMode = ANT_B;
+ if (priv->tx_rx_ant_inv == true)
+ priv->rx_antenna_mode = ANT_B;
else
- priv->byRxAntennaMode = ANT_A;
+ priv->rx_antenna_mode = ANT_A;
} else {
- priv->byTxAntennaMode = ANT_B;
+ priv->tx_antenna_mode = ANT_B;
- if (priv->bTxRxAntInv == true)
- priv->byRxAntennaMode = ANT_A;
+ if (priv->tx_rx_ant_inv == true)
+ priv->rx_antenna_mode = ANT_A;
else
- priv->byRxAntennaMode = ANT_B;
+ priv->rx_antenna_mode = ANT_B;
}
}
/* Set initial antenna mode */
- vnt_set_antenna_mode(priv, priv->byRxAntennaMode);
+ vnt_set_antenna_mode(priv, priv->rx_antenna_mode);
/* get Auto Fall Back type */
priv->byAutoFBCtrl = AUTO_FB_0;
@@ -348,9 +348,9 @@ static int device_init_registers(struct vnt_private *priv)
vnt_set_short_slot_time(priv);
- priv->byRadioCtl = priv->abyEEPROM[EEP_OFS_RADIOCTL];
+ priv->radio_ctl = priv->abyEEPROM[EEP_OFS_RADIOCTL];
- if ((priv->byRadioCtl & EEP_RADIOCTL_ENABLE) != 0) {
+ if ((priv->radio_ctl & EEP_RADIOCTL_ENABLE) != 0) {
status = vnt_control_in(priv, MESSAGE_TYPE_READ,
MAC_REG_GPIOCTL1, MESSAGE_REQUEST_MACREG, 1, &tmp);
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index c56b7b3..304f6d6 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -146,17 +146,17 @@ void vnt_run_command(struct work_struct *work)
case WLAN_CMD_CHANGE_ANTENNA_START:
dev_dbg(&priv->usb->dev, "Change from Antenna%d to",
- priv->dwRxAntennaSel);
+ priv->rx_antenna_sel);
- if (priv->dwRxAntennaSel == 0) {
- priv->dwRxAntennaSel = 1;
- if (priv->bTxRxAntInv == true)
+ if (priv->rx_antenna_sel == 0) {
+ priv->rx_antenna_sel = 1;
+ if (priv->tx_rx_ant_inv == true)
vnt_set_antenna_mode(priv, ANT_RXA);
else
vnt_set_antenna_mode(priv, ANT_RXB);
} else {
- priv->dwRxAntennaSel = 0;
- if (priv->bTxRxAntInv == true)
+ priv->rx_antenna_sel = 0;
+ if (priv->tx_rx_ant_inv == true)
vnt_set_antenna_mode(priv, ANT_RXB);
else
vnt_set_antenna_mode(priv, ANT_RXA);
--
2.0.1
Removing prefix and camel case
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 2 +-
drivers/staging/vt6656/main_usb.c | 6 +++---
drivers/staging/vt6656/rxtx.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 183d9c9..9287948 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -306,7 +306,7 @@ struct vnt_private {
struct vnt_cmd_card_init init_command;
struct vnt_rsp_card_init init_response;
- u8 abyCurrentNetAddr[ETH_ALEN];
+ u8 current_net_addr[ETH_ALEN];
u8 abyPermanentNetAddr[ETH_ALEN];
int bExistSWNetAddr;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index c8b4914..e8e4de5 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -165,7 +165,7 @@ static int device_init_registers(struct vnt_private *priv)
init_cmd->init_class = DEVICE_INIT_COLD;
init_cmd->exist_sw_net_addr = (u8) priv->bExistSWNetAddr;
for (ii = 0; ii < 6; ii++)
- init_cmd->sw_net_addr[ii] = priv->abyCurrentNetAddr[ii];
+ init_cmd->sw_net_addr[ii] = priv->current_net_addr[ii];
init_cmd->short_retry_limit = priv->byShortRetryLimit;
init_cmd->long_retry_limit = priv->byLongRetryLimit;
@@ -335,12 +335,12 @@ static int device_init_registers(struct vnt_private *priv)
/* get permanent network address */
memcpy(priv->abyPermanentNetAddr, init_rsp->net_addr, 6);
- memcpy(priv->abyCurrentNetAddr,
+ memcpy(priv->current_net_addr,
priv->abyPermanentNetAddr, ETH_ALEN);
/* if exist SW network address, use it */
dev_dbg(&priv->usb->dev, "Network address = %pM\n",
- priv->abyCurrentNetAddr);
+ priv->current_net_addr);
/*
* set BB and packet type at the same time
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index c4b9ca2..25a87b0 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -517,7 +517,7 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
buf->data.frame_control =
cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS);
- memcpy(buf->data.ra, priv->abyCurrentNetAddr, ETH_ALEN);
+ memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN);
return vnt_rxtx_datahead_g_fb(tx_context, pkt_type,
current_rate, &buf->data_head, frame_len,
@@ -536,7 +536,7 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
buf->data.frame_control =
cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS);
- memcpy(buf->data.ra, priv->abyCurrentNetAddr, ETH_ALEN);
+ memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN);
return vnt_rxtx_datahead_g(tx_context, pkt_type, current_rate,
&buf->data_head, frame_len, need_ack);
--
2.0.1
Remove camel case
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/baseband.c | 28 ++++++++++++++--------------
drivers/staging/vt6656/device.h | 2 +-
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index b08d1ea..71226c7 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -352,11 +352,11 @@ void vnt_set_antenna_mode(struct vnt_private *priv, u8 antenna_mode)
case ANT_TXB:
break;
case ANT_RXA:
- priv->byBBRxConf &= 0xFC;
+ priv->bb_rx_conf &= 0xFC;
break;
case ANT_RXB:
- priv->byBBRxConf &= 0xFE;
- priv->byBBRxConf |= 0x02;
+ priv->bb_rx_conf &= 0xFE;
+ priv->bb_rx_conf |= 0x02;
break;
}
@@ -404,7 +404,7 @@ int vnt_vt3184_init(struct vnt_private *priv)
if ((priv->rf_type == RF_AL2230) ||
(priv->rf_type == RF_AL2230S)) {
- priv->byBBRxConf = vnt_vt3184_al2230[10];
+ priv->bb_rx_conf = vnt_vt3184_al2230[10];
length = sizeof(vnt_vt3184_al2230);
addr = vnt_vt3184_al2230;
agc = vnt_vt3184_agc;
@@ -419,7 +419,7 @@ int vnt_vt3184_init(struct vnt_private *priv)
priv->ldBmThreshold[2] = 0;
priv->ldBmThreshold[3] = 0;
} else if (priv->rf_type == RF_AIROHA7230) {
- priv->byBBRxConf = vnt_vt3184_al2230[10];
+ priv->bb_rx_conf = vnt_vt3184_al2230[10];
length = sizeof(vnt_vt3184_al2230);
addr = vnt_vt3184_al2230;
agc = vnt_vt3184_agc;
@@ -437,7 +437,7 @@ int vnt_vt3184_init(struct vnt_private *priv)
priv->ldBmThreshold[3] = 0;
} else if ((priv->rf_type == RF_VT3226) ||
(priv->rf_type == RF_VT3226D0)) {
- priv->byBBRxConf = vnt_vt3184_vt3226d0[10];
+ priv->bb_rx_conf = vnt_vt3184_vt3226d0[10];
length = sizeof(vnt_vt3184_vt3226d0);
addr = vnt_vt3184_vt3226d0;
agc = vnt_vt3184_agc;
@@ -455,7 +455,7 @@ int vnt_vt3184_init(struct vnt_private *priv)
vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2,
SOFTPWRCTL_RFLEOPT);
} else if (priv->rf_type == RF_VT3342A0) {
- priv->byBBRxConf = vnt_vt3184_vt3226d0[10];
+ priv->bb_rx_conf = vnt_vt3184_vt3226d0[10];
length = sizeof(vnt_vt3184_vt3226d0);
addr = vnt_vt3184_vt3226d0;
agc = vnt_vt3184_agc;
@@ -531,16 +531,16 @@ void vnt_set_short_slot_time(struct vnt_private *priv)
u8 bb_vga = 0;
if (priv->bShortSlotTime)
- priv->byBBRxConf &= 0xdf;
+ priv->bb_rx_conf &= 0xdf;
else
- priv->byBBRxConf |= 0x20;
+ priv->bb_rx_conf |= 0x20;
vnt_control_in_u8(priv, MESSAGE_REQUEST_BBREG, 0xe7, &bb_vga);
if (bb_vga == priv->abyBBVGA[0])
- priv->byBBRxConf |= 0x20;
+ priv->bb_rx_conf |= 0x20;
- vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, 0x0a, priv->byBBRxConf);
+ vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, 0x0a, priv->bb_rx_conf);
}
void vnt_set_vga_gain_offset(struct vnt_private *priv, u8 data)
@@ -550,11 +550,11 @@ void vnt_set_vga_gain_offset(struct vnt_private *priv, u8 data)
/* patch for 3253B0 Baseband with Cardbus module */
if (priv->bShortSlotTime)
- priv->byBBRxConf &= 0xdf; /* 1101 1111 */
+ priv->bb_rx_conf &= 0xdf; /* 1101 1111 */
else
- priv->byBBRxConf |= 0x20; /* 0010 0000 */
+ priv->bb_rx_conf |= 0x20; /* 0010 0000 */
- vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, 0x0a, priv->byBBRxConf);
+ vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, 0x0a, priv->bb_rx_conf);
}
/*
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 8b5793b..3152f93 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -302,7 +302,7 @@ struct vnt_private {
u16 firmware_version;
u8 local_id;
u8 rf_type;
- u8 byBBRxConf;
+ u8 bb_rx_conf;
u8 byZoneType;
--
2.0.1
Removing camel case
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 2 +-
drivers/staging/vt6656/dpc.c | 2 +-
drivers/staging/vt6656/key.c | 2 +-
drivers/staging/vt6656/main_usb.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index b9f4841..c1d0551 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -300,7 +300,7 @@ struct vnt_private {
/* Version control */
u16 firmware_version;
- u8 byLocalID;
+ u8 local_id;
u8 byRFType;
u8 byBBRxConf;
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index f3da0db..5d4c2c1 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -175,7 +175,7 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb,
rx_status.rate_idx = rate_idx;
if (ieee80211_has_protected(fc)) {
- if (priv->byLocalID > REV_ID_VT3253_A1) {
+ if (priv->local_id > REV_ID_VT3253_A1) {
rx_status.flag |= RX_FLAG_DECRYPTED;
/* Drop packet */
diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c
index b76ee31..22f2961 100644
--- a/drivers/staging/vt6656/key.c
+++ b/drivers/staging/vt6656/key.c
@@ -158,7 +158,7 @@ int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
break;
case WLAN_CIPHER_SUITE_CCMP:
- if (priv->byLocalID <= MAC_REVISION_A1)
+ if (priv->local_id <= MAC_REVISION_A1)
return -EINVAL;
key_dec_mode = KEY_CTL_CCMP;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index ba2467c..9974bab 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -189,7 +189,7 @@ static int device_init_registers(struct vnt_private *priv)
/* local ID for AES functions */
status = vnt_control_in(priv, MESSAGE_TYPE_READ,
MAC_REG_LOCALID, MESSAGE_REQUEST_MACREG, 1,
- &priv->byLocalID);
+ &priv->local_id);
if (status != STATUS_SUCCESS)
return false;
--
2.0.1
Camel case changes
uSIFS -> sifs
uDIFS -> difs
uEIFS -> eifs
uSlot -> slot
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/card.c | 46 ++++++++++++++++++++---------------------
drivers/staging/vt6656/device.h | 8 +++----
drivers/staging/vt6656/rxtx.c | 14 ++++++-------
3 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index f3fd7d6..5ce26fa 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -366,27 +366,27 @@ void vnt_update_ifs(struct vnt_private *priv)
u8 data[4];
if (priv->byPacketType == PK_TYPE_11A) {
- priv->uSlot = C_SLOT_SHORT;
- priv->uSIFS = C_SIFS_A;
- priv->uDIFS = C_SIFS_A + 2 * C_SLOT_SHORT;
+ priv->slot = C_SLOT_SHORT;
+ priv->sifs = C_SIFS_A;
+ priv->difs = C_SIFS_A + 2 * C_SLOT_SHORT;
max_min = 4;
} else if (priv->byPacketType == PK_TYPE_11B) {
- priv->uSlot = C_SLOT_LONG;
- priv->uSIFS = C_SIFS_BG;
- priv->uDIFS = C_SIFS_BG + 2 * C_SLOT_LONG;
+ priv->slot = C_SLOT_LONG;
+ priv->sifs = C_SIFS_BG;
+ priv->difs = C_SIFS_BG + 2 * C_SLOT_LONG;
max_min = 5;
} else {/* PK_TYPE_11GA & PK_TYPE_11GB */
bool ofdm_rate = false;
unsigned int ii = 0;
- priv->uSIFS = C_SIFS_BG;
+ priv->sifs = C_SIFS_BG;
if (priv->bShortSlotTime)
- priv->uSlot = C_SLOT_SHORT;
+ priv->slot = C_SLOT_SHORT;
else
- priv->uSlot = C_SLOT_LONG;
+ priv->slot = C_SLOT_LONG;
- priv->uDIFS = C_SIFS_BG + 2 * priv->uSlot;
+ priv->difs = C_SIFS_BG + 2 * priv->slot;
for (ii = RATE_54M; ii >= RATE_6M; ii--) {
if (priv->wBasicRate & ((u32)(0x1 << ii))) {
@@ -401,13 +401,13 @@ void vnt_update_ifs(struct vnt_private *priv)
max_min = 5;
}
- priv->uEIFS = C_EIFS;
+ priv->eifs = C_EIFS;
switch (priv->rf_type) {
case RF_VT3226D0:
if (priv->byBBType != BB_TYPE_11B) {
- priv->uSIFS -= 1;
- priv->uDIFS -= 1;
+ priv->sifs -= 1;
+ priv->difs -= 1;
break;
}
case RF_AIROHA7230:
@@ -418,25 +418,25 @@ void vnt_update_ifs(struct vnt_private *priv)
case RF_RFMD2959:
case RF_VT3226:
case RF_VT3342A0:
- priv->uSIFS -= 3;
- priv->uDIFS -= 3;
+ priv->sifs -= 3;
+ priv->difs -= 3;
break;
case RF_MAXIM2829:
if (priv->byBBType == BB_TYPE_11A) {
- priv->uSIFS -= 5;
- priv->uDIFS -= 5;
+ priv->sifs -= 5;
+ priv->difs -= 5;
} else {
- priv->uSIFS -= 2;
- priv->uDIFS -= 2;
+ priv->sifs -= 2;
+ priv->difs -= 2;
}
break;
}
- data[0] = (u8)priv->uSIFS;
- data[1] = (u8)priv->uDIFS;
- data[2] = (u8)priv->uEIFS;
- data[3] = (u8)priv->uSlot;
+ data[0] = (u8)priv->sifs;
+ data[1] = (u8)priv->difs;
+ data[2] = (u8)priv->eifs;
+ data[3] = (u8)priv->slot;
vnt_control_out(priv, MESSAGE_TYPE_WRITE, MAC_REG_SIFS,
MESSAGE_REQUEST_MACREG, 4, &data[0]);
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index f67173b..b9753c1 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -324,10 +324,10 @@ struct vnt_private {
u8 radio_ctl;
/* IFS & Cw */
- u32 uSIFS; /* Current SIFS */
- u32 uDIFS; /* Current DIFS */
- u32 uEIFS; /* Current EIFS */
- u32 uSlot; /* Current SlotTime */
+ u32 sifs; /* Current SIFS */
+ u32 difs; /* Current DIFS */
+ u32 eifs; /* Current EIFS */
+ u32 slot; /* Current SlotTime */
/* Rate */
u8 byBBType; /* 0: 11A, 1:11B, 2:11G */
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 25a87b0..aa382e7 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -125,7 +125,7 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type,
14, (u16)priv->byTopOFDMBasicRate);
if (need_ack)
- return data_time + priv->uSIFS + ack_time;
+ return data_time + priv->sifs + ack_time;
return data_time;
}
@@ -170,12 +170,12 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,
ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
14, priv->byTopOFDMBasicRate);
- rrv_time = cts_time + ack_time + data_time + 2 * priv->uSIFS;
+ rrv_time = cts_time + ack_time + data_time + 2 * priv->sifs;
return cpu_to_le16((u16)rrv_time);
}
- rrv_time = rts_time + cts_time + ack_time + data_time + 3 * priv->uSIFS;
+ rrv_time = rts_time + cts_time + ack_time + data_time + 3 * priv->sifs;
return cpu_to_le16((u16)rrv_time);
}
@@ -193,7 +193,7 @@ static __le16 vnt_get_duration_le(struct vnt_private *piv,
ack_time = vnt_get_frame_time(piv->byPreambleType,
pkt_type, 14, piv->byTopOFDMBasicRate);
- return cpu_to_le16((u16)(piv->uSIFS + ack_time));
+ return cpu_to_le16((u16)(piv->sifs + ack_time));
}
return 0;
@@ -211,7 +211,7 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_private *priv, u8 dur_type,
case RTSDUR_BA_F1:
cts_time = vnt_get_frame_time(priv->byPreambleType,
pkt_type, 14, priv->byTopCCKBasicRate);
- dur_time = cts_time + 2 * priv->uSIFS +
+ dur_time = cts_time + 2 * priv->sifs +
vnt_get_rsvtime(priv, pkt_type,
frame_length, rate, need_ack);
break;
@@ -221,7 +221,7 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_private *priv, u8 dur_type,
case RTSDUR_AA_F1:
cts_time = vnt_get_frame_time(priv->byPreambleType,
pkt_type, 14, priv->byTopOFDMBasicRate);
- dur_time = cts_time + 2 * priv->uSIFS +
+ dur_time = cts_time + 2 * priv->sifs +
vnt_get_rsvtime(priv, pkt_type,
frame_length, rate, need_ack);
break;
@@ -229,7 +229,7 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_private *priv, u8 dur_type,
case CTSDUR_BA:
case CTSDUR_BA_F0:
case CTSDUR_BA_F1:
- dur_time = priv->uSIFS + vnt_get_rsvtime(priv,
+ dur_time = priv->sifs + vnt_get_rsvtime(priv,
pkt_type, frame_length, rate, need_ack);
break;
--
2.0.1