linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/22] staging: vt6656: rf.c additional power.
@ 2014-05-17  8:50 Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 02/22] staging: vt6656: usbpipe: get rid of in/out debug messages Malcolm Priestley
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Provides extra power on weak RSSI.

The values orginate from the vendors driver.

It is applied later in RFbRawSetPower to simplify and check that it doesn't
exceed the max power.

Vendor driver VT6656_Linux_src_v1.21.03_x86_11.04.zip
http://www.viaembedded.com/servlet/downloadSvl?id=1890&download_file_id=14704
This is GPL-licensed code.

vendors code
...
if (pDevice->byRFType == RF_VT3226D0) {
	if (lRSSI == 0){
		lAdditionalPower = 7;
	}
	else if ((lRSSI < -60) && (lRSSI >= -65)){
		lAdditionalPower = 5;
		//lAdditionalPower = 9;
	}
	else if ((lRSSI < -65) && (lRSSI >= -70)){
		lAdditionalPower = 7;
		//lAdditionalPower = 9;
	}
	else if ((lRSSI < -70) && (lRSSI >= -80)){
		lAdditionalPower = 9;
		}
	else if (lRSSI < -80) {
		lAdditionalPower = 9;
	}
}
else {
	if (lRSSI == 0){
		lAdditionalPower = 7;
	}
	else if ((lRSSI < -70) && (lRSSI >= -75)){
		lAdditionalPower = 5;
	}
	else if ((lRSSI < -75) && (lRSSI >= -80)){
			lAdditionalPower = 7;
		}
		else if (lRSSI < -80) {
			lAdditionalPower = 9;
		}
	}

...

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/rf.c | 30 ++++++++++++++++++++++++++++++
 drivers/staging/vt6656/rf.h |  2 ++
 2 files changed, 32 insertions(+)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 1e8f64b..64632e9 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -769,6 +769,32 @@ int RFbSetPower(struct vnt_private *priv, u32 rate, u32 channel)
 	return ret;
 }
 
+static u8 vnt_rf_addpower(struct vnt_private *priv)
+{
+	s32 rssi = -priv->uCurrRSSI;
+
+	if (!rssi)
+		return 7;
+
+	if (priv->byRFType == RF_VT3226D0) {
+		if (rssi < -70)
+			return 9;
+		else if (rssi < -65)
+			return 7;
+		else if (rssi < -60)
+			return 5;
+	} else {
+		if (rssi < -80)
+			return 9;
+		else if (rssi < -75)
+			return 7;
+		else if (rssi < -70)
+			return 5;
+	}
+
+	return 0;
+}
+
 /*
  * Description: Set Tx power
  *
@@ -788,6 +814,10 @@ int RFbRawSetPower(struct vnt_private *priv, u8 power, u32 rate)
 	u32 power_setting = 0;
 	int ret = true;
 
+	power += vnt_rf_addpower(priv);
+	if (power > VNT_RF_MAX_POWER)
+		power = VNT_RF_MAX_POWER;
+
 	if (priv->byCurPwr == power)
 		return true;
 
diff --git a/drivers/staging/vt6656/rf.h b/drivers/staging/vt6656/rf.h
index de5c613..e9a01fe 100644
--- a/drivers/staging/vt6656/rf.h
+++ b/drivers/staging/vt6656/rf.h
@@ -53,6 +53,8 @@
 #define RF_EMU              0x80
 #define RF_MASK             0x7F
 
+#define VNT_RF_MAX_POWER    0x3f
+
 extern const u8 RFaby11aChannelIndex[200];
 
 int IFRFbWriteEmbedded(struct vnt_private *, u32 dwData);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 02/22] staging: vt6656: usbpipe: get rid of in/out debug messages.
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 03/22] staging: vt6656: usbpipe: replace debug messsages Malcolm Priestley
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Remove all in/out debug messages.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/usbpipe.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index 433edca..8d0705d 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -126,9 +126,6 @@ int PIPEnsInterruptRead(struct vnt_private *priv)
 {
 	int status = STATUS_FAILURE;
 
-	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-			"---->s_nsStartInterruptUsbRead()\n");
-
 	if (priv->int_buf.in_use == true)
 		return STATUS_FAILURE;
 
@@ -150,9 +147,6 @@ int PIPEnsInterruptRead(struct vnt_private *priv)
 		priv->int_buf.in_use = false;
 	}
 
-	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-		"<----s_nsStartInterruptUsbRead Return(%x)\n", status);
-
 	return status;
 }
 
@@ -176,9 +170,6 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb)
 	struct vnt_private *priv = urb->context;
 	int status;
 
-	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-			"---->s_nsInterruptUsbIoCompleteRead\n");
-
 	switch (urb->status) {
 	case 0:
 	case -ETIMEDOUT:
@@ -194,9 +185,6 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb)
 
 	status = urb->status;
 
-	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-		"s_nsInterruptUsbIoCompleteRead Status %d\n", status);
-
 	if (status != STATUS_SUCCESS) {
 		priv->int_buf.in_use = false;
 
@@ -236,8 +224,6 @@ int PIPEnsBulkInUsbRead(struct vnt_private *priv, struct vnt_rcb *rcb)
 	int status = 0;
 	struct urb *urb;
 
-	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsStartBulkInUsbRead\n");
-
 	if (priv->Flags & fMP_DISCONNECTED)
 		return STATUS_FAILURE;
 
@@ -290,8 +276,6 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
 	unsigned long flags;
 	int re_alloc_skb = false;
 
-	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkInUsbIoCompleteRead\n");
-
 	switch (urb->status) {
 	case 0:
 		break;
@@ -351,8 +335,6 @@ int PIPEnsSendBulkOut(struct vnt_private *priv,
 
 	priv->bPWBitOn = false;
 
-	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_nsSendBulkOut\n");
-
 	if (!(MP_IS_READY(priv) && priv->Flags & fMP_POST_WRITES)) {
 		context->in_use = false;
 		return STATUS_RESOURCES;
@@ -413,8 +395,6 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
 	struct vnt_private *priv = context->priv;
 	u8 context_type = context->type;
 
-	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkOutIoCompleteWrite\n");
-
 	switch (urb->status) {
 	case 0:
 		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 03/22] staging: vt6656: usbpipe: replace debug messsages.
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 02/22] staging: vt6656: usbpipe: get rid of in/out debug messages Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 04/22] staging: vt6656: PIPEnsControlOut remove camel case Malcolm Priestley
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Replace all DBG_PRT wiht dev_dbg

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/usbpipe.c | 39 +++++++++++++++------------------------
 1 file changed, 15 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index 8d0705d..5a466653 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -51,9 +51,6 @@
 //endpoint 2: read bulk
 //endpoint 3: write bulk
 
-//static int          msglevel                =MSG_LEVEL_DEBUG;
-static int          msglevel                =MSG_LEVEL_INFO;
-
 #define USB_CTL_WAIT   500 //ms
 
 #ifndef URB_ASYNC_UNLINK
@@ -142,8 +139,7 @@ int PIPEnsInterruptRead(struct vnt_private *priv)
 
 	status = usb_submit_urb(priv->pInterruptURB, GFP_ATOMIC);
 	if (status) {
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-			"Submit int URB failed %d\n", status);
+		dev_dbg(&priv->usb->dev, "Submit int URB failed %d\n", status);
 		priv->int_buf.in_use = false;
 	}
 
@@ -188,16 +184,14 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb)
 	if (status != STATUS_SUCCESS) {
 		priv->int_buf.in_use = false;
 
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-			"IntUSBIoCompleteControl STATUS = %d\n", status);
+		dev_dbg(&priv->usb->dev, "%s status = %d\n", __func__, status);
 	} else {
 		INTnsProcessData(priv);
 	}
 
 	status = usb_submit_urb(priv->pInterruptURB, GFP_ATOMIC);
 	if (status) {
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-			"Submit int URB failed %d\n", status);
+		dev_dbg(&priv->usb->dev, "Submit int URB failed %d\n", status);
 	} else {
 		priv->int_buf.in_use = true;
 	}
@@ -229,7 +223,7 @@ int PIPEnsBulkInUsbRead(struct vnt_private *priv, struct vnt_rcb *rcb)
 
 	urb = rcb->pUrb;
 	if (rcb->skb == NULL) {
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"rcb->skb is null\n");
+		dev_dbg(&priv->usb->dev, "rcb->skb is null\n");
 		return status;
 	}
 
@@ -243,8 +237,7 @@ int PIPEnsBulkInUsbRead(struct vnt_private *priv, struct vnt_rcb *rcb)
 
 	status = usb_submit_urb(urb, GFP_ATOMIC);
 	if (status != 0) {
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-				"Submit Rx URB failed %d\n", status);
+		dev_dbg(&priv->usb->dev, "Submit Rx URB failed %d\n", status);
 		return STATUS_FAILURE ;
 	}
 
@@ -285,8 +278,7 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
 		return;
 	case -ETIMEDOUT:
 	default:
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-				"BULK In failed %d\n", urb->status);
+		dev_dbg(&priv->usb->dev, "BULK In failed %d\n", urb->status);
 		break;
 	}
 
@@ -301,8 +293,9 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
 
 	rcb->Ref--;
 	if (rcb->Ref == 0) {
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RxvFreeNormal %d\n",
-							priv->NumRecvFreeList);
+		dev_dbg(&priv->usb->dev,
+				"RxvFreeNormal %d\n", priv->NumRecvFreeList);
+
 		spin_lock_irqsave(&priv->lock, flags);
 
 		RXvFreeRCB(rcb, re_alloc_skb);
@@ -352,8 +345,8 @@ int PIPEnsSendBulkOut(struct vnt_private *priv,
 
 	status = usb_submit_urb(urb, GFP_ATOMIC);
 	if (status != 0) {
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-				"Submit Tx URB failed %d\n", status);
+		dev_dbg(&priv->usb->dev, "Submit Tx URB failed %d\n", status);
+
 		context->in_use = false;
 		return STATUS_FAILURE;
 	}
@@ -397,8 +390,7 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
 
 	switch (urb->status) {
 	case 0:
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-			"Write %d bytes\n", context->buf_len);
+		dev_dbg(&priv->usb->dev, "Write %d bytes\n", context->buf_len);
 		break;
 	case -ECONNRESET:
 	case -ENOENT:
@@ -407,8 +399,7 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
 		return;
 	case -ETIMEDOUT:
 	default:
-		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-				"BULK Out failed %d\n", urb->status);
+		dev_dbg(&priv->usb->dev, "BULK Out failed %d\n", urb->status);
 		break;
 	}
 
@@ -419,8 +410,8 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
 		if (context->skb != NULL) {
 			dev_kfree_skb_irq(context->skb);
 			context->skb = NULL;
-			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-				"tx  %d bytes\n", context->buf_len);
+			dev_dbg(&priv->usb->dev,
+					"tx  %d bytes\n", context->buf_len);
 		}
 
 		priv->dev->trans_start = jiffies;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 04/22] staging: vt6656: PIPEnsControlOut remove camel case.
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 02/22] staging: vt6656: usbpipe: get rid of in/out debug messages Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 03/22] staging: vt6656: usbpipe: replace debug messsages Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 05/22] staging: vt6656: PIPEnsControlIn " Malcolm Priestley
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Camel case changes
pDevice, byRequest,  wValue, wIndex, wLength, pbyBuffer, ntStatus

->

priv, request, value, index, length, buffer, status

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/usbpipe.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index 5a466653..76fa19e 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -61,23 +61,23 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb);
 static void s_nsBulkInUsbIoCompleteRead(struct urb *urb);
 static void s_nsBulkOutIoCompleteWrite(struct urb *urb);
 
-int PIPEnsControlOut(struct vnt_private *pDevice, u8 byRequest, u16 wValue,
-		u16 wIndex, u16 wLength, u8 *pbyBuffer)
+int PIPEnsControlOut(struct vnt_private *priv, u8 request, u16 value,
+		u16 index, u16 length, u8 *buffer)
 {
-	int ntStatus = 0;
+	int status = 0;
 
-	if (pDevice->Flags & fMP_DISCONNECTED)
+	if (priv->Flags & fMP_DISCONNECTED)
 		return STATUS_FAILURE;
 
-	mutex_lock(&pDevice->usb_lock);
+	mutex_lock(&priv->usb_lock);
 
-	ntStatus = usb_control_msg(pDevice->usb,
-		usb_sndctrlpipe(pDevice->usb, 0), byRequest, 0x40, wValue,
-			wIndex, pbyBuffer, wLength, USB_CTL_WAIT);
+	status = usb_control_msg(priv->usb,
+		usb_sndctrlpipe(priv->usb, 0), request, 0x40, value,
+			index, buffer, length, USB_CTL_WAIT);
 
-	mutex_unlock(&pDevice->usb_lock);
+	mutex_unlock(&priv->usb_lock);
 
-	if (ntStatus < (int)wLength)
+	if (status < (int)length)
 		return STATUS_FAILURE;
 
 	return STATUS_SUCCESS;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 05/22] staging: vt6656: PIPEnsControlIn remove camel case.
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (2 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 04/22] staging: vt6656: PIPEnsControlOut remove camel case Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 06/22] staging: vt6656: device_cfg.h remove dead code Malcolm Priestley
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Camel case changes
pDevice, byRequest,  wValue, wIndex, wLength, pbyBuffer, ntStatus

->

priv, request, value, index, length, buffer, status

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/usbpipe.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index 76fa19e..2dfa16e 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -83,23 +83,23 @@ int PIPEnsControlOut(struct vnt_private *priv, u8 request, u16 value,
 	return STATUS_SUCCESS;
 }
 
-int PIPEnsControlIn(struct vnt_private *pDevice, u8 byRequest, u16 wValue,
-	u16 wIndex, u16 wLength, u8 *pbyBuffer)
+int PIPEnsControlIn(struct vnt_private *priv, u8 request, u16 value,
+		u16 index, u16 length, u8 *buffer)
 {
-	int ntStatus;
+	int status;
 
-	if (pDevice->Flags & fMP_DISCONNECTED)
+	if (priv->Flags & fMP_DISCONNECTED)
 		return STATUS_FAILURE;
 
-	mutex_lock(&pDevice->usb_lock);
+	mutex_lock(&priv->usb_lock);
 
-	ntStatus = usb_control_msg(pDevice->usb,
-		usb_rcvctrlpipe(pDevice->usb, 0), byRequest, 0xc0, wValue,
-			wIndex, pbyBuffer, wLength, USB_CTL_WAIT);
+	status = usb_control_msg(priv->usb,
+		usb_rcvctrlpipe(priv->usb, 0), request, 0xc0, value,
+			index, buffer, length, USB_CTL_WAIT);
 
-	mutex_unlock(&pDevice->usb_lock);
+	mutex_unlock(&priv->usb_lock);
 
-	if (ntStatus < (int)wLength)
+	if (status < (int)length)
 		return STATUS_FAILURE;
 
 	return STATUS_SUCCESS;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 06/22] staging: vt6656: device_cfg.h remove dead code.
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (3 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 05/22] staging: vt6656: PIPEnsControlIn " Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 07/22] staging: vt6656: device_cfg.h Move macros to device.h Malcolm Priestley
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Also unneeded #ifndef

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/device_cfg.h | 45 -------------------------------------
 1 file changed, 45 deletions(-)

diff --git a/drivers/staging/vt6656/device_cfg.h b/drivers/staging/vt6656/device_cfg.h
index 0b9d834..b018339 100644
--- a/drivers/staging/vt6656/device_cfg.h
+++ b/drivers/staging/vt6656/device_cfg.h
@@ -27,61 +27,16 @@
 #ifndef __DEVICE_CONFIG_H
 #define __DEVICE_CONFIG_H
 
-#include <linux/types.h>
-
-typedef
-struct _version {
-    unsigned char   major;
-    unsigned char   minor;
-    unsigned char   build;
-} version_t, *pversion_t;
-
-#ifndef false
-#define false   (0)
-#endif
-
-#ifndef true
-#define true    (!(false))
-#endif
-
-#define VID_TABLE_SIZE      64
-#define MCAST_TABLE_SIZE    64
-#define MCAM_SIZE           32
-#define VCAM_SIZE           32
-#define TX_QUEUE_NO         8
-
 #define DEVICE_NAME         "vt6656"
 #define DEVICE_FULL_DRV_NAM "VIA Networking Wireless LAN USB Driver"
 
-#ifndef MAJOR_VERSION
-#define MAJOR_VERSION       1
-#endif
-
-#ifndef MINOR_VERSION
-#define MINOR_VERSION       13
-#endif
-
-#ifndef DEVICE_VERSION
 #define DEVICE_VERSION       "1.19_12"
-#endif
 
 #define MAX_RATE	12
 
-/* config file */
-#include <linux/fs.h>
-#include <linux/fcntl.h>
-#ifndef CONFIG_PATH
 #define CONFIG_PATH            "/etc/vntconfiguration.dat"
-#endif
-
-/* Max: 2378 = 2312 Payload + 30HD + 4CRC + 2Padding + 4Len + 8TSF + 4RSR */
-#define PKT_BUF_SZ          2390
 
 #define MAX_UINTS           8
 #define OPTION_DEFAULT      { [0 ... MAX_UINTS-1] = -1}
 
-typedef enum  _chip_type {
-    VT3184 = 1
-} CHIP_TYPE, *PCHIP_TYPE;
-
 #endif
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 07/22] staging: vt6656: device_cfg.h Move macros to device.h
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (4 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 06/22] staging: vt6656: device_cfg.h remove dead code Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 08/22] staging: vt6656: device.h remove dead macros Malcolm Priestley
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Remove device_cfg.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/device.h     | 13 +++++++++++-
 drivers/staging/vt6656/device_cfg.h | 42 -------------------------------------
 2 files changed, 12 insertions(+), 43 deletions(-)
 delete mode 100644 drivers/staging/vt6656/device_cfg.h

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 410e028..3c2c4ce 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -60,11 +60,12 @@
 #define RT_DOWNDEV_EVENT_FLAG                        0x0105
 #define RT_RMMOD_EVENT_FLAG                              0x0106
 
+#define MAX_RATE			12
+
 /*
  * device specific
  */
 
-#include "device_cfg.h"
 #include "80211hdr.h"
 #include "tether.h"
 #include "wmgr.h"
@@ -79,6 +80,16 @@
 #define VNT_USB_VENDOR_ID                     0x160a
 #define VNT_USB_PRODUCT_ID                    0x3184
 
+#define DEVICE_NAME			"vt6656"
+#define DEVICE_FULL_DRV_NAM		"VIA Networking Wireless LAN USB Driver"
+
+#define DEVICE_VERSION			"1.19_12"
+
+#define CONFIG_PATH			"/etc/vntconfiguration.dat"
+
+#define MAX_UINTS			8
+#define OPTION_DEFAULT			{ [0 ... MAX_UINTS-1] = -1}
+
 #define MAC_MAX_CONTEXT_REG     (256+128)
 
 #define MAX_MULTICAST_ADDRESS_NUM       32
diff --git a/drivers/staging/vt6656/device_cfg.h b/drivers/staging/vt6656/device_cfg.h
deleted file mode 100644
index b018339..0000000
--- a/drivers/staging/vt6656/device_cfg.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: device_cfg.h
- *
- * Purpose: Driver configuration header
- * Author: Lyndon Chen
- *
- * Date: Dec 9, 2005
- *
- */
-#ifndef __DEVICE_CONFIG_H
-#define __DEVICE_CONFIG_H
-
-#define DEVICE_NAME         "vt6656"
-#define DEVICE_FULL_DRV_NAM "VIA Networking Wireless LAN USB Driver"
-
-#define DEVICE_VERSION       "1.19_12"
-
-#define MAX_RATE	12
-
-#define CONFIG_PATH            "/etc/vntconfiguration.dat"
-
-#define MAX_UINTS           8
-#define OPTION_DEFAULT      { [0 ... MAX_UINTS-1] = -1}
-
-#endif
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 08/22] staging: vt6656: device.h remove dead macros
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (5 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 07/22] staging: vt6656: device_cfg.h Move macros to device.h Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 09/22] staging: vt6656: desc.h Remove unused macros Malcolm Priestley
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/device.h | 67 +----------------------------------------
 1 file changed, 1 insertion(+), 66 deletions(-)

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 3c2c4ce..f8591a2 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -52,14 +52,6 @@
 #undef DEVICE_ETHTOOL_IOCTL_SUPPORT
 #endif
 
-/* please copy below macro to driver_event.c for API */
-#define RT_INSMOD_EVENT_FLAG                             0x0101
-#define RT_UPDEV_EVENT_FLAG                               0x0102
-#define RT_DISCONNECTED_EVENT_FLAG               0x0103
-#define RT_WPACONNECTED_EVENT_FLAG             0x0104
-#define RT_DOWNDEV_EVENT_FLAG                        0x0105
-#define RT_RMMOD_EVENT_FLAG                              0x0106
-
 #define MAX_RATE			12
 
 /*
@@ -90,27 +82,8 @@
 #define MAX_UINTS			8
 #define OPTION_DEFAULT			{ [0 ... MAX_UINTS-1] = -1}
 
-#define MAC_MAX_CONTEXT_REG     (256+128)
-
-#define MAX_MULTICAST_ADDRESS_NUM       32
-#define MULTICAST_ADDRESS_LIST_SIZE     (MAX_MULTICAST_ADDRESS_NUM * ETH_ALEN)
-
 #define DUPLICATE_RX_CACHE_LENGTH       5
 
-#define NUM_KEY_ENTRY                   11
-
-#define TX_WEP_NONE                     0
-#define TX_WEP_OTF                      1
-#define TX_WEP_SW                       2
-#define TX_WEP_SWOTP                    3
-#define TX_WEP_OTPSW                    4
-#define TX_WEP_SW232                    5
-
-#define KEYSEL_WEP40                    0
-#define KEYSEL_WEP104                   1
-#define KEYSEL_TKIP                     2
-#define KEYSEL_CCMP                     3
-
 #define AUTO_FB_NONE            0
 #define AUTO_FB_0               1
 #define AUTO_FB_1               2
@@ -130,13 +103,6 @@
 #define ANT_RXA                 2
 #define ANT_RXB                 3
 
-#define MAXCHECKHANGCNT         4
-
-/* Packet type */
-#define TX_PKT_UNI              0x00
-#define TX_PKT_MULTI            0x01
-#define TX_PKT_BROAD            0x02
-
 #define BB_VGA_LEVEL            4
 #define BB_VGA_CHANGE_THRESHOLD 3
 
@@ -144,9 +110,6 @@
 #define RUN_AT(x)                       (jiffies+(x))
 #endif
 
-/* DMA related */
-#define RESERV_AC0DMA                   4
-
 #define PRIVATE_Message                 0
 
 #define DBG_PRT(l, p, args...) { if (l <= msglevel) printk(p, ##args); }
@@ -320,29 +283,9 @@ typedef struct tagSDeFragControlBlock
 
 /* flags for options */
 #define     DEVICE_FLAGS_UNPLUG          0x00000001UL
-#define     DEVICE_FLAGS_PREAMBLE_TYPE   0x00000002UL
-#define     DEVICE_FLAGS_OP_MODE         0x00000004UL
-#define     DEVICE_FLAGS_PS_MODE         0x00000008UL
-#define		DEVICE_FLAGS_80211h_MODE	 0x00000010UL
 
 /* flags for driver status */
 #define     DEVICE_FLAGS_OPENED          0x00010000UL
-#define     DEVICE_FLAGS_WOL_ENABLED     0x00080000UL
-/* flags for capabilities */
-#define     DEVICE_FLAGS_TX_ALIGN        0x01000000UL
-#define     DEVICE_FLAGS_HAVE_CAM        0x02000000UL
-#define     DEVICE_FLAGS_FLOW_CTRL       0x04000000UL
-
-/* flags for MII status */
-#define     DEVICE_LINK_FAIL             0x00000001UL
-#define     DEVICE_SPEED_10              0x00000002UL
-#define     DEVICE_SPEED_100             0x00000004UL
-#define     DEVICE_SPEED_1000            0x00000008UL
-#define     DEVICE_DUPLEX_FULL           0x00000010UL
-#define     DEVICE_AUTONEG_ENABLE        0x00000020UL
-#define     DEVICE_FORCED_BY_EEPROM      0x00000040UL
-/* for device_set_media_duplex */
-#define     DEVICE_LINK_CHANGE           0x00000001UL
 
 typedef struct __device_opt {
 	int nRxDescs0;  /* number of RX descriptors 0 */
@@ -742,14 +685,7 @@ struct vnt_private {
         (uVar)++;                                   \
 }
 
-#define fMP_RESET_IN_PROGRESS               0x00000001
 #define fMP_DISCONNECTED                    0x00000002
-#define fMP_HALT_IN_PROGRESS                0x00000004
-#define fMP_SURPRISE_REMOVED                0x00000008
-#define fMP_RECV_LOOKASIDE                  0x00000010
-#define fMP_INIT_IN_PROGRESS                0x00000020
-#define fMP_SEND_SIDE_RESOURCE_ALLOCATED    0x00000040
-#define fMP_RECV_SIDE_RESOURCE_ALLOCATED    0x00000080
 #define fMP_POST_READS                      0x00000100
 #define fMP_POST_WRITES                     0x00000200
 
@@ -757,8 +693,7 @@ struct vnt_private {
 #define MP_CLEAR_FLAG(_M, _F)            ((_M)->Flags &= ~(_F))
 #define MP_TEST_FLAGS(_M, _F)            (((_M)->Flags & (_F)) == (_F))
 
-#define MP_IS_READY(_M)        (((_M)->Flags & \
-                                 (fMP_DISCONNECTED | fMP_RESET_IN_PROGRESS | fMP_HALT_IN_PROGRESS | fMP_INIT_IN_PROGRESS | fMP_SURPRISE_REMOVED)) == 0)
+#define MP_IS_READY(_M)        (((_M)->Flags & fMP_DISCONNECTED) == 0)
 
 int device_alloc_frag_buf(struct vnt_private *, PSDeFragControlBlock pDeF);
 void vnt_configure_filter(struct vnt_private *);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 09/22] staging: vt6656: desc.h Remove unused macros
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (6 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 08/22] staging: vt6656: device.h remove dead macros Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 10/22] staging: vt6656: srom.h : Remove dead code Malcolm Priestley
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/desc.h | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/staging/vt6656/desc.h b/drivers/staging/vt6656/desc.h
index 171315a..617d479 100644
--- a/drivers/staging/vt6656/desc.h
+++ b/drivers/staging/vt6656/desc.h
@@ -39,28 +39,15 @@
 /* max transmit or receive buffer size */
 #define CB_MAX_BUF_SIZE     2900U       /* NOTE: must be multiple of 4 */
 
-/* max TX buffer size */
-#define CB_MAX_TX_BUF_SIZE        CB_MAX_BUF_SIZE
-/* max RX buffer size when not use Multi-RD */
-#define CB_MAX_RX_BUF_SIZE_NORMAL CB_MAX_BUF_SIZE
-
-#define CB_BEACON_BUF_SIZE  512U        /* default beacon buffer size */
-
 #define MAX_TOTAL_SIZE_WITH_ALL_HEADERS CB_MAX_BUF_SIZE
 
 #define MAX_INTERRUPT_SIZE              32
 
-#define RX_BLOCKS           64          /* from 0x60 to 0xA0 */
-#define TX_BLOCKS           32          /* from 0xA0 to 0xC0 */
-
 #define CB_MAX_RX_DESC      128         /* max # of descriptors */
 #define CB_MIN_RX_DESC      16          /* min # of RX descriptors */
 #define CB_MAX_TX_DESC      128         /* max # of descriptors */
 #define CB_MIN_TX_DESC      16          /* min # of TX descriptors */
 
-#define CB_RD_NUM           64          /* default # of RD */
-#define CB_TD_NUM           64          /* default # of TD */
-
 /*
  * bits in the RSR register
  */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 10/22] staging: vt6656: srom.h : Remove dead code.
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (7 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 09/22] staging: vt6656: desc.h Remove unused macros Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 11/22] staging: vt6656: srom.h move all macros to device.h Malcolm Priestley
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Remove macros and unused strutures.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/srom.h | 38 --------------------------------------
 1 file changed, 38 deletions(-)

diff --git a/drivers/staging/vt6656/srom.h b/drivers/staging/vt6656/srom.h
index 488192d..ce61ab4 100644
--- a/drivers/staging/vt6656/srom.h
+++ b/drivers/staging/vt6656/srom.h
@@ -32,10 +32,6 @@
 
 #define EEP_MAX_CONTEXT_SIZE    256
 
-#define CB_EEPROM_READBYTE_WAIT 900     //us
-
-#define W_MAX_I2CRETRY          0x0fff
-
 //
 // Contents in the EEPROM
 //
@@ -75,38 +71,4 @@
 //
 #define EEP_RADIOCTL_ENABLE 0x80
 
-// AT24C02 eeprom contents
-//      2048 bits = 256 bytes = 128 words
-//
-typedef struct tagSSromReg {
-    u8    abyPAR[6];                  // 0x00 (u16)
-
-    u16    wSUB_VID;                   // 0x03 (u16)
-    u16    wSUB_SID;
-
-    u8    byBCFG0;                    // 0x05 (u16)
-    u8    byBCFG1;
-
-    u8    byFCR0;                     // 0x06 (u16)
-    u8    byFCR1;
-    u8    byPMC0;                     // 0x07 (u16)
-    u8    byPMC1;
-    u8    byMAXLAT;                   // 0x08 (u16)
-    u8    byMINGNT;
-    u8    byCFG0;                     // 0x09 (u16)
-    u8    byCFG1;
-    u16    wCISPTR;                    // 0x0A (u16)
-    u16    wRsv0;                      // 0x0B (u16)
-    u16    wRsv1;                      // 0x0C (u16)
-    u8    byBBPAIR;                   // 0x0D (u16)
-    u8    byRFTYPE;
-    u8    byMinChannel;               // 0x0E (u16)
-    u8    byMaxChannel;
-    u8    bySignature;                // 0x0F (u16)
-    u8    byCheckSum;
-
-    u8    abyReserved0[96];           // 0x10 (u16)
-    u8    abyCIS[128];                // 0x80 (u16)
-} SSromReg, *PSSromReg;
-
 #endif /* __EEPROM_H__ */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 11/22] staging: vt6656: srom.h move all macros to device.h
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (8 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 10/22] staging: vt6656: srom.h : Remove dead code Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 12/22] staging: vt6656: rndis.h remove dead code Malcolm Priestley
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Remove srom.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/baseband.c |  1 -
 drivers/staging/vt6656/datarate.c |  1 -
 drivers/staging/vt6656/device.h   | 36 ++++++++++++++++++-
 drivers/staging/vt6656/srom.h     | 74 ---------------------------------------
 4 files changed, 35 insertions(+), 77 deletions(-)
 delete mode 100644 drivers/staging/vt6656/srom.h

diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index 3d4610e..9f3b2fb 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -40,7 +40,6 @@
 #include "mac.h"
 #include "baseband.h"
 #include "rf.h"
-#include "srom.h"
 #include "control.h"
 #include "datarate.h"
 #include "rndis.h"
diff --git a/drivers/staging/vt6656/datarate.c b/drivers/staging/vt6656/datarate.c
index 547db6f..8032d6b 100644
--- a/drivers/staging/vt6656/datarate.c
+++ b/drivers/staging/vt6656/datarate.c
@@ -40,7 +40,6 @@
 #include "datarate.h"
 #include "card.h"
 #include "baseband.h"
-#include "srom.h"
 #include "rf.h"
 
 /* static int msglevel = MSG_LEVEL_DEBUG; */
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index f8591a2..990b345 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -62,7 +62,6 @@
 #include "tether.h"
 #include "wmgr.h"
 #include "wcmd.h"
-#include "srom.h"
 #include "rc4.h"
 #include "desc.h"
 #include "key.h"
@@ -106,6 +105,41 @@
 #define BB_VGA_LEVEL            4
 #define BB_VGA_CHANGE_THRESHOLD 3
 
+#define EEP_MAX_CONTEXT_SIZE    256
+
+/* Contents in the EEPROM */
+#define EEP_OFS_PAR		0x0
+#define EEP_OFS_ANTENNA		0x17
+#define EEP_OFS_RADIOCTL	0x18
+#define EEP_OFS_RFTYPE		0x1b
+#define EEP_OFS_MINCHANNEL	0x1c
+#define EEP_OFS_MAXCHANNEL	0x1d
+#define EEP_OFS_SIGNATURE	0x1e
+#define EEP_OFS_ZONETYPE	0x1f
+#define EEP_OFS_RFTABLE		0x20
+#define EEP_OFS_PWR_CCK		0x20
+#define EEP_OFS_SETPT_CCK	0x21
+#define EEP_OFS_PWR_OFDMG	0x23
+
+#define EEP_OFS_CALIB_TX_IQ	0x24
+#define EEP_OFS_CALIB_TX_DC	0x25
+#define EEP_OFS_CALIB_RX_IQ	0x26
+
+#define EEP_OFS_MAJOR_VER	0x2e
+#define EEP_OFS_MINOR_VER	0x2f
+
+#define EEP_OFS_CCK_PWR_TBL	0x30
+#define EEP_OFS_OFDM_PWR_TBL	0x40
+#define EEP_OFS_OFDMA_PWR_TBL	0x50
+
+/* Bits in EEP_OFS_ANTENNA */
+#define EEP_ANTENNA_MAIN	0x1
+#define EEP_ANTENNA_AUX		0x2
+#define EEP_ANTINV		0x4
+
+/* Bits in EEP_OFS_RADIOCTL */
+#define EEP_RADIOCTL_ENABLE	0x80
+
 #ifndef RUN_AT
 #define RUN_AT(x)                       (jiffies+(x))
 #endif
diff --git a/drivers/staging/vt6656/srom.h b/drivers/staging/vt6656/srom.h
deleted file mode 100644
index ce61ab4..0000000
--- a/drivers/staging/vt6656/srom.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: srom.h
- *
- * Purpose: Implement functions to access eeprom
- *
- * Author: Jerry Chen
- *
- * Date: Jan 29, 2003
- *
- */
-
-#ifndef __SROM_H__
-#define __SROM_H__
-
-#define EEP_MAX_CONTEXT_SIZE    256
-
-//
-// Contents in the EEPROM
-//
-#define EEP_OFS_PAR         0x00        // physical address
-#define EEP_OFS_ANTENNA     0x17
-#define EEP_OFS_RADIOCTL    0x18
-#define EEP_OFS_RFTYPE      0x1B        // for select RF
-#define EEP_OFS_MINCHANNEL  0x1C        // Min Channel #
-#define EEP_OFS_MAXCHANNEL  0x1D        // Max Channel #
-#define EEP_OFS_SIGNATURE   0x1E        //
-#define EEP_OFS_ZONETYPE    0x1F        //
-#define EEP_OFS_RFTABLE     0x20        // RF POWER TABLE
-#define EEP_OFS_PWR_CCK     0x20
-#define EEP_OFS_SETPT_CCK   0x21
-#define EEP_OFS_PWR_OFDMG   0x23
-
-#define EEP_OFS_CALIB_TX_IQ 0x24
-#define EEP_OFS_CALIB_TX_DC 0x25
-#define EEP_OFS_CALIB_RX_IQ 0x26
-
-#define EEP_OFS_MAJOR_VER 0x2E
-#define EEP_OFS_MINOR_VER 0x2F
-
-#define EEP_OFS_CCK_PWR_TBL     0x30
-#define EEP_OFS_OFDM_PWR_TBL    0x40
-#define EEP_OFS_OFDMA_PWR_TBL   0x50
-
-//
-// Bits in EEP_OFS_ANTENNA
-//
-#define EEP_ANTENNA_MAIN    0x01
-#define EEP_ANTENNA_AUX     0x02
-#define EEP_ANTINV          0x04
-
-//
-// Bits in EEP_OFS_RADIOCTL
-//
-#define EEP_RADIOCTL_ENABLE 0x80
-
-#endif /* __EEPROM_H__ */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 12/22] staging: vt6656: rndis.h remove dead code.
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (9 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 11/22] staging: vt6656: srom.h move all macros to device.h Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 13/22] staging: vt6656: rndis.h move all to device.h Malcolm Priestley
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Remove dead structures and macros.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/rndis.h | 64 ------------------------------------------
 1 file changed, 64 deletions(-)

diff --git a/drivers/staging/vt6656/rndis.h b/drivers/staging/vt6656/rndis.h
index 3661f82..cf4e0e0 100644
--- a/drivers/staging/vt6656/rndis.h
+++ b/drivers/staging/vt6656/rndis.h
@@ -64,21 +64,8 @@
 #define MESSAGE_REQUEST_RF_CH1          0x0C
 #define MESSAGE_REQUEST_RF_CH2          0x0D
 
-#define VIAUSB20_PACKET_HEADER          0x04
-
 #define USB_REG4	0x604
 
-typedef struct _CMD_MESSAGE
-{
-    u8        byData[256];
-} CMD_MESSAGE, *PCMD_MESSAGE;
-
-typedef struct _CMD_WRITE_MASK
-{
-    u8        byData;
-    u8        byMask;
-} CMD_WRITE_MASK, *PCMD_WRITE_MASK;
-
 struct vnt_cmd_card_init
 {
 	u8 init_class;
@@ -97,55 +84,4 @@ struct vnt_rsp_card_init
 	u8 max_channel;
 };
 
-typedef struct _CMD_SET_KEY
-{
-    u16        wKCTL;
-    u8        abyMacAddr[6];
-    u8        abyKey[16];
-} CMD_SET_KEY, *PCMD_SET_KEY;
-
-typedef struct _CMD_CLRKEY_ENTRY
-{
-    u8        abyKeyEntry[11];
-} CMD_CLRKEY_ENTRY, *PCMD_CLRKEY_ENTRY;
-
-typedef struct _CMD_WRITE_MISCFF
-{
-    u32       adwMiscFFData[22][4];  //a key entry has only 22 dwords
-} CMD_WRITE_MISCFF, *PCMD_WRITE_MISCFF;
-
-typedef struct _CMD_SET_TSFTBTT
-{
-    u8        abyTSF_TBTT[8];
-} CMD_SET_TSFTBTT, *PCMD_SET_TSFTBTT;
-
-typedef struct _CMD_SET_SSTIFS
-{
-    u8        bySIFS;
-    u8        byDIFS;
-    u8        byEIFS;
-    u8        bySlotTime;
-    u8        byCwMax_Min;
-    u8        byBBCR10;
-} CMD_SET_SSTIFS, *PCMD_SET_SSTIFS;
-
-typedef struct _CMD_CHANGE_BBTYPE
-{
-    u8        bySIFS;
-    u8        byDIFS;
-    u8        byEIFS;
-    u8        bySlotTime;
-    u8        byCwMax_Min;
-    u8        byBBCR10;
-    u8        byBB_BBType;    //CR88
-    u8        byMAC_BBType;
-    u32       dwRSPINF_b_1;
-    u32       dwRSPINF_b_2;
-    u32       dwRSPINF_b_55;
-    u32       dwRSPINF_b_11;
-    u16        wRSPINF_a[9];
-} CMD_CHANGE_BBTYPE, *PCMD_CHANGE_BBTYPE;
-
-#define EXCH_WORD(w) ((u16)((u16)(w)<<8) | (u16)((u16)(w)>>8))
-
 #endif /* _RNDIS_H_ */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 13/22] staging: vt6656: rndis.h move all to device.h
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (10 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 12/22] staging: vt6656: rndis.h remove dead code Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 14/22] staging: vt6656: Remove unused variable byRevId Malcolm Priestley
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Commands macros are common to all source files.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/baseband.c |  1 -
 drivers/staging/vt6656/bssdb.c    |  1 -
 drivers/staging/vt6656/card.c     |  1 -
 drivers/staging/vt6656/control.c  |  1 -
 drivers/staging/vt6656/device.h   | 56 ++++++++++++++++++++++++-
 drivers/staging/vt6656/firmware.c |  1 -
 drivers/staging/vt6656/iwctl.c    |  1 -
 drivers/staging/vt6656/key.c      |  1 -
 drivers/staging/vt6656/mac.c      |  1 -
 drivers/staging/vt6656/power.c    |  1 -
 drivers/staging/vt6656/rf.c       |  1 -
 drivers/staging/vt6656/rndis.h    | 87 ---------------------------------------
 drivers/staging/vt6656/wcmd.c     |  1 -
 drivers/staging/vt6656/wmgr.c     |  1 -
 drivers/staging/vt6656/wpactl.c   |  1 -
 15 files changed, 55 insertions(+), 101 deletions(-)
 delete mode 100644 drivers/staging/vt6656/rndis.h

diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index 9f3b2fb..b4489d6 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -42,7 +42,6 @@
 #include "rf.h"
 #include "control.h"
 #include "datarate.h"
-#include "rndis.h"
 
 static int          msglevel                =MSG_LEVEL_INFO;
 //static int          msglevel                =MSG_LEVEL_DEBUG;
diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c
index b018955..7e8e67a 100644
--- a/drivers/staging/vt6656/bssdb.c
+++ b/drivers/staging/vt6656/bssdb.c
@@ -54,7 +54,6 @@
 #include "mac.h"
 #include "wpa2.h"
 #include "control.h"
-#include "rndis.h"
 #include "iowpa.h"
 #include "power.h"
 
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 0d87728..b8f35e7 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -57,7 +57,6 @@
 #include "rc4.h"
 #include "country.h"
 #include "datarate.h"
-#include "rndis.h"
 #include "control.h"
 
 //static int          msglevel                =MSG_LEVEL_DEBUG;
diff --git a/drivers/staging/vt6656/control.c b/drivers/staging/vt6656/control.c
index 026784f..fc19166 100644
--- a/drivers/staging/vt6656/control.c
+++ b/drivers/staging/vt6656/control.c
@@ -41,7 +41,6 @@
  */
 
 #include "control.h"
-#include "rndis.h"
 
 /* static int          msglevel                =MSG_LEVEL_INFO;  */
 /* static int          msglevel                =MSG_LEVEL_DEBUG; */
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 990b345..59d3828 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -66,7 +66,6 @@
 #include "desc.h"
 #include "key.h"
 #include "card.h"
-#include "rndis.h"
 
 #define VNT_USB_VENDOR_ID                     0x160a
 #define VNT_USB_PRODUCT_ID                    0x3184
@@ -140,6 +139,44 @@
 /* Bits in EEP_OFS_RADIOCTL */
 #define EEP_RADIOCTL_ENABLE	0x80
 
+/* control commands */
+#define MESSAGE_TYPE_READ		0x1
+#define MESSAGE_TYPE_WRITE		0x0
+#define MESSAGE_TYPE_LOCK_OR		0x2
+#define MESSAGE_TYPE_LOCK_AND		0x3
+#define MESSAGE_TYPE_WRITE_MASK		0x4
+#define MESSAGE_TYPE_CARDINIT		0x5
+#define MESSAGE_TYPE_INIT_RSP		0x6
+#define MESSAGE_TYPE_MACSHUTDOWN	0x7
+#define MESSAGE_TYPE_SETKEY		0x8
+#define MESSAGE_TYPE_CLRKEYENTRY	0x9
+#define MESSAGE_TYPE_WRITE_MISCFF	0xa
+#define MESSAGE_TYPE_SET_ANTMD		0xb
+#define MESSAGE_TYPE_SELECT_CHANNLE	0xc
+#define MESSAGE_TYPE_SET_TSFTBTT	0xd
+#define MESSAGE_TYPE_SET_SSTIFS		0xe
+#define MESSAGE_TYPE_CHANGE_BBTYPE	0xf
+#define MESSAGE_TYPE_DISABLE_PS		0x10
+#define MESSAGE_TYPE_WRITE_IFRF		0x11
+
+/* command read/write(index) */
+#define MESSAGE_REQUEST_MEM		0x1
+#define MESSAGE_REQUEST_BBREG		0x2
+#define MESSAGE_REQUEST_MACREG		0x3
+#define MESSAGE_REQUEST_EEPROM		0x4
+#define MESSAGE_REQUEST_TSF		0x5
+#define MESSAGE_REQUEST_TBTT		0x6
+#define MESSAGE_REQUEST_BBAGC		0x7
+#define MESSAGE_REQUEST_VERSION		0x8
+#define MESSAGE_REQUEST_RF_INIT		0x9
+#define MESSAGE_REQUEST_RF_INIT2	0xa
+#define MESSAGE_REQUEST_RF_CH0		0xb
+#define MESSAGE_REQUEST_RF_CH1		0xc
+#define MESSAGE_REQUEST_RF_CH2		0xd
+
+/* USB registers */
+#define USB_REG4			0x604
+
 #ifndef RUN_AT
 #define RUN_AT(x)                       (jiffies+(x))
 #endif
@@ -161,6 +198,23 @@ typedef enum __device_msg_level {
 #define DEVICE_INIT_RESET	0x1 /* reset init or Dx to D0 power remain */
 #define DEVICE_INIT_DXPL	0x2 /* Dx to D0 power lost init */
 
+/* Device init */
+struct vnt_cmd_card_init {
+	u8 init_class;
+	u8 exist_sw_net_addr;
+	u8 sw_net_addr[6];
+	u8 short_retry_limit;
+	u8 long_retry_limit;
+};
+
+struct vnt_rsp_card_init {
+	u8 status;
+	u8 net_addr[6];
+	u8 rf_type;
+	u8 min_channel;
+	u8 max_channel;
+};
+
 /* USB */
 
 /*
diff --git a/drivers/staging/vt6656/firmware.c b/drivers/staging/vt6656/firmware.c
index e03f1f9..1d3d268 100644
--- a/drivers/staging/vt6656/firmware.c
+++ b/drivers/staging/vt6656/firmware.c
@@ -34,7 +34,6 @@
 #include <linux/compiler.h>
 #include "firmware.h"
 #include "control.h"
-#include "rndis.h"
 
 static int msglevel = MSG_LEVEL_INFO;
 /* static int msglevel = MSG_LEVEL_DEBUG; */
diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index bfd5f37..38739fa 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -40,7 +40,6 @@
 #include "iowpa.h"
 #include "wpactl.h"
 #include "control.h"
-#include "rndis.h"
 #include "baseband.h"
 
 static const long frequency_list[] = {
diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c
index b173ca1..a88c6b18 100644
--- a/drivers/staging/vt6656/key.c
+++ b/drivers/staging/vt6656/key.c
@@ -39,7 +39,6 @@
 #include "mac.h"
 #include "tmacro.h"
 #include "key.h"
-#include "rndis.h"
 #include "control.h"
 
 static int          msglevel                =MSG_LEVEL_INFO;
diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c
index 8bd3ab0..8298a9e 100644
--- a/drivers/staging/vt6656/mac.c
+++ b/drivers/staging/vt6656/mac.c
@@ -35,7 +35,6 @@
 #include "desc.h"
 #include "mac.h"
 #include "80211hdr.h"
-#include "rndis.h"
 #include "control.h"
 
 //static int          msglevel                =MSG_LEVEL_DEBUG;
diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c
index 43da589..c4bea74 100644
--- a/drivers/staging/vt6656/power.c
+++ b/drivers/staging/vt6656/power.c
@@ -45,7 +45,6 @@
 #include "rxtx.h"
 #include "card.h"
 #include "control.h"
-#include "rndis.h"
 
 static int msglevel = MSG_LEVEL_INFO;
 
diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 64632e9..7217f2c 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -39,7 +39,6 @@
 #include "rf.h"
 #include "baseband.h"
 #include "control.h"
-#include "rndis.h"
 #include "datarate.h"
 
 static int          msglevel                =MSG_LEVEL_INFO;
diff --git a/drivers/staging/vt6656/rndis.h b/drivers/staging/vt6656/rndis.h
deleted file mode 100644
index cf4e0e0..0000000
--- a/drivers/staging/vt6656/rndis.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: rndis.h
- *
- * Purpose: Interface between firmware and driver
- *
- * Author: Warren Hsu
- *
- * Date: Nov 24, 2004
- *
- */
-
-#ifndef __RNDIS_H__
-#define __RNDIS_H__
-
-#define MESSAGE_TYPE_READ               0x01
-#define MESSAGE_TYPE_WRITE              0x00
-#define MESSAGE_TYPE_LOCK_OR            0x02
-#define MESSAGE_TYPE_LOCK_AND           0x03
-#define MESSAGE_TYPE_WRITE_MASK         0x04
-#define MESSAGE_TYPE_CARDINIT           0x05
-#define MESSAGE_TYPE_INIT_RSP           0x06
-#define MESSAGE_TYPE_MACSHUTDOWN        0x07
-#define MESSAGE_TYPE_SETKEY             0x08
-#define MESSAGE_TYPE_CLRKEYENTRY        0x09
-#define MESSAGE_TYPE_WRITE_MISCFF       0x0A
-#define MESSAGE_TYPE_SET_ANTMD          0x0B
-#define MESSAGE_TYPE_SELECT_CHANNLE     0x0C
-#define MESSAGE_TYPE_SET_TSFTBTT        0x0D
-#define MESSAGE_TYPE_SET_SSTIFS         0x0E
-#define MESSAGE_TYPE_CHANGE_BBTYPE      0x0F
-#define MESSAGE_TYPE_DISABLE_PS         0x10
-#define MESSAGE_TYPE_WRITE_IFRF         0x11
-
-//used for read/write(index)
-#define MESSAGE_REQUEST_MEM             0x01
-#define MESSAGE_REQUEST_BBREG           0x02
-#define MESSAGE_REQUEST_MACREG          0x03
-#define MESSAGE_REQUEST_EEPROM          0x04
-#define MESSAGE_REQUEST_TSF             0x05
-#define MESSAGE_REQUEST_TBTT            0x06
-#define MESSAGE_REQUEST_BBAGC           0x07
-#define MESSAGE_REQUEST_VERSION         0x08
-#define MESSAGE_REQUEST_RF_INIT         0x09
-#define MESSAGE_REQUEST_RF_INIT2        0x0A
-#define MESSAGE_REQUEST_RF_CH0          0x0B
-#define MESSAGE_REQUEST_RF_CH1          0x0C
-#define MESSAGE_REQUEST_RF_CH2          0x0D
-
-#define USB_REG4	0x604
-
-struct vnt_cmd_card_init
-{
-	u8 init_class;
-	u8 exist_sw_net_addr;
-	u8 sw_net_addr[6];
-	u8 short_retry_limit;
-	u8 long_retry_limit;
-};
-
-struct vnt_rsp_card_init
-{
-	u8 status;
-	u8 net_addr[6];
-	u8 rf_type;
-	u8 min_channel;
-	u8 max_channel;
-};
-
-#endif /* _RNDIS_H_ */
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index 66d59d5..8fecb34 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -51,7 +51,6 @@
 #include "control.h"
 #include "rxtx.h"
 #include "rf.h"
-#include "rndis.h"
 #include "channel.h"
 #include "iowpa.h"
 
diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c
index cce67cd..64edc16 100644
--- a/drivers/staging/vt6656/wmgr.c
+++ b/drivers/staging/vt6656/wmgr.c
@@ -79,7 +79,6 @@
 #include "rf.h"
 #include "iowpa.h"
 #include "control.h"
-#include "rndis.h"
 
 static int msglevel = MSG_LEVEL_INFO;
 //static int          msglevel                =MSG_LEVEL_DEBUG;
diff --git a/drivers/staging/vt6656/wpactl.c b/drivers/staging/vt6656/wpactl.c
index f4a8a5c..b6885a9 100644
--- a/drivers/staging/vt6656/wpactl.c
+++ b/drivers/staging/vt6656/wpactl.c
@@ -39,7 +39,6 @@
 #include "iocmd.h"
 #include "iowpa.h"
 #include "control.h"
-#include "rndis.h"
 #include "rf.h"
 
 static int msglevel = MSG_LEVEL_INFO;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 14/22] staging: vt6656: Remove unused variable byRevId.
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (11 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 13/22] staging: vt6656: rndis.h move all to device.h Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 15/22] staging: vt6656: Remove unused variable ulTxPower Malcolm Priestley
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/device.h   | 2 --
 drivers/staging/vt6656/main_usb.c | 7 +------
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 59d3828..aefbe93 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -409,8 +409,6 @@ struct vnt_private {
 
 	u32 rx_bytes;
 
-	u8 byRevId;
-
 	u32 flags;
 	unsigned long Flags;
 
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 1b58cca..68ae97c 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -387,7 +387,7 @@ static int device_init_registers(struct vnt_private *pDevice)
 
 	pDevice->byTopOFDMBasicRate = RATE_24M;
 	pDevice->byTopCCKBasicRate = RATE_1M;
-	pDevice->byRevId = 0;
+
 	/* target to IF pin while programming to RF chip */
 	pDevice->byCurPwr = 0xFF;
 
@@ -508,11 +508,6 @@ static int device_init_registers(struct vnt_private *pDevice)
 	/* get RFType */
 	pDevice->byRFType = init_rsp->rf_type;
 
-	if ((pDevice->byRFType & RF_EMU) != 0) {
-		/* force change RevID for VT3253 emu */
-		pDevice->byRevId = 0x80;
-	}
-
 	/* load vt3266 calibration parameters in EEPROM */
 	if (pDevice->byRFType == RF_VT3226D0) {
 		if ((pDevice->abyEEPROM[EEP_OFS_MAJOR_VER] == 0x1) &&
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 15/22] staging: vt6656: Remove unused variable ulTxPower.
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (12 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 14/22] staging: vt6656: Remove unused variable byRevId Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 16/22] staging: vt6656: Remove dead variable bCCK Malcolm Priestley
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/device.h   | 1 -
 drivers/staging/vt6656/main_usb.c | 3 ---
 2 files changed, 4 deletions(-)

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index aefbe93..7e7ac80 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -639,7 +639,6 @@ struct vnt_private {
 	u8 bSameBSSCurNum;
 	int bRoaming;
 	int b11hEable;
-	unsigned long ulTxPower;
 
 	/* Encryption */
 	NDIS_802_11_WEP_STATUS eEncryptionStatus;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 68ae97c..3832bcb 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -498,9 +498,6 @@ static int device_init_registers(struct vnt_private *pDevice)
 	pDevice->eConfigPHYMode = PHY_TYPE_AUTO;
 	pDevice->byBBType = BB_TYPE_11G;
 
-	/* initialize BBP registers */
-	pDevice->ulTxPower = 25;
-
 	/* get channel range */
 	pDevice->byMinChannel = 1;
 	pDevice->byMaxChannel = CB_MAX_CHANNEL;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 16/22] staging: vt6656: Remove dead variable bCCK.
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (13 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 15/22] staging: vt6656: Remove unused variable ulTxPower Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 17/22] staging: vt6656: Remove unused variable uScanTime Malcolm Priestley
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

bCCK is always true remove all false conditions and
local variable.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/baseband.c | 6 ------
 drivers/staging/vt6656/device.h   | 1 -
 drivers/staging/vt6656/main_usb.c | 2 --
 drivers/staging/vt6656/wmgr.c     | 1 -
 4 files changed, 10 deletions(-)

diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index b4489d6..a70b278 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -737,7 +737,6 @@ void BBvCalculateParameter(struct vnt_private *pDevice, u32 cbFrameLength,
 	u32 cbTmp;
 	int bExtBit;
 	u8 byPreambleType = pDevice->byPreambleType;
-	int bCCK = pDevice->bCCK;
 
     cbBitCount = cbFrameLength * 8;
     bExtBit = false;
@@ -757,8 +756,6 @@ void BBvCalculateParameter(struct vnt_private *pDevice, u32 cbFrameLength,
         break;
 
     case RATE_5M :
-        if (bCCK == false)
-            cbBitCount ++;
         cbUsCount = (cbBitCount * 10) / 55;
         cbTmp = (cbUsCount * 55) / 10;
         if (cbTmp != cbBitCount)
@@ -770,9 +767,6 @@ void BBvCalculateParameter(struct vnt_private *pDevice, u32 cbFrameLength,
         break;
 
     case RATE_11M :
-
-        if (bCCK == false)
-            cbBitCount ++;
         cbUsCount = cbBitCount / 11;
         cbTmp = cbUsCount * 11;
         if (cbTmp != cbBitCount) {
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 7e7ac80..8248824 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -581,7 +581,6 @@ struct vnt_private {
 
 	u32 dwMaxReceiveLifetime;  /* dot11MaxReceiveLifetime */
 
-	int bCCK;
 	int bEncryptionEnable;
 	int bShortSlotTime;
 	int bProtectMode;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 3832bcb..ea0c9e7 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -368,8 +368,6 @@ static int device_init_registers(struct vnt_private *pDevice)
 
 	/* do MACbSoftwareReset in MACvInitialize */
 
-	/* force CCK */
-	pDevice->bCCK = true;
 	pDevice->bProtectMode = false;
 	/* only used in 11g type, sync with ERP IE */
 	pDevice->bNonERPPresent = false;
diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c
index 64edc16..d08f290 100644
--- a/drivers/staging/vt6656/wmgr.c
+++ b/drivers/staging/vt6656/wmgr.c
@@ -2571,7 +2571,6 @@ static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode,
     }
 
     // Init the BSS informations
-    pDevice->bCCK = true;
     pDevice->bProtectMode = false;
     MACvDisableProtectMD(pDevice);
     pDevice->bBarkerPreambleMd = false;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 17/22] staging: vt6656: Remove unused variable uScanTime.
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (14 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 16/22] staging: vt6656: Remove dead variable bCCK Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 18/22] staging: vt6656: Remove unused variable byACKRate Malcolm Priestley
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/device.h   | 1 -
 drivers/staging/vt6656/main_usb.c | 3 ---
 2 files changed, 4 deletions(-)

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 8248824..eff50c8 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -607,7 +607,6 @@ struct vnt_private {
 	int bBeaconSent;
 	int bFixRate;
 	u8 byCurrentCh;
-	u32 uScanTime;
 
 	CMD_STATE eCommandState;
 
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index ea0c9e7..c00a16c 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -488,9 +488,6 @@ static int device_init_registers(struct vnt_private *pDevice)
 	/* get Auto Fall Back type */
 	pDevice->byAutoFBCtrl = AUTO_FB_0;
 
-	/* set SCAN Time */
-	pDevice->uScanTime = WLAN_SCAN_MINITIME;
-
 	/* default Auto Mode */
 	/* pDevice->NetworkType = Ndis802_11Automode; */
 	pDevice->eConfigPHYMode = PHY_TYPE_AUTO;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 18/22] staging: vt6656: Remove unused variable byACKRate.
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (15 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 17/22] staging: vt6656: Remove unused variable uScanTime Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 19/22] staging: vt6656: vnt_private remove dead variables Malcolm Priestley
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/device.h | 1 -
 drivers/staging/vt6656/rxtx.c   | 2 --
 2 files changed, 3 deletions(-)

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index eff50c8..73bce9e 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -535,7 +535,6 @@ struct vnt_private {
 	u8 byBBType; /* 0: 11A, 1:11B, 2:11G */
 	u8 byPacketType; /* 0:11a 1:11b 2:11gb 3:11ga */
 	u16 wBasicRate;
-	u8 byACKRate;
 	u8 byTopOFDMBasicRate;
 	u8 byTopCCKBasicRate;
 
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 7287467..4ec79c4 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -2341,12 +2341,10 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, struct sk_buff *skb)
 	if (pDevice->sTxEthHeader.h_proto == cpu_to_be16(ETH_P_PAE)) {
 		if (pDevice->byBBType != BB_TYPE_11A) {
 			pDevice->wCurrentRate = RATE_1M;
-			pDevice->byACKRate = RATE_1M;
 			pDevice->byTopCCKBasicRate = RATE_1M;
 			pDevice->byTopOFDMBasicRate = RATE_6M;
 		} else {
 			pDevice->wCurrentRate = RATE_6M;
-			pDevice->byACKRate = RATE_6M;
 			pDevice->byTopCCKBasicRate = RATE_1M;
 			pDevice->byTopOFDMBasicRate = RATE_6M;
 		}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 19/22] staging: vt6656: vnt_private remove dead variables.
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (16 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 18/22] staging: vt6656: Remove unused variable byACKRate Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 20/22] " Malcolm Priestley
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

dwAotoRateTxOkCnt
dwAotoRateTxFailCnt
dwErrorRateThreshold
dwTPTable

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/device.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 73bce9e..f3072dd 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -538,10 +538,6 @@ struct vnt_private {
 	u8 byTopOFDMBasicRate;
 	u8 byTopCCKBasicRate;
 
-	u32 dwAotoRateTxOkCnt;
-	u32 dwAotoRateTxFailCnt;
-	u32 dwErrorRateThreshold[13];
-	u32 dwTPTable[MAX_RATE];
 	u8 abyEEPROM[EEP_MAX_CONTEXT_SIZE];  /*u32 alignment */
 
 	u8 byMinChannel;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 20/22] staging: vt6656: vnt_private remove dead variables
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (17 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 19/22] staging: vt6656: vnt_private remove dead variables Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 21/22] " Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 22/22] staging: vt6656: Remove always true bUpdateBBVGA Malcolm Priestley
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

byFOETuning
byAutoPwrTunning

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/device.h   | 6 ------
 drivers/staging/vt6656/main_usb.c | 2 --
 2 files changed, 8 deletions(-)

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index f3072dd..a8637ec 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -672,12 +672,6 @@ struct vnt_private {
 
 	int bRadioCmd;
 
-	/* For FOE Tuning */
-	u8  byFOETuning;
-
-	/* For Auto Power Tunning */
-	u8  byAutoPwrTunning;
-
 	/* BaseBand Loopback Use */
 	u8 byBBCR4d;
 	u8 byBBCRc9;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index c00a16c..a9d9cc8 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -263,8 +263,6 @@ device_set_options(struct vnt_private *pDevice) {
     pDevice->byPacketType = pDevice->byBBType;
     pDevice->byAutoFBCtrl = AUTO_FB_0;
     pDevice->bUpdateBBVGA = true;
-    pDevice->byFOETuning = 0;
-    pDevice->byAutoPwrTunning = 0;
     pDevice->byPreambleType = 0;
     pDevice->bExistSWNetAddr = false;
     /* pDevice->bDiversityRegCtlON = true; */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 21/22] staging: vt6656: vnt_private remove dead variables.
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (18 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 20/22] " Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  2014-05-17  8:50 ` [PATCH 22/22] staging: vt6656: Remove always true bUpdateBBVGA Malcolm Priestley
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

byBBCR4d
byBBCRc9
byBBCR88
byBBCR09

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/device.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index a8637ec..ee3fb0b 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -672,12 +672,6 @@ struct vnt_private {
 
 	int bRadioCmd;
 
-	/* BaseBand Loopback Use */
-	u8 byBBCR4d;
-	u8 byBBCRc9;
-	u8 byBBCR88;
-	u8 byBBCR09;
-
 	/* command timer */
 	struct delayed_work run_command_work;
 	/* One second callback */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 22/22] staging: vt6656: Remove always true bUpdateBBVGA
  2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
                   ` (19 preceding siblings ...)
  2014-05-17  8:50 ` [PATCH 21/22] " Malcolm Priestley
@ 2014-05-17  8:50 ` Malcolm Priestley
  20 siblings, 0 replies; 22+ messages in thread
From: Malcolm Priestley @ 2014-05-17  8:50 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley

Remove true if statements.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/bssdb.c    | 29 ++++++++++++-----------------
 drivers/staging/vt6656/device.h   |  1 -
 drivers/staging/vt6656/main_usb.c |  9 +++------
 drivers/staging/vt6656/wcmd.c     | 17 +++++++----------
 drivers/staging/vt6656/wmgr.c     |  3 +--
 5 files changed, 23 insertions(+), 36 deletions(-)

diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c
index 7e8e67a..de60c99 100644
--- a/drivers/staging/vt6656/bssdb.c
+++ b/drivers/staging/vt6656/bssdb.c
@@ -455,16 +455,14 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice,
 		}
 	}
 
-	if (pDevice->bUpdateBBVGA) {
-		/* Monitor if RSSI is too strong. */
-		pBSSList->byRSSIStatCnt = 0;
-		RFvRSSITodBm(pDevice, (u8) (pRxPacket->uRSSI),
+	/* Monitor if RSSI is too strong. */
+	pBSSList->byRSSIStatCnt = 0;
+	RFvRSSITodBm(pDevice, (u8) (pRxPacket->uRSSI),
 			     &pBSSList->ldBmMAX);
-		pBSSList->ldBmAverage[0] = pBSSList->ldBmMAX;
-		pBSSList->ldBmAverRange = pBSSList->ldBmMAX;
-		for (ii = 1; ii < RSSI_STAT_COUNT; ii++)
-			pBSSList->ldBmAverage[ii] = 0;
-	}
+	pBSSList->ldBmAverage[0] = pBSSList->ldBmMAX;
+	pBSSList->ldBmAverRange = pBSSList->ldBmMAX;
+	for (ii = 1; ii < RSSI_STAT_COUNT; ii++)
+		pBSSList->ldBmAverage[ii] = 0;
 
 	pBSSList->uIELength = uIELength;
 	if (pBSSList->uIELength > WLAN_BEACON_FR_MAXLEN)
@@ -998,10 +996,8 @@ void BSSvSecondCallBack(struct work_struct *work)
 
 		if (pMgmt->sNodeDBTable[0].bActive) { /* Assoc with BSS */
 
-			if (pDevice->bUpdateBBVGA) {
-				s_vCheckSensitivity(pDevice);
-				s_vCheckPreEDThreshold(pDevice);
-			}
+			s_vCheckSensitivity(pDevice);
+			s_vCheckPreEDThreshold(pDevice);
 
 			if (pMgmt->sNodeDBTable[0].uInActiveCount >=
 							(LOST_BEACON_COUNT/2) &&
@@ -1118,10 +1114,9 @@ void BSSvSecondCallBack(struct work_struct *work)
 		}
 		if (pMgmt->eCurrState == WMAC_STATE_JOINTED) {
 
-			if (pDevice->bUpdateBBVGA) {
-				s_vCheckSensitivity(pDevice);
-				s_vCheckPreEDThreshold(pDevice);
-			}
+			s_vCheckSensitivity(pDevice);
+			s_vCheckPreEDThreshold(pDevice);
+
 			if (pMgmt->sNodeDBTable[0].uInActiveCount >=
 						ADHOC_LOST_BEACON_COUNT) {
 				DBG_PRT(MSG_LEVEL_NOTICE,
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index ee3fb0b..606ca9f 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -660,7 +660,6 @@ struct vnt_private {
 	int bRxMICFail;
 
 	/* For Update BaseBand VGA Gain Offset */
-	int bUpdateBBVGA;
 	u32 uBBVGADiffCount;
 	u8 byBBVGANew;
 	u8 byBBVGACurrent;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index a9d9cc8..3a576fa 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -262,7 +262,6 @@ device_set_options(struct vnt_private *pDevice) {
     pDevice->byBBType = BBP_TYPE_DEF;
     pDevice->byPacketType = pDevice->byBBType;
     pDevice->byAutoFBCtrl = AUTO_FB_0;
-    pDevice->bUpdateBBVGA = true;
     pDevice->byPreambleType = 0;
     pDevice->bExistSWNetAddr = false;
     /* pDevice->bDiversityRegCtlON = true; */
@@ -566,12 +565,10 @@ static int device_init_registers(struct vnt_private *pDevice)
 	BBvSetShortSlotTime(pDevice);
 	CARDvSetBSSMode(pDevice);
 
-	if (pDevice->bUpdateBBVGA) {
-		pDevice->byBBVGACurrent = pDevice->abyBBVGA[0];
-		pDevice->byBBVGANew = pDevice->byBBVGACurrent;
+	pDevice->byBBVGACurrent = pDevice->abyBBVGA[0];
+	pDevice->byBBVGANew = pDevice->byBBVGACurrent;
 
-		BBvSetVGAGainOffset(pDevice, pDevice->abyBBVGA[0]);
-	}
+	BBvSetVGAGainOffset(pDevice, pDevice->abyBBVGA[0]);
 
 	pDevice->byRadioCtl = pDevice->abyEEPROM[EEP_OFS_RADIOCTL];
 	pDevice->bHWRadioOff = false;
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index 8fecb34..b742460 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -344,11 +344,10 @@ void vRunCommand(struct work_struct *work)
 			CARDbSetMediaChannel(pDevice, pMgmt->uScanChannel);
 			// Set Baseband to be more sensitive.
 
-			if (pDevice->bUpdateBBVGA) {
-				BBvSetShortSlotTime(pDevice);
-				BBvSetVGAGainOffset(pDevice, pDevice->abyBBVGA[0]);
-				BBvUpdatePreEDThreshold(pDevice, true);
-			}
+			BBvSetShortSlotTime(pDevice);
+			BBvSetVGAGainOffset(pDevice, pDevice->abyBBVGA[0]);
+			BBvUpdatePreEDThreshold(pDevice, true);
+
 			pMgmt->uScanChannel++;
 
 			while (!ChannelValid(pDevice->byZoneType, pMgmt->uScanChannel) &&
@@ -381,11 +380,9 @@ void vRunCommand(struct work_struct *work)
 			CARDvSetBSSMode(pDevice);
 		}
 
-		if (pDevice->bUpdateBBVGA) {
-			BBvSetShortSlotTime(pDevice);
-			BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent);
-			BBvUpdatePreEDThreshold(pDevice, false);
-		}
+		BBvSetShortSlotTime(pDevice);
+		BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent);
+		BBvUpdatePreEDThreshold(pDevice, false);
 
 		// Set channel back
 		vAdHocBeaconRestart(pDevice);
diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c
index d08f290..e6eec7f 100644
--- a/drivers/staging/vt6656/wmgr.c
+++ b/drivers/staging/vt6656/wmgr.c
@@ -2653,8 +2653,7 @@ static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode,
     pMgmt->uCurrChannel = pCurr->uChannel;
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "<----s_bSynchBSS Set Channel [%d]\n", pCurr->uChannel);
 
-    if ((pDevice->bUpdateBBVGA) &&
-        (pDevice->byBBVGACurrent != pDevice->abyBBVGA[0])) {
+    if (pDevice->byBBVGACurrent != pDevice->abyBBVGA[0]) {
         pDevice->byBBVGACurrent = pDevice->abyBBVGA[0];
         BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent);
         BBvSetShortSlotTime(pDevice);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2014-05-17  8:53 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-17  8:50 [PATCH 01/22] staging: vt6656: rf.c additional power Malcolm Priestley
2014-05-17  8:50 ` [PATCH 02/22] staging: vt6656: usbpipe: get rid of in/out debug messages Malcolm Priestley
2014-05-17  8:50 ` [PATCH 03/22] staging: vt6656: usbpipe: replace debug messsages Malcolm Priestley
2014-05-17  8:50 ` [PATCH 04/22] staging: vt6656: PIPEnsControlOut remove camel case Malcolm Priestley
2014-05-17  8:50 ` [PATCH 05/22] staging: vt6656: PIPEnsControlIn " Malcolm Priestley
2014-05-17  8:50 ` [PATCH 06/22] staging: vt6656: device_cfg.h remove dead code Malcolm Priestley
2014-05-17  8:50 ` [PATCH 07/22] staging: vt6656: device_cfg.h Move macros to device.h Malcolm Priestley
2014-05-17  8:50 ` [PATCH 08/22] staging: vt6656: device.h remove dead macros Malcolm Priestley
2014-05-17  8:50 ` [PATCH 09/22] staging: vt6656: desc.h Remove unused macros Malcolm Priestley
2014-05-17  8:50 ` [PATCH 10/22] staging: vt6656: srom.h : Remove dead code Malcolm Priestley
2014-05-17  8:50 ` [PATCH 11/22] staging: vt6656: srom.h move all macros to device.h Malcolm Priestley
2014-05-17  8:50 ` [PATCH 12/22] staging: vt6656: rndis.h remove dead code Malcolm Priestley
2014-05-17  8:50 ` [PATCH 13/22] staging: vt6656: rndis.h move all to device.h Malcolm Priestley
2014-05-17  8:50 ` [PATCH 14/22] staging: vt6656: Remove unused variable byRevId Malcolm Priestley
2014-05-17  8:50 ` [PATCH 15/22] staging: vt6656: Remove unused variable ulTxPower Malcolm Priestley
2014-05-17  8:50 ` [PATCH 16/22] staging: vt6656: Remove dead variable bCCK Malcolm Priestley
2014-05-17  8:50 ` [PATCH 17/22] staging: vt6656: Remove unused variable uScanTime Malcolm Priestley
2014-05-17  8:50 ` [PATCH 18/22] staging: vt6656: Remove unused variable byACKRate Malcolm Priestley
2014-05-17  8:50 ` [PATCH 19/22] staging: vt6656: vnt_private remove dead variables Malcolm Priestley
2014-05-17  8:50 ` [PATCH 20/22] " Malcolm Priestley
2014-05-17  8:50 ` [PATCH 21/22] " Malcolm Priestley
2014-05-17  8:50 ` [PATCH 22/22] staging: vt6656: Remove always true bUpdateBBVGA Malcolm Priestley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).