Commit Graph

565 Commits

Author SHA1 Message Date
Malcolm Priestley
372108e7b8 staging: vt6656: rxtx Replace wCTSTxRrvTime_ba
Replace with cts_rrv_time_ba with __le16 base.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:00:18 -07:00
Malcolm Priestley
7fd5747f31 staging: vt6656: rxtx: Replace wCTSDuration*
Fix base type to __le16 and remove camel case.

Camel case changes
wCTSDuration* -> cts_duration*

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:00:18 -07:00
Malcolm Priestley
5ff627aedb staging: vt6656: rxtx: Replace wTxRrvTime*
Fix base type to __le16 and remove camel case.

Camel case changes
wTxRrvTime* -> rrv_time*

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:00:18 -07:00
Malcolm Priestley
85417bf0d7 staging: vt6656: rxtx: Replace wRTSTxRrvTime*
Fix base type to __le16 and remove camel case.

Camel case changes
wRTSTxRrvTime* -> rts_rrv_time*

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:00:18 -07:00
Malcolm Priestley
fadc3bdfd9 staging: vt6656: rxtx: Replace wRTSDuration* variables
Fix base type to __le16 and remove camel case.

Camel case changes
wRTSDuration* -> rts_duration*

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:00:18 -07:00
Malcolm Priestley
4e01117c2d staging: vt6656: rxtx Replace wDuration* variables.
Fix base type to __le16 and remove camel case.

Camel case changes
wDuration* -> duration*

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:00:18 -07:00
Himangi Saraogi
f4d636ddef staging: vt6656: Fix sparse warnings
This patch fixes the following sparse warnings:
drivers/staging/vt6656/aes_ccmp.c:272:32: warning: restricted __le16 degrades to integer
drivers/staging/vt6656/aes_ccmp.c:274:32: warning: restricted __le16 degrades to integer
drivers/staging/vt6656/aes_ccmp.c:282:32: warning: restricted __le16 degrades to integer

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:02:28 -07:00
Malcolm Priestley
b9d93d1c5d staging: vt6656: [BUG] Fix Warning BOGUS urb xfer, pipe 3 != type 1
Stable kernels will need patches
staging: vt6656: s_nsInterruptUsbIoCompleteRead remove usb_fill_bulk_urb
staging: vt6656: PIPEnsInterruptRead use usb_fill_int_urb

and a backported version of this patch.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:50:46 -07:00
Malcolm Priestley
6ae4663342 staging: vt6656: [BUG] set usb_fill_int_urb interval to 1
As result of patch
staging: vt6656: [BUG] Fix Warning BOGUS urb xfer, pipe 3 != type 1

has resulted in sluggish TX performance due to interupt inverval
being too long.

Set int_interval to 1 as set in bInterval of endpoint 1.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:29:50 -07:00
Aybuke Ozdemir
64052b783d staging: vt6656: power.c Fix line over 80 characters.
Fix checkpatch.pl issue with
line over 80 characters in power.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 22:10:23 -07:00
Iulia Manda
9009dd160f staging: vt6656: Use __releases/__acquires annotations
This patch fixes the following sparse warnings:

drivers/staging/vt6656/usbpipe.c:147:24: warning: context imbalance in 'PIPEnsControlOut' - unexpected unlock
drivers/staging/vt6656/usbpipe.c:209:24: warning: context imbalance in 'PIPEnsControlIn' - unexpected unlock

Signed-off-by: Iulia Manda <iulia.manda21@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:07:06 -07:00
Andreea-Cristina Bernat
74f161f619 /staging/vt6656: Delete extra paranthesis from macro definition
This patch solves the error of checkpatch.pl by deleting the extra paranthesis.

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 17:30:22 -07:00
Chi Pham
9eac685dbc staging:vt6656: Removed assignment in if statement.
The following coccinelle script found the match:

@@
expression E0, E1, E2;
statement S0;
@@
- if ((E1 = E2) == E0)
+ E1 = E2;
+ if (E1 == E0)
S0

Signed-off-by: Chi Pham <fempsci@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-10 14:56:07 -07:00
Iulia Manda
879ea7d34e Staging:vt6656: Replace some kzalloc calls with kcalloc in iwctl.c
This replacement is justified by the fact that kcalloc could prevent integer
overflow resulted from the multiplications used in kzalloc.

The semantic patch that showed this suggestion is kzalloc.cocci

Signed-off-by: Iulia Manda <iulia.manda21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08 20:31:53 -08:00
Malcolm Priestley
da62fa24ca staging: vt6656: Remove unused tasklets tasklet_struct CmdWorkItem and EventWorkItem are not used.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 16:48:37 -08:00
Malcolm Priestley
061982ad04 staging: vt6656: dead code removetypedef struct tagSQuietControl
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 16:48:37 -08:00
Malcolm Priestley
1506bf3755 staging: vt6656: clean up device_free_int_bufs.
Clean up white and camel case.

Camel case change
pDevice -> priv

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 16:48:36 -08:00
Malcolm Priestley
f2625c24d9 staging: vt6656: clean up device_free_tx_bufs
Clean up white space and camel case.

Camel case changes
pDevice -> priv
pTxContext -> tx_context

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 16:48:36 -08:00
Malcolm Priestley
afc5eeb86b staging: vt6656: clean up device_free_rx_bufs.
cleanup white space and camel case.

Camel case changes
pDevice -> priv
pRCB -> rcb

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 16:48:36 -08:00
Malcolm Priestley
35491de718 staging: vt6656: Clean up device_alloc_bufs
Clean up white space, comments and camel case.

pDevice -> priv
pTxContext -> tx_context
pRCB -> rcb

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 16:48:36 -08:00
Malcolm Priestley
29263661f9 staging: vt6656: Replace dev_alloc_skb with netdev_alloc_skb.
Remove code that points to netdev (pDevice/priv->dev)

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 16:48:36 -08:00
Malcolm Priestley
5a30e0b658 staging: vt6656: Clean up RXvFreeRCB.
Clean up white space, comments and camel case.

Camel case changes
pRCB -> rcb
bReAllocSkb -> re_alloc_skb
pDevice -> priv

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 16:48:36 -08:00
Malcolm Priestley
49d73a9805 staging: vt6656: Clean up RXvWorkItem
Remove white space and camel case.

Camel case changes
pDevice -> priv
ntStatus -> status
pRCB -> rcb

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 16:48:36 -08:00
Malcolm Priestley
d1b2a11d7a staging: vt6656: s_nsBulkOutIoCompleteWrite Remove variable status.
Remove status and move debug messages to switch statement.

Remove duplicate second debug message.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 17:09:19 -08:00
Malcolm Priestley
d597aaef2d staging: vt6656: s_nsBulkOutIoCompleteWrite remove buf_len.
Use context->uBufLen directly which is unsigned int.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 17:09:19 -08:00
Malcolm Priestley
07bc8398ad staging: vt6656: Remove unused variables packets*
These variables are unused and don't reach user.

Remove them all.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 17:09:19 -08:00
Malcolm Priestley
cbe4da533b staging: vt6656: Remove unused variable bEventAvailable.
Flips from true to false but does nothing.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 17:09:18 -08:00
Malcolm Priestley
81aec60ed7 staging: vt6656: struct vnt_usb_send_context remove sEthHeader.
In nsDMA_tx_packet and bRelayPacketSend s_vSaveTxPktInfo points
to sEthHeader.h_dest which is the wrong viable.

Correct and point to pDevice->sTxEthHeader.

This is only relevant in the non fuctioning hostapd access point
mode, shortly to be removed from driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 17:09:18 -08:00
Malcolm Priestley
7e5a9193b1 staging: vt6656: Remove all variables ulInt*
None of these variables reach user or used by debug messages.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 17:09:18 -08:00
Malcolm Priestley
88c4d12c91 staging: vt6656: Remove all variables ulBulk*
None of these variables reach user or in any debug messages.

Remove them all.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 17:09:18 -08:00
Malcolm Priestley
ebf5a3ccdf staging: vt6656: struct vnt_usb_send_context struct size optimization.
Reorder in size and remove dead member Next.

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 13:04:36 -08:00
Malcolm Priestley
599e4b5ca8 staging: vt6656: Remove pointer cast to urb->context.
Remove unnecessary cast to void * urb->context

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 13:04:36 -08:00
Malcolm Priestley
0b787d713b staging: vt6656: Cleanup PIPEnsBulkInUsbRead
Remove camel case and white space.

Camel case changes
pDevice -> priv
pRCB -> rcb
ntStatus -> status
pUrb -> urb

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 13:04:36 -08:00
Malcolm Priestley
d4fa2ab067 staging: vt6656: clean up s_nsBulkInUsbIoCompleteRead
Clean up white space and camel case.

Camel case changes
pDevice -> priv
pRCB -> rcb
bReAllocSkb -> re_alloc_skb

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 13:04:36 -08:00
Malcolm Priestley
67638980ef staging: vt6656: s_nsBulkInUsbIoCompleteRead Replace error handling.
Use switch on urb->status

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 13:04:36 -08:00
Malcolm Priestley
1882c19c2d staging: vt6656: s_nsBulkInUsbIoCompleteRead Remove bytesRead/bIndicateReceive.
Replace with urb->actual_length.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 13:04:36 -08:00
Malcolm Priestley
e3a8fa1748 staging: vt6656: s_nsBulkInUsbIoCompleteRead get rid of status.
Just use urb->status directly.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 13:04:36 -08:00
Malcolm Priestley
3f38290e3b staging: vt6656: clean up PIPEnsSendBulkOut.
Remove commented out code, white space and camel case.

camel case changes
pDevice -> priv
pContext -> context
pUrb -> urb

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 13:04:36 -08:00
Malcolm Priestley
da5c99fdf5 staging: vt6656: usb_fill_bulk_urb get rid of void* cast.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 13:04:36 -08:00
Malcolm Priestley
133383035f staging: vt6656: PIPEnsSendBulkOut reverse if statement
Get rid of unnessary else statement by !(MP_IS_READY(pDevice) &&
pDevice->Flags & fMP_POST_WRITES)

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 13:04:36 -08:00
Malcolm Priestley
1450ba62db staging: vt6656: Remove typedef enum _CONTEXT_TYPE
Replace with enum

assign as u8 type.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:57:44 -08:00
Malcolm Priestley
21aa212ca6 staging: vt6656: clean up s_nsBulkOutIoCompleteWrite.
Remove commented out, white space and camel case.

Camel case changes
pContext -> context
pDevice -> priv
ContextType -> context_type
ulBufLen -> buf_len

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:57:44 -08:00
Malcolm Priestley
e8152bfb51 staging: vt6656: s_nsBulkOutIoCompleteWrite add error handling,
change pContext->bBoolInUse to false on connection errors.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:57:44 -08:00
Malcolm Priestley
1c398a38fb staging: vt6656: s_nsBulkOutIoCompleteWrite reorganise variable order.
Declare in order of pointer use.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:57:44 -08:00
Malcolm Priestley
2ae2777c44 staging: vt6656: vRunCommand remove multi calls to s_bCommandComplete.
Remove calls with break
s_bCommandComplete(pDevice);
spin_unlock_irq(&pDevice->lock);
return;

Add single call to s_bCommandComplete;

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:55:41 -08:00
Malcolm Priestley
edd20e9640 staging: vt6656: Move device_set_multi code call to vRunCommand
device_set_multi is an atomic call, in order to reduce atomic area of driver
move code to be called from vRunCommand.

Later the atomic area of vRunCommand can be reduced.

Change existing code in device_set_multi to new function
vnt_configure_filter minus its locks.

Change device_set_multi to call bScheduleCommand

device_set_multi is nolonger called from device open.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:55:41 -08:00
Malcolm Priestley
f764e00d16 staging: vt6656: Replace typedef struct INT_BUFFER, *PINT_BUFFER
Replace with struct vnt_interrupt_buffer.

Using only the live member of old structure
pDataBuf -> data_buf
bInUse -> in_use

uDataLen is unused and dropped.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:54:53 -08:00
Malcolm Priestley
5f38b78310 staging: vt6656: clean up PIPEnsInterruptRead.
Remove comments, white space and camel case.

Camel case changes
pDevice -> priv
ntStatus -> status

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:54:53 -08:00
Malcolm Priestley
59858f5e91 staging: vt6656: PIPEnsInterruptRead set intBuf.bInUse to false.
set intBuf.bInUse to false on return error.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:54:53 -08:00
Malcolm Priestley
f39b8534d3 staging: vt6656: PIPEnsInterruptRead use usb_fill_int_urb
Change to usb_fill_int_urb which has int_interval.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-24 16:54:53 -08:00