Camel case change
pDevice -> priv
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 6a46203..436523f 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -438,13 +438,13 @@ static void device_free_rx_bufs(struct vnt_private *priv)
return;
}
-static void usb_device_reset(struct vnt_private *pDevice)
+static void usb_device_reset(struct vnt_private *priv)
{
int status;
- status = usb_reset_device(pDevice->usb);
+ status = usb_reset_device(priv->usb);
if (status)
- dev_warn(&pDevice->usb->dev,
+ dev_warn(&priv->usb->dev,
"usb_device_reset fail status=%d\n", status);
return ;
}
--
2.0.1
Camel case changes
pDevice -> priv
pUrb -> urb
bBoolInUse -> in_use
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 6 +++---
drivers/staging/vt6656/main_usb.c | 14 +++++++-------
drivers/staging/vt6656/usbpipe.c | 10 +++++-----
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index ad43c6f..8f318a9 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -219,10 +219,10 @@ enum {
/* RCB (Receive Control Block) */
struct vnt_rcb {
- void *pDevice;
- struct urb *pUrb;
+ void *priv;
+ struct urb *urb;
struct sk_buff *skb;
- int bBoolInUse;
+ int in_use;
};
/* used to track bulk out irps */
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 06e4861..be498bc 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -423,9 +423,9 @@ static void device_free_rx_bufs(struct vnt_private *priv)
continue;
/* deallocate URBs */
- if (rcb->pUrb) {
- usb_kill_urb(rcb->pUrb);
- usb_free_urb(rcb->pUrb);
+ if (rcb->urb) {
+ usb_kill_urb(rcb->urb);
+ usb_free_urb(rcb->urb);
}
/* deallocate skb */
@@ -495,11 +495,11 @@ static bool device_alloc_bufs(struct vnt_private *priv)
rcb = priv->apRCB[ii];
- rcb->pDevice = priv;
+ rcb->priv = priv;
/* allocate URBs */
- rcb->pUrb = usb_alloc_urb(0, GFP_ATOMIC);
- if (rcb->pUrb == NULL) {
+ rcb->urb = usb_alloc_urb(0, GFP_ATOMIC);
+ if (rcb->urb == NULL) {
dev_err(&priv->usb->dev, "Failed to alloc rx urb\n");
goto free_rx_tx;
}
@@ -510,7 +510,7 @@ static bool device_alloc_bufs(struct vnt_private *priv)
goto free_rx_tx;
}
- rcb->bBoolInUse = false;
+ rcb->in_use = false;
/* submit rx urb */
if (vnt_submit_rx_urb(priv, rcb))
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index d994b1b..126294d 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -187,7 +187,7 @@ int vnt_submit_rx_urb(struct vnt_private *priv, struct vnt_rcb *rcb)
int status = 0;
struct urb *urb;
- urb = rcb->pUrb;
+ urb = rcb->urb;
if (rcb->skb == NULL) {
dev_dbg(&priv->usb->dev, "rcb->skb is null\n");
return status;
@@ -207,7 +207,7 @@ int vnt_submit_rx_urb(struct vnt_private *priv, struct vnt_rcb *rcb)
return STATUS_FAILURE ;
}
- rcb->bBoolInUse = true;
+ rcb->in_use = true;
return status;
}
@@ -215,7 +215,7 @@ int vnt_submit_rx_urb(struct vnt_private *priv, struct vnt_rcb *rcb)
static void vnt_submit_rx_urb_complete(struct urb *urb)
{
struct vnt_rcb *rcb = urb->context;
- struct vnt_private *priv = rcb->pDevice;
+ struct vnt_private *priv = rcb->priv;
unsigned long flags;
switch (urb->status) {
@@ -240,7 +240,7 @@ static void vnt_submit_rx_urb_complete(struct urb *urb)
dev_dbg(&priv->usb->dev,
"Failed to re-alloc rx skb\n");
- rcb->bBoolInUse = false;
+ rcb->in_use = false;
spin_unlock_irqrestore(&priv->lock, flags);
return;
}
@@ -258,7 +258,7 @@ static void vnt_submit_rx_urb_complete(struct urb *urb)
if (usb_submit_urb(urb, GFP_ATOMIC)) {
dev_dbg(&priv->usb->dev, "Failed to re submit rx skb\n");
- rcb->bBoolInUse = false;
+ rcb->in_use = false;
}
return;
--
2.0.1
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 2 +-
drivers/staging/vt6656/main_usb.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 22554af..a5a6c39 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -288,7 +288,7 @@ struct vnt_private {
u32 int_interval;
/* Variables to track resources for the BULK In Pipe */
- struct vnt_rcb *apRCB[CB_MAX_RX_DESC];
+ struct vnt_rcb *rcb[CB_MAX_RX_DESC];
u32 cbRD;
/* Variables to track resources for the BULK Out Pipe */
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index fe2f0bc..5c8ff98 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -418,7 +418,7 @@ static void device_free_rx_bufs(struct vnt_private *priv)
int ii;
for (ii = 0; ii < priv->cbRD; ii++) {
- rcb = priv->apRCB[ii];
+ rcb = priv->rcb[ii];
if (!rcb)
continue;
@@ -486,14 +486,14 @@ static bool device_alloc_bufs(struct vnt_private *priv)
}
for (ii = 0; ii < priv->cbRD; ii++) {
- priv->apRCB[ii] = kzalloc(sizeof(struct vnt_rcb), GFP_KERNEL);
- if (!priv->apRCB[ii]) {
+ priv->rcb[ii] = kzalloc(sizeof(struct vnt_rcb), GFP_KERNEL);
+ if (!priv->rcb[ii]) {
dev_err(&priv->usb->dev,
"failed to allocate rcb no %d\n", ii);
goto free_rx_tx;
}
- rcb = priv->apRCB[ii];
+ rcb = priv->rcb[ii];
rcb->priv = priv;
--
2.0.1
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index f3ff6f5..8257a64 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -381,8 +381,6 @@ struct vnt_private {
enum vnt_cmd command;
- int bStopDataPkt;
-
/* 802.11 counter */
enum vnt_cmd cmd_queue[CMD_Q_SIZE];
@@ -396,22 +394,15 @@ struct vnt_private {
u8 byAutoFBCtrl;
/* For Update BaseBand VGA Gain Offset */
- u32 uBBVGADiffCount;
- u8 byBBVGANew;
- u8 byBBVGACurrent;
u8 abyBBVGA[BB_VGA_LEVEL];
signed long ldBmThreshold[BB_VGA_LEVEL];
u8 byBBPreEDRSSI;
u8 byBBPreEDIndex;
- int bRadioCmd;
-
/* command timer */
struct delayed_work run_command_work;
- u8 tx_data_time_out;
-
int bChannelSwitch;
u8 byNewChannel;
u8 byChannelSwitchCount;
--
2.0.1
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 8f318a9..f3ff6f5 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -240,12 +240,6 @@ struct vnt_usb_send_context {
unsigned char data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS];
};
-/* tx packet info for rxtx */
-struct vnt_tx_pkt_info {
- u16 fifo_ctl;
- u8 dest_addr[ETH_ALEN];
-};
-
/*
* Structure to keep track of USB interrupt packets
*/
@@ -300,7 +294,6 @@ struct vnt_private {
/* Variables to track resources for the BULK Out Pipe */
struct vnt_usb_send_context *apTD[CB_MAX_TX_DESC];
u32 cbTD;
- struct vnt_tx_pkt_info pkt_info[16];
/* Variables to track resources for the Interrupt In Pipe */
struct vnt_interrupt_buffer int_buf;
--
2.0.1
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 2 +-
drivers/staging/vt6656/int.c | 2 +-
drivers/staging/vt6656/main_usb.c | 4 ++--
drivers/staging/vt6656/rxtx.c | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index a5a6c39..757d500 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -292,7 +292,7 @@ struct vnt_private {
u32 cbRD;
/* Variables to track resources for the BULK Out Pipe */
- struct vnt_usb_send_context *apTD[CB_MAX_TX_DESC];
+ struct vnt_usb_send_context *tx_context[CB_MAX_TX_DESC];
u32 cbTD;
/* Variables to track resources for the Interrupt In Pipe */
diff --git a/drivers/staging/vt6656/int.c b/drivers/staging/vt6656/int.c
index 87ac6a1..e404d9e 100644
--- a/drivers/staging/vt6656/int.c
+++ b/drivers/staging/vt6656/int.c
@@ -78,7 +78,7 @@ static int vnt_int_report_rate(struct vnt_private *priv, u8 pkt_no, u8 tsr)
if (pkt_no >= priv->cbTD)
return -EINVAL;
- context = priv->apTD[pkt_no];
+ context = priv->tx_context[pkt_no];
if (!context->skb)
return -EINVAL;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 5c8ff98..ff4e18d 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -399,7 +399,7 @@ static void device_free_tx_bufs(struct vnt_private *priv)
int ii;
for (ii = 0; ii < priv->cbTD; ii++) {
- tx_context = priv->apTD[ii];
+ tx_context = priv->tx_context[ii];
/* deallocate URBs */
if (tx_context->urb) {
usb_kill_urb(tx_context->urb);
@@ -471,7 +471,7 @@ static bool device_alloc_bufs(struct vnt_private *priv)
goto free_tx;
}
- priv->apTD[ii] = tx_context;
+ priv->tx_context[ii] = tx_context;
tx_context->priv = priv;
tx_context->pkt_no = ii;
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 76b7f17..f3bbfba 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -82,10 +82,10 @@ static struct vnt_usb_send_context
dev_dbg(&priv->usb->dev, "%s\n", __func__);
for (ii = 0; ii < priv->cbTD; ii++) {
- if (!priv->apTD[ii])
+ if (!priv->tx_context[ii])
return NULL;
- context = priv->apTD[ii];
+ context = priv->tx_context[ii];
if (context->in_use == false) {
context->in_use = true;
memset(context->data, 0,
--
2.0.1
Remove Next and Ref
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 2 --
drivers/staging/vt6656/usbpipe.c | 1 -
2 files changed, 3 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index f08f7de..ad43c6f 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -219,8 +219,6 @@ enum {
/* RCB (Receive Control Block) */
struct vnt_rcb {
- void *Next;
- signed long Ref;
void *pDevice;
struct urb *pUrb;
struct sk_buff *skb;
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index 59e508c..d994b1b 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -207,7 +207,6 @@ int vnt_submit_rx_urb(struct vnt_private *priv, struct vnt_rcb *rcb)
return STATUS_FAILURE ;
}
- rcb->Ref = 1;
rcb->bBoolInUse = true;
return status;
--
2.0.1
Should point to vnt_tx_buffers
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/main_usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 436523f..06e4861 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -79,7 +79,7 @@ MODULE_PARM_DESC(rx_buffers, "Number of receive usb rx buffers");
#define TX_DESC_DEF0 64
static int vnt_tx_buffers = TX_DESC_DEF0;
-module_param_named(tx_buffers, vnt_rx_buffers, int, 0644);
+module_param_named(tx_buffers, vnt_tx_buffers, int, 0644);
MODULE_PARM_DESC(tx_buffers, "Number of receive usb tx buffers");
#define RTS_THRESH_DEF 2347
--
2.0.1
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/device.h | 2 +-
drivers/staging/vt6656/main_usb.c | 14 +++++++-------
drivers/staging/vt6656/usbpipe.c | 6 +++---
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 8257a64..22554af 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -284,7 +284,7 @@ struct vnt_private {
unsigned long Flags;
/* USB */
- struct urb *pInterruptURB;
+ struct urb *interrupt_urb;
u32 int_interval;
/* Variables to track resources for the BULK In Pipe */
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index be498bc..fe2f0bc 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -517,8 +517,8 @@ static bool device_alloc_bufs(struct vnt_private *priv)
goto free_rx_tx;
}
- priv->pInterruptURB = usb_alloc_urb(0, GFP_ATOMIC);
- if (priv->pInterruptURB == NULL) {
+ priv->interrupt_urb = usb_alloc_urb(0, GFP_ATOMIC);
+ if (priv->interrupt_urb == NULL) {
dev_err(&priv->usb->dev, "Failed to alloc int urb\n");
goto free_rx_tx;
}
@@ -526,7 +526,7 @@ static bool device_alloc_bufs(struct vnt_private *priv)
priv->int_buf.data_buf = kmalloc(MAX_INTERRUPT_SIZE, GFP_KERNEL);
if (priv->int_buf.data_buf == NULL) {
dev_err(&priv->usb->dev, "Failed to alloc int buf\n");
- usb_free_urb(priv->pInterruptURB);
+ usb_free_urb(priv->interrupt_urb);
goto free_rx_tx;
}
@@ -590,8 +590,8 @@ free_all:
device_free_tx_bufs(priv);
device_free_int_bufs(priv);
- usb_kill_urb(priv->pInterruptURB);
- usb_free_urb(priv->pInterruptURB);
+ usb_kill_urb(priv->interrupt_urb);
+ usb_free_urb(priv->interrupt_urb);
return -ENOMEM;
}
@@ -629,8 +629,8 @@ static void vnt_stop(struct ieee80211_hw *hw)
device_free_rx_bufs(priv);
device_free_int_bufs(priv);
- usb_kill_urb(priv->pInterruptURB);
- usb_free_urb(priv->pInterruptURB);
+ usb_kill_urb(priv->interrupt_urb);
+ usb_free_urb(priv->interrupt_urb);
return;
}
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index 126294d..9a88749 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -126,7 +126,7 @@ int vnt_start_interrupt_urb(struct vnt_private *priv)
priv->int_buf.in_use = true;
- usb_fill_int_urb(priv->pInterruptURB,
+ usb_fill_int_urb(priv->interrupt_urb,
priv->usb,
usb_rcvintpipe(priv->usb, 1),
priv->int_buf.data_buf,
@@ -135,7 +135,7 @@ int vnt_start_interrupt_urb(struct vnt_private *priv)
priv,
priv->int_interval);
- status = usb_submit_urb(priv->pInterruptURB, GFP_ATOMIC);
+ status = usb_submit_urb(priv->interrupt_urb, GFP_ATOMIC);
if (status) {
dev_dbg(&priv->usb->dev, "Submit int URB failed %d\n", status);
priv->int_buf.in_use = false;
@@ -172,7 +172,7 @@ static void vnt_start_interrupt_urb_complete(struct urb *urb)
vnt_int_process_data(priv);
}
- status = usb_submit_urb(priv->pInterruptURB, GFP_ATOMIC);
+ status = usb_submit_urb(priv->interrupt_urb, GFP_ATOMIC);
if (status) {
dev_dbg(&priv->usb->dev, "Submit int URB failed %d\n", status);
} else {
--
2.0.1