Commit Graph

585 Commits

Author SHA1 Message Date
Neil Armstrong
6b2a016964 staging: vt6656: fix bad symbol declaration
With sparse, the following error appears :
  CHECK   drivers/staging/vt6656/aes_ccmp.c
drivers/staging/vt6656/aes_ccmp.c:221:6: warning: symbol 'AESbGenCCMP' was not declared. Should it be static?

Add correct include header in order to have function declaration.

Signed-off-by: Neil 'Superna' Armstrong <superna9999@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:10:29 -07:00
Cédric Cabessa
f2ca407b96 staging: vt6655,vt6656: fix sparse error "unexpected unlock"
Signed-off-by: Cédric Cabessa <ced@ryick.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:07:42 -07:00
Malcolm Priestley
d9560ae53b staging: vt6656: rxtx s_vFillCTSHead replace TYPE_CTL_CTS macro
Replace with IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS from linux/ieee80211.h
to get value of TYPE_CTL_CTS and endian correct to frame_control.

Remove old macros in tether.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:05:30 -07:00
Malcolm Priestley
f4554d3b0e staging: vt6656: vnt_fill_ieee80211_rts replace TYPE_CTL_RTS macro
Replace with IEEE80211_FTYPE_CTL | IEEE80211_STYPE_RTS from linux/ieee80211.h
to get value of TYPE_CTL_RTS and endian correct to frame_control.

Remove old macros in tether.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:05:29 -07:00
Malcolm Priestley
03a9cf3418 staging: vt6656: rxtx Replace vnt_tx_fifo_head wReserved
At run time wReserved has the value of wCurrentRate.

Replace with current_rate with __le16 base type and endian correct
wCurrentRate.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:05:29 -07:00
Malcolm Priestley
fad8e4aeac staging : vt6656: rxtx struct vnt_beacon_buffer Replace wTxByteCount
Replace with tx_byte_count with base type __le16

Provide endian correction in csBeacon_xmit of cbReqCount

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:05:29 -07:00
Malcolm Priestley
ca3475968a staging: vt6656: rxtx struct vnt_tx_buffer Replace wTxByteCount
Replace with tx_byte_count with base type __le16.

In nsDMA_tx_packet and bRelayPacketSend provide endian correction.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:05:29 -07:00
Malcolm Priestley
5846251d0e staging: vt6656: rxtx Replace struct vnt_tx_fifo_head wTimeStamp
Replace with time_stamp with base type __le16

In s_bPacketToWirelessUsb endian correct DEFAULT_MSDU_LIFETIME_RES_64us

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:05:29 -07:00
Malcolm Priestley
5d4fe75704 staging: vt6656: rxtx: s_vFillTxKey fix pMACHeader sparse warning
Endian convert __le16 pMACHeader->frame_control and pMACHeader->seq_ctrl
back to cpu.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:05:28 -07:00
Malcolm Priestley
2fbb230c8a staging: vt6656: rxtx: s_vFillTxKey Fix base type pdwExtIV
Use base type to __le32.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:05:28 -07:00
Malcolm Priestley
fb453db9bf staging: vt6656: rxtx s_vFillTxKey Fix pdwIV base type
Use base type __le32 and endian correct changed values.

Correct endian conversions to cpu_to_le32.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:05:28 -07:00
Malcolm Priestley
fbfaccff4f staging: vt6656: rxtx.c: s_vFillTxKey Replace dwRevIVCounter
Fix base type to __le32 and remove camel case.

Camel case change
dwRevIVCounter -> rev_iv_counter

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:05:28 -07:00
Malcolm Priestley
2033801522 staging: vt6656: s_uGetRTSCTSRsvTime fix return.
Always returns to __le16 type

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:00:19 -07:00
Malcolm Priestley
2075f6547e staging: vt6656: vnt_rxtx_rsvtime_le16 fix return.
Always returns to __le16 type.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:00:19 -07:00
Malcolm Priestley
5abe3d63ad staging: vt6656: s_uGetDataDuration use __le16.
s_uGetDataDuration always returns to __le16 type

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:00:19 -07:00
Malcolm Priestley
7f591a1107 staging: vt6656: Correct return type s_uGetRTSCTSDuration.
s_uGetRTSCTSDuration always returns in __le16 type

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:00:19 -07:00
Malcolm Priestley
c4cf6dfb8e staging: vt6656: rxtx endian correct return duration
All duration base types are __le16 correct back to cpu

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:00:19 -07:00
Malcolm Priestley
dab085b139 staging: vt6656: vnt_time_stamp_off fix return to __le16
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:00:19 -07:00
Malcolm Priestley
533f9d3adc staging: vt6656: struct vnt_tx_short_buf_head correct base types
Both variables duration and time_stamp_off are __le16 types

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

Camel case changes
wTimeStampOff* -> time_stamp_off*

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:00:19 -07:00
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