2014-07-20 14:34:20

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 01/25] staging: vt6656: struct vnt_private replace byBBType with bb_type

Removing type prefix and camel case.

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

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 5ce26fa..94b933f 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -405,7 +405,7 @@ void vnt_update_ifs(struct vnt_private *priv)

switch (priv->rf_type) {
case RF_VT3226D0:
- if (priv->byBBType != BB_TYPE_11B) {
+ if (priv->bb_type != BB_TYPE_11B) {
priv->sifs -= 1;
priv->difs -= 1;
break;
@@ -413,7 +413,7 @@ void vnt_update_ifs(struct vnt_private *priv)
case RF_AIROHA7230:
case RF_AL2230:
case RF_AL2230S:
- if (priv->byBBType != BB_TYPE_11B)
+ if (priv->bb_type != BB_TYPE_11B)
break;
case RF_RFMD2959:
case RF_VT3226:
@@ -422,7 +422,7 @@ void vnt_update_ifs(struct vnt_private *priv)
priv->difs -= 3;
break;
case RF_MAXIM2829:
- if (priv->byBBType == BB_TYPE_11A) {
+ if (priv->bb_type == BB_TYPE_11A) {
priv->sifs -= 5;
priv->difs -= 5;
} else {
@@ -489,8 +489,8 @@ int vnt_ofdm_min_rate(struct vnt_private *priv)
u8 vnt_get_pkt_type(struct vnt_private *priv)
{

- if (priv->byBBType == BB_TYPE_11A || priv->byBBType == BB_TYPE_11B)
- return (u8)priv->byBBType;
+ if (priv->bb_type == BB_TYPE_11A || priv->bb_type == BB_TYPE_11B)
+ return (u8)priv->bb_type;
else if (vnt_ofdm_min_rate(priv))
return PK_TYPE_11GA;
else
@@ -788,24 +788,24 @@ int vnt_radio_power_on(struct vnt_private *priv)

void vnt_set_bss_mode(struct vnt_private *priv)
{
- if (priv->rf_type == RF_AIROHA7230 && priv->byBBType == BB_TYPE_11A)
+ if (priv->rf_type == RF_AIROHA7230 && priv->bb_type == BB_TYPE_11A)
vnt_mac_set_bb_type(priv, BB_TYPE_11G);
else
- vnt_mac_set_bb_type(priv, priv->byBBType);
+ vnt_mac_set_bb_type(priv, priv->bb_type);

priv->byPacketType = vnt_get_pkt_type(priv);

- if (priv->byBBType == BB_TYPE_11A)
+ if (priv->bb_type == BB_TYPE_11A)
vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, 0x88, 0x03);
- else if (priv->byBBType == BB_TYPE_11B)
+ else if (priv->bb_type == BB_TYPE_11B)
vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, 0x88, 0x02);
- else if (priv->byBBType == BB_TYPE_11G)
+ else if (priv->bb_type == BB_TYPE_11G)
vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, 0x88, 0x08);

vnt_update_ifs(priv);
- vnt_set_rspinf(priv, (u8)priv->byBBType);
+ vnt_set_rspinf(priv, (u8)priv->bb_type);

- if (priv->byBBType == BB_TYPE_11A) {
+ if (priv->bb_type == BB_TYPE_11A) {
if (priv->rf_type == RF_AIROHA7230) {
priv->abyBBVGA[0] = 0x20;

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index b9753c1..7b5779a 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -330,7 +330,7 @@ struct vnt_private {
u32 slot; /* Current SlotTime */

/* Rate */
- u8 byBBType; /* 0: 11A, 1:11B, 2:11G */
+ u8 bb_type; /* 0: 11A, 1:11B, 2:11G */
u8 byPacketType; /* 0:11a 1:11b 2:11gb 3:11ga */
u32 wBasicRate;
u8 byTopOFDMBasicRate;
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index f8410ce1..3bf2782 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -133,7 +133,7 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb,

priv->tsf_time = le64_to_cpu(*tsf_time);

- if (priv->byBBType == BB_TYPE_11G) {
+ if (priv->bb_type == BB_TYPE_11G) {
sq_3 = skb_data + 8 + pay_load_with_padding + 12;
sq = sq_3;
} else {
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 1137a19..5ca28c2 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -121,8 +121,8 @@ static void device_set_options(struct vnt_private *priv)
priv->byShortRetryLimit = SHORT_RETRY_DEF;
priv->byLongRetryLimit = LONG_RETRY_DEF;
priv->op_mode = NL80211_IFTYPE_UNSPECIFIED;
- priv->byBBType = BBP_TYPE_DEF;
- priv->byPacketType = priv->byBBType;
+ priv->bb_type = BBP_TYPE_DEF;
+ priv->byPacketType = priv->bb_type;
priv->byAutoFBCtrl = AUTO_FB_0;
priv->byPreambleType = 0;
priv->exist_sw_net_addr = false;
@@ -283,7 +283,7 @@ static int device_init_registers(struct vnt_private *priv)
priv->byAutoFBCtrl = AUTO_FB_0;

/* default Auto Mode */
- priv->byBBType = BB_TYPE_11G;
+ priv->bb_type = BB_TYPE_11G;

/* get RFType */
priv->rf_type = init_rsp->rf_type;
@@ -341,7 +341,7 @@ static int device_init_registers(struct vnt_private *priv)
* set BB and packet type at the same time
* set Short Slot Time, xIFS, and RSPINF
*/
- if (priv->byBBType == BB_TYPE_11A)
+ if (priv->bb_type == BB_TYPE_11A)
priv->bShortSlotTime = true;
else
priv->bShortSlotTime = false;
@@ -709,15 +709,15 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed)
else
bb_type = BB_TYPE_11G;

- if (priv->byBBType != bb_type) {
- priv->byBBType = bb_type;
+ if (priv->bb_type != bb_type) {
+ priv->bb_type = bb_type;

vnt_set_bss_mode(priv);
}
}

if (changed & IEEE80211_CONF_CHANGE_POWER) {
- if (priv->byBBType == BB_TYPE_11B)
+ if (priv->bb_type == BB_TYPE_11B)
priv->wCurrentRate = RATE_1M;
else
priv->wCurrentRate = RATE_54M;
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index aa382e7..3347a72 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -966,7 +966,7 @@ static int vnt_beacon_xmit(struct vnt_private *priv,
beacon_buffer = (struct vnt_beacon_buffer *)&context->data[0];
short_head = &beacon_buffer->short_head;

- if (priv->byBBType == BB_TYPE_11A) {
+ if (priv->bb_type == BB_TYPE_11A) {
current_rate = RATE_6M;

/* Get SignalField,ServiceField,Length */
--
2.0.1



2014-07-20 14:34:51

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 17/25] staging: vt6656: struct vnt_private replace byBBPreEDRSSI with bb_pre_ed_rssi

Remove type prefix and camel case.

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

diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index dd449a3..e15e842 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -580,69 +580,69 @@ void vnt_update_pre_ed_threshold(struct vnt_private *priv, int scanning)
break;
}

- if (priv->byBBPreEDRSSI <= 45) {
+ if (priv->bb_pre_ed_rssi <= 45) {
ed_inx = 20;
cr_201 = 0xff;
- } else if (priv->byBBPreEDRSSI <= 46) {
+ } else if (priv->bb_pre_ed_rssi <= 46) {
ed_inx = 19;
cr_201 = 0x1a;
- } else if (priv->byBBPreEDRSSI <= 47) {
+ } else if (priv->bb_pre_ed_rssi <= 47) {
ed_inx = 18;
cr_201 = 0x15;
- } else if (priv->byBBPreEDRSSI <= 49) {
+ } else if (priv->bb_pre_ed_rssi <= 49) {
ed_inx = 17;
cr_201 = 0xe;
- } else if (priv->byBBPreEDRSSI <= 51) {
+ } else if (priv->bb_pre_ed_rssi <= 51) {
ed_inx = 16;
cr_201 = 0x9;
- } else if (priv->byBBPreEDRSSI <= 53) {
+ } else if (priv->bb_pre_ed_rssi <= 53) {
ed_inx = 15;
cr_201 = 0x6;
- } else if (priv->byBBPreEDRSSI <= 55) {
+ } else if (priv->bb_pre_ed_rssi <= 55) {
ed_inx = 14;
cr_201 = 0x3;
- } else if (priv->byBBPreEDRSSI <= 56) {
+ } else if (priv->bb_pre_ed_rssi <= 56) {
ed_inx = 13;
cr_201 = 0x2;
cr_206 = 0xa0;
- } else if (priv->byBBPreEDRSSI <= 57) {
+ } else if (priv->bb_pre_ed_rssi <= 57) {
ed_inx = 12;
cr_201 = 0x2;
cr_206 = 0x20;
- } else if (priv->byBBPreEDRSSI <= 58) {
+ } else if (priv->bb_pre_ed_rssi <= 58) {
ed_inx = 11;
cr_201 = 0x1;
cr_206 = 0xa0;
- } else if (priv->byBBPreEDRSSI <= 59) {
+ } else if (priv->bb_pre_ed_rssi <= 59) {
ed_inx = 10;
cr_201 = 0x1;
cr_206 = 0x54;
- } else if (priv->byBBPreEDRSSI <= 60) {
+ } else if (priv->bb_pre_ed_rssi <= 60) {
ed_inx = 9;
cr_201 = 0x1;
cr_206 = 0x18;
- } else if (priv->byBBPreEDRSSI <= 61) {
+ } else if (priv->bb_pre_ed_rssi <= 61) {
ed_inx = 8;
cr_206 = 0xe3;
- } else if (priv->byBBPreEDRSSI <= 62) {
+ } else if (priv->bb_pre_ed_rssi <= 62) {
ed_inx = 7;
cr_206 = 0xb9;
- } else if (priv->byBBPreEDRSSI <= 63) {
+ } else if (priv->bb_pre_ed_rssi <= 63) {
ed_inx = 6;
cr_206 = 0x93;
- } else if (priv->byBBPreEDRSSI <= 64) {
+ } else if (priv->bb_pre_ed_rssi <= 64) {
ed_inx = 5;
cr_206 = 0x79;
- } else if (priv->byBBPreEDRSSI <= 65) {
+ } else if (priv->bb_pre_ed_rssi <= 65) {
ed_inx = 4;
cr_206 = 0x62;
- } else if (priv->byBBPreEDRSSI <= 66) {
+ } else if (priv->bb_pre_ed_rssi <= 66) {
ed_inx = 3;
cr_206 = 0x51;
- } else if (priv->byBBPreEDRSSI <= 67) {
+ } else if (priv->bb_pre_ed_rssi <= 67) {
ed_inx = 2;
cr_206 = 0x43;
- } else if (priv->byBBPreEDRSSI <= 68) {
+ } else if (priv->bb_pre_ed_rssi <= 68) {
ed_inx = 1;
cr_206 = 0x36;
} else {
@@ -659,75 +659,75 @@ void vnt_update_pre_ed_threshold(struct vnt_private *priv, int scanning)
break;
}

- if (priv->byBBPreEDRSSI <= 41) {
+ if (priv->bb_pre_ed_rssi <= 41) {
ed_inx = 22;
cr_201 = 0xff;
- } else if (priv->byBBPreEDRSSI <= 42) {
+ } else if (priv->bb_pre_ed_rssi <= 42) {
ed_inx = 21;
cr_201 = 0x36;
- } else if (priv->byBBPreEDRSSI <= 43) {
+ } else if (priv->bb_pre_ed_rssi <= 43) {
ed_inx = 20;
cr_201 = 0x26;
- } else if (priv->byBBPreEDRSSI <= 45) {
+ } else if (priv->bb_pre_ed_rssi <= 45) {
ed_inx = 19;
cr_201 = 0x18;
- } else if (priv->byBBPreEDRSSI <= 47) {
+ } else if (priv->bb_pre_ed_rssi <= 47) {
ed_inx = 18;
cr_201 = 0x11;
- } else if (priv->byBBPreEDRSSI <= 49) {
+ } else if (priv->bb_pre_ed_rssi <= 49) {
ed_inx = 17;
cr_201 = 0xa;
- } else if (priv->byBBPreEDRSSI <= 51) {
+ } else if (priv->bb_pre_ed_rssi <= 51) {
ed_inx = 16;
cr_201 = 0x7;
- } else if (priv->byBBPreEDRSSI <= 53) {
+ } else if (priv->bb_pre_ed_rssi <= 53) {
ed_inx = 15;
cr_201 = 0x4;
- } else if (priv->byBBPreEDRSSI <= 55) {
+ } else if (priv->bb_pre_ed_rssi <= 55) {
ed_inx = 14;
cr_201 = 0x2;
cr_206 = 0xc0;
- } else if (priv->byBBPreEDRSSI <= 56) {
+ } else if (priv->bb_pre_ed_rssi <= 56) {
ed_inx = 13;
cr_201 = 0x2;
cr_206 = 0x30;
- } else if (priv->byBBPreEDRSSI <= 57) {
+ } else if (priv->bb_pre_ed_rssi <= 57) {
ed_inx = 12;
cr_201 = 0x1;
cr_206 = 0xb0;
- } else if (priv->byBBPreEDRSSI <= 58) {
+ } else if (priv->bb_pre_ed_rssi <= 58) {
ed_inx = 11;
cr_201 = 0x1;
cr_206 = 0x70;
- } else if (priv->byBBPreEDRSSI <= 59) {
+ } else if (priv->bb_pre_ed_rssi <= 59) {
ed_inx = 10;
cr_201 = 0x1;
cr_206 = 0x30;
- } else if (priv->byBBPreEDRSSI <= 60) {
+ } else if (priv->bb_pre_ed_rssi <= 60) {
ed_inx = 9;
cr_206 = 0xea;
- } else if (priv->byBBPreEDRSSI <= 61) {
+ } else if (priv->bb_pre_ed_rssi <= 61) {
ed_inx = 8;
cr_206 = 0xc0;
- } else if (priv->byBBPreEDRSSI <= 62) {
+ } else if (priv->bb_pre_ed_rssi <= 62) {
ed_inx = 7;
cr_206 = 0x9c;
- } else if (priv->byBBPreEDRSSI <= 63) {
+ } else if (priv->bb_pre_ed_rssi <= 63) {
ed_inx = 6;
cr_206 = 0x80;
- } else if (priv->byBBPreEDRSSI <= 64) {
+ } else if (priv->bb_pre_ed_rssi <= 64) {
ed_inx = 5;
cr_206 = 0x68;
- } else if (priv->byBBPreEDRSSI <= 65) {
+ } else if (priv->bb_pre_ed_rssi <= 65) {
ed_inx = 4;
cr_206 = 0x52;
- } else if (priv->byBBPreEDRSSI <= 66) {
+ } else if (priv->bb_pre_ed_rssi <= 66) {
ed_inx = 3;
cr_206 = 0x43;
- } else if (priv->byBBPreEDRSSI <= 67) {
+ } else if (priv->bb_pre_ed_rssi <= 67) {
ed_inx = 2;
cr_206 = 0x36;
- } else if (priv->byBBPreEDRSSI <= 68) {
+ } else if (priv->bb_pre_ed_rssi <= 68) {
ed_inx = 1;
cr_206 = 0x2d;
} else {
@@ -743,69 +743,69 @@ void vnt_update_pre_ed_threshold(struct vnt_private *priv, int scanning)
break;
}

- if (priv->byBBPreEDRSSI <= 41) {
+ if (priv->bb_pre_ed_rssi <= 41) {
ed_inx = 20;
cr_201 = 0xff;
- } else if (priv->byBBPreEDRSSI <= 42) {
+ } else if (priv->bb_pre_ed_rssi <= 42) {
ed_inx = 19;
cr_201 = 0x36;
- } else if (priv->byBBPreEDRSSI <= 43) {
+ } else if (priv->bb_pre_ed_rssi <= 43) {
ed_inx = 18;
cr_201 = 0x26;
- } else if (priv->byBBPreEDRSSI <= 45) {
+ } else if (priv->bb_pre_ed_rssi <= 45) {
ed_inx = 17;
cr_201 = 0x18;
- } else if (priv->byBBPreEDRSSI <= 47) {
+ } else if (priv->bb_pre_ed_rssi <= 47) {
ed_inx = 16;
cr_201 = 0x11;
- } else if (priv->byBBPreEDRSSI <= 49) {
+ } else if (priv->bb_pre_ed_rssi <= 49) {
ed_inx = 15;
cr_201 = 0xa;
- } else if (priv->byBBPreEDRSSI <= 51) {
+ } else if (priv->bb_pre_ed_rssi <= 51) {
ed_inx = 14;
cr_201 = 0x7;
- } else if (priv->byBBPreEDRSSI <= 53) {
+ } else if (priv->bb_pre_ed_rssi <= 53) {
ed_inx = 13;
cr_201 = 0x4;
- } else if (priv->byBBPreEDRSSI <= 55) {
+ } else if (priv->bb_pre_ed_rssi <= 55) {
ed_inx = 12;
cr_201 = 0x2;
cr_206 = 0xc0;
- } else if (priv->byBBPreEDRSSI <= 56) {
+ } else if (priv->bb_pre_ed_rssi <= 56) {
ed_inx = 11;
cr_201 = 0x2;
cr_206 = 0x30;
- } else if (priv->byBBPreEDRSSI <= 57) {
+ } else if (priv->bb_pre_ed_rssi <= 57) {
ed_inx = 10;
cr_201 = 0x1;
cr_206 = 0xb0;
- } else if (priv->byBBPreEDRSSI <= 58) {
+ } else if (priv->bb_pre_ed_rssi <= 58) {
ed_inx = 9;
cr_201 = 0x1;
cr_206 = 0x70;
- } else if (priv->byBBPreEDRSSI <= 59) {
+ } else if (priv->bb_pre_ed_rssi <= 59) {
ed_inx = 8;
cr_201 = 0x1;
cr_206 = 0x30;
- } else if (priv->byBBPreEDRSSI <= 60) {
+ } else if (priv->bb_pre_ed_rssi <= 60) {
ed_inx = 7;
cr_206 = 0xea;
- } else if (priv->byBBPreEDRSSI <= 61) {
+ } else if (priv->bb_pre_ed_rssi <= 61) {
ed_inx = 6;
cr_206 = 0xc0;
- } else if (priv->byBBPreEDRSSI <= 62) {
+ } else if (priv->bb_pre_ed_rssi <= 62) {
ed_inx = 5;
cr_206 = 0x9c;
- } else if (priv->byBBPreEDRSSI <= 63) {
+ } else if (priv->bb_pre_ed_rssi <= 63) {
ed_inx = 4;
cr_206 = 0x80;
- } else if (priv->byBBPreEDRSSI <= 64) {
+ } else if (priv->bb_pre_ed_rssi <= 64) {
ed_inx = 3;
cr_206 = 0x68;
- } else if (priv->byBBPreEDRSSI <= 65) {
+ } else if (priv->bb_pre_ed_rssi <= 65) {
ed_inx = 2;
cr_206 = 0x52;
- } else if (priv->byBBPreEDRSSI <= 66) {
+ } else if (priv->bb_pre_ed_rssi <= 66) {
ed_inx = 1;
cr_206 = 0x43;
} else {
@@ -821,8 +821,8 @@ void vnt_update_pre_ed_threshold(struct vnt_private *priv, int scanning)

priv->byBBPreEDIndex = ed_inx;

- dev_dbg(&priv->usb->dev, "%s byBBPreEDRSSI %d\n",
- __func__, priv->byBBPreEDRSSI);
+ dev_dbg(&priv->usb->dev, "%s bb_pre_ed_rssi %d\n",
+ __func__, priv->bb_pre_ed_rssi);

if (!cr_201 && !cr_206)
return;
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 24ebbd0..e97283b 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -385,7 +385,7 @@ struct vnt_private {
/* For Update BaseBand VGA Gain Offset */
u8 bb_vga[BB_VGA_LEVEL];

- u8 byBBPreEDRSSI;
+ u8 bb_pre_ed_rssi;
u8 byBBPreEDIndex;

/* command timer */
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index 3bf2782..f5fbb5f 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -152,8 +152,8 @@ 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->current_rssi = priv->byBBPreEDRSSI;
+ priv->bb_pre_ed_rssi = (u8)rx_dbm + 1;
+ priv->current_rssi = priv->bb_pre_ed_rssi;

frame = skb_data + 8;

--
2.0.1


2014-07-20 14:35:03

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 24/25] staging; vt6656: rxtx add current_rate into vnt_usb_send_context as tx_rate

Create u8 tx_rate and remove current_rate from function declarations

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 1 +
drivers/staging/vt6656/rxtx.c | 91 ++++++++++++++++++++---------------------
2 files changed, 45 insertions(+), 47 deletions(-)

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index d3c36af..6b7bb8c 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -234,6 +234,7 @@ struct vnt_usb_send_context {
unsigned int buf_len;
u32 frame_len;
u16 tx_hdr_size;
+ u16 tx_rate;
u8 type;
u8 pkt_no;
u8 pkt_type;
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 163bb1a..7c92d1b 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -254,13 +254,14 @@ static u16 vnt_mac_hdr_pos(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context,
- u16 rate, struct vnt_tx_datahead_g *buf)
+ struct vnt_tx_datahead_g *buf)
{

struct vnt_private *priv = tx_context->priv;
struct ieee80211_hdr *hdr =
(struct ieee80211_hdr *)tx_context->skb->data;
u32 frame_len = tx_context->frame_len;
+ u16 rate = tx_context->tx_rate;
u8 need_ack = tx_context->need_ack;

/* Get SignalField,ServiceField,Length */
@@ -291,10 +292,11 @@ static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_datahead_g_fb(struct vnt_usb_send_context *tx_context,
- u16 rate, struct vnt_tx_datahead_g_fb *buf)
+ struct vnt_tx_datahead_g_fb *buf)
{
struct vnt_private *priv = tx_context->priv;
u32 frame_len = tx_context->frame_len;
+ u16 rate = tx_context->tx_rate;
u8 need_ack = tx_context->need_ack;

/* Get SignalField,ServiceField,Length */
@@ -323,9 +325,10 @@ static u16 vnt_rxtx_datahead_g_fb(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_datahead_a_fb(struct vnt_usb_send_context *tx_context,
- u16 rate, struct vnt_tx_datahead_a_fb *buf)
+ struct vnt_tx_datahead_a_fb *buf)
{
struct vnt_private *priv = tx_context->priv;
+ u16 rate = tx_context->tx_rate;
u8 pkt_type = tx_context->pkt_type;
u8 need_ack = tx_context->need_ack;
u32 frame_len = tx_context->frame_len;
@@ -346,12 +349,13 @@ static u16 vnt_rxtx_datahead_a_fb(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_datahead_ab(struct vnt_usb_send_context *tx_context,
- u16 rate, struct vnt_tx_datahead_ab *buf)
+ struct vnt_tx_datahead_ab *buf)
{
struct vnt_private *priv = tx_context->priv;
struct ieee80211_hdr *hdr =
(struct ieee80211_hdr *)tx_context->skb->data;
u32 frame_len = tx_context->frame_len;
+ u16 rate = tx_context->tx_rate;
u8 need_ack = tx_context->need_ack;

/* Get SignalField,ServiceField,Length */
@@ -392,11 +396,12 @@ static int vnt_fill_ieee80211_rts(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_g *buf, u16 current_rate)
+ struct vnt_rts_g *buf)
{
struct vnt_private *priv = tx_context->priv;
u32 frame_len = tx_context->frame_len;
u16 rts_frame_len = 20;
+ u16 current_rate = tx_context->tx_rate;
u8 need_ack = tx_context->need_ack;

vnt_get_phy_field(priv, rts_frame_len, priv->top_cck_basic_rate,
@@ -413,18 +418,18 @@ static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context *tx_context,

vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration_aa);

- return vnt_rxtx_datahead_g(tx_context, current_rate, &buf->data_head);
+ return vnt_rxtx_datahead_g(tx_context, &buf->data_head);
}

static u16 vnt_rxtx_rts_g_fb_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_g_fb *buf, u16 current_rate)
+ struct vnt_rts_g_fb *buf)
{
struct vnt_private *priv = tx_context->priv;
u32 frame_len = tx_context->frame_len;
+ u16 current_rate = tx_context->tx_rate;
u16 rts_frame_len = 20;
u8 need_ack = tx_context->need_ack;

-
vnt_get_phy_field(priv, rts_frame_len, priv->top_cck_basic_rate,
PK_TYPE_11B, &buf->b);
vnt_get_phy_field(priv, rts_frame_len, priv->top_ofdm_basic_rate,
@@ -448,15 +453,15 @@ static u16 vnt_rxtx_rts_g_fb_head(struct vnt_usb_send_context *tx_context,

vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration_aa);

- return vnt_rxtx_datahead_g_fb(tx_context,
- current_rate, &buf->data_head);
+ return vnt_rxtx_datahead_g_fb(tx_context, &buf->data_head);
}

static u16 vnt_rxtx_rts_ab_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_ab *buf, u16 current_rate)
+ struct vnt_rts_ab *buf)
{
struct vnt_private *priv = tx_context->priv;
u32 frame_len = tx_context->frame_len;
+ u16 current_rate = tx_context->tx_rate;
u16 rts_frame_len = 20;
u8 need_ack = tx_context->need_ack;

@@ -470,19 +475,18 @@ static u16 vnt_rxtx_rts_ab_head(struct vnt_usb_send_context *tx_context,

vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration);

- return vnt_rxtx_datahead_ab(tx_context, current_rate,
- &buf->data_head);
+ return vnt_rxtx_datahead_ab(tx_context, &buf->data_head);
}

static u16 vnt_rxtx_rts_a_fb_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_a_fb *buf, u16 current_rate)
+ struct vnt_rts_a_fb *buf)
{
struct vnt_private *priv = tx_context->priv;
u32 frame_len = tx_context->frame_len;
+ u16 current_rate = tx_context->tx_rate;
u16 rts_frame_len = 20;
u8 need_ack = tx_context->need_ack;

-
vnt_get_phy_field(priv, rts_frame_len,
priv->top_ofdm_basic_rate, tx_context->pkt_type, &buf->a);

@@ -498,16 +502,16 @@ static u16 vnt_rxtx_rts_a_fb_head(struct vnt_usb_send_context *tx_context,

vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration);

- return vnt_rxtx_datahead_a_fb(tx_context,
- current_rate, &buf->data_head);
+ return vnt_rxtx_datahead_a_fb(tx_context, &buf->data_head);
}

static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
- union vnt_tx_data_head *head, u16 current_rate)
+ union vnt_tx_data_head *head)
{
struct vnt_private *priv = tx_context->priv;
u32 frame_len = tx_context->frame_len;
u32 cts_frame_len = 14;
+ u16 current_rate = tx_context->tx_rate;
u8 need_ack = tx_context->need_ack;

if (!head)
@@ -537,8 +541,7 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,

memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN);

- return vnt_rxtx_datahead_g_fb(tx_context, current_rate,
- &buf->data_head);
+ return vnt_rxtx_datahead_g_fb(tx_context, &buf->data_head);
} else {
struct vnt_cts *buf = &head->cts_g;
/* Get SignalField,ServiceField,Length */
@@ -555,21 +558,20 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,

memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN);

- return vnt_rxtx_datahead_g(tx_context, current_rate,
- &buf->data_head);
+ return vnt_rxtx_datahead_g(tx_context, &buf->data_head);
}

return 0;
}

static u16 vnt_rxtx_rts(struct vnt_usb_send_context *tx_context,
- union vnt_tx_head *tx_head,
- u16 current_rate, bool need_mic)
+ union vnt_tx_head *tx_head, bool need_mic)
{
struct vnt_private *priv = tx_context->priv;
struct vnt_rrv_time_rts *buf = &tx_head->tx_rts.rts;
union vnt_tx_data_head *head = &tx_head->tx_rts.tx.head;
u32 frame_len = tx_context->frame_len;
+ u16 current_rate = tx_context->tx_rate;
u8 need_ack = tx_context->need_ack;

buf->rts_rrv_time_aa = vnt_get_rtscts_rsvtime_le(priv, 2,
@@ -589,19 +591,19 @@ static u16 vnt_rxtx_rts(struct vnt_usb_send_context *tx_context,
head = &tx_head->tx_rts.tx.mic.head;

if (tx_context->fb_option)
- return vnt_rxtx_rts_g_fb_head(tx_context, &head->rts_g_fb,
- current_rate);
+ return vnt_rxtx_rts_g_fb_head(tx_context, &head->rts_g_fb);

- return vnt_rxtx_rts_g_head(tx_context, &head->rts_g, current_rate);
+ return vnt_rxtx_rts_g_head(tx_context, &head->rts_g);
}

static u16 vnt_rxtx_cts(struct vnt_usb_send_context *tx_context,
- union vnt_tx_head *tx_head, u16 current_rate, bool need_mic)
+ union vnt_tx_head *tx_head, bool need_mic)
{
struct vnt_private *priv = tx_context->priv;
struct vnt_rrv_time_cts *buf = &tx_head->tx_cts.cts;
union vnt_tx_data_head *head = &tx_head->tx_cts.tx.head;
u32 frame_len = tx_context->frame_len;
+ u16 current_rate = tx_context->tx_rate;
u8 need_ack = tx_context->need_ack;

buf->rrv_time_a = vnt_rxtx_rsvtime_le16(priv, tx_context->pkt_type,
@@ -616,17 +618,17 @@ static u16 vnt_rxtx_cts(struct vnt_usb_send_context *tx_context,
head = &tx_head->tx_cts.tx.mic.head;

/* Fill CTS */
- return vnt_fill_cts_head(tx_context, head, current_rate);
+ return vnt_fill_cts_head(tx_context, head);
}

static u16 vnt_rxtx_ab(struct vnt_usb_send_context *tx_context,
- union vnt_tx_head *tx_head,
- u16 current_rate, bool need_rts, bool need_mic)
+ union vnt_tx_head *tx_head, bool need_rts, bool need_mic)
{
struct vnt_private *priv = tx_context->priv;
struct vnt_rrv_time_ab *buf = &tx_head->tx_ab.ab;
union vnt_tx_data_head *head = &tx_head->tx_ab.tx.head;
u32 frame_len = tx_context->frame_len;
+ u16 current_rate = tx_context->tx_rate;
u8 need_ack = tx_context->need_ack;

buf->rrv_time = vnt_rxtx_rsvtime_le16(priv, tx_context->pkt_type,
@@ -646,23 +648,20 @@ static u16 vnt_rxtx_ab(struct vnt_usb_send_context *tx_context,
if (tx_context->fb_option &&
tx_context->pkt_type == PK_TYPE_11A)
return vnt_rxtx_rts_a_fb_head(tx_context,
- &head->rts_a_fb,
- current_rate);
+ &head->rts_a_fb);

- return vnt_rxtx_rts_ab_head(tx_context, &head->rts_ab,
- current_rate);
+ return vnt_rxtx_rts_ab_head(tx_context, &head->rts_ab);
}

if (tx_context->pkt_type == PK_TYPE_11A)
- return vnt_rxtx_datahead_a_fb(tx_context, current_rate,
+ return vnt_rxtx_datahead_a_fb(tx_context,
&head->data_head_a_fb);

- return vnt_rxtx_datahead_ab(tx_context, current_rate,
- &head->data_head_ab);
+ return vnt_rxtx_datahead_ab(tx_context, &head->data_head_ab);
}

static u16 vnt_generate_tx_parameter(struct vnt_usb_send_context *tx_context,
- u16 current_rate, struct vnt_tx_buffer *tx_buffer,
+ struct vnt_tx_buffer *tx_buffer,
struct vnt_mic_hdr **mic_hdr, u32 need_mic,
bool need_rts)
{
@@ -675,21 +674,19 @@ static u16 vnt_generate_tx_parameter(struct vnt_usb_send_context *tx_context,
tx_head.tx_rts.tx.mic.hdr;

return vnt_rxtx_rts(tx_context, &tx_buffer->tx_head,
- current_rate, need_mic);
+ need_mic);
}

if (need_mic)
*mic_hdr = &tx_buffer->tx_head.tx_cts.tx.mic.hdr;

- return vnt_rxtx_cts(tx_context, &tx_buffer->tx_head,
- current_rate, need_mic);
+ return vnt_rxtx_cts(tx_context, &tx_buffer->tx_head, need_mic);
}

if (need_mic)
*mic_hdr = &tx_buffer->tx_head.tx_ab.tx.mic.hdr;

- return vnt_rxtx_ab(tx_context, &tx_buffer->tx_head,
- current_rate, need_rts, need_mic);
+ return vnt_rxtx_ab(tx_context, &tx_buffer->tx_head, need_rts, need_mic);
}

static void vnt_fill_txkey(struct vnt_usb_send_context *tx_context,
@@ -807,6 +804,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
tx_context->pkt_type = pkt_type;
tx_context->need_ack = false;
tx_context->frame_len = skb->len + 4;
+ tx_context->tx_rate = current_rate;

spin_unlock_irqrestore(&priv->lock, flags);

@@ -909,9 +907,8 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)

tx_context->fb_option = fb_option;

- duration_id = vnt_generate_tx_parameter(tx_context, current_rate,
- tx_buffer, &mic_hdr, need_mic,
- need_rts);
+ duration_id = vnt_generate_tx_parameter(tx_context, tx_buffer, &mic_hdr,
+ need_mic, need_rts);

tx_header_size = tx_context->tx_hdr_size;
if (!tx_header_size) {
--
2.0.1


2014-07-20 14:34:23

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 03/25] staging: vt6656: struct vnt_private replace wBasicRate with basic_rates

The same name as in struct ieee80211_bss_conf

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

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 80b2ff8..80b6732 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -109,7 +109,7 @@ static u16 vnt_get_cck_rate(struct vnt_private *priv, u16 rate_idx)
u16 ui = rate_idx;

while (ui > RATE_1M) {
- if (priv->wBasicRate & (1 << ui))
+ if (priv->basic_rates & (1 << ui))
return ui;
ui--;
}
@@ -135,7 +135,7 @@ static u16 vnt_get_ofdm_rate(struct vnt_private *priv, u16 rate_idx)
u16 ui = rate_idx;

dev_dbg(&priv->usb->dev, "%s basic rate: %d\n",
- __func__, priv->wBasicRate);
+ __func__, priv->basic_rates);

if (!vnt_ofdm_min_rate(priv)) {
dev_dbg(&priv->usb->dev, "%s (NO OFDM) %d\n",
@@ -146,7 +146,7 @@ static u16 vnt_get_ofdm_rate(struct vnt_private *priv, u16 rate_idx)
}

while (ui > RATE_11M) {
- if (priv->wBasicRate & (1 << ui)) {
+ if (priv->basic_rates & (1 << ui)) {
dev_dbg(&priv->usb->dev, "%s rate: %d\n",
__func__, ui);
return ui;
@@ -389,7 +389,7 @@ void vnt_update_ifs(struct vnt_private *priv)
priv->difs = C_SIFS_BG + 2 * priv->slot;

for (ii = RATE_54M; ii >= RATE_6M; ii--) {
- if (priv->wBasicRate & ((u32)(0x1 << ii))) {
+ if (priv->basic_rates & ((u32)(0x1 << ii))) {
ofdm_rate = true;
break;
}
@@ -454,7 +454,7 @@ void vnt_update_top_rates(struct vnt_private *priv)

/*Determines the highest basic rate.*/
for (i = RATE_54M; i >= RATE_6M; i--) {
- if (priv->wBasicRate & (u16)(1 << i)) {
+ if (priv->basic_rates & (u16)(1 << i)) {
top_ofdm = i;
break;
}
@@ -463,7 +463,7 @@ void vnt_update_top_rates(struct vnt_private *priv)
priv->byTopOFDMBasicRate = top_ofdm;

for (i = RATE_11M;; i--) {
- if (priv->wBasicRate & (u16)(1 << i)) {
+ if (priv->basic_rates & (u16)(1 << i)) {
top_cck = i;
break;
}
@@ -479,7 +479,7 @@ int vnt_ofdm_min_rate(struct vnt_private *priv)
int ii;

for (ii = RATE_54M; ii >= RATE_6M; ii--) {
- if ((priv->wBasicRate) & ((u16)(1 << ii)))
+ if ((priv->basic_rates) & ((u16)(1 << ii)))
return true;
}

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 1f9ea51..8cc33df 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -332,7 +332,7 @@ struct vnt_private {
/* Rate */
u8 bb_type; /* 0: 11A, 1:11B, 2:11G */
u8 packet_type; /* 0:11a 1:11b 2:11gb 3:11ga */
- u32 wBasicRate;
+ u32 basic_rates;
u8 byTopOFDMBasicRate;
u8 byTopCCKBasicRate;

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 85142b7..02898ff 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -742,7 +742,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,


if (changed & BSS_CHANGED_BASIC_RATES) {
- priv->wBasicRate = conf->basic_rates;
+ priv->basic_rates = conf->basic_rates;

vnt_update_top_rates(priv);

--
2.0.1


2014-07-20 14:34:46

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 16/25] staging: vt6656: struct vnt_private remove dead code ldBmThreshold

ldBmThreshold was used in old function s_vCheckSensitivity which
had been disabled in orginal vendors code.

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

diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index 11c098c..dd449a3 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -410,10 +410,7 @@ int vnt_vt3184_init(struct vnt_private *priv)
priv->bb_vga[1] = 0x10;
priv->bb_vga[2] = 0x0;
priv->bb_vga[3] = 0x0;
- priv->ldBmThreshold[0] = -70;
- priv->ldBmThreshold[1] = -48;
- priv->ldBmThreshold[2] = 0;
- priv->ldBmThreshold[3] = 0;
+
} else if (priv->rf_type == RF_AIROHA7230) {
priv->bb_rx_conf = vnt_vt3184_al2230[10];
length = sizeof(vnt_vt3184_al2230);
@@ -427,10 +424,7 @@ int vnt_vt3184_init(struct vnt_private *priv)
priv->bb_vga[1] = 0x10;
priv->bb_vga[2] = 0x0;
priv->bb_vga[3] = 0x0;
- priv->ldBmThreshold[0] = -70;
- priv->ldBmThreshold[1] = -48;
- priv->ldBmThreshold[2] = 0;
- priv->ldBmThreshold[3] = 0;
+
} else if ((priv->rf_type == RF_VT3226) ||
(priv->rf_type == RF_VT3226D0)) {
priv->bb_rx_conf = vnt_vt3184_vt3226d0[10];
@@ -443,10 +437,7 @@ int vnt_vt3184_init(struct vnt_private *priv)
priv->bb_vga[1] = 0x10;
priv->bb_vga[2] = 0x0;
priv->bb_vga[3] = 0x0;
- priv->ldBmThreshold[0] = -70;
- priv->ldBmThreshold[1] = -48;
- priv->ldBmThreshold[2] = 0;
- priv->ldBmThreshold[3] = 0;
+
/* Fix VT3226 DFC system timing issue */
vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2,
SOFTPWRCTL_RFLEOPT);
@@ -461,10 +452,7 @@ int vnt_vt3184_init(struct vnt_private *priv)
priv->bb_vga[1] = 0x10;
priv->bb_vga[2] = 0x0;
priv->bb_vga[3] = 0x0;
- priv->ldBmThreshold[0] = -70;
- priv->ldBmThreshold[1] = -48;
- priv->ldBmThreshold[2] = 0;
- priv->ldBmThreshold[3] = 0;
+
/* Fix VT3226 DFC system timing issue */
vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2,
SOFTPWRCTL_RFLEOPT);
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index e3c2509..24ebbd0 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -384,7 +384,6 @@ struct vnt_private {

/* For Update BaseBand VGA Gain Offset */
u8 bb_vga[BB_VGA_LEVEL];
- signed long ldBmThreshold[BB_VGA_LEVEL];

u8 byBBPreEDRSSI;
u8 byBBPreEDIndex;
--
2.0.1


2014-07-20 14:34:22

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 02/25] staging: vt6656: struct vnt_private replace byPacketType with packet_type

Removing type prefix and camel case.

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

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 94b933f..80b2ff8 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -365,12 +365,12 @@ void vnt_update_ifs(struct vnt_private *priv)
u8 max_min = 0;
u8 data[4];

- if (priv->byPacketType == PK_TYPE_11A) {
+ if (priv->packet_type == PK_TYPE_11A) {
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) {
+ } else if (priv->packet_type == PK_TYPE_11B) {
priv->slot = C_SLOT_LONG;
priv->sifs = C_SIFS_BG;
priv->difs = C_SIFS_BG + 2 * C_SLOT_LONG;
@@ -793,7 +793,7 @@ void vnt_set_bss_mode(struct vnt_private *priv)
else
vnt_mac_set_bb_type(priv, priv->bb_type);

- priv->byPacketType = vnt_get_pkt_type(priv);
+ priv->packet_type = vnt_get_pkt_type(priv);

if (priv->bb_type == BB_TYPE_11A)
vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, 0x88, 0x03);
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 7b5779a..1f9ea51 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -331,7 +331,7 @@ struct vnt_private {

/* Rate */
u8 bb_type; /* 0: 11A, 1:11B, 2:11G */
- u8 byPacketType; /* 0:11a 1:11b 2:11gb 3:11ga */
+ u8 packet_type; /* 0:11a 1:11b 2:11gb 3:11ga */
u32 wBasicRate;
u8 byTopOFDMBasicRate;
u8 byTopCCKBasicRate;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 5ca28c2..85142b7 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -122,7 +122,7 @@ static void device_set_options(struct vnt_private *priv)
priv->byLongRetryLimit = LONG_RETRY_DEF;
priv->op_mode = NL80211_IFTYPE_UNSPECIFIED;
priv->bb_type = BBP_TYPE_DEF;
- priv->byPacketType = priv->bb_type;
+ priv->packet_type = priv->bb_type;
priv->byAutoFBCtrl = AUTO_FB_0;
priv->byPreambleType = 0;
priv->exist_sw_net_addr = false;
@@ -142,7 +142,7 @@ static int device_init_registers(struct vnt_private *priv)
u8 calib_tx_iq = 0, calib_tx_dc = 0, calib_rx_iq = 0;

dev_dbg(&priv->usb->dev, "---->INIbInitAdapter. [%d][%d]\n",
- DEVICE_INIT_COLD, priv->byPacketType);
+ DEVICE_INIT_COLD, priv->packet_type);

if (!vnt_check_firmware_version(priv)) {
if (vnt_download_firmware(priv) == true) {
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 3347a72..03f299d 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -771,7 +771,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
}

if (current_rate > RATE_11M)
- pkt_type = priv->byPacketType;
+ pkt_type = priv->packet_type;
else
pkt_type = PK_TYPE_11B;

--
2.0.1


2014-07-20 14:35:00

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 22/25] staging: vt6656: move need_ack into into vnt_usb_send_context

Fixing need_ack to u8 and removing from function declarations.

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 1 +
drivers/staging/vt6656/rxtx.c | 89 +++++++++++++++++++++++------------------
2 files changed, 52 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 0d5ecd6..9d42877 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -236,6 +236,7 @@ struct vnt_usb_send_context {
u8 type;
u8 pkt_no;
u8 pkt_type;
+ u8 need_ack;
u8 fb_option;
bool in_use;
unsigned char data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS];
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 7906251..81086ab 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -255,12 +255,13 @@ static u16 vnt_mac_hdr_pos(struct vnt_usb_send_context *tx_context,

static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context,
u16 rate, struct vnt_tx_datahead_g *buf,
- u32 frame_len, int need_ack)
+ u32 frame_len)
{

struct vnt_private *priv = tx_context->priv;
struct ieee80211_hdr *hdr =
(struct ieee80211_hdr *)tx_context->skb->data;
+ u8 need_ack = tx_context->need_ack;

/* Get SignalField,ServiceField,Length */
vnt_get_phy_field(priv, frame_len, rate, tx_context->pkt_type, &buf->a);
@@ -291,9 +292,10 @@ static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context,

static u16 vnt_rxtx_datahead_g_fb(struct vnt_usb_send_context *tx_context,
u16 rate, struct vnt_tx_datahead_g_fb *buf,
- u32 frame_len, int need_ack)
+ u32 frame_len)
{
struct vnt_private *priv = tx_context->priv;
+ u8 need_ack = tx_context->need_ack;

/* Get SignalField,ServiceField,Length */
vnt_get_phy_field(priv, frame_len, rate, tx_context->pkt_type, &buf->a);
@@ -322,10 +324,11 @@ static u16 vnt_rxtx_datahead_g_fb(struct vnt_usb_send_context *tx_context,

static u16 vnt_rxtx_datahead_a_fb(struct vnt_usb_send_context *tx_context,
u16 rate, struct vnt_tx_datahead_a_fb *buf,
- u32 frame_len, int need_ack)
+ u32 frame_len)
{
struct vnt_private *priv = tx_context->priv;
u8 pkt_type = tx_context->pkt_type;
+ u8 need_ack = tx_context->need_ack;

/* Get SignalField,ServiceField,Length */
vnt_get_phy_field(priv, frame_len, rate, pkt_type, &buf->a);
@@ -344,11 +347,12 @@ static u16 vnt_rxtx_datahead_a_fb(struct vnt_usb_send_context *tx_context,

static u16 vnt_rxtx_datahead_ab(struct vnt_usb_send_context *tx_context,
u16 rate, struct vnt_tx_datahead_ab *buf,
- u32 frame_len, int need_ack)
+ u32 frame_len)
{
struct vnt_private *priv = tx_context->priv;
struct ieee80211_hdr *hdr =
(struct ieee80211_hdr *)tx_context->skb->data;
+ u8 need_ack = tx_context->need_ack;

/* Get SignalField,ServiceField,Length */
vnt_get_phy_field(priv, frame_len, rate,
@@ -388,10 +392,12 @@ static int vnt_fill_ieee80211_rts(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_g *buf, u32 frame_len, int need_ack, u16 current_rate)
+ struct vnt_rts_g *buf, u32 frame_len, u16 current_rate)
{
struct vnt_private *priv = tx_context->priv;
u16 rts_frame_len = 20;
+ u8 need_ack = tx_context->need_ack;
+

vnt_get_phy_field(priv, rts_frame_len, priv->top_cck_basic_rate,
PK_TYPE_11B, &buf->b);
@@ -408,14 +414,16 @@ static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context *tx_context,
vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration_aa);

return vnt_rxtx_datahead_g(tx_context, current_rate, &buf->data_head,
- frame_len, need_ack);
+ frame_len);
}

static u16 vnt_rxtx_rts_g_fb_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_g_fb *buf, u32 frame_len, int need_ack, u16 current_rate)
+ struct vnt_rts_g_fb *buf, u32 frame_len, u16 current_rate)
{
struct vnt_private *priv = tx_context->priv;
u16 rts_frame_len = 20;
+ u8 need_ack = tx_context->need_ack;
+

vnt_get_phy_field(priv, rts_frame_len, priv->top_cck_basic_rate,
PK_TYPE_11B, &buf->b);
@@ -441,15 +449,16 @@ static u16 vnt_rxtx_rts_g_fb_head(struct vnt_usb_send_context *tx_context,
vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration_aa);

return vnt_rxtx_datahead_g_fb(tx_context, current_rate, &buf->data_head,
- frame_len, need_ack);
+ frame_len);
}

static u16 vnt_rxtx_rts_ab_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_ab *buf, u32 frame_len, int need_ack,
- u16 current_rate)
+ struct vnt_rts_ab *buf, u32 frame_len, u16 current_rate)
{
struct vnt_private *priv = tx_context->priv;
u16 rts_frame_len = 20;
+ u8 need_ack = tx_context->need_ack;
+

vnt_get_phy_field(priv, rts_frame_len, priv->top_ofdm_basic_rate,
tx_context->pkt_type, &buf->ab);
@@ -461,14 +470,16 @@ static u16 vnt_rxtx_rts_ab_head(struct vnt_usb_send_context *tx_context,
vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration);

return vnt_rxtx_datahead_ab(tx_context, current_rate,
- &buf->data_head, frame_len, need_ack);
+ &buf->data_head, frame_len);
}

static u16 vnt_rxtx_rts_a_fb_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_a_fb *buf, u32 frame_len, int need_ack, u16 current_rate)
+ struct vnt_rts_a_fb *buf, u32 frame_len, u16 current_rate)
{
struct vnt_private *priv = tx_context->priv;
u16 rts_frame_len = 20;
+ u8 need_ack = tx_context->need_ack;
+

vnt_get_phy_field(priv, rts_frame_len,
priv->top_ofdm_basic_rate, tx_context->pkt_type, &buf->a);
@@ -486,15 +497,16 @@ static u16 vnt_rxtx_rts_a_fb_head(struct vnt_usb_send_context *tx_context,
vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration);

return vnt_rxtx_datahead_a_fb(tx_context, current_rate, &buf->data_head,
- frame_len, need_ack);
+ frame_len);
}

static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
- union vnt_tx_data_head *head, u32 frame_len,
- int need_ack, u16 current_rate)
+ union vnt_tx_data_head *head, u32 frame_len, u16 current_rate)
{
struct vnt_private *priv = tx_context->priv;
u32 cts_frame_len = 14;
+ u8 need_ack = tx_context->need_ack;
+

if (!head)
return 0;
@@ -524,8 +536,7 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN);

return vnt_rxtx_datahead_g_fb(tx_context, current_rate,
- &buf->data_head, frame_len,
- need_ack);
+ &buf->data_head, frame_len);
} else {
struct vnt_cts *buf = &head->cts_g;
/* Get SignalField,ServiceField,Length */
@@ -543,19 +554,20 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN);

return vnt_rxtx_datahead_g(tx_context, current_rate,
- &buf->data_head, frame_len, need_ack);
+ &buf->data_head, frame_len);
}

return 0;
}

static u16 vnt_rxtx_rts(struct vnt_usb_send_context *tx_context,
- union vnt_tx_head *tx_head, u32 frame_size, int need_ack,
+ union vnt_tx_head *tx_head, u32 frame_size,
u16 current_rate, bool need_mic)
{
struct vnt_private *priv = tx_context->priv;
struct vnt_rrv_time_rts *buf = &tx_head->tx_rts.rts;
union vnt_tx_data_head *head = &tx_head->tx_rts.tx.head;
+ u8 need_ack = tx_context->need_ack;

buf->rts_rrv_time_aa = vnt_get_rtscts_rsvtime_le(priv, 2,
tx_context->pkt_type, frame_size, current_rate);
@@ -575,19 +587,21 @@ static u16 vnt_rxtx_rts(struct vnt_usb_send_context *tx_context,

if (tx_context->fb_option)
return vnt_rxtx_rts_g_fb_head(tx_context, &head->rts_g_fb,
- frame_size, need_ack, current_rate);
+ frame_size, current_rate);

return vnt_rxtx_rts_g_head(tx_context, &head->rts_g, frame_size,
- need_ack, current_rate);
+ current_rate);
}

static u16 vnt_rxtx_cts(struct vnt_usb_send_context *tx_context,
- union vnt_tx_head *tx_head, u32 frame_size, int need_ack,
+ union vnt_tx_head *tx_head, u32 frame_size,
u16 current_rate, bool need_mic)
{
struct vnt_private *priv = tx_context->priv;
struct vnt_rrv_time_cts *buf = &tx_head->tx_cts.cts;
union vnt_tx_data_head *head = &tx_head->tx_cts.tx.head;
+ u8 need_ack = tx_context->need_ack;
+

buf->rrv_time_a = vnt_rxtx_rsvtime_le16(priv, tx_context->pkt_type,
frame_size, current_rate, need_ack);
@@ -601,17 +615,17 @@ static u16 vnt_rxtx_cts(struct vnt_usb_send_context *tx_context,
head = &tx_head->tx_cts.tx.mic.head;

/* Fill CTS */
- return vnt_fill_cts_head(tx_context,
- head, frame_size, need_ack, current_rate);
+ return vnt_fill_cts_head(tx_context, head, frame_size, current_rate);
}

static u16 vnt_rxtx_ab(struct vnt_usb_send_context *tx_context,
union vnt_tx_head *tx_head, u32 frame_size,
- int need_ack, u16 current_rate, bool need_rts, bool need_mic)
+ u16 current_rate, bool need_rts, bool need_mic)
{
struct vnt_private *priv = tx_context->priv;
struct vnt_rrv_time_ab *buf = &tx_head->tx_ab.ab;
union vnt_tx_data_head *head = &tx_head->tx_ab.tx.head;
+ u8 need_ack = tx_context->need_ack;

buf->rrv_time = vnt_rxtx_rsvtime_le16(priv, tx_context->pkt_type,
frame_size, current_rate, need_ack);
@@ -631,26 +645,25 @@ static u16 vnt_rxtx_ab(struct vnt_usb_send_context *tx_context,
tx_context->pkt_type == PK_TYPE_11A)
return vnt_rxtx_rts_a_fb_head(tx_context,
&head->rts_a_fb,
- frame_size, need_ack,
- current_rate);
+ frame_size, current_rate);

return vnt_rxtx_rts_ab_head(tx_context, &head->rts_ab,
- frame_size, need_ack, current_rate);
+ frame_size, current_rate);
}

if (tx_context->pkt_type == PK_TYPE_11A)
return vnt_rxtx_datahead_a_fb(tx_context, current_rate,
&head->data_head_a_fb,
- frame_size, need_ack);
+ frame_size);

return vnt_rxtx_datahead_ab(tx_context, current_rate,
- &head->data_head_ab, frame_size, need_ack);
+ &head->data_head_ab, frame_size);
}

static u16 vnt_generate_tx_parameter(struct vnt_usb_send_context *tx_context,
u16 current_rate, struct vnt_tx_buffer *tx_buffer,
struct vnt_mic_hdr **mic_hdr, u32 need_mic, u32 frame_size,
- int need_ack, bool need_rts)
+ bool need_rts)
{

if (tx_context->pkt_type == PK_TYPE_11GB ||
@@ -661,22 +674,21 @@ static u16 vnt_generate_tx_parameter(struct vnt_usb_send_context *tx_context,
tx_head.tx_rts.tx.mic.hdr;

return vnt_rxtx_rts(tx_context, &tx_buffer->tx_head,
- frame_size, need_ack, current_rate,
- need_mic);
+ frame_size, current_rate, need_mic);
}

if (need_mic)
*mic_hdr = &tx_buffer->tx_head.tx_cts.tx.mic.hdr;

return vnt_rxtx_cts(tx_context, &tx_buffer->tx_head, frame_size,
- need_ack, current_rate, need_mic);
+ current_rate, need_mic);
}

if (need_mic)
*mic_hdr = &tx_buffer->tx_head.tx_ab.tx.mic.hdr;

return vnt_rxtx_ab(tx_context, &tx_buffer->tx_head, frame_size,
- need_ack, current_rate, need_rts, need_mic);
+ current_rate, need_rts, need_mic);
}

static void vnt_fill_txkey(struct vnt_usb_send_context *tx_context,
@@ -763,7 +775,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
u32 frame_size = 0;
u16 tx_bytes, tx_header_size, tx_body_size, current_rate, duration_id;
u8 pkt_type, fb_option = AUTO_FB_NONE;
- bool need_rts = false, need_ack = false, is_pspoll = false;
+ bool need_rts = false, is_pspoll = false;
bool need_mic = false;

hdr = (struct ieee80211_hdr *)(skb->data);
@@ -793,6 +805,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)

tx_context->skb = skb;
tx_context->pkt_type = pkt_type;
+ tx_context->need_ack = false;

spin_unlock_irqrestore(&priv->lock, flags);

@@ -826,7 +839,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)

if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
tx_buffer_head->wFIFOCtl |= FIFOCTL_NEEDACK;
- need_ack = true;
+ tx_context->need_ack = true;
}

if (ieee80211_has_retry(hdr->frame_control))
@@ -899,7 +912,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)

duration_id = vnt_generate_tx_parameter(tx_context, current_rate,
tx_buffer, &mic_hdr, need_mic,
- frame_size, need_ack, need_rts);
+ frame_size, need_rts);

tx_header_size = tx_context->tx_hdr_size;
if (!tx_header_size) {
--
2.0.1


2014-07-20 14:35:02

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 23/25] staging: vt6656: rxtx move frame_len/size into vnt_usb_send_context as frame_len

Removing frame_len and frame_size from function declarations

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 1 +
drivers/staging/vt6656/rxtx.c | 115 ++++++++++++++++++++--------------------
2 files changed, 58 insertions(+), 58 deletions(-)

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 9d42877..d3c36af 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -232,6 +232,7 @@ struct vnt_usb_send_context {
struct urb *urb;
struct ieee80211_hdr *hdr;
unsigned int buf_len;
+ u32 frame_len;
u16 tx_hdr_size;
u8 type;
u8 pkt_no;
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 81086ab..163bb1a 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -254,13 +254,13 @@ static u16 vnt_mac_hdr_pos(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context,
- u16 rate, struct vnt_tx_datahead_g *buf,
- u32 frame_len)
+ u16 rate, struct vnt_tx_datahead_g *buf)
{

struct vnt_private *priv = tx_context->priv;
struct ieee80211_hdr *hdr =
(struct ieee80211_hdr *)tx_context->skb->data;
+ u32 frame_len = tx_context->frame_len;
u8 need_ack = tx_context->need_ack;

/* Get SignalField,ServiceField,Length */
@@ -291,10 +291,10 @@ static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_datahead_g_fb(struct vnt_usb_send_context *tx_context,
- u16 rate, struct vnt_tx_datahead_g_fb *buf,
- u32 frame_len)
+ u16 rate, struct vnt_tx_datahead_g_fb *buf)
{
struct vnt_private *priv = tx_context->priv;
+ u32 frame_len = tx_context->frame_len;
u8 need_ack = tx_context->need_ack;

/* Get SignalField,ServiceField,Length */
@@ -323,12 +323,12 @@ static u16 vnt_rxtx_datahead_g_fb(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_datahead_a_fb(struct vnt_usb_send_context *tx_context,
- u16 rate, struct vnt_tx_datahead_a_fb *buf,
- u32 frame_len)
+ u16 rate, struct vnt_tx_datahead_a_fb *buf)
{
struct vnt_private *priv = tx_context->priv;
u8 pkt_type = tx_context->pkt_type;
u8 need_ack = tx_context->need_ack;
+ u32 frame_len = tx_context->frame_len;

/* Get SignalField,ServiceField,Length */
vnt_get_phy_field(priv, frame_len, rate, pkt_type, &buf->a);
@@ -346,12 +346,12 @@ static u16 vnt_rxtx_datahead_a_fb(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_datahead_ab(struct vnt_usb_send_context *tx_context,
- u16 rate, struct vnt_tx_datahead_ab *buf,
- u32 frame_len)
+ u16 rate, struct vnt_tx_datahead_ab *buf)
{
struct vnt_private *priv = tx_context->priv;
struct ieee80211_hdr *hdr =
(struct ieee80211_hdr *)tx_context->skb->data;
+ u32 frame_len = tx_context->frame_len;
u8 need_ack = tx_context->need_ack;

/* Get SignalField,ServiceField,Length */
@@ -392,13 +392,13 @@ static int vnt_fill_ieee80211_rts(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_g *buf, u32 frame_len, u16 current_rate)
+ struct vnt_rts_g *buf, u16 current_rate)
{
struct vnt_private *priv = tx_context->priv;
+ u32 frame_len = tx_context->frame_len;
u16 rts_frame_len = 20;
u8 need_ack = tx_context->need_ack;

-
vnt_get_phy_field(priv, rts_frame_len, priv->top_cck_basic_rate,
PK_TYPE_11B, &buf->b);
vnt_get_phy_field(priv, rts_frame_len, priv->top_ofdm_basic_rate,
@@ -413,14 +413,14 @@ static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context *tx_context,

vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration_aa);

- return vnt_rxtx_datahead_g(tx_context, current_rate, &buf->data_head,
- frame_len);
+ return vnt_rxtx_datahead_g(tx_context, current_rate, &buf->data_head);
}

static u16 vnt_rxtx_rts_g_fb_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_g_fb *buf, u32 frame_len, u16 current_rate)
+ struct vnt_rts_g_fb *buf, u16 current_rate)
{
struct vnt_private *priv = tx_context->priv;
+ u32 frame_len = tx_context->frame_len;
u16 rts_frame_len = 20;
u8 need_ack = tx_context->need_ack;

@@ -448,14 +448,15 @@ static u16 vnt_rxtx_rts_g_fb_head(struct vnt_usb_send_context *tx_context,

vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration_aa);

- return vnt_rxtx_datahead_g_fb(tx_context, current_rate, &buf->data_head,
- frame_len);
+ return vnt_rxtx_datahead_g_fb(tx_context,
+ current_rate, &buf->data_head);
}

static u16 vnt_rxtx_rts_ab_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_ab *buf, u32 frame_len, u16 current_rate)
+ struct vnt_rts_ab *buf, u16 current_rate)
{
struct vnt_private *priv = tx_context->priv;
+ u32 frame_len = tx_context->frame_len;
u16 rts_frame_len = 20;
u8 need_ack = tx_context->need_ack;

@@ -470,13 +471,14 @@ static u16 vnt_rxtx_rts_ab_head(struct vnt_usb_send_context *tx_context,
vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration);

return vnt_rxtx_datahead_ab(tx_context, current_rate,
- &buf->data_head, frame_len);
+ &buf->data_head);
}

static u16 vnt_rxtx_rts_a_fb_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_a_fb *buf, u32 frame_len, u16 current_rate)
+ struct vnt_rts_a_fb *buf, u16 current_rate)
{
struct vnt_private *priv = tx_context->priv;
+ u32 frame_len = tx_context->frame_len;
u16 rts_frame_len = 20;
u8 need_ack = tx_context->need_ack;

@@ -496,18 +498,18 @@ static u16 vnt_rxtx_rts_a_fb_head(struct vnt_usb_send_context *tx_context,

vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration);

- return vnt_rxtx_datahead_a_fb(tx_context, current_rate, &buf->data_head,
- frame_len);
+ return vnt_rxtx_datahead_a_fb(tx_context,
+ current_rate, &buf->data_head);
}

static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
- union vnt_tx_data_head *head, u32 frame_len, u16 current_rate)
+ union vnt_tx_data_head *head, u16 current_rate)
{
struct vnt_private *priv = tx_context->priv;
+ u32 frame_len = tx_context->frame_len;
u32 cts_frame_len = 14;
u8 need_ack = tx_context->need_ack;

-
if (!head)
return 0;

@@ -536,7 +538,7 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN);

return vnt_rxtx_datahead_g_fb(tx_context, current_rate,
- &buf->data_head, frame_len);
+ &buf->data_head);
} else {
struct vnt_cts *buf = &head->cts_g;
/* Get SignalField,ServiceField,Length */
@@ -554,32 +556,33 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN);

return vnt_rxtx_datahead_g(tx_context, current_rate,
- &buf->data_head, frame_len);
+ &buf->data_head);
}

return 0;
}

static u16 vnt_rxtx_rts(struct vnt_usb_send_context *tx_context,
- union vnt_tx_head *tx_head, u32 frame_size,
+ union vnt_tx_head *tx_head,
u16 current_rate, bool need_mic)
{
struct vnt_private *priv = tx_context->priv;
struct vnt_rrv_time_rts *buf = &tx_head->tx_rts.rts;
union vnt_tx_data_head *head = &tx_head->tx_rts.tx.head;
+ u32 frame_len = tx_context->frame_len;
u8 need_ack = tx_context->need_ack;

buf->rts_rrv_time_aa = vnt_get_rtscts_rsvtime_le(priv, 2,
- tx_context->pkt_type, frame_size, current_rate);
+ tx_context->pkt_type, frame_len, current_rate);
buf->rts_rrv_time_ba = vnt_get_rtscts_rsvtime_le(priv, 1,
- tx_context->pkt_type, frame_size, current_rate);
+ tx_context->pkt_type, frame_len, current_rate);
buf->rts_rrv_time_bb = vnt_get_rtscts_rsvtime_le(priv, 0,
- tx_context->pkt_type, frame_size, current_rate);
+ tx_context->pkt_type, frame_len, current_rate);

buf->rrv_time_a = vnt_rxtx_rsvtime_le16(priv, tx_context->pkt_type,
- frame_size, current_rate,
+ frame_len, current_rate,
need_ack);
- buf->rrv_time_b = vnt_rxtx_rsvtime_le16(priv, PK_TYPE_11B, frame_size,
+ buf->rrv_time_b = vnt_rxtx_rsvtime_le16(priv, PK_TYPE_11B, frame_len,
priv->top_cck_basic_rate, need_ack);

if (need_mic)
@@ -587,48 +590,47 @@ static u16 vnt_rxtx_rts(struct vnt_usb_send_context *tx_context,

if (tx_context->fb_option)
return vnt_rxtx_rts_g_fb_head(tx_context, &head->rts_g_fb,
- frame_size, current_rate);
+ current_rate);

- return vnt_rxtx_rts_g_head(tx_context, &head->rts_g, frame_size,
- current_rate);
+ return vnt_rxtx_rts_g_head(tx_context, &head->rts_g, current_rate);
}

static u16 vnt_rxtx_cts(struct vnt_usb_send_context *tx_context,
- union vnt_tx_head *tx_head, u32 frame_size,
- u16 current_rate, bool need_mic)
+ union vnt_tx_head *tx_head, u16 current_rate, bool need_mic)
{
struct vnt_private *priv = tx_context->priv;
struct vnt_rrv_time_cts *buf = &tx_head->tx_cts.cts;
union vnt_tx_data_head *head = &tx_head->tx_cts.tx.head;
+ u32 frame_len = tx_context->frame_len;
u8 need_ack = tx_context->need_ack;

-
buf->rrv_time_a = vnt_rxtx_rsvtime_le16(priv, tx_context->pkt_type,
- frame_size, current_rate, need_ack);
+ frame_len, current_rate, need_ack);
buf->rrv_time_b = vnt_rxtx_rsvtime_le16(priv, PK_TYPE_11B,
- frame_size, priv->top_cck_basic_rate, need_ack);
+ frame_len, priv->top_cck_basic_rate, need_ack);

buf->cts_rrv_time_ba = vnt_get_rtscts_rsvtime_le(priv, 3,
- tx_context->pkt_type, frame_size, current_rate);
+ tx_context->pkt_type, frame_len, current_rate);

if (need_mic)
head = &tx_head->tx_cts.tx.mic.head;

/* Fill CTS */
- return vnt_fill_cts_head(tx_context, head, frame_size, current_rate);
+ return vnt_fill_cts_head(tx_context, head, current_rate);
}

static u16 vnt_rxtx_ab(struct vnt_usb_send_context *tx_context,
- union vnt_tx_head *tx_head, u32 frame_size,
+ union vnt_tx_head *tx_head,
u16 current_rate, bool need_rts, bool need_mic)
{
struct vnt_private *priv = tx_context->priv;
struct vnt_rrv_time_ab *buf = &tx_head->tx_ab.ab;
union vnt_tx_data_head *head = &tx_head->tx_ab.tx.head;
+ u32 frame_len = tx_context->frame_len;
u8 need_ack = tx_context->need_ack;

buf->rrv_time = vnt_rxtx_rsvtime_le16(priv, tx_context->pkt_type,
- frame_size, current_rate, need_ack);
+ frame_len, current_rate, need_ack);

if (need_mic)
head = &tx_head->tx_ab.tx.mic.head;
@@ -636,33 +638,32 @@ static u16 vnt_rxtx_ab(struct vnt_usb_send_context *tx_context,
if (need_rts) {
if (tx_context->pkt_type == PK_TYPE_11B)
buf->rts_rrv_time = vnt_get_rtscts_rsvtime_le(priv, 0,
- tx_context->pkt_type, frame_size, current_rate);
+ tx_context->pkt_type, frame_len, current_rate);
else /* PK_TYPE_11A */
buf->rts_rrv_time = vnt_get_rtscts_rsvtime_le(priv, 2,
- tx_context->pkt_type, frame_size, current_rate);
+ tx_context->pkt_type, frame_len, current_rate);

if (tx_context->fb_option &&
tx_context->pkt_type == PK_TYPE_11A)
return vnt_rxtx_rts_a_fb_head(tx_context,
&head->rts_a_fb,
- frame_size, current_rate);
+ current_rate);

return vnt_rxtx_rts_ab_head(tx_context, &head->rts_ab,
- frame_size, current_rate);
+ current_rate);
}

if (tx_context->pkt_type == PK_TYPE_11A)
return vnt_rxtx_datahead_a_fb(tx_context, current_rate,
- &head->data_head_a_fb,
- frame_size);
+ &head->data_head_a_fb);

return vnt_rxtx_datahead_ab(tx_context, current_rate,
- &head->data_head_ab, frame_size);
+ &head->data_head_ab);
}

static u16 vnt_generate_tx_parameter(struct vnt_usb_send_context *tx_context,
u16 current_rate, struct vnt_tx_buffer *tx_buffer,
- struct vnt_mic_hdr **mic_hdr, u32 need_mic, u32 frame_size,
+ struct vnt_mic_hdr **mic_hdr, u32 need_mic,
bool need_rts)
{

@@ -674,20 +675,20 @@ static u16 vnt_generate_tx_parameter(struct vnt_usb_send_context *tx_context,
tx_head.tx_rts.tx.mic.hdr;

return vnt_rxtx_rts(tx_context, &tx_buffer->tx_head,
- frame_size, current_rate, need_mic);
+ current_rate, need_mic);
}

if (need_mic)
*mic_hdr = &tx_buffer->tx_head.tx_cts.tx.mic.hdr;

- return vnt_rxtx_cts(tx_context, &tx_buffer->tx_head, frame_size,
+ return vnt_rxtx_cts(tx_context, &tx_buffer->tx_head,
current_rate, need_mic);
}

if (need_mic)
*mic_hdr = &tx_buffer->tx_head.tx_ab.tx.mic.hdr;

- return vnt_rxtx_ab(tx_context, &tx_buffer->tx_head, frame_size,
+ return vnt_rxtx_ab(tx_context, &tx_buffer->tx_head,
current_rate, need_rts, need_mic);
}

@@ -772,7 +773,6 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
struct vnt_tx_fifo_head *tx_buffer_head;
struct vnt_usb_send_context *tx_context;
unsigned long flags;
- u32 frame_size = 0;
u16 tx_bytes, tx_header_size, tx_body_size, current_rate, duration_id;
u8 pkt_type, fb_option = AUTO_FB_NONE;
bool need_rts = false, is_pspoll = false;
@@ -806,6 +806,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
tx_context->skb = skb;
tx_context->pkt_type = pkt_type;
tx_context->need_ack = false;
+ tx_context->frame_len = skb->len + 4;

spin_unlock_irqrestore(&priv->lock, flags);

@@ -813,8 +814,6 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
tx_buffer_head = &tx_buffer->fifo_head;
tx_body_size = skb->len;

- frame_size = tx_body_size + 4;
-
/*Set fifo controls */
if (pkt_type == PK_TYPE_11A)
tx_buffer_head->wFIFOCtl = 0;
@@ -880,7 +879,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
default:
break;
}
- frame_size += tx_key->icv_len;
+ tx_context->frame_len += tx_key->icv_len;
}

tx_buffer_head->current_rate = cpu_to_le16(current_rate);
@@ -912,7 +911,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)

duration_id = vnt_generate_tx_parameter(tx_context, current_rate,
tx_buffer, &mic_hdr, need_mic,
- frame_size, need_rts);
+ need_rts);

tx_header_size = tx_context->tx_hdr_size;
if (!tx_header_size) {
--
2.0.1


2014-07-20 14:34:39

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 12/25] staging: vt6656: struct vnt_private remove dead variable bBarkerPreambleMd

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 35bc8c6..905e90b 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -359,7 +359,6 @@ struct vnt_private {
enum nl80211_iftype op_mode;

int short_slot_time;
- int bBarkerPreambleMd;

/* Power save */
u16 current_aid;
--
2.0.1


2014-07-20 14:34:27

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 05/25] staging: vt6656: struct vnt_private replace byTopCCKBasicRate with top_cck_basic_rate

Removing type prefix and camel case.

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

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 3217f77..8e00377 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -471,7 +471,7 @@ void vnt_update_top_rates(struct vnt_private *priv)
break;
}

- priv->byTopCCKBasicRate = top_cck;
+ priv->top_cck_basic_rate = top_cck;
}

int vnt_ofdm_min_rate(struct vnt_private *priv)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 951abc2b..dcb57dc 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -334,7 +334,7 @@ struct vnt_private {
u8 packet_type; /* 0:11a 1:11b 2:11gb 3:11ga */
u32 basic_rates;
u8 top_ofdm_basic_rate;
- u8 byTopCCKBasicRate;
+ u8 top_cck_basic_rate;

u8 abyEEPROM[EEP_MAX_CONTEXT_SIZE]; /*u32 alignment */

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index a02a028..f5227ee 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -196,7 +196,7 @@ static int device_init_registers(struct vnt_private *priv)
/* do MACbSoftwareReset in MACvInitialize */

priv->top_ofdm_basic_rate = RATE_24M;
- priv->byTopCCKBasicRate = RATE_1M;
+ priv->top_cck_basic_rate = RATE_1M;

/* target to IF pin while programming to RF chip */
priv->byCurPwr = 0xFF;
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index ba2d550..79ce396 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -119,7 +119,7 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type,

if (pkt_type == PK_TYPE_11B)
ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
- 14, (u16)priv->byTopCCKBasicRate);
+ 14, (u16)priv->top_cck_basic_rate);
else
ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
14, (u16)priv->top_ofdm_basic_rate);
@@ -149,14 +149,14 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,

if (rsv_type == 0) {
rts_time = vnt_get_frame_time(priv->byPreambleType,
- pkt_type, 20, priv->byTopCCKBasicRate);
+ pkt_type, 20, priv->top_cck_basic_rate);
cts_time = ack_time = vnt_get_frame_time(priv->byPreambleType,
- pkt_type, 14, priv->byTopCCKBasicRate);
+ pkt_type, 14, priv->top_cck_basic_rate);
} else if (rsv_type == 1) {
rts_time = vnt_get_frame_time(priv->byPreambleType,
- pkt_type, 20, priv->byTopCCKBasicRate);
+ pkt_type, 20, priv->top_cck_basic_rate);
cts_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
- 14, priv->byTopCCKBasicRate);
+ 14, priv->top_cck_basic_rate);
ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
14, priv->top_ofdm_basic_rate);
} else if (rsv_type == 2) {
@@ -166,7 +166,7 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,
pkt_type, 14, priv->top_ofdm_basic_rate);
} else if (rsv_type == 3) {
cts_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
- 14, priv->byTopCCKBasicRate);
+ 14, priv->top_cck_basic_rate);
ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
14, priv->top_ofdm_basic_rate);

@@ -188,7 +188,7 @@ static __le16 vnt_get_duration_le(struct vnt_private *piv,
if (need_ack) {
if (pkt_type == PK_TYPE_11B)
ack_time = vnt_get_frame_time(piv->byPreambleType,
- pkt_type, 14, piv->byTopCCKBasicRate);
+ pkt_type, 14, piv->top_cck_basic_rate);
else
ack_time = vnt_get_frame_time(piv->byPreambleType,
pkt_type, 14, piv->top_ofdm_basic_rate);
@@ -210,7 +210,7 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_private *priv, u8 dur_type,
case RTSDUR_BA_F0:
case RTSDUR_BA_F1:
cts_time = vnt_get_frame_time(priv->byPreambleType,
- pkt_type, 14, priv->byTopCCKBasicRate);
+ pkt_type, 14, priv->top_cck_basic_rate);
dur_time = cts_time + 2 * priv->sifs +
vnt_get_rsvtime(priv, pkt_type,
frame_length, rate, need_ack);
@@ -264,7 +264,7 @@ static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context,

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

/* Get Duration and TimeStamp */
@@ -281,7 +281,7 @@ static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context,

buf->time_stamp_off_a = vnt_time_stamp_off(priv, rate);
buf->time_stamp_off_b = vnt_time_stamp_off(priv,
- priv->byTopCCKBasicRate);
+ priv->top_cck_basic_rate);

tx_context->tx_hdr_size = vnt_mac_hdr_pos(tx_context, &buf->hdr);

@@ -297,7 +297,7 @@ static u16 vnt_rxtx_datahead_g_fb(struct vnt_usb_send_context *tx_context,
/* Get SignalField,ServiceField,Length */
vnt_get_phy_field(priv, frame_len, rate, pkt_type, &buf->a);

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

/* Get Duration and TimeStamp */
@@ -309,7 +309,7 @@ static u16 vnt_rxtx_datahead_g_fb(struct vnt_usb_send_context *tx_context,

buf->time_stamp_off_a = vnt_time_stamp_off(priv, rate);
buf->time_stamp_off_b = vnt_time_stamp_off(priv,
- priv->byTopCCKBasicRate);
+ priv->top_cck_basic_rate);

tx_context->tx_hdr_size = vnt_mac_hdr_pos(tx_context, &buf->hdr);

@@ -387,13 +387,13 @@ 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;

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

buf->duration_bb = vnt_get_rtscts_duration_le(priv, RTSDUR_BB,
- frame_len, PK_TYPE_11B, priv->byTopCCKBasicRate, need_ack);
+ frame_len, PK_TYPE_11B, priv->top_cck_basic_rate, need_ack);
buf->duration_aa = vnt_get_rtscts_duration_le(priv, RTSDUR_AA,
frame_len, pkt_type, current_rate, need_ack);
buf->duration_ba = vnt_get_rtscts_duration_le(priv, RTSDUR_BA,
@@ -412,14 +412,14 @@ 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;

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


buf->duration_bb = vnt_get_rtscts_duration_le(priv, RTSDUR_BB,
- frame_len, PK_TYPE_11B, priv->byTopCCKBasicRate, need_ack);
+ frame_len, PK_TYPE_11B, priv->top_cck_basic_rate, need_ack);
buf->duration_aa = vnt_get_rtscts_duration_le(priv, RTSDUR_AA,
frame_len, pkt_type, current_rate, need_ack);
buf->duration_ba = vnt_get_rtscts_duration_le(priv, RTSDUR_BA,
@@ -500,7 +500,7 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
struct vnt_cts_fb *buf = &head->cts_g_fb;
/* Get SignalField,ServiceField,Length */
vnt_get_phy_field(priv, cts_frame_len,
- priv->byTopCCKBasicRate, PK_TYPE_11B, &buf->b);
+ priv->top_cck_basic_rate, PK_TYPE_11B, &buf->b);
buf->duration_ba = vnt_get_rtscts_duration_le(priv, CTSDUR_BA,
frame_len, pkt_type,
current_rate, need_ack);
@@ -526,7 +526,7 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
struct vnt_cts *buf = &head->cts_g;
/* Get SignalField,ServiceField,Length */
vnt_get_phy_field(priv, cts_frame_len,
- priv->byTopCCKBasicRate, PK_TYPE_11B, &buf->b);
+ priv->top_cck_basic_rate, PK_TYPE_11B, &buf->b);
/* Get CTSDuration_ba */
buf->duration_ba = vnt_get_rtscts_duration_le(priv,
CTSDUR_BA, frame_len, pkt_type,
@@ -563,7 +563,7 @@ static u16 vnt_rxtx_rts(struct vnt_usb_send_context *tx_context,
buf->rrv_time_a = vnt_rxtx_rsvtime_le16(priv, pkt_type, frame_size,
current_rate, need_ack);
buf->rrv_time_b = vnt_rxtx_rsvtime_le16(priv, PK_TYPE_11B, frame_size,
- priv->byTopCCKBasicRate, need_ack);
+ priv->top_cck_basic_rate, need_ack);

if (need_mic)
head = &tx_head->tx_rts.tx.mic.head;
@@ -588,7 +588,7 @@ static u16 vnt_rxtx_cts(struct vnt_usb_send_context *tx_context,
buf->rrv_time_a = vnt_rxtx_rsvtime_le16(priv, pkt_type,
frame_size, current_rate, need_ack);
buf->rrv_time_b = vnt_rxtx_rsvtime_le16(priv, PK_TYPE_11B,
- frame_size, priv->byTopCCKBasicRate, need_ack);
+ frame_size, priv->top_cck_basic_rate, need_ack);

buf->cts_rrv_time_ba = vnt_get_rtscts_rsvtime_le(priv, 3,
pkt_type, frame_size, current_rate);
--
2.0.1


2014-07-20 14:34:40

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 13/25] staging: vt6656: struct vnt_private replace wSeqCounter with seq_counter

Removing type prefix and camel case

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

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 905e90b..6647b2b 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -364,7 +364,7 @@ struct vnt_private {
u16 current_aid;

/* Beacon releated */
- u16 wSeqCounter;
+ u16 seq_counter;

enum vnt_cmd_state command_state;

diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 0e4b773..8d745af 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -914,7 +914,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
tx_key, skb, tx_body_size, mic_hdr);
}

- priv->wSeqCounter = (le16_to_cpu(hdr->seq_ctrl) &
+ priv->seq_counter = (le16_to_cpu(hdr->seq_ctrl) &
IEEE80211_SCTL_SEQ) >> 4;

tx_buffer->tx_byte_count = cpu_to_le16(tx_bytes);
@@ -1004,12 +1004,12 @@ static int vnt_beacon_xmit(struct vnt_private *priv,
if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)mgmt_hdr;
hdr->duration_id = 0;
- hdr->seq_ctrl = cpu_to_le16(priv->wSeqCounter << 4);
+ hdr->seq_ctrl = cpu_to_le16(priv->seq_counter << 4);
}

- priv->wSeqCounter++;
- if (priv->wSeqCounter > 0x0fff)
- priv->wSeqCounter = 0;
+ priv->seq_counter++;
+ if (priv->seq_counter > 0x0fff)
+ priv->seq_counter = 0;

count = sizeof(struct vnt_tx_short_buf_head) + skb->len;

--
2.0.1


2014-07-20 14:34:58

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 21/25] staging: vt6656: rxtx move pkt_type into vnt_usb_send_context

Removing pkt_type from functions

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 1 +
drivers/staging/vt6656/rxtx.c | 208 +++++++++++++++++++++-------------------
2 files changed, 109 insertions(+), 100 deletions(-)

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 120d325..0d5ecd6 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -235,6 +235,7 @@ struct vnt_usb_send_context {
u16 tx_hdr_size;
u8 type;
u8 pkt_no;
+ u8 pkt_type;
u8 fb_option;
bool in_use;
unsigned char data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS];
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 5d2072f..7906251 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -254,7 +254,7 @@ static u16 vnt_mac_hdr_pos(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context,
- u8 pkt_type, u16 rate, struct vnt_tx_datahead_g *buf,
+ u16 rate, struct vnt_tx_datahead_g *buf,
u32 frame_len, int need_ack)
{

@@ -263,7 +263,7 @@ static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context,
(struct ieee80211_hdr *)tx_context->skb->data;

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

@@ -274,7 +274,8 @@ static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context,
buf->duration_a = dur;
buf->duration_b = dur;
} else {
- buf->duration_a = vnt_get_duration_le(priv, pkt_type, need_ack);
+ buf->duration_a = vnt_get_duration_le(priv,
+ tx_context->pkt_type, need_ack);
buf->duration_b = vnt_get_duration_le(priv,
PK_TYPE_11B, need_ack);
}
@@ -289,23 +290,26 @@ static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_datahead_g_fb(struct vnt_usb_send_context *tx_context,
- u8 pkt_type, u16 rate, struct vnt_tx_datahead_g_fb *buf,
+ u16 rate, struct vnt_tx_datahead_g_fb *buf,
u32 frame_len, int need_ack)
{
struct vnt_private *priv = tx_context->priv;

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

vnt_get_phy_field(priv, frame_len, priv->top_cck_basic_rate,
PK_TYPE_11B, &buf->b);

/* Get Duration and TimeStamp */
- buf->duration_a = vnt_get_duration_le(priv, pkt_type, need_ack);
+ buf->duration_a = vnt_get_duration_le(priv, tx_context->pkt_type,
+ need_ack);
buf->duration_b = vnt_get_duration_le(priv, PK_TYPE_11B, need_ack);

- buf->duration_a_f0 = vnt_get_duration_le(priv, pkt_type, need_ack);
- buf->duration_a_f1 = vnt_get_duration_le(priv, pkt_type, need_ack);
+ buf->duration_a_f0 = vnt_get_duration_le(priv, tx_context->pkt_type,
+ need_ack);
+ buf->duration_a_f1 = vnt_get_duration_le(priv, tx_context->pkt_type,
+ need_ack);

buf->time_stamp_off_a = vnt_time_stamp_off(priv, rate);
buf->time_stamp_off_b = vnt_time_stamp_off(priv,
@@ -317,10 +321,11 @@ static u16 vnt_rxtx_datahead_g_fb(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_datahead_a_fb(struct vnt_usb_send_context *tx_context,
- u8 pkt_type, u16 rate, struct vnt_tx_datahead_a_fb *buf,
+ u16 rate, struct vnt_tx_datahead_a_fb *buf,
u32 frame_len, int need_ack)
{
struct vnt_private *priv = tx_context->priv;
+ u8 pkt_type = tx_context->pkt_type;

/* Get SignalField,ServiceField,Length */
vnt_get_phy_field(priv, frame_len, rate, pkt_type, &buf->a);
@@ -338,7 +343,7 @@ static u16 vnt_rxtx_datahead_a_fb(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_datahead_ab(struct vnt_usb_send_context *tx_context,
- u8 pkt_type, u16 rate, struct vnt_tx_datahead_ab *buf,
+ u16 rate, struct vnt_tx_datahead_ab *buf,
u32 frame_len, int need_ack)
{
struct vnt_private *priv = tx_context->priv;
@@ -346,7 +351,8 @@ static u16 vnt_rxtx_datahead_ab(struct vnt_usb_send_context *tx_context,
(struct ieee80211_hdr *)tx_context->skb->data;

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

/* Get Duration and TimeStampOff */
if (ieee80211_is_pspoll(hdr->frame_control)) {
@@ -354,7 +360,8 @@ static u16 vnt_rxtx_datahead_ab(struct vnt_usb_send_context *tx_context,

buf->duration = dur;
} else {
- buf->duration = vnt_get_duration_le(priv, pkt_type, need_ack);
+ buf->duration = vnt_get_duration_le(priv, tx_context->pkt_type,
+ need_ack);
}

buf->time_stamp_off = vnt_time_stamp_off(priv, rate);
@@ -381,112 +388,109 @@ static int vnt_fill_ieee80211_rts(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_g *buf, u8 pkt_type, u32 frame_len, int need_ack,
- u16 current_rate)
+ struct vnt_rts_g *buf, u32 frame_len, int need_ack, u16 current_rate)
{
struct vnt_private *priv = tx_context->priv;
u16 rts_frame_len = 20;

vnt_get_phy_field(priv, rts_frame_len, priv->top_cck_basic_rate,
PK_TYPE_11B, &buf->b);
- vnt_get_phy_field(priv, rts_frame_len,
- priv->top_ofdm_basic_rate, pkt_type, &buf->a);
+ vnt_get_phy_field(priv, rts_frame_len, priv->top_ofdm_basic_rate,
+ tx_context->pkt_type, &buf->a);

buf->duration_bb = vnt_get_rtscts_duration_le(priv, RTSDUR_BB,
frame_len, PK_TYPE_11B, priv->top_cck_basic_rate, need_ack);
buf->duration_aa = vnt_get_rtscts_duration_le(priv, RTSDUR_AA,
- frame_len, pkt_type, current_rate, need_ack);
+ frame_len, tx_context->pkt_type, current_rate, need_ack);
buf->duration_ba = vnt_get_rtscts_duration_le(priv, RTSDUR_BA,
- frame_len, pkt_type, current_rate, need_ack);
+ frame_len, tx_context->pkt_type, current_rate, need_ack);

vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration_aa);

- return vnt_rxtx_datahead_g(tx_context, pkt_type, current_rate,
- &buf->data_head, frame_len, need_ack);
+ return vnt_rxtx_datahead_g(tx_context, current_rate, &buf->data_head,
+ frame_len, need_ack);
}

static u16 vnt_rxtx_rts_g_fb_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_g_fb *buf, u8 pkt_type, u32 frame_len, int need_ack,
- u16 current_rate)
+ struct vnt_rts_g_fb *buf, u32 frame_len, int need_ack, u16 current_rate)
{
struct vnt_private *priv = tx_context->priv;
u16 rts_frame_len = 20;

vnt_get_phy_field(priv, rts_frame_len, priv->top_cck_basic_rate,
PK_TYPE_11B, &buf->b);
- vnt_get_phy_field(priv, rts_frame_len,
- priv->top_ofdm_basic_rate, pkt_type, &buf->a);
-
+ vnt_get_phy_field(priv, rts_frame_len, priv->top_ofdm_basic_rate,
+ tx_context->pkt_type, &buf->a);

buf->duration_bb = vnt_get_rtscts_duration_le(priv, RTSDUR_BB,
frame_len, PK_TYPE_11B, priv->top_cck_basic_rate, need_ack);
buf->duration_aa = vnt_get_rtscts_duration_le(priv, RTSDUR_AA,
- frame_len, pkt_type, current_rate, need_ack);
+ frame_len, tx_context->pkt_type, current_rate, need_ack);
buf->duration_ba = vnt_get_rtscts_duration_le(priv, RTSDUR_BA,
- frame_len, pkt_type, current_rate, need_ack);
-
+ frame_len, tx_context->pkt_type, current_rate, need_ack);

buf->rts_duration_ba_f0 = vnt_get_rtscts_duration_le(priv, RTSDUR_BA_F0,
- frame_len, pkt_type, priv->tx_rate_fb0, need_ack);
+ frame_len, tx_context->pkt_type, priv->tx_rate_fb0, need_ack);
buf->rts_duration_aa_f0 = vnt_get_rtscts_duration_le(priv, RTSDUR_AA_F0,
- frame_len, pkt_type, priv->tx_rate_fb0, need_ack);
+ frame_len, tx_context->pkt_type, priv->tx_rate_fb0, need_ack);
buf->rts_duration_ba_f1 = vnt_get_rtscts_duration_le(priv, RTSDUR_BA_F1,
- frame_len, pkt_type, priv->tx_rate_fb1, need_ack);
+ frame_len, tx_context->pkt_type, priv->tx_rate_fb1, need_ack);
buf->rts_duration_aa_f1 = vnt_get_rtscts_duration_le(priv, RTSDUR_AA_F1,
- frame_len, pkt_type, priv->tx_rate_fb1, need_ack);
+ frame_len, tx_context->pkt_type, priv->tx_rate_fb1, need_ack);

vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration_aa);

- return vnt_rxtx_datahead_g_fb(tx_context, pkt_type, current_rate,
- &buf->data_head, frame_len, need_ack);
+ return vnt_rxtx_datahead_g_fb(tx_context, current_rate, &buf->data_head,
+ frame_len, need_ack);
}

static u16 vnt_rxtx_rts_ab_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_ab *buf, u8 pkt_type, u32 frame_len, int need_ack,
+ struct vnt_rts_ab *buf, u32 frame_len, int need_ack,
u16 current_rate)
{
struct vnt_private *priv = tx_context->priv;
u16 rts_frame_len = 20;

- vnt_get_phy_field(priv, rts_frame_len,
- priv->top_ofdm_basic_rate, pkt_type, &buf->ab);
+ vnt_get_phy_field(priv, rts_frame_len, priv->top_ofdm_basic_rate,
+ tx_context->pkt_type, &buf->ab);

buf->duration = vnt_get_rtscts_duration_le(priv, RTSDUR_AA, frame_len,
- pkt_type, current_rate, need_ack);
+ tx_context->pkt_type,
+ current_rate, need_ack);

vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration);

- return vnt_rxtx_datahead_ab(tx_context, pkt_type, current_rate,
- &buf->data_head, frame_len, need_ack);
+ return vnt_rxtx_datahead_ab(tx_context, current_rate,
+ &buf->data_head, frame_len, need_ack);
}

static u16 vnt_rxtx_rts_a_fb_head(struct vnt_usb_send_context *tx_context,
- struct vnt_rts_a_fb *buf, u8 pkt_type, u32 frame_len, int need_ack,
- u16 current_rate)
+ struct vnt_rts_a_fb *buf, u32 frame_len, int need_ack, u16 current_rate)
{
struct vnt_private *priv = tx_context->priv;
u16 rts_frame_len = 20;

vnt_get_phy_field(priv, rts_frame_len,
- priv->top_ofdm_basic_rate, pkt_type, &buf->a);
+ priv->top_ofdm_basic_rate, tx_context->pkt_type, &buf->a);

buf->duration = vnt_get_rtscts_duration_le(priv, RTSDUR_AA, frame_len,
- pkt_type, current_rate, need_ack);
+ tx_context->pkt_type,
+ current_rate, need_ack);

buf->rts_duration_f0 = vnt_get_rtscts_duration_le(priv, RTSDUR_AA_F0,
- frame_len, pkt_type, priv->tx_rate_fb0, need_ack);
+ frame_len, tx_context->pkt_type, priv->tx_rate_fb0, need_ack);

buf->rts_duration_f1 = vnt_get_rtscts_duration_le(priv, RTSDUR_AA_F1,
- frame_len, pkt_type, priv->tx_rate_fb1, need_ack);
+ frame_len, tx_context->pkt_type, priv->tx_rate_fb1, need_ack);

vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration);

- return vnt_rxtx_datahead_a_fb(tx_context, pkt_type, current_rate,
- &buf->data_head, frame_len, need_ack);
+ return vnt_rxtx_datahead_a_fb(tx_context, current_rate, &buf->data_head,
+ frame_len, need_ack);
}

static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
- u8 pkt_type, union vnt_tx_data_head *head, u32 frame_len,
+ union vnt_tx_data_head *head, u32 frame_len,
int need_ack, u16 current_rate)
{
struct vnt_private *priv = tx_context->priv;
@@ -502,15 +506,15 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
vnt_get_phy_field(priv, cts_frame_len,
priv->top_cck_basic_rate, PK_TYPE_11B, &buf->b);
buf->duration_ba = vnt_get_rtscts_duration_le(priv, CTSDUR_BA,
- frame_len, pkt_type,
+ frame_len, tx_context->pkt_type,
current_rate, need_ack);
/* Get CTSDuration_ba_f0 */
buf->cts_duration_ba_f0 = vnt_get_rtscts_duration_le(priv,
- CTSDUR_BA_F0, frame_len, pkt_type,
+ CTSDUR_BA_F0, frame_len, tx_context->pkt_type,
priv->tx_rate_fb0, need_ack);
/* Get CTSDuration_ba_f1 */
buf->cts_duration_ba_f1 = vnt_get_rtscts_duration_le(priv,
- CTSDUR_BA_F1, frame_len, pkt_type,
+ CTSDUR_BA_F1, frame_len, tx_context->pkt_type,
priv->tx_rate_fb1, need_ack);
/* Get CTS Frame body */
buf->data.duration = buf->duration_ba;
@@ -519,9 +523,9 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,

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,
- need_ack);
+ return vnt_rxtx_datahead_g_fb(tx_context, current_rate,
+ &buf->data_head, frame_len,
+ need_ack);
} else {
struct vnt_cts *buf = &head->cts_g;
/* Get SignalField,ServiceField,Length */
@@ -529,7 +533,7 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
priv->top_cck_basic_rate, PK_TYPE_11B, &buf->b);
/* Get CTSDuration_ba */
buf->duration_ba = vnt_get_rtscts_duration_le(priv,
- CTSDUR_BA, frame_len, pkt_type,
+ CTSDUR_BA, frame_len, tx_context->pkt_type,
current_rate, need_ack);
/*Get CTS Frame body*/
buf->data.duration = buf->duration_ba;
@@ -538,7 +542,7 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,

memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN);

- return vnt_rxtx_datahead_g(tx_context, pkt_type, current_rate,
+ return vnt_rxtx_datahead_g(tx_context, current_rate,
&buf->data_head, frame_len, need_ack);
}

@@ -546,22 +550,23 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
}

static u16 vnt_rxtx_rts(struct vnt_usb_send_context *tx_context,
- union vnt_tx_head *tx_head, u8 pkt_type, u32 frame_size,
- int need_ack, u16 current_rate, bool need_mic)
+ union vnt_tx_head *tx_head, u32 frame_size, int need_ack,
+ u16 current_rate, bool need_mic)
{
struct vnt_private *priv = tx_context->priv;
struct vnt_rrv_time_rts *buf = &tx_head->tx_rts.rts;
union vnt_tx_data_head *head = &tx_head->tx_rts.tx.head;

buf->rts_rrv_time_aa = vnt_get_rtscts_rsvtime_le(priv, 2,
- pkt_type, frame_size, current_rate);
+ tx_context->pkt_type, frame_size, current_rate);
buf->rts_rrv_time_ba = vnt_get_rtscts_rsvtime_le(priv, 1,
- pkt_type, frame_size, current_rate);
+ tx_context->pkt_type, frame_size, current_rate);
buf->rts_rrv_time_bb = vnt_get_rtscts_rsvtime_le(priv, 0,
- pkt_type, frame_size, current_rate);
+ tx_context->pkt_type, frame_size, current_rate);

- buf->rrv_time_a = vnt_rxtx_rsvtime_le16(priv, pkt_type, frame_size,
- current_rate, need_ack);
+ buf->rrv_time_a = vnt_rxtx_rsvtime_le16(priv, tx_context->pkt_type,
+ frame_size, current_rate,
+ need_ack);
buf->rrv_time_b = vnt_rxtx_rsvtime_le16(priv, PK_TYPE_11B, frame_size,
priv->top_cck_basic_rate, need_ack);

@@ -570,106 +575,108 @@ static u16 vnt_rxtx_rts(struct vnt_usb_send_context *tx_context,

if (tx_context->fb_option)
return vnt_rxtx_rts_g_fb_head(tx_context, &head->rts_g_fb,
- pkt_type, frame_size, need_ack, current_rate);
+ frame_size, need_ack, current_rate);

- return vnt_rxtx_rts_g_head(tx_context, &head->rts_g,
- pkt_type, frame_size, need_ack, current_rate);
+ return vnt_rxtx_rts_g_head(tx_context, &head->rts_g, frame_size,
+ need_ack, current_rate);
}

static u16 vnt_rxtx_cts(struct vnt_usb_send_context *tx_context,
- union vnt_tx_head *tx_head, u8 pkt_type, u32 frame_size,
- int need_ack, u16 current_rate, bool need_mic)
+ union vnt_tx_head *tx_head, u32 frame_size, int need_ack,
+ u16 current_rate, bool need_mic)
{
struct vnt_private *priv = tx_context->priv;
struct vnt_rrv_time_cts *buf = &tx_head->tx_cts.cts;
union vnt_tx_data_head *head = &tx_head->tx_cts.tx.head;

-
- buf->rrv_time_a = vnt_rxtx_rsvtime_le16(priv, pkt_type,
+ buf->rrv_time_a = vnt_rxtx_rsvtime_le16(priv, tx_context->pkt_type,
frame_size, current_rate, need_ack);
buf->rrv_time_b = vnt_rxtx_rsvtime_le16(priv, PK_TYPE_11B,
frame_size, priv->top_cck_basic_rate, need_ack);

buf->cts_rrv_time_ba = vnt_get_rtscts_rsvtime_le(priv, 3,
- pkt_type, frame_size, current_rate);
+ tx_context->pkt_type, frame_size, current_rate);

if (need_mic)
head = &tx_head->tx_cts.tx.mic.head;

/* Fill CTS */
- return vnt_fill_cts_head(tx_context, pkt_type, head, frame_size,
- need_ack, current_rate);
+ return vnt_fill_cts_head(tx_context,
+ head, frame_size, need_ack, current_rate);
}

static u16 vnt_rxtx_ab(struct vnt_usb_send_context *tx_context,
- union vnt_tx_head *tx_head, u8 pkt_type, u32 frame_size,
+ union vnt_tx_head *tx_head, u32 frame_size,
int need_ack, u16 current_rate, bool need_rts, bool need_mic)
{
struct vnt_private *priv = tx_context->priv;
struct vnt_rrv_time_ab *buf = &tx_head->tx_ab.ab;
union vnt_tx_data_head *head = &tx_head->tx_ab.tx.head;

- buf->rrv_time = vnt_rxtx_rsvtime_le16(priv, pkt_type,
+ buf->rrv_time = vnt_rxtx_rsvtime_le16(priv, tx_context->pkt_type,
frame_size, current_rate, need_ack);

if (need_mic)
head = &tx_head->tx_ab.tx.mic.head;

if (need_rts) {
- if (pkt_type == PK_TYPE_11B)
+ if (tx_context->pkt_type == PK_TYPE_11B)
buf->rts_rrv_time = vnt_get_rtscts_rsvtime_le(priv, 0,
- pkt_type, frame_size, current_rate);
+ tx_context->pkt_type, frame_size, current_rate);
else /* PK_TYPE_11A */
buf->rts_rrv_time = vnt_get_rtscts_rsvtime_le(priv, 2,
- pkt_type, frame_size, current_rate);
+ tx_context->pkt_type, frame_size, current_rate);

- if (tx_context->fb_option && pkt_type == PK_TYPE_11A)
+ if (tx_context->fb_option &&
+ tx_context->pkt_type == PK_TYPE_11A)
return vnt_rxtx_rts_a_fb_head(tx_context,
- &head->rts_a_fb, pkt_type, frame_size,
- need_ack, current_rate);
+ &head->rts_a_fb,
+ frame_size, need_ack,
+ current_rate);

return vnt_rxtx_rts_ab_head(tx_context, &head->rts_ab,
- pkt_type, frame_size, need_ack, current_rate);
+ frame_size, need_ack, current_rate);
}

- if (pkt_type == PK_TYPE_11A)
- return vnt_rxtx_datahead_a_fb(tx_context, pkt_type,
- current_rate, &head->data_head_a_fb,
- frame_size, need_ack);
+ if (tx_context->pkt_type == PK_TYPE_11A)
+ return vnt_rxtx_datahead_a_fb(tx_context, current_rate,
+ &head->data_head_a_fb,
+ frame_size, need_ack);

- return vnt_rxtx_datahead_ab(tx_context, pkt_type, current_rate,
- &head->data_head_ab, frame_size, need_ack);
+ return vnt_rxtx_datahead_ab(tx_context, current_rate,
+ &head->data_head_ab, frame_size, need_ack);
}

static u16 vnt_generate_tx_parameter(struct vnt_usb_send_context *tx_context,
- u8 pkt_type, u16 current_rate, struct vnt_tx_buffer *tx_buffer,
+ u16 current_rate, struct vnt_tx_buffer *tx_buffer,
struct vnt_mic_hdr **mic_hdr, u32 need_mic, u32 frame_size,
int need_ack, bool need_rts)
{

- if (pkt_type == PK_TYPE_11GB || pkt_type == PK_TYPE_11GA) {
+ if (tx_context->pkt_type == PK_TYPE_11GB ||
+ tx_context->pkt_type == PK_TYPE_11GA) {
if (need_rts) {
if (need_mic)
*mic_hdr = &tx_buffer->
tx_head.tx_rts.tx.mic.hdr;

return vnt_rxtx_rts(tx_context, &tx_buffer->tx_head,
- pkt_type, frame_size, need_ack,
- current_rate, need_mic);
+ frame_size, need_ack, current_rate,
+ need_mic);
}

if (need_mic)
*mic_hdr = &tx_buffer->tx_head.tx_cts.tx.mic.hdr;

- return vnt_rxtx_cts(tx_context, &tx_buffer->tx_head, pkt_type,
- frame_size, need_ack, current_rate, need_mic);
+ return vnt_rxtx_cts(tx_context, &tx_buffer->tx_head, frame_size,
+ need_ack, current_rate, need_mic);
}

if (need_mic)
*mic_hdr = &tx_buffer->tx_head.tx_ab.tx.mic.hdr;

- return vnt_rxtx_ab(tx_context, &tx_buffer->tx_head, pkt_type,
- frame_size, need_ack, current_rate, need_rts, need_mic);
+ return vnt_rxtx_ab(tx_context, &tx_buffer->tx_head, frame_size,
+ need_ack, current_rate, need_rts, need_mic);
}

static void vnt_fill_txkey(struct vnt_usb_send_context *tx_context,
@@ -785,6 +792,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
}

tx_context->skb = skb;
+ tx_context->pkt_type = pkt_type;

spin_unlock_irqrestore(&priv->lock, flags);

@@ -889,9 +897,9 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)

tx_context->fb_option = fb_option;

- duration_id = vnt_generate_tx_parameter(tx_context, pkt_type,
- current_rate, tx_buffer, &mic_hdr, need_mic, frame_size,
- need_ack, need_rts);
+ duration_id = vnt_generate_tx_parameter(tx_context, current_rate,
+ tx_buffer, &mic_hdr, need_mic,
+ frame_size, need_ack, need_rts);

tx_header_size = tx_context->tx_hdr_size;
if (!tx_header_size) {
--
2.0.1


2014-07-20 14:34:44

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 15/25] staging: vt6656: struct vnt_private replace abyBBVGA with bb_vga

Removing type prefix and camel case.

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

diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index 8b2b2e7..11c098c 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -406,10 +406,10 @@ int vnt_vt3184_init(struct vnt_private *priv)
agc = vnt_vt3184_agc;
length_agc = sizeof(vnt_vt3184_agc);

- priv->abyBBVGA[0] = 0x1C;
- priv->abyBBVGA[1] = 0x10;
- priv->abyBBVGA[2] = 0x0;
- priv->abyBBVGA[3] = 0x0;
+ priv->bb_vga[0] = 0x1C;
+ priv->bb_vga[1] = 0x10;
+ priv->bb_vga[2] = 0x0;
+ priv->bb_vga[3] = 0x0;
priv->ldBmThreshold[0] = -70;
priv->ldBmThreshold[1] = -48;
priv->ldBmThreshold[2] = 0;
@@ -423,10 +423,10 @@ int vnt_vt3184_init(struct vnt_private *priv)

addr[0xd7] = 0x06;

- priv->abyBBVGA[0] = 0x1c;
- priv->abyBBVGA[1] = 0x10;
- priv->abyBBVGA[2] = 0x0;
- priv->abyBBVGA[3] = 0x0;
+ priv->bb_vga[0] = 0x1c;
+ priv->bb_vga[1] = 0x10;
+ priv->bb_vga[2] = 0x0;
+ priv->bb_vga[3] = 0x0;
priv->ldBmThreshold[0] = -70;
priv->ldBmThreshold[1] = -48;
priv->ldBmThreshold[2] = 0;
@@ -439,10 +439,10 @@ int vnt_vt3184_init(struct vnt_private *priv)
agc = vnt_vt3184_agc;
length_agc = sizeof(vnt_vt3184_agc);

- priv->abyBBVGA[0] = 0x20;
- priv->abyBBVGA[1] = 0x10;
- priv->abyBBVGA[2] = 0x0;
- priv->abyBBVGA[3] = 0x0;
+ priv->bb_vga[0] = 0x20;
+ priv->bb_vga[1] = 0x10;
+ priv->bb_vga[2] = 0x0;
+ priv->bb_vga[3] = 0x0;
priv->ldBmThreshold[0] = -70;
priv->ldBmThreshold[1] = -48;
priv->ldBmThreshold[2] = 0;
@@ -457,10 +457,10 @@ int vnt_vt3184_init(struct vnt_private *priv)
agc = vnt_vt3184_agc;
length_agc = sizeof(vnt_vt3184_agc);

- priv->abyBBVGA[0] = 0x20;
- priv->abyBBVGA[1] = 0x10;
- priv->abyBBVGA[2] = 0x0;
- priv->abyBBVGA[3] = 0x0;
+ priv->bb_vga[0] = 0x20;
+ priv->bb_vga[1] = 0x10;
+ priv->bb_vga[2] = 0x0;
+ priv->bb_vga[3] = 0x0;
priv->ldBmThreshold[0] = -70;
priv->ldBmThreshold[1] = -48;
priv->ldBmThreshold[2] = 0;
@@ -533,7 +533,7 @@ void vnt_set_short_slot_time(struct vnt_private *priv)

vnt_control_in_u8(priv, MESSAGE_REQUEST_BBREG, 0xe7, &bb_vga);

- if (bb_vga == priv->abyBBVGA[0])
+ if (bb_vga == priv->bb_vga[0])
priv->bb_rx_conf |= 0x20;

vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, 0x0a, priv->bb_rx_conf);
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 75b586b..c06dd9d 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -807,25 +807,25 @@ void vnt_set_bss_mode(struct vnt_private *priv)

if (priv->bb_type == BB_TYPE_11A) {
if (priv->rf_type == RF_AIROHA7230) {
- priv->abyBBVGA[0] = 0x20;
+ priv->bb_vga[0] = 0x20;

vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG,
- 0xe7, priv->abyBBVGA[0]);
+ 0xe7, priv->bb_vga[0]);
}

- priv->abyBBVGA[2] = 0x10;
- priv->abyBBVGA[3] = 0x10;
+ priv->bb_vga[2] = 0x10;
+ priv->bb_vga[3] = 0x10;
} else {
if (priv->rf_type == RF_AIROHA7230) {
- priv->abyBBVGA[0] = 0x1c;
+ priv->bb_vga[0] = 0x1c;

vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG,
- 0xe7, priv->abyBBVGA[0]);
+ 0xe7, priv->bb_vga[0]);
}

- priv->abyBBVGA[2] = 0x0;
- priv->abyBBVGA[3] = 0x0;
+ priv->bb_vga[2] = 0x0;
+ priv->bb_vga[3] = 0x0;
}

- vnt_set_vga_gain_offset(priv, priv->abyBBVGA[0]);
+ vnt_set_vga_gain_offset(priv, priv->bb_vga[0]);
}
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index ef9b505..e3c2509 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -383,7 +383,7 @@ struct vnt_private {
u8 auto_fb_ctrl;

/* For Update BaseBand VGA Gain Offset */
- u8 abyBBVGA[BB_VGA_LEVEL];
+ u8 bb_vga[BB_VGA_LEVEL];
signed long ldBmThreshold[BB_VGA_LEVEL];

u8 byBBPreEDRSSI;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index fac13b1..b99def7 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -773,7 +773,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
priv->short_slot_time = false;

vnt_set_short_slot_time(priv);
- vnt_set_vga_gain_offset(priv, priv->abyBBVGA[0]);
+ vnt_set_vga_gain_offset(priv, priv->bb_vga[0]);
vnt_update_pre_ed_threshold(priv, false);
}

--
2.0.1


2014-07-20 14:34:29

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 06/25] staging: vt6656: struct vnt_private replace abyEEPROM with eeprom

Removing type prefix and camel case.

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

diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index 6af9fcb..9598c19 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -390,11 +390,11 @@ int vnt_vt3184_init(struct vnt_private *priv)

status = vnt_control_in(priv, MESSAGE_TYPE_READ, 0,
MESSAGE_REQUEST_EEPROM, EEP_MAX_CONTEXT_SIZE,
- priv->abyEEPROM);
+ priv->eeprom);
if (status != STATUS_SUCCESS)
return false;

- priv->rf_type = priv->abyEEPROM[EEP_OFS_RFTYPE];
+ priv->rf_type = priv->eeprom[EEP_OFS_RFTYPE];

dev_dbg(&priv->usb->dev, "RF Type %d\n", priv->rf_type);

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index dcb57dc..07e9d03 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -336,7 +336,7 @@ struct vnt_private {
u8 top_ofdm_basic_rate;
u8 top_cck_basic_rate;

- u8 abyEEPROM[EEP_MAX_CONTEXT_SIZE]; /*u32 alignment */
+ u8 eeprom[EEP_MAX_CONTEXT_SIZE]; /*u32 alignment */

u8 byPreambleType;

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index f5227ee..4054e36 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -201,17 +201,17 @@ static int device_init_registers(struct vnt_private *priv)
/* target to IF pin while programming to RF chip */
priv->byCurPwr = 0xFF;

- priv->byCCKPwr = priv->abyEEPROM[EEP_OFS_PWR_CCK];
- priv->byOFDMPwrG = priv->abyEEPROM[EEP_OFS_PWR_OFDMG];
+ priv->byCCKPwr = priv->eeprom[EEP_OFS_PWR_CCK];
+ priv->byOFDMPwrG = priv->eeprom[EEP_OFS_PWR_OFDMG];
/* load power table */
for (ii = 0; ii < 14; ii++) {
priv->abyCCKPwrTbl[ii] =
- priv->abyEEPROM[ii + EEP_OFS_CCK_PWR_TBL];
+ priv->eeprom[ii + EEP_OFS_CCK_PWR_TBL];

if (priv->abyCCKPwrTbl[ii] == 0)
priv->abyCCKPwrTbl[ii] = priv->byCCKPwr;
priv->abyOFDMPwrTbl[ii] =
- priv->abyEEPROM[ii + EEP_OFS_OFDM_PWR_TBL];
+ priv->eeprom[ii + EEP_OFS_OFDM_PWR_TBL];
if (priv->abyOFDMPwrTbl[ii] == 0)
priv->abyOFDMPwrTbl[ii] = priv->byOFDMPwrG;
}
@@ -230,13 +230,13 @@ static int device_init_registers(struct vnt_private *priv)
/* load OFDM A power table */
for (ii = 0; ii < CB_MAX_CHANNEL_5G; ii++) {
priv->abyOFDMAPwrTbl[ii] =
- priv->abyEEPROM[ii + EEP_OFS_OFDMA_PWR_TBL];
+ priv->eeprom[ii + EEP_OFS_OFDMA_PWR_TBL];

if (priv->abyOFDMAPwrTbl[ii] == 0)
priv->abyOFDMAPwrTbl[ii] = priv->byOFDMPwrA;
}

- antenna = priv->abyEEPROM[EEP_OFS_ANTENNA];
+ antenna = priv->eeprom[EEP_OFS_ANTENNA];

if (antenna & EEP_ANTINV)
priv->tx_rx_ant_inv = true;
@@ -290,12 +290,12 @@ static int device_init_registers(struct vnt_private *priv)

/* load vt3266 calibration parameters in EEPROM */
if (priv->rf_type == RF_VT3226D0) {
- if ((priv->abyEEPROM[EEP_OFS_MAJOR_VER] == 0x1) &&
- (priv->abyEEPROM[EEP_OFS_MINOR_VER] >= 0x4)) {
+ if ((priv->eeprom[EEP_OFS_MAJOR_VER] == 0x1) &&
+ (priv->eeprom[EEP_OFS_MINOR_VER] >= 0x4)) {

- calib_tx_iq = priv->abyEEPROM[EEP_OFS_CALIB_TX_IQ];
- calib_tx_dc = priv->abyEEPROM[EEP_OFS_CALIB_TX_DC];
- calib_rx_iq = priv->abyEEPROM[EEP_OFS_CALIB_RX_IQ];
+ calib_tx_iq = priv->eeprom[EEP_OFS_CALIB_TX_IQ];
+ calib_tx_dc = priv->eeprom[EEP_OFS_CALIB_TX_DC];
+ calib_rx_iq = priv->eeprom[EEP_OFS_CALIB_RX_IQ];
if (calib_tx_iq || calib_tx_dc || calib_rx_iq) {
/* CR255, enable TX/RX IQ and
DC compensation mode */
@@ -348,7 +348,7 @@ static int device_init_registers(struct vnt_private *priv)

vnt_set_short_slot_time(priv);

- priv->radio_ctl = priv->abyEEPROM[EEP_OFS_RADIOCTL];
+ priv->radio_ctl = priv->eeprom[EEP_OFS_RADIOCTL];

if ((priv->radio_ctl & EEP_RADIOCTL_ENABLE) != 0) {
status = vnt_control_in(priv, MESSAGE_TYPE_READ,
--
2.0.1


2014-07-20 14:34:32

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 08/25] staging: vt6656: struct vnt_private rf power table remove camel case

Camel case changes
byCCKPwr -> cck_pwr
byOFDMPwrG -> ofdm_pwr_g
byOFDMPwrA -> ofdm_pwr_a
byCurPwr -> power
abyCCKPwrTbl -> cck_pwr_tbl
abyOFDMPwrTbl -> ofdm_pwr_tbl
abyOFDMAPwrTbl -> ofdm_a_pwr_tbl

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

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 466a984..4424d75 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -341,13 +341,13 @@ struct vnt_private {
u8 preamble_type;

/* For RF Power table */
- u8 byCCKPwr;
- u8 byOFDMPwrG;
- u8 byOFDMPwrA;
- u8 byCurPwr;
- u8 abyCCKPwrTbl[14];
- u8 abyOFDMPwrTbl[14];
- u8 abyOFDMAPwrTbl[42];
+ u8 cck_pwr;
+ u8 ofdm_pwr_g;
+ u8 ofdm_pwr_a;
+ u8 power;
+ u8 cck_pwr_tbl[14];
+ u8 ofdm_pwr_tbl[14];
+ u8 ofdm_a_pwr_tbl[42];

u16 wCurrentRate;
u16 tx_rate_fb0;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 325daae..8fb602a 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -199,21 +199,21 @@ static int device_init_registers(struct vnt_private *priv)
priv->top_cck_basic_rate = RATE_1M;

/* target to IF pin while programming to RF chip */
- priv->byCurPwr = 0xFF;
+ priv->power = 0xFF;

- priv->byCCKPwr = priv->eeprom[EEP_OFS_PWR_CCK];
- priv->byOFDMPwrG = priv->eeprom[EEP_OFS_PWR_OFDMG];
+ priv->cck_pwr = priv->eeprom[EEP_OFS_PWR_CCK];
+ priv->ofdm_pwr_g = priv->eeprom[EEP_OFS_PWR_OFDMG];
/* load power table */
for (ii = 0; ii < 14; ii++) {
- priv->abyCCKPwrTbl[ii] =
+ priv->cck_pwr_tbl[ii] =
priv->eeprom[ii + EEP_OFS_CCK_PWR_TBL];
+ if (priv->cck_pwr_tbl[ii] == 0)
+ priv->cck_pwr_tbl[ii] = priv->cck_pwr;

- if (priv->abyCCKPwrTbl[ii] == 0)
- priv->abyCCKPwrTbl[ii] = priv->byCCKPwr;
- priv->abyOFDMPwrTbl[ii] =
+ priv->ofdm_pwr_tbl[ii] =
priv->eeprom[ii + EEP_OFS_OFDM_PWR_TBL];
- if (priv->abyOFDMPwrTbl[ii] == 0)
- priv->abyOFDMPwrTbl[ii] = priv->byOFDMPwrG;
+ if (priv->ofdm_pwr_tbl[ii] == 0)
+ priv->ofdm_pwr_tbl[ii] = priv->ofdm_pwr_g;
}

/*
@@ -221,19 +221,19 @@ static int device_init_registers(struct vnt_private *priv)
* then need to recover 12, 13, 14 channels with 11 channel
*/
for (ii = 11; ii < 14; ii++) {
- priv->abyCCKPwrTbl[ii] = priv->abyCCKPwrTbl[10];
- priv->abyOFDMPwrTbl[ii] = priv->abyOFDMPwrTbl[10];
+ priv->cck_pwr_tbl[ii] = priv->cck_pwr_tbl[10];
+ priv->ofdm_pwr_tbl[ii] = priv->ofdm_pwr_tbl[10];
}

- priv->byOFDMPwrA = 0x34; /* same as RFbMA2829SelectChannel */
+ priv->ofdm_pwr_a = 0x34; /* same as RFbMA2829SelectChannel */

/* load OFDM A power table */
for (ii = 0; ii < CB_MAX_CHANNEL_5G; ii++) {
- priv->abyOFDMAPwrTbl[ii] =
+ priv->ofdm_a_pwr_tbl[ii] =
priv->eeprom[ii + EEP_OFS_OFDMA_PWR_TBL];

- if (priv->abyOFDMAPwrTbl[ii] == 0)
- priv->abyOFDMAPwrTbl[ii] = priv->byOFDMPwrA;
+ if (priv->ofdm_a_pwr_tbl[ii] == 0)
+ priv->ofdm_a_pwr_tbl[ii] = priv->ofdm_pwr_a;
}

antenna = priv->eeprom[EEP_OFS_ANTENNA];
diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 3815db9..c0edcae 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -624,7 +624,7 @@ int vnt_rf_write_embedded(struct vnt_private *priv, u32 data)
int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel)
{
int ret = true;
- u8 power = priv->byCCKPwr;
+ u8 power = priv->cck_pwr;

if (channel == 0)
return -EINVAL;
@@ -636,8 +636,8 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel)
case RATE_11M:
channel--;

- if (channel < sizeof(priv->abyCCKPwrTbl))
- power = priv->abyCCKPwrTbl[channel];
+ if (channel < sizeof(priv->cck_pwr_tbl))
+ power = priv->cck_pwr_tbl[channel];
break;
case RATE_6M:
case RATE_9M:
@@ -647,9 +647,9 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel)
case RATE_48M:
case RATE_54M:
if (channel > CB_MAX_CHANNEL_24G)
- power = priv->abyOFDMAPwrTbl[channel-15];
+ power = priv->ofdm_a_pwr_tbl[channel-15];
else
- power = priv->abyOFDMPwrTbl[channel-1];
+ power = priv->ofdm_pwr_tbl[channel-1];
break;
}

@@ -694,10 +694,10 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, u32 rate)
if (power > VNT_RF_MAX_POWER)
power = VNT_RF_MAX_POWER;

- if (priv->byCurPwr == power)
+ if (priv->power == power)
return true;

- priv->byCurPwr = power;
+ priv->power = power;

switch (priv->rf_type) {
case RF_AL2230:
--
2.0.1


2014-07-20 14:34:42

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 14/25] staging: vt6656: struct vnt_private replace byAutoFBCtrl with auto_fb_ctrl

Removing type prefix and camel case.

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

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 6647b2b..ef9b505 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -380,7 +380,7 @@ struct vnt_private {

unsigned long key_entry_inuse;

- u8 byAutoFBCtrl;
+ u8 auto_fb_ctrl;

/* For Update BaseBand VGA Gain Offset */
u8 abyBBVGA[BB_VGA_LEVEL];
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index f7f4dcc..fac13b1 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -123,7 +123,7 @@ static void device_set_options(struct vnt_private *priv)
priv->op_mode = NL80211_IFTYPE_UNSPECIFIED;
priv->bb_type = BBP_TYPE_DEF;
priv->packet_type = priv->bb_type;
- priv->byAutoFBCtrl = AUTO_FB_0;
+ priv->auto_fb_ctrl = AUTO_FB_0;
priv->preamble_type = 0;
priv->exist_sw_net_addr = false;
}
@@ -280,7 +280,7 @@ static int device_init_registers(struct vnt_private *priv)
vnt_set_antenna_mode(priv, priv->rx_antenna_mode);

/* get Auto Fall Back type */
- priv->byAutoFBCtrl = AUTO_FB_0;
+ priv->auto_fb_ctrl = AUTO_FB_0;

/* default Auto Mode */
priv->bb_type = BB_TYPE_11G;
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 8d745af..0febd03 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -866,7 +866,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)

/* legacy rates TODO use ieee80211_tx_rate */
if (current_rate >= RATE_18M && ieee80211_is_data(hdr->frame_control)) {
- if (priv->byAutoFBCtrl == AUTO_FB_0) {
+ if (priv->auto_fb_ctrl == AUTO_FB_0) {
tx_buffer_head->wFIFOCtl |= FIFOCTL_AUTO_FB_0;

priv->tx_rate_fb0 =
@@ -875,7 +875,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
vnt_fb_opt0[FB_RATE1][current_rate - RATE_18M];

fb_option = AUTO_FB_0;
- } else if (priv->byAutoFBCtrl == AUTO_FB_1) {
+ } else if (priv->auto_fb_ctrl == AUTO_FB_1) {
tx_buffer_head->wFIFOCtl |= FIFOCTL_AUTO_FB_1;

priv->tx_rate_fb0 =
--
2.0.1


2014-07-20 14:34:25

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 04/25] staging: vt6656: struct vnt_private replace byTopOFDMBasicRate with top_ofdm_basic_rate

Removing type prefix and camel case.

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

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 80b6732..3217f77 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -460,7 +460,7 @@ void vnt_update_top_rates(struct vnt_private *priv)
}
}

- priv->byTopOFDMBasicRate = top_ofdm;
+ priv->top_ofdm_basic_rate = top_ofdm;

for (i = RATE_11M;; i--) {
if (priv->basic_rates & (u16)(1 << i)) {
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 8cc33df..951abc2b 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -333,7 +333,7 @@ struct vnt_private {
u8 bb_type; /* 0: 11A, 1:11B, 2:11G */
u8 packet_type; /* 0:11a 1:11b 2:11gb 3:11ga */
u32 basic_rates;
- u8 byTopOFDMBasicRate;
+ u8 top_ofdm_basic_rate;
u8 byTopCCKBasicRate;

u8 abyEEPROM[EEP_MAX_CONTEXT_SIZE]; /*u32 alignment */
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 02898ff..a02a028 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -195,7 +195,7 @@ static int device_init_registers(struct vnt_private *priv)

/* do MACbSoftwareReset in MACvInitialize */

- priv->byTopOFDMBasicRate = RATE_24M;
+ priv->top_ofdm_basic_rate = RATE_24M;
priv->byTopCCKBasicRate = RATE_1M;

/* target to IF pin while programming to RF chip */
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 03f299d..ba2d550 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -122,7 +122,7 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type,
14, (u16)priv->byTopCCKBasicRate);
else
ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
- 14, (u16)priv->byTopOFDMBasicRate);
+ 14, (u16)priv->top_ofdm_basic_rate);

if (need_ack)
return data_time + priv->sifs + ack_time;
@@ -158,17 +158,17 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,
cts_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
14, priv->byTopCCKBasicRate);
ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
- 14, priv->byTopOFDMBasicRate);
+ 14, priv->top_ofdm_basic_rate);
} else if (rsv_type == 2) {
rts_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
- 20, priv->byTopOFDMBasicRate);
+ 20, priv->top_ofdm_basic_rate);
cts_time = ack_time = vnt_get_frame_time(priv->byPreambleType,
- pkt_type, 14, priv->byTopOFDMBasicRate);
+ pkt_type, 14, priv->top_ofdm_basic_rate);
} else if (rsv_type == 3) {
cts_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
14, priv->byTopCCKBasicRate);
ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
- 14, priv->byTopOFDMBasicRate);
+ 14, priv->top_ofdm_basic_rate);

rrv_time = cts_time + ack_time + data_time + 2 * priv->sifs;

@@ -191,7 +191,7 @@ static __le16 vnt_get_duration_le(struct vnt_private *piv,
pkt_type, 14, piv->byTopCCKBasicRate);
else
ack_time = vnt_get_frame_time(piv->byPreambleType,
- pkt_type, 14, piv->byTopOFDMBasicRate);
+ pkt_type, 14, piv->top_ofdm_basic_rate);

return cpu_to_le16((u16)(piv->sifs + ack_time));
}
@@ -220,7 +220,7 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_private *priv, u8 dur_type,
case RTSDUR_AA_F0:
case RTSDUR_AA_F1:
cts_time = vnt_get_frame_time(priv->byPreambleType,
- pkt_type, 14, priv->byTopOFDMBasicRate);
+ pkt_type, 14, priv->top_ofdm_basic_rate);
dur_time = cts_time + 2 * priv->sifs +
vnt_get_rsvtime(priv, pkt_type,
frame_length, rate, need_ack);
@@ -390,7 +390,7 @@ static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context *tx_context,
vnt_get_phy_field(priv, rts_frame_len, priv->byTopCCKBasicRate,
PK_TYPE_11B, &buf->b);
vnt_get_phy_field(priv, rts_frame_len,
- priv->byTopOFDMBasicRate, pkt_type, &buf->a);
+ priv->top_ofdm_basic_rate, pkt_type, &buf->a);

buf->duration_bb = vnt_get_rtscts_duration_le(priv, RTSDUR_BB,
frame_len, PK_TYPE_11B, priv->byTopCCKBasicRate, need_ack);
@@ -415,7 +415,7 @@ static u16 vnt_rxtx_rts_g_fb_head(struct vnt_usb_send_context *tx_context,
vnt_get_phy_field(priv, rts_frame_len, priv->byTopCCKBasicRate,
PK_TYPE_11B, &buf->b);
vnt_get_phy_field(priv, rts_frame_len,
- priv->byTopOFDMBasicRate, pkt_type, &buf->a);
+ priv->top_ofdm_basic_rate, pkt_type, &buf->a);


buf->duration_bb = vnt_get_rtscts_duration_le(priv, RTSDUR_BB,
@@ -449,7 +449,7 @@ static u16 vnt_rxtx_rts_ab_head(struct vnt_usb_send_context *tx_context,
u16 rts_frame_len = 20;

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

buf->duration = vnt_get_rtscts_duration_le(priv, RTSDUR_AA, frame_len,
pkt_type, current_rate, need_ack);
@@ -468,7 +468,7 @@ static u16 vnt_rxtx_rts_a_fb_head(struct vnt_usb_send_context *tx_context,
u16 rts_frame_len = 20;

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

buf->duration = vnt_get_rtscts_duration_le(priv, RTSDUR_AA, frame_len,
pkt_type, current_rate, need_ack);
--
2.0.1


2014-07-20 14:35:05

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 25/25] staging: vt6656: struct vnt_usb_send_context context into vnt_get_duration_le

Removing priv, frame_length and need_ack

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

diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 7c92d1b..4fc93f0 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -199,10 +199,13 @@ static __le16 vnt_get_duration_le(struct vnt_private *priv,
return 0;
}

-static __le16 vnt_get_rtscts_duration_le(struct vnt_private *priv, u8 dur_type,
- u32 frame_length, u8 pkt_type, u16 rate, int need_ack)
+static __le16 vnt_get_rtscts_duration_le(struct vnt_usb_send_context *context,
+ u8 dur_type, u8 pkt_type, u16 rate)
{
+ struct vnt_private *priv = context->priv;
u32 cts_time = 0, dur_time = 0;
+ u32 frame_length = context->frame_len;
+ u8 need_ack = context->need_ack;

switch (dur_type) {
case RTSDUR_BB:
@@ -399,22 +402,23 @@ static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context *tx_context,
struct vnt_rts_g *buf)
{
struct vnt_private *priv = tx_context->priv;
- u32 frame_len = tx_context->frame_len;
u16 rts_frame_len = 20;
u16 current_rate = tx_context->tx_rate;
- u8 need_ack = tx_context->need_ack;

vnt_get_phy_field(priv, rts_frame_len, priv->top_cck_basic_rate,
PK_TYPE_11B, &buf->b);
vnt_get_phy_field(priv, rts_frame_len, priv->top_ofdm_basic_rate,
tx_context->pkt_type, &buf->a);

- buf->duration_bb = vnt_get_rtscts_duration_le(priv, RTSDUR_BB,
- frame_len, PK_TYPE_11B, priv->top_cck_basic_rate, need_ack);
- buf->duration_aa = vnt_get_rtscts_duration_le(priv, RTSDUR_AA,
- frame_len, tx_context->pkt_type, current_rate, need_ack);
- buf->duration_ba = vnt_get_rtscts_duration_le(priv, RTSDUR_BA,
- frame_len, tx_context->pkt_type, current_rate, need_ack);
+ buf->duration_bb = vnt_get_rtscts_duration_le(tx_context, RTSDUR_BB,
+ PK_TYPE_11B,
+ priv->top_cck_basic_rate);
+ buf->duration_aa = vnt_get_rtscts_duration_le(tx_context, RTSDUR_AA,
+ tx_context->pkt_type,
+ current_rate);
+ buf->duration_ba = vnt_get_rtscts_duration_le(tx_context, RTSDUR_BA,
+ tx_context->pkt_type,
+ current_rate);

vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration_aa);

@@ -425,31 +429,40 @@ static u16 vnt_rxtx_rts_g_fb_head(struct vnt_usb_send_context *tx_context,
struct vnt_rts_g_fb *buf)
{
struct vnt_private *priv = tx_context->priv;
- u32 frame_len = tx_context->frame_len;
u16 current_rate = tx_context->tx_rate;
u16 rts_frame_len = 20;
- u8 need_ack = tx_context->need_ack;

vnt_get_phy_field(priv, rts_frame_len, priv->top_cck_basic_rate,
PK_TYPE_11B, &buf->b);
vnt_get_phy_field(priv, rts_frame_len, priv->top_ofdm_basic_rate,
tx_context->pkt_type, &buf->a);

- buf->duration_bb = vnt_get_rtscts_duration_le(priv, RTSDUR_BB,
- frame_len, PK_TYPE_11B, priv->top_cck_basic_rate, need_ack);
- buf->duration_aa = vnt_get_rtscts_duration_le(priv, RTSDUR_AA,
- frame_len, tx_context->pkt_type, current_rate, need_ack);
- buf->duration_ba = vnt_get_rtscts_duration_le(priv, RTSDUR_BA,
- frame_len, tx_context->pkt_type, current_rate, need_ack);
-
- buf->rts_duration_ba_f0 = vnt_get_rtscts_duration_le(priv, RTSDUR_BA_F0,
- frame_len, tx_context->pkt_type, priv->tx_rate_fb0, need_ack);
- buf->rts_duration_aa_f0 = vnt_get_rtscts_duration_le(priv, RTSDUR_AA_F0,
- frame_len, tx_context->pkt_type, priv->tx_rate_fb0, need_ack);
- buf->rts_duration_ba_f1 = vnt_get_rtscts_duration_le(priv, RTSDUR_BA_F1,
- frame_len, tx_context->pkt_type, priv->tx_rate_fb1, need_ack);
- buf->rts_duration_aa_f1 = vnt_get_rtscts_duration_le(priv, RTSDUR_AA_F1,
- frame_len, tx_context->pkt_type, priv->tx_rate_fb1, need_ack);
+ buf->duration_bb = vnt_get_rtscts_duration_le(tx_context, RTSDUR_BB,
+ PK_TYPE_11B,
+ priv->top_cck_basic_rate);
+ buf->duration_aa = vnt_get_rtscts_duration_le(tx_context, RTSDUR_AA,
+ tx_context->pkt_type,
+ current_rate);
+ buf->duration_ba = vnt_get_rtscts_duration_le(tx_context, RTSDUR_BA,
+ tx_context->pkt_type,
+ current_rate);
+
+ buf->rts_duration_ba_f0 =
+ vnt_get_rtscts_duration_le(tx_context, RTSDUR_BA_F0,
+ tx_context->pkt_type,
+ priv->tx_rate_fb0);
+ buf->rts_duration_aa_f0 =
+ vnt_get_rtscts_duration_le(tx_context, RTSDUR_AA_F0,
+ tx_context->pkt_type,
+ priv->tx_rate_fb0);
+ buf->rts_duration_ba_f1 =
+ vnt_get_rtscts_duration_le(tx_context, RTSDUR_BA_F1,
+ tx_context->pkt_type,
+ priv->tx_rate_fb1);
+ buf->rts_duration_aa_f1 =
+ vnt_get_rtscts_duration_le(tx_context, RTSDUR_AA_F1,
+ tx_context->pkt_type,
+ priv->tx_rate_fb1);

vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration_aa);

@@ -460,18 +473,15 @@ static u16 vnt_rxtx_rts_ab_head(struct vnt_usb_send_context *tx_context,
struct vnt_rts_ab *buf)
{
struct vnt_private *priv = tx_context->priv;
- u32 frame_len = tx_context->frame_len;
u16 current_rate = tx_context->tx_rate;
u16 rts_frame_len = 20;
- u8 need_ack = tx_context->need_ack;
-

vnt_get_phy_field(priv, rts_frame_len, priv->top_ofdm_basic_rate,
tx_context->pkt_type, &buf->ab);

- buf->duration = vnt_get_rtscts_duration_le(priv, RTSDUR_AA, frame_len,
+ buf->duration = vnt_get_rtscts_duration_le(tx_context, RTSDUR_AA,
tx_context->pkt_type,
- current_rate, need_ack);
+ current_rate);

vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration);

@@ -482,23 +492,25 @@ static u16 vnt_rxtx_rts_a_fb_head(struct vnt_usb_send_context *tx_context,
struct vnt_rts_a_fb *buf)
{
struct vnt_private *priv = tx_context->priv;
- u32 frame_len = tx_context->frame_len;
u16 current_rate = tx_context->tx_rate;
u16 rts_frame_len = 20;
- u8 need_ack = tx_context->need_ack;

vnt_get_phy_field(priv, rts_frame_len,
priv->top_ofdm_basic_rate, tx_context->pkt_type, &buf->a);

- buf->duration = vnt_get_rtscts_duration_le(priv, RTSDUR_AA, frame_len,
+ buf->duration = vnt_get_rtscts_duration_le(tx_context, RTSDUR_AA,
tx_context->pkt_type,
- current_rate, need_ack);
+ current_rate);

- buf->rts_duration_f0 = vnt_get_rtscts_duration_le(priv, RTSDUR_AA_F0,
- frame_len, tx_context->pkt_type, priv->tx_rate_fb0, need_ack);
+ buf->rts_duration_f0 =
+ vnt_get_rtscts_duration_le(tx_context, RTSDUR_AA_F0,
+ tx_context->pkt_type,
+ priv->tx_rate_fb0);

- buf->rts_duration_f1 = vnt_get_rtscts_duration_le(priv, RTSDUR_AA_F1,
- frame_len, tx_context->pkt_type, priv->tx_rate_fb1, need_ack);
+ buf->rts_duration_f1 =
+ vnt_get_rtscts_duration_le(tx_context, RTSDUR_AA_F1,
+ tx_context->pkt_type,
+ priv->tx_rate_fb1);

vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration);

@@ -509,10 +521,8 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
union vnt_tx_data_head *head)
{
struct vnt_private *priv = tx_context->priv;
- u32 frame_len = tx_context->frame_len;
u32 cts_frame_len = 14;
u16 current_rate = tx_context->tx_rate;
- u8 need_ack = tx_context->need_ack;

if (!head)
return 0;
@@ -523,17 +533,20 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
/* Get SignalField,ServiceField,Length */
vnt_get_phy_field(priv, cts_frame_len,
priv->top_cck_basic_rate, PK_TYPE_11B, &buf->b);
- buf->duration_ba = vnt_get_rtscts_duration_le(priv, CTSDUR_BA,
- frame_len, tx_context->pkt_type,
- current_rate, need_ack);
+ buf->duration_ba =
+ vnt_get_rtscts_duration_le(tx_context, CTSDUR_BA,
+ tx_context->pkt_type,
+ current_rate);
/* Get CTSDuration_ba_f0 */
- buf->cts_duration_ba_f0 = vnt_get_rtscts_duration_le(priv,
- CTSDUR_BA_F0, frame_len, tx_context->pkt_type,
- priv->tx_rate_fb0, need_ack);
+ buf->cts_duration_ba_f0 =
+ vnt_get_rtscts_duration_le(tx_context, CTSDUR_BA_F0,
+ tx_context->pkt_type,
+ priv->tx_rate_fb0);
/* Get CTSDuration_ba_f1 */
- buf->cts_duration_ba_f1 = vnt_get_rtscts_duration_le(priv,
- CTSDUR_BA_F1, frame_len, tx_context->pkt_type,
- priv->tx_rate_fb1, need_ack);
+ buf->cts_duration_ba_f1 =
+ vnt_get_rtscts_duration_le(tx_context, CTSDUR_BA_F1,
+ tx_context->pkt_type,
+ priv->tx_rate_fb1);
/* Get CTS Frame body */
buf->data.duration = buf->duration_ba;
buf->data.frame_control =
@@ -548,9 +561,10 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
vnt_get_phy_field(priv, cts_frame_len,
priv->top_cck_basic_rate, PK_TYPE_11B, &buf->b);
/* Get CTSDuration_ba */
- buf->duration_ba = vnt_get_rtscts_duration_le(priv,
- CTSDUR_BA, frame_len, tx_context->pkt_type,
- current_rate, need_ack);
+ buf->duration_ba =
+ vnt_get_rtscts_duration_le(tx_context, CTSDUR_BA,
+ tx_context->pkt_type,
+ current_rate);
/*Get CTS Frame body*/
buf->data.duration = buf->duration_ba;
buf->data.frame_control =
--
2.0.1


2014-07-20 14:34:34

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 09/25] staging: vt6656: struct vnt_private replace wCurrentRate with current_rate

Removing type prefix and camel case.

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

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 4424d75..9e095eb 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -349,7 +349,7 @@ struct vnt_private {
u8 ofdm_pwr_tbl[14];
u8 ofdm_a_pwr_tbl[42];

- u16 wCurrentRate;
+ u16 current_rate;
u16 tx_rate_fb0;
u16 tx_rate_fb1;

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 8fb602a..5939f9a 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -718,11 +718,11 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed)

if (changed & IEEE80211_CONF_CHANGE_POWER) {
if (priv->bb_type == BB_TYPE_11B)
- priv->wCurrentRate = RATE_1M;
+ priv->current_rate = RATE_1M;
else
- priv->wCurrentRate = RATE_54M;
+ priv->current_rate = RATE_54M;

- vnt_rf_setpower(priv, priv->wCurrentRate,
+ vnt_rf_setpower(priv, priv->current_rate,
conf->chandef.chan->hw_value);
}

@@ -778,7 +778,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
}

if (changed & BSS_CHANGED_TXPOWER)
- vnt_rf_setpower(priv, priv->wCurrentRate,
+ vnt_rf_setpower(priv, priv->current_rate,
conf->chandef.chan->hw_value);

if (changed & BSS_CHANGED_BEACON_ENABLED) {
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 68e479a..0e4b773 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -764,9 +764,9 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
rate = ieee80211_get_tx_rate(priv->hw, info);

current_rate = rate->hw_value;
- if (priv->wCurrentRate != current_rate &&
+ if (priv->current_rate != current_rate &&
!(priv->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)) {
- priv->wCurrentRate = current_rate;
+ priv->current_rate = current_rate;
vnt_schedule_command(priv, WLAN_CMD_SETPOWER);
}

diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index 304f6d6..a63d0fd 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -139,7 +139,7 @@ void vnt_run_command(struct work_struct *work)

case WLAN_CMD_SETPOWER_START:

- vnt_rf_setpower(priv, priv->wCurrentRate,
+ vnt_rf_setpower(priv, priv->current_rate,
priv->hw->conf.chandef.chan->hw_value);

break;
--
2.0.1


2014-07-20 14:34:30

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 07/25] staging: vt6656: struct vnt_private replace byPreambleType with preamble_type

Removing type prefix and camel case.

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

diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index 9598c19..ab5ce02 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -207,7 +207,7 @@ void vnt_get_phy_field(struct vnt_private *priv, u32 frame_length,
u32 count = 0;
u32 tmp;
int ext_bit;
- u8 preamble_type = priv->byPreambleType;
+ u8 preamble_type = priv->preamble_type;

bit_count = frame_length * 8;
ext_bit = false;
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 07e9d03..466a984 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -338,7 +338,7 @@ struct vnt_private {

u8 eeprom[EEP_MAX_CONTEXT_SIZE]; /*u32 alignment */

- u8 byPreambleType;
+ u8 preamble_type;

/* For RF Power table */
u8 byCCKPwr;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 4054e36..325daae 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -124,7 +124,7 @@ static void device_set_options(struct vnt_private *priv)
priv->bb_type = BBP_TYPE_DEF;
priv->packet_type = priv->bb_type;
priv->byAutoFBCtrl = AUTO_FB_0;
- priv->byPreambleType = 0;
+ priv->preamble_type = 0;
priv->exist_sw_net_addr = false;
}

@@ -752,10 +752,10 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
if (changed & BSS_CHANGED_ERP_PREAMBLE) {
if (conf->use_short_preamble) {
vnt_mac_enable_barker_preamble_mode(priv);
- priv->byPreambleType = true;
+ priv->preamble_type = true;
} else {
vnt_mac_disable_barker_preamble_mode(priv);
- priv->byPreambleType = false;
+ priv->preamble_type = false;
}
}

diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 79ce396..68e479a 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -105,7 +105,7 @@ static struct vnt_usb_send_context

static __le16 vnt_time_stamp_off(struct vnt_private *priv, u16 rate)
{
- return cpu_to_le16(vnt_time_stampoff[priv->byPreambleType % 2]
+ return cpu_to_le16(vnt_time_stampoff[priv->preamble_type % 2]
[rate % MAX_RATE]);
}

@@ -114,14 +114,14 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type,
{
u32 data_time, ack_time;

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

if (pkt_type == PK_TYPE_11B)
- ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
+ ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
14, (u16)priv->top_cck_basic_rate);
else
- ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
+ ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
14, (u16)priv->top_ofdm_basic_rate);

if (need_ack)
@@ -144,30 +144,30 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,

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

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

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

rrv_time = cts_time + ack_time + data_time + 2 * priv->sifs;
@@ -187,10 +187,10 @@ static __le16 vnt_get_duration_le(struct vnt_private *piv,

if (need_ack) {
if (pkt_type == PK_TYPE_11B)
- ack_time = vnt_get_frame_time(piv->byPreambleType,
+ ack_time = vnt_get_frame_time(piv->preamble_type,
pkt_type, 14, piv->top_cck_basic_rate);
else
- ack_time = vnt_get_frame_time(piv->byPreambleType,
+ ack_time = vnt_get_frame_time(piv->preamble_type,
pkt_type, 14, piv->top_ofdm_basic_rate);

return cpu_to_le16((u16)(piv->sifs + ack_time));
@@ -209,7 +209,7 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_private *priv, u8 dur_type,
case RTSDUR_BA:
case RTSDUR_BA_F0:
case RTSDUR_BA_F1:
- cts_time = vnt_get_frame_time(priv->byPreambleType,
+ cts_time = vnt_get_frame_time(priv->preamble_type,
pkt_type, 14, priv->top_cck_basic_rate);
dur_time = cts_time + 2 * priv->sifs +
vnt_get_rsvtime(priv, pkt_type,
@@ -219,7 +219,7 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_private *priv, u8 dur_type,
case RTSDUR_AA:
case RTSDUR_AA_F0:
case RTSDUR_AA_F1:
- cts_time = vnt_get_frame_time(priv->byPreambleType,
+ cts_time = vnt_get_frame_time(priv->preamble_type,
pkt_type, 14, priv->top_ofdm_basic_rate);
dur_time = cts_time + 2 * priv->sifs +
vnt_get_rsvtime(priv, pkt_type,
@@ -825,9 +825,9 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
tx_buffer_head->wFIFOCtl |= FIFOCTL_LRETRY;

if (tx_rate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)
- priv->byPreambleType = PREAMBLE_SHORT;
+ priv->preamble_type = PREAMBLE_SHORT;
else
- priv->byPreambleType = PREAMBLE_LONG;
+ priv->preamble_type = PREAMBLE_LONG;

if (tx_rate->flags & IEEE80211_TX_RC_USE_RTS_CTS) {
need_rts = true;
--
2.0.1


2014-07-20 14:34:53

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 18/25] staging: vt6656: struct vnt_private rename byBBPreEDIndex with bb_pre_ed_index

Removing type prefix and camel case.

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

diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index e15e842..e6c7b60 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -568,7 +568,7 @@ void vnt_exit_deep_sleep(struct vnt_private *priv)
void vnt_update_pre_ed_threshold(struct vnt_private *priv, int scanning)
{
u8 cr_201 = 0x0, cr_206 = 0x0;
- u8 ed_inx = priv->byBBPreEDIndex;
+ u8 ed_inx = priv->bb_pre_ed_index;

switch (priv->rf_type) {
case RF_AL2230:
@@ -816,10 +816,10 @@ void vnt_update_pre_ed_threshold(struct vnt_private *priv, int scanning)

}

- if (ed_inx == priv->byBBPreEDIndex && !scanning)
+ if (ed_inx == priv->bb_pre_ed_index && !scanning)
return;

- priv->byBBPreEDIndex = ed_inx;
+ priv->bb_pre_ed_index = ed_inx;

dev_dbg(&priv->usb->dev, "%s bb_pre_ed_rssi %d\n",
__func__, priv->bb_pre_ed_rssi);
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index e97283b..101d0ca 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -386,7 +386,7 @@ struct vnt_private {
u8 bb_vga[BB_VGA_LEVEL];

u8 bb_pre_ed_rssi;
- u8 byBBPreEDIndex;
+ u8 bb_pre_ed_index;

/* command timer */
struct delayed_work run_command_work;
--
2.0.1


2014-07-20 14:34:56

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 20/25] staging: vt6656: vnt_get_duration_le fix typo piv to priv

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

diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 0febd03..5d2072f 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -180,20 +180,20 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,
return cpu_to_le16((u16)rrv_time);
}

-static __le16 vnt_get_duration_le(struct vnt_private *piv,
+static __le16 vnt_get_duration_le(struct vnt_private *priv,
u8 pkt_type, int need_ack)
{
u32 ack_time = 0;

if (need_ack) {
if (pkt_type == PK_TYPE_11B)
- ack_time = vnt_get_frame_time(piv->preamble_type,
- pkt_type, 14, piv->top_cck_basic_rate);
+ ack_time = vnt_get_frame_time(priv->preamble_type,
+ pkt_type, 14, priv->top_cck_basic_rate);
else
- ack_time = vnt_get_frame_time(piv->preamble_type,
- pkt_type, 14, piv->top_ofdm_basic_rate);
+ ack_time = vnt_get_frame_time(priv->preamble_type,
+ pkt_type, 14, priv->top_ofdm_basic_rate);

- return cpu_to_le16((u16)(piv->sifs + ack_time));
+ return cpu_to_le16((u16)(priv->sifs + ack_time));
}

return 0;
--
2.0.1


2014-07-20 14:34:36

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 10/25] staging: vt6656: struct vnt_private remove camel case retry limit

camel case changes
byShortRetryLimit -> short_retry_limit
byLongRetryLimit -> long_retry_limit

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

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 9e095eb..fd230b3 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -353,8 +353,8 @@ struct vnt_private {
u16 tx_rate_fb0;
u16 tx_rate_fb1;

- u8 byShortRetryLimit;
- u8 byLongRetryLimit;
+ u8 short_retry_limit;
+ u8 long_retry_limit;

enum nl80211_iftype op_mode;

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 5939f9a..e8ce52d 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -118,8 +118,8 @@ static void device_set_options(struct vnt_private *priv)
else
priv->num_rcb = vnt_rx_buffers;

- priv->byShortRetryLimit = SHORT_RETRY_DEF;
- priv->byLongRetryLimit = LONG_RETRY_DEF;
+ priv->short_retry_limit = SHORT_RETRY_DEF;
+ priv->long_retry_limit = LONG_RETRY_DEF;
priv->op_mode = NL80211_IFTYPE_UNSPECIFIED;
priv->bb_type = BBP_TYPE_DEF;
priv->packet_type = priv->bb_type;
@@ -166,8 +166,8 @@ static int device_init_registers(struct vnt_private *priv)
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;
- init_cmd->long_retry_limit = priv->byLongRetryLimit;
+ init_cmd->short_retry_limit = priv->short_retry_limit;
+ init_cmd->long_retry_limit = priv->long_retry_limit;

/* issue card_init command to device */
status = vnt_control_out(priv,
--
2.0.1


2014-07-20 14:34:54

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 19/25] staging: vt6656: dead code remove channel switch.

The driver needs to do anything special for channel switch.

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 4 ----
drivers/staging/vt6656/int.c | 8 --------
drivers/staging/vt6656/wcmd.c | 8 --------
drivers/staging/vt6656/wcmd.h | 4 +---
4 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 101d0ca..120d325 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -391,10 +391,6 @@ struct vnt_private {
/* command timer */
struct delayed_work run_command_work;

- int bChannelSwitch;
- u8 byNewChannel;
- u8 byChannelSwitchCount;
-
struct ieee80211_low_level_stats low_stats;
};

diff --git a/drivers/staging/vt6656/int.c b/drivers/staging/vt6656/int.c
index 9c5fefc..2ef70e4 100644
--- a/drivers/staging/vt6656/int.c
+++ b/drivers/staging/vt6656/int.c
@@ -153,14 +153,6 @@ void vnt_int_process_data(struct vnt_private *priv)
if (priv->hw->conf.flags & IEEE80211_CONF_PS)
vnt_schedule_command(priv,
WLAN_CMD_TBTT_WAKEUP);
-#if 0 /* TODO channel switch */
- if (priv->bChannelSwitch) {
- priv->byChannelSwitchCount--;
- if (priv->byChannelSwitchCount == 0)
- vnt_schedule_command(priv,
- WLAN_CMD_11H_CHSW);
- }
-#endif
}
priv->current_tsf = le64_to_cpu(int_data->tsf);

diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index a63d0fd..e4a5e2b 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -83,10 +83,6 @@ static int vnt_cmd_complete(struct vnt_private *priv)
priv->command_state = WLAN_CMD_CHANGE_ANTENNA_START;
break;

- case WLAN_CMD_11H_CHSW:
- priv->command_state = WLAN_CMD_11H_CHSW_START;
- break;
-
default:
break;
}
@@ -163,10 +159,6 @@ void vnt_run_command(struct work_struct *work)
}
break;

- case WLAN_CMD_11H_CHSW_START:
- vnt_set_channel(priv, priv->hw->conf.chandef.chan->hw_value);
- break;
-
default:
break;
}
diff --git a/drivers/staging/vt6656/wcmd.h b/drivers/staging/vt6656/wcmd.h
index 0fc2c40..79df04a 100644
--- a/drivers/staging/vt6656/wcmd.h
+++ b/drivers/staging/vt6656/wcmd.h
@@ -40,8 +40,7 @@ enum vnt_cmd {
WLAN_CMD_SETPOWER,
WLAN_CMD_TBTT_WAKEUP,
WLAN_CMD_BECON_SEND,
- WLAN_CMD_CHANGE_ANTENNA,
- WLAN_CMD_11H_CHSW,
+ WLAN_CMD_CHANGE_ANTENNA
};

#define CMD_Q_SIZE 32
@@ -53,7 +52,6 @@ enum vnt_cmd_state {
WLAN_CMD_TBTT_WAKEUP_START,
WLAN_CMD_BECON_SEND_START,
WLAN_CMD_CHANGE_ANTENNA_START,
- WLAN_CMD_11H_CHSW_START,
WLAN_CMD_IDLE
};

--
2.0.1


2014-07-20 14:34:37

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 11/25] staging: vt6656: struct vnt_private replace bShortSlotTime with short_slot_time

Removing type prefix and camel case

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

diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index ab5ce02..8b2b2e7 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -526,7 +526,7 @@ void vnt_set_short_slot_time(struct vnt_private *priv)
{
u8 bb_vga = 0;

- if (priv->bShortSlotTime)
+ if (priv->short_slot_time)
priv->bb_rx_conf &= 0xdf;
else
priv->bb_rx_conf |= 0x20;
@@ -545,7 +545,7 @@ void vnt_set_vga_gain_offset(struct vnt_private *priv, u8 data)
vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, 0xE7, data);

/* patch for 3253B0 Baseband with Cardbus module */
- if (priv->bShortSlotTime)
+ if (priv->short_slot_time)
priv->bb_rx_conf &= 0xdf; /* 1101 1111 */
else
priv->bb_rx_conf |= 0x20; /* 0010 0000 */
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 8e00377..75b586b 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -381,7 +381,7 @@ void vnt_update_ifs(struct vnt_private *priv)

priv->sifs = C_SIFS_BG;

- if (priv->bShortSlotTime)
+ if (priv->short_slot_time)
priv->slot = C_SLOT_SHORT;
else
priv->slot = C_SLOT_LONG;
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index fd230b3..35bc8c6 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -358,7 +358,7 @@ struct vnt_private {

enum nl80211_iftype op_mode;

- int bShortSlotTime;
+ int short_slot_time;
int bBarkerPreambleMd;

/* Power save */
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index e8ce52d..f7f4dcc 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -342,9 +342,9 @@ static int device_init_registers(struct vnt_private *priv)
* set Short Slot Time, xIFS, and RSPINF
*/
if (priv->bb_type == BB_TYPE_11A)
- priv->bShortSlotTime = true;
+ priv->short_slot_time = true;
else
- priv->bShortSlotTime = false;
+ priv->short_slot_time = false;

vnt_set_short_slot_time(priv);

@@ -768,9 +768,9 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,

if (changed & BSS_CHANGED_ERP_SLOT) {
if (conf->use_short_slot)
- priv->bShortSlotTime = true;
+ priv->short_slot_time = true;
else
- priv->bShortSlotTime = false;
+ priv->short_slot_time = false;

vnt_set_short_slot_time(priv);
vnt_set_vga_gain_offset(priv, priv->abyBBVGA[0]);
--
2.0.1