Skip to contentSkip to conversation

staging: vt6656: struct vnt_private replace byBBType with bb_type

PATCH New Malcolm Priestley 1 participant 25 messages Jul 20, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/25 staging: vt6656: struct vnt_private replace byBBType with bb_type

Removing type prefix and camel case.

---
 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(-)
drivers/staging/vt6656/card.c +12 -12
index 5ce26fa..94b933f 100644
@@ -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;
 
drivers/staging/vt6656/device.h +1 -1
index b9753c1..7b5779a 100644
@@ -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;
drivers/staging/vt6656/dpc.c +1 -1
index f8410ce1..3bf2782 100644
@@ -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 {
drivers/staging/vt6656/main_usb.c +7 -7
index 1137a19..5ca28c2 100644
@@ -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;
drivers/staging/vt6656/rxtx.c +1 -1
index aa382e7..3347a72 100644
@@ -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 */
Signature · 1 line
2.0.1
#1 lore raw

PATCH 2/25 staging: vt6656: struct vnt_private replace byPacketType with packet_type

Removing type prefix and camel case.

---
 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(-)
drivers/staging/vt6656/card.c +3 -3
index 94b933f..80b2ff8 100644
@@ -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);
drivers/staging/vt6656/device.h +1 -1
index 7b5779a..1f9ea51 100644
@@ -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;
drivers/staging/vt6656/main_usb.c +2 -2
index 5ca28c2..85142b7 100644
@@ -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) {
drivers/staging/vt6656/rxtx.c +1 -1
index 3347a72..03f299d 100644
@@ -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;
 
Signature · 1 line
2.0.1
#2 lore raw

PATCH 3/25 staging: vt6656: struct vnt_private replace wBasicRate with basic_rates

In reply to Malcolm Priestley

The same name as in struct ieee80211_bss_conf

---
 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(-)
drivers/staging/vt6656/card.c +7 -7
index 80b2ff8..80b6732 100644
@@ -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;
 	}
 
drivers/staging/vt6656/device.h +1 -1
index 1f9ea51..8cc33df 100644
@@ -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;
 
drivers/staging/vt6656/main_usb.c +1 -1
index 85142b7..02898ff 100644
@@ -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);
 
Signature · 1 line
2.0.1
#3 lore raw

PATCH 4/25 staging: vt6656: struct vnt_private replace byTopOFDMBasicRate with top_ofdm_basic_rate

In reply to Malcolm Priestley

Removing type prefix and camel case.

---
 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(-)
drivers/staging/vt6656/card.c +1 -1
index 80b6732..3217f77 100644
@@ -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)) {
drivers/staging/vt6656/device.h +1 -1
index 8cc33df..951abc2b 100644
@@ -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 */
drivers/staging/vt6656/main_usb.c +1 -1
index 02898ff..a02a028 100644
@@ -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 */
drivers/staging/vt6656/rxtx.c +11 -11
index 03f299d..ba2d550 100644
@@ -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);
Signature · 1 line
2.0.1
#4 lore raw

PATCH 5/25 staging: vt6656: struct vnt_private replace byTopCCKBasicRate with top_cck_basic_rate

In reply to Malcolm Priestley

Removing type prefix and camel case.

---
 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(-)
drivers/staging/vt6656/card.c +1 -1
index 3217f77..8e00377 100644
@@ -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)
drivers/staging/vt6656/device.h +1 -1
index 951abc2b..dcb57dc 100644
@@ -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 */
 
drivers/staging/vt6656/main_usb.c +1 -1
index a02a028..f5227ee 100644
@@ -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;
drivers/staging/vt6656/rxtx.c +20 -20
index ba2d550..79ce396 100644
@@ -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);
Signature · 1 line
2.0.1
#5 lore raw

PATCH 6/25 staging: vt6656: struct vnt_private replace abyEEPROM with eeprom

In reply to Malcolm Priestley

Removing type prefix and camel case.

---
 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(-)
drivers/staging/vt6656/baseband.c +2 -2
index 6af9fcb..9598c19 100644
@@ -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);
 
drivers/staging/vt6656/device.h +1 -1
index dcb57dc..07e9d03 100644
@@ -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;
 
drivers/staging/vt6656/main_usb.c +12 -12
index f5227ee..4054e36 100644
@@ -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,
Signature · 1 line
2.0.1
#6 lore raw

PATCH 7/25 staging: vt6656: struct vnt_private replace byPreambleType with preamble_type

In reply to Malcolm Priestley

Removing type prefix and camel case.

---
 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(-)
drivers/staging/vt6656/baseband.c +1 -1
index 9598c19..ab5ce02 100644
@@ -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;
drivers/staging/vt6656/device.h +1 -1
index 07e9d03..466a984 100644
@@ -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;
drivers/staging/vt6656/main_usb.c +3 -3
index 4054e36..325daae 100644
@@ -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;
 		}
 	}
 
drivers/staging/vt6656/rxtx.c +20 -20
index 79ce396..68e479a 100644
@@ -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;
Signature · 1 line
2.0.1
#7 lore raw

PATCH 8/25 staging: vt6656: struct vnt_private rf power table remove camel case

In reply to Malcolm Priestley

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

---
 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(-)
drivers/staging/vt6656/device.h +7 -7
index 466a984..4424d75 100644
@@ -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;
drivers/staging/vt6656/main_usb.c +15 -15
index 325daae..8fb602a 100644
@@ -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];
drivers/staging/vt6656/rf.c +7 -7
index 3815db9..c0edcae 100644
@@ -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:
Signature · 1 line
2.0.1
#8 lore raw

PATCH 9/25 staging: vt6656: struct vnt_private replace wCurrentRate with current_rate

In reply to Malcolm Priestley

Removing type prefix and camel case.

---
 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(-)
drivers/staging/vt6656/device.h +1 -1
index 4424d75..9e095eb 100644
@@ -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;
 
drivers/staging/vt6656/main_usb.c +4 -4
index 8fb602a..5939f9a 100644
@@ -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) {
drivers/staging/vt6656/rxtx.c +2 -2
index 68e479a..0e4b773 100644
@@ -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);
 	}
 
drivers/staging/vt6656/wcmd.c +1 -1
index 304f6d6..a63d0fd 100644
@@ -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;
Signature · 1 line
2.0.1
#9 lore raw

PATCH 10/25 staging: vt6656: struct vnt_private remove camel case retry limit

In reply to Malcolm Priestley

camel case changes
byShortRetryLimit -> short_retry_limit
byLongRetryLimit -> long_retry_limit

---
 drivers/staging/vt6656/device.h   | 4 ++--
 drivers/staging/vt6656/main_usb.c | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/vt6656/device.h +2 -2
index 9e095eb..fd230b3 100644
@@ -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;
 
drivers/staging/vt6656/main_usb.c +4 -4
index 5939f9a..e8ce52d 100644
@@ -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,
Signature · 1 line
2.0.1
#10 lore raw

PATCH 11/25 staging: vt6656: struct vnt_private replace bShortSlotTime with short_slot_time

In reply to Malcolm Priestley

Removing type prefix and camel case

---
 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(-)
drivers/staging/vt6656/baseband.c +2 -2
index ab5ce02..8b2b2e7 100644
@@ -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 */
drivers/staging/vt6656/card.c +1 -1
index 8e00377..75b586b 100644
@@ -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;
drivers/staging/vt6656/device.h +1 -1
index fd230b3..35bc8c6 100644
@@ -358,7 +358,7 @@ struct vnt_private {
 
 	enum nl80211_iftype op_mode;
 
-	int bShortSlotTime;
+	int short_slot_time;
 	int bBarkerPreambleMd;
 
 	/* Power save */
drivers/staging/vt6656/main_usb.c +4 -4
index e8ce52d..f7f4dcc 100644
@@ -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]);
Signature · 1 line
2.0.1
#11 lore raw

PATCH 12/25 staging: vt6656: struct vnt_private remove dead variable bBarkerPreambleMd

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/device.h | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/vt6656/device.h +0 -1
index 35bc8c6..905e90b 100644
@@ -359,7 +359,6 @@ struct vnt_private {
 	enum nl80211_iftype op_mode;
 
 	int short_slot_time;
-	int bBarkerPreambleMd;
 
 	/* Power save */
 	u16 current_aid;
Signature · 1 line
2.0.1
#12 lore raw

PATCH 13/25 staging: vt6656: struct vnt_private replace wSeqCounter with seq_counter

In reply to Malcolm Priestley

Removing type prefix and camel case

---
 drivers/staging/vt6656/device.h |  2 +-
 drivers/staging/vt6656/rxtx.c   | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/vt6656/device.h +1 -1
index 905e90b..6647b2b 100644
@@ -364,7 +364,7 @@ struct vnt_private {
 	u16 current_aid;
 
 	/* Beacon releated */
-	u16 wSeqCounter;
+	u16 seq_counter;
 
 	enum vnt_cmd_state command_state;
 
drivers/staging/vt6656/rxtx.c +5 -5
index 0e4b773..8d745af 100644
@@ -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;
 
Signature · 1 line
2.0.1
#13 lore raw

PATCH 14/25 staging: vt6656: struct vnt_private replace byAutoFBCtrl with auto_fb_ctrl

In reply to Malcolm Priestley

Removing type prefix and camel case.

---
 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(-)
drivers/staging/vt6656/device.h +1 -1
index 6647b2b..ef9b505 100644
@@ -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];
drivers/staging/vt6656/main_usb.c +2 -2
index f7f4dcc..fac13b1 100644
@@ -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;
drivers/staging/vt6656/rxtx.c +2 -2
index 8d745af..0febd03 100644
@@ -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 =
Signature · 1 line
2.0.1
#14 lore raw

PATCH 15/25 staging: vt6656: struct vnt_private replace abyBBVGA with bb_vga

In reply to Malcolm Priestley

Removing type prefix and camel case.

---
 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(-)
drivers/staging/vt6656/baseband.c +17 -17
index 8b2b2e7..11c098c 100644
@@ -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);
drivers/staging/vt6656/card.c +9 -9
index 75b586b..c06dd9d 100644
@@ -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]);
 }
drivers/staging/vt6656/device.h +1 -1
index ef9b505..e3c2509 100644
@@ -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;
drivers/staging/vt6656/main_usb.c +1 -1
index fac13b1..b99def7 100644
@@ -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);
 	}
 
Signature · 1 line
2.0.1
#15 lore raw

PATCH 16/25 staging: vt6656: struct vnt_private remove dead code ldBmThreshold

In reply to Malcolm Priestley

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

---
 drivers/staging/vt6656/baseband.c | 20 ++++----------------
 drivers/staging/vt6656/device.h   |  1 -
 2 files changed, 4 insertions(+), 17 deletions(-)
drivers/staging/vt6656/baseband.c +4 -16
index 11c098c..dd449a3 100644
@@ -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);
drivers/staging/vt6656/device.h +0 -1
index e3c2509..24ebbd0 100644
@@ -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;
Signature · 1 line
2.0.1
#16 lore raw

PATCH 17/25 staging: vt6656: struct vnt_private replace byBBPreEDRSSI with bb_pre_ed_rssi

In reply to Malcolm Priestley

Remove type prefix and camel case.

---
 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(-)
drivers/staging/vt6656/baseband.c +64 -64
index dd449a3..e15e842 100644
@@ -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;
drivers/staging/vt6656/device.h +1 -1
index 24ebbd0..e97283b 100644
@@ -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 */
drivers/staging/vt6656/dpc.c +2 -2
index 3bf2782..f5fbb5f 100644
@@ -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;
 
Signature · 1 line
2.0.1
#17 lore raw

PATCH 18/25 staging: vt6656: struct vnt_private rename byBBPreEDIndex with bb_pre_ed_index

In reply to Malcolm Priestley

Removing type prefix and camel case.

---
 drivers/staging/vt6656/baseband.c | 6 +++---
 drivers/staging/vt6656/device.h   | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/vt6656/baseband.c +3 -3
index e15e842..e6c7b60 100644
@@ -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);
drivers/staging/vt6656/device.h +1 -1
index e97283b..101d0ca 100644
@@ -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;
Signature · 1 line
2.0.1
#18 lore raw

PATCH 19/25 staging: vt6656: dead code remove channel switch.

In reply to Malcolm Priestley

The driver needs to do anything special for channel switch.

---
 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(-)
drivers/staging/vt6656/device.h +0 -4
index 101d0ca..120d325 100644
@@ -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;
 };
 
drivers/staging/vt6656/int.c +0 -8
index 9c5fefc..2ef70e4 100644
@@ -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);
 
drivers/staging/vt6656/wcmd.c +0 -8
index a63d0fd..e4a5e2b 100644
@@ -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;
 	}
drivers/staging/vt6656/wcmd.h +1 -3
index 0fc2c40..79df04a 100644
@@ -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
 };
 
Signature · 1 line
2.0.1
#19 lore raw

PATCH 20/25 staging: vt6656: vnt_get_duration_le fix typo piv to priv

In reply to Malcolm Priestley
---
 drivers/staging/vt6656/rxtx.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/vt6656/rxtx.c +6 -6
index 0febd03..5d2072f 100644
@@ -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;
Signature · 1 line
2.0.1
#20 lore raw

PATCH 21/25 staging: vt6656: rxtx move pkt_type into vnt_usb_send_context

In reply to Malcolm Priestley

Removing pkt_type from functions

---
 drivers/staging/vt6656/device.h |   1 +
 drivers/staging/vt6656/rxtx.c   | 208 +++++++++++++++++++++-------------------
 2 files changed, 109 insertions(+), 100 deletions(-)
drivers/staging/vt6656/device.h +1 -0
index 120d325..0d5ecd6 100644
@@ -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];
drivers/staging/vt6656/rxtx.c +108 -100

476 lines not on this page · raw message

Signature · 1 line
2.0.1
#21 lore raw

PATCH 22/25 staging: vt6656: move need_ack into into vnt_usb_send_context

In reply to Malcolm Priestley

Fixing need_ack to u8 and removing from function declarations.

---
 drivers/staging/vt6656/device.h |  1 +
 drivers/staging/vt6656/rxtx.c   | 89 +++++++++++++++++++++++------------------
 2 files changed, 52 insertions(+), 38 deletions(-)
drivers/staging/vt6656/device.h +1 -0
index 0d5ecd6..9d42877 100644
@@ -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];
drivers/staging/vt6656/rxtx.c +51 -38

299 lines not on this page · raw message

Signature · 1 line
2.0.1
#22 lore raw

PATCH 23/25 staging: vt6656: rxtx move frame_len/size into vnt_usb_send_context as frame_len

In reply to Malcolm Priestley

Removing frame_len and frame_size from function declarations

---
 drivers/staging/vt6656/device.h |   1 +
 drivers/staging/vt6656/rxtx.c   | 115 ++++++++++++++++++++--------------------
 2 files changed, 58 insertions(+), 58 deletions(-)
drivers/staging/vt6656/device.h +1 -0
index 9d42877..d3c36af 100644
@@ -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;
drivers/staging/vt6656/rxtx.c +57 -58

351 lines not on this page · raw message

Signature · 1 line
2.0.1
#23 lore raw

PATCH 24/25 staging; vt6656: rxtx add current_rate into vnt_usb_send_context as tx_rate

In reply to Malcolm Priestley

Create u8 tx_rate and remove current_rate from function declarations

---
 drivers/staging/vt6656/device.h |  1 +
 drivers/staging/vt6656/rxtx.c   | 91 ++++++++++++++++++++---------------------
 2 files changed, 45 insertions(+), 47 deletions(-)
drivers/staging/vt6656/device.h +1 -0
index d3c36af..6b7bb8c 100644
@@ -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;
drivers/staging/vt6656/rxtx.c +44 -47

291 lines not on this page · raw message

Signature · 1 line
2.0.1
#24 lore raw

PATCH 25/25 staging: vt6656: struct vnt_usb_send_context context into vnt_get_duration_le

In reply to Malcolm Priestley

Removing priv, frame_length and need_ack

---
 drivers/staging/vt6656/rxtx.c | 122 +++++++++++++++++++++++-------------------
 1 file changed, 68 insertions(+), 54 deletions(-)
drivers/staging/vt6656/rxtx.c +68 -54
index 7c92d1b..4fc93f0 100644
@@ -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 =
Signature · 1 line
2.0.1