2014-07-25 19:52:31

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 01/12] staging: vt6656: rename device_set_options to vnt_set_options

changing device to vnt

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

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index fdc5c7b..7e8551f 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -104,7 +104,7 @@ static struct usb_device_id vt6656_table[] = {
{}
};

-static void device_set_options(struct vnt_private *priv)
+static void vnt_set_options(struct vnt_private *priv)
{
/* Set number of TX buffers */
if (vnt_tx_buffers < CB_MIN_TX_DESC || vnt_tx_buffers > CB_MAX_TX_DESC)
@@ -997,7 +997,7 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id)
priv->hw = hw;
priv->usb = udev;

- device_set_options(priv);
+ vnt_set_options(priv);

spin_lock_init(&priv->lock);
mutex_init(&priv->usb_lock);
--
2.0.1



2014-07-25 19:52:35

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 03/12] staging: vt6656: rename device_free_tx_bufs to vnt_free_tx_bufs

changing device to vnt

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

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 51fad26..88484c8 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -34,7 +34,7 @@
* device_ioctl - ioctl entry
* device_close - shutdown mac/bbp & free dma/descriptor resource
* device_alloc_frag_buf - rx fragement pre-allocated function
- * device_free_tx_bufs - free tx buffer function
+ * vnt_free_tx_bufs - free tx buffer function
* device_dma0_tx_80211- tx 802.11 frame via dma0
* device_dma0_xmit- tx PS buffered frame via dma0
* vnt_init_registers- initial MAC & BBP & RF internal registers.
@@ -378,7 +378,7 @@ static int vnt_init_registers(struct vnt_private *priv)
return true;
}

-static void device_free_tx_bufs(struct vnt_private *priv)
+static void vnt_free_tx_bufs(struct vnt_private *priv)
{
struct vnt_usb_send_context *tx_context;
int ii;
@@ -521,7 +521,7 @@ free_rx_tx:
device_free_rx_bufs(priv);

free_tx:
- device_free_tx_bufs(priv);
+ vnt_free_tx_bufs(priv);

return false;
}
@@ -568,7 +568,7 @@ static int vnt_start(struct ieee80211_hw *hw)

free_all:
device_free_rx_bufs(priv);
- device_free_tx_bufs(priv);
+ vnt_free_tx_bufs(priv);
device_free_int_bufs(priv);

usb_kill_urb(priv->interrupt_urb);
@@ -602,7 +602,7 @@ static void vnt_stop(struct ieee80211_hw *hw)

priv->cmd_running = false;

- device_free_tx_bufs(priv);
+ vnt_free_tx_bufs(priv);
device_free_rx_bufs(priv);
device_free_int_bufs(priv);

--
2.0.1


2014-07-25 19:52:36

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 04/12] staging: vt6656: rename device_free_rx_bufs to vnt_free_rx_bufs

changing vnt to device

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

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 88484c8..76678c8 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -397,7 +397,7 @@ static void vnt_free_tx_bufs(struct vnt_private *priv)
return;
}

-static void device_free_rx_bufs(struct vnt_private *priv)
+static void vnt_free_rx_bufs(struct vnt_private *priv)
{
struct vnt_rcb *rcb;
int ii;
@@ -518,7 +518,7 @@ static bool device_alloc_bufs(struct vnt_private *priv)
return true;

free_rx_tx:
- device_free_rx_bufs(priv);
+ vnt_free_rx_bufs(priv);

free_tx:
vnt_free_tx_bufs(priv);
@@ -567,7 +567,7 @@ static int vnt_start(struct ieee80211_hw *hw)
return 0;

free_all:
- device_free_rx_bufs(priv);
+ vnt_free_rx_bufs(priv);
vnt_free_tx_bufs(priv);
device_free_int_bufs(priv);

@@ -603,7 +603,7 @@ static void vnt_stop(struct ieee80211_hw *hw)
priv->cmd_running = false;

vnt_free_tx_bufs(priv);
- device_free_rx_bufs(priv);
+ vnt_free_rx_bufs(priv);
device_free_int_bufs(priv);

usb_kill_urb(priv->interrupt_urb);
--
2.0.1


2014-07-25 19:53:04

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 12/12] staging: vt6656: rf.h clean up comments

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

diff --git a/drivers/staging/vt6656/rf.h b/drivers/staging/vt6656/rf.h
index 8cebb6a..3acdc65 100644
--- a/drivers/staging/vt6656/rf.h
+++ b/drivers/staging/vt6656/rf.h
@@ -32,9 +32,7 @@

#include "device.h"

-//
-// Baseband RF pair definition in eeprom (Bits 6..0)
-//
+/* Baseband RF pair definition in eeprom (Bits 6..0) */
#define RF_RFMD2959 0x01
#define RF_MAXIMAG 0x02
#define RF_AL2230 0x03
@@ -46,8 +44,8 @@
#define RF_VT3226 0x09
#define RF_AIROHA7230 0x0a
#define RF_UW2453 0x0b
-#define RF_VT3226D0 0x0c //RobertYu:20051114
-#define RF_VT3342A0 0x0d //RobertYu:20060609
+#define RF_VT3226D0 0x0c /* RobertYu:20051114 */
+#define RF_VT3342A0 0x0d /* RobertYu:20060609 */
#define RF_AL2230S 0x0e

#define RF_EMU 0x80
--
2.0.1


2014-07-25 19:52:45

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 09/12] staging: vt6656: main_usb.c remove return from void functions

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/main_usb.c | 13 -------------
1 file changed, 13 deletions(-)

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 87e89d7..422fcba 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -381,8 +381,6 @@ static void vnt_free_tx_bufs(struct vnt_private *priv)

kfree(tx_context);
}
-
- return;
}

static void vnt_free_rx_bufs(struct vnt_private *priv)
@@ -407,8 +405,6 @@ static void vnt_free_rx_bufs(struct vnt_private *priv)

kfree(rcb);
}
-
- return;
}

static void usb_device_reset(struct vnt_private *priv)
@@ -419,14 +415,11 @@ static void usb_device_reset(struct vnt_private *priv)
if (status)
dev_warn(&priv->usb->dev,
"usb_device_reset fail status=%d\n", status);
- return ;
}

static void vnt_free_int_bufs(struct vnt_private *priv)
{
kfree(priv->int_buf.data_buf);
-
- return;
}

static bool vnt_alloc_bufs(struct vnt_private *priv)
@@ -596,8 +589,6 @@ static void vnt_stop(struct ieee80211_hw *hw)

usb_kill_urb(priv->interrupt_urb);
usb_free_urb(priv->interrupt_urb);
-
- return;
}

static int vnt_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
@@ -663,8 +654,6 @@ static void vnt_remove_interface(struct ieee80211_hw *hw,

/* LED slow blink */
vnt_mac_set_led(priv, LEDSTS_STS, LEDSTS_SLOW);
-
- return;
}

static int vnt_config(struct ieee80211_hw *hw, u32 changed)
@@ -844,8 +833,6 @@ static void vnt_configure(struct ieee80211_hw *hw,
vnt_control_out_u8(priv, MESSAGE_REQUEST_MACREG, MAC_REG_RCR, rx_mode);

dev_dbg(&priv->usb->dev, "rx mode out= %x\n", rx_mode);
-
- return;
}

static int vnt_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
--
2.0.1


2014-07-25 19:52:43

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 08/12] staging: vt6656: change driver version to mac80211

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

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 2ec086c..5a7ca52 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -81,7 +81,7 @@
#define DEVICE_NAME "vt6656"
#define DEVICE_FULL_DRV_NAM "VIA Networking Wireless LAN USB Driver"

-#define DEVICE_VERSION "1.19_12"
+#define DEVICE_VERSION "mac80211"

#define CONFIG_PATH "/etc/vntconfiguration.dat"

--
2.0.1


2014-07-25 19:52:33

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 02/12] staging: vt6656: rename device_init_registers to vnt_init_registers

changing device to vnt

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

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 7e8551f..51fad26 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -37,7 +37,7 @@
* device_free_tx_bufs - free tx buffer function
* device_dma0_tx_80211- tx 802.11 frame via dma0
* device_dma0_xmit- tx PS buffered frame via dma0
- * device_init_registers- initial MAC & BBP & RF internal registers.
+ * vnt_init_registers- initial MAC & BBP & RF internal registers.
* device_init_rings- initial tx/rx ring buffer
* device_init_defrag_cb- initial & allocate de-fragement buffer.
* device_tx_srv- tx interrupt service function
@@ -131,7 +131,7 @@ static void vnt_set_options(struct vnt_private *priv)
/*
* initialization of MAC & BBP registers
*/
-static int device_init_registers(struct vnt_private *priv)
+static int vnt_init_registers(struct vnt_private *priv)
{
struct vnt_cmd_card_init *init_cmd = &priv->init_command;
struct vnt_rsp_card_init *init_rsp = &priv->init_response;
@@ -553,7 +553,7 @@ static int vnt_start(struct ieee80211_hw *hw)

clear_bit(DEVICE_FLAGS_DISCONNECTED, &priv->flags);

- if (device_init_registers(priv) == false) {
+ if (vnt_init_registers(priv) == false) {
dev_dbg(&priv->usb->dev, " init register fail\n");
goto free_all;
}
@@ -954,7 +954,7 @@ static const struct ieee80211_ops vnt_mac_ops = {
int vnt_init(struct vnt_private *priv)
{

- if (!(device_init_registers(priv)))
+ if (!(vnt_init_registers(priv)))
return -EAGAIN;

SET_IEEE80211_PERM_ADDR(priv->hw, priv->permanent_net_addr);
--
2.0.1


2014-07-25 19:52:38

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 05/12] staging: vt6656: rename device_free_int_bufs to vnt_free_int_bufs

changing device to vnt

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

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 76678c8..50955d2 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -434,7 +434,7 @@ static void usb_device_reset(struct vnt_private *priv)
return ;
}

-static void device_free_int_bufs(struct vnt_private *priv)
+static void vnt_free_int_bufs(struct vnt_private *priv)
{
kfree(priv->int_buf.data_buf);

@@ -569,7 +569,7 @@ static int vnt_start(struct ieee80211_hw *hw)
free_all:
vnt_free_rx_bufs(priv);
vnt_free_tx_bufs(priv);
- device_free_int_bufs(priv);
+ vnt_free_int_bufs(priv);

usb_kill_urb(priv->interrupt_urb);
usb_free_urb(priv->interrupt_urb);
@@ -604,7 +604,7 @@ static void vnt_stop(struct ieee80211_hw *hw)

vnt_free_tx_bufs(priv);
vnt_free_rx_bufs(priv);
- device_free_int_bufs(priv);
+ vnt_free_int_bufs(priv);

usb_kill_urb(priv->interrupt_urb);
usb_free_urb(priv->interrupt_urb);
--
2.0.1


2014-07-25 19:53:03

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 11/12] staging: vt6656: remove comments of old functions nolonger present.

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/card.c | 6 ------
drivers/staging/vt6656/dpc.c | 5 -----
drivers/staging/vt6656/usbpipe.c | 1 -
3 files changed, 12 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 8c0b8fa..98567a7 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -19,15 +19,11 @@
* File: card.c
* Purpose: Provide functions to setup NIC operation mode
* Functions:
- * s_vSafeResetTx - Rest Tx
* vnt_set_rspinf - Set RSPINF
* vnt_update_ifs - Update slotTime,SIFS,DIFS, and EIFS
* vnt_update_top_rates - Update BasicTopRate
* vnt_add_basic_rate - Add to BasicRateSet
- * CARDbSetBasicRate - Set Basic Tx Rate
* vnt_ofdm_min_rate - Check if any OFDM rate is in BasicRateSet
- * CARDvSetLoopbackMode - Set Loopback mode
- * CARDbSoftwareReset - Sortware reset NIC
* vnt_get_tsf_offset - Calculate TSFOffset
* vnt_get_current_tsf - Read Current NIC TSF counter
* vnt_get_next_tbtt - Calculate Next Beacon TSF counter
@@ -35,8 +31,6 @@
* vnt_update_next_tbtt - Sync. NIC Beacon time
* vnt_radio_power_off - Turn Off NIC Radio Power
* vnt_radio_power_on - Turn On NIC Radio Power
- * CARDbSetWEPMode - Set NIC Wep mode
- * CARDbSetTxPower - Set NIC tx power
*
* Revision History:
* 06-10-2003 Bryan YC Fan: Re-write codes to support VT3253 spec.
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index 07de768..e6367ed 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -25,11 +25,6 @@
* Date: May 20, 2003
*
* Functions:
- * device_receive_frame - Rcv 802.11 frame function
- * s_bHandleRxEncryption- Rcv decrypted data via on-fly
- * s_byGetRateIdx- get rate index
- * s_vGetDASA- get data offset
- * s_vProcessRxMACHeader- Rcv 802.11 and translate to 802.3
*
* Revision History:
*
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index df31ae6..cba6532 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -30,7 +30,6 @@
* vnt_control_in - Read variable length bytes from MEM/BB/MAC/EEPROM
* vnt_control_out_u8 - Write one byte to MEM/BB/MAC/EEPROM
* vnt_control_in_u8 - Read one byte from MEM/BB/MAC/EEPROM
- * ControlvMaskByte - Read one byte from MEM/BB/MAC/EEPROM and clear/set some bits in the same address
*
* Revision History:
* 04-05-2004 Jerry Chen: Initial release
--
2.0.1


2014-07-25 19:52:41

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 07/12] staging: vt6656: main_usb.c remove comments to functions nolonger present.

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

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index fa0128f..87e89d7 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -27,20 +27,8 @@
* Functions:
*
* vt6656_probe - module initial (insmod) driver entry
- * device_remove1 - module remove entry
- * device_open - allocate dma/descripter resource & initial mac/bbp function
- * device_xmit - asynchronous data tx function
- * device_set_multi - set mac filter
- * device_ioctl - ioctl entry
- * device_close - shutdown mac/bbp & free dma/descriptor resource
- * device_alloc_frag_buf - rx fragement pre-allocated function
* vnt_free_tx_bufs - free tx buffer function
- * device_dma0_tx_80211- tx 802.11 frame via dma0
- * device_dma0_xmit- tx PS buffered frame via dma0
* vnt_init_registers- initial MAC & BBP & RF internal registers.
- * device_init_rings- initial tx/rx ring buffer
- * device_init_defrag_cb- initial & allocate de-fragement buffer.
- * device_tx_srv- tx interrupt service function
*
* Revision History:
*/
--
2.0.1


2014-07-25 19:52:46

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 10/12] staging: vt6656: remove return from all void functions

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/card.c | 4 ----
drivers/staging/vt6656/mac.c | 2 --
drivers/staging/vt6656/usbpipe.c | 6 ------
drivers/staging/vt6656/wcmd.c | 2 --
4 files changed, 14 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index c06dd9d..8c0b8fa 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -669,8 +669,6 @@ void vnt_reset_next_tbtt(struct vnt_private *priv, u16 beacon_interval)

vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT,
MESSAGE_REQUEST_TBTT, 0, 8, data);
-
- return;
}

/*
@@ -708,8 +706,6 @@ void vnt_update_next_tbtt(struct vnt_private *priv, u64 tsf,
MESSAGE_REQUEST_TBTT, 0, 8, data);

dev_dbg(&priv->usb->dev, "%s TBTT: %8llx\n", __func__, tsf);
-
- return;
}

/*
diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c
index 641d77b..bb37e33 100644
--- a/drivers/staging/vt6656/mac.c
+++ b/drivers/staging/vt6656/mac.c
@@ -243,6 +243,4 @@ void vnt_mac_set_led(struct vnt_private *priv, u8 state, u8 led)

vnt_control_out(priv, MESSAGE_TYPE_WRITE_MASK, MAC_REG_PAPEDELAY,
MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
-
- return;
}
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index f1969fe..df31ae6 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -137,8 +137,6 @@ static void vnt_start_interrupt_urb_complete(struct urb *urb)
} else {
priv->int_buf.in_use = true;
}
-
- return;
}

int vnt_start_interrupt_urb(struct vnt_private *priv)
@@ -216,8 +214,6 @@ static void vnt_submit_rx_urb_complete(struct urb *urb)

rcb->in_use = false;
}
-
- return;
}

int vnt_submit_rx_urb(struct vnt_private *priv, struct vnt_rcb *rcb)
@@ -279,8 +275,6 @@ static void vnt_tx_context_complete(struct urb *urb)

context->in_use = false;
}
-
- return;
}

int vnt_tx_context(struct vnt_private *priv,
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index 8f6417bc..3cbf479 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -164,8 +164,6 @@ void vnt_run_command(struct work_struct *work)
}

vnt_cmd_complete(priv);
-
- return;
}

int vnt_schedule_command(struct vnt_private *priv, enum vnt_cmd command)
--
2.0.1


2014-07-25 19:52:40

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 06/12] staging: vt6656: rename device_alloc_bufs to vnt_alloc_bufs

changing device to vnt

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

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 50955d2..fa0128f 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -441,7 +441,7 @@ static void vnt_free_int_bufs(struct vnt_private *priv)
return;
}

-static bool device_alloc_bufs(struct vnt_private *priv)
+static bool vnt_alloc_bufs(struct vnt_private *priv)
{
struct vnt_usb_send_context *tx_context;
struct vnt_rcb *rcb;
@@ -546,8 +546,8 @@ static int vnt_start(struct ieee80211_hw *hw)

priv->rx_buf_sz = MAX_TOTAL_SIZE_WITH_ALL_HEADERS;

- if (device_alloc_bufs(priv) == false) {
- dev_dbg(&priv->usb->dev, "device_alloc_bufs fail...\n");
+ if (vnt_alloc_bufs(priv) == false) {
+ dev_dbg(&priv->usb->dev, "vnt_alloc_bufs fail...\n");
return -ENOMEM;
}

--
2.0.1