Commit Graph

255 Commits

Author SHA1 Message Date
Malcolm Priestley 2a38e6fcf9 staging: vt6656: iwctl_giwaplist() re warn: possible memory leak of 'qual'
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-15 15:26:14 -08:00
Malcolm Priestley 848ce5112e staging: vt6656: iwctl_giwaplist/device_ioctl : use off stack buffers.
Calls ioctl SIOCGIWAPLIST use off stack buffers.

clears up warning messages.
main_usb.c:2015:1: warning: the frame size of 1888 bytes is larger than 1024 bytes [-Wframe-larger-than=]
iwctl.c:683:1: warning: the frame size of 1280 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 15:10:28 -08:00
Malcolm Priestley f1426fd7cc staging: vt6656: Remove WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT macro
Already removed in parts of driver.

Removed in remainder.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:52:58 -08:00
Malcolm Priestley 70e227790d staging: vt6656: 64bit fixes: vCommandTimerWait change calculation of timer.
The timer appears to run too fast/race on 64 bit systems.

Using msecs_to_jiffies seems to cause a deadlock on 64 bit.

A calculation of (MSecond * HZ) / 1000 appears to run satisfactory.

Change BSSIDInfoCount to u32.

After this patch the driver can be successfully connect on little endian 64/32 bit systems.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:51:32 -08:00
Malcolm Priestley 1d651be13f staging: vt6656: 64 bit fixes correct sizes of NDIS_802_11_ASSOCIATION_INFORMATION
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:51:32 -08:00
Malcolm Priestley 2f88964281 staging: vt6656: 64 bit fixes TKIPvMixKey remove unsigned long
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:51:31 -08:00
Malcolm Priestley d5bbef7c94 staging: vt6656: 64 bit fixes pdwIV is now u32
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:51:31 -08:00
Malcolm Priestley c0d05b305b staging: vt6656: 64bit fixes: key.c/h change unsigned long to u32
Fixes long issues.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:51:31 -08:00
Malcolm Priestley b4dc03af55 staging: vt6656: 64 bit fixes: fix long warning messages.
Fixes long warning messages from patch
[PATCH 08/14] staging: vt6656: 64 bit fixes : correct all type sizes

 Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:51:31 -08:00
Malcolm Priestley 7730492855 staging: vt6656: 64 bit fixes : correct all type sizes
After this patch all BYTE/WORD/DWORD types can be replaced with the appropriate u sizes.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:51:31 -08:00
Malcolm Priestley 21814d6c45 staging: vt6656: 64 bit fixes: int.h replaced DWORD with u32
Fixes size of long issues.

Signed-off-by: Malcolm Priestley<tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:51:31 -08:00
Malcolm Priestley ed74395ca4 staging: vt6656: 64 bit fixes: rxtx.h Replace DWORD with u32.
Size of long issues.

 Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:51:30 -08:00
Malcolm Priestley a552397d5e staging: vt6656: 64 bit fixes: use u32 for QWORD definition.
Size of long issues replace with u32.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:51:30 -08:00
Malcolm Priestley cf5d170e02 staging: vt6656: 64 bit fixes: RXbBulkInProcessData Framesize
Size of long issues.

Framesize correction replace DWORD with u32.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:51:30 -08:00
Malcolm Priestley d3b6f870ee staging: vt6656: 64bit fixes: desh.h fix size. replace DWORD with u32.
Fixes size of long issues replace DWORD with u32.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:51:30 -08:00
Malcolm Priestley eb304bddc4 staging: vt6656: 64bit fixes: dpc.c incorrect addressing of void structure.
Fixes the deadlock on 64 bit.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:51:30 -08:00
Malcolm Priestley e2efba763b staging: vt6656: 64 bit- Correctly address void structure.
Fixes 64 bit deadlock on successful association.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:51:30 -08:00
Malcolm Priestley 0421226828 staging: vt6656: fix viawget_wpa_param size
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:45:44 -08:00
Malcolm Priestley d77fb7f756 staging: vt6656: nsDMA_tx_packet: free tx context bBoolInUse
This reduces the number of free TX urbs when key is not found.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:45:44 -08:00
Malcolm Priestley bebbb29c96 staging: vt6656: dead code byCntMeasure/TKIPCounterMeasuresInvoked
remove TKIPCounterMeasuresInvoked and byCntMeasure

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:45:43 -08:00
Malcolm Priestley 95e40c7a16 staging: vt6656: dead code remove upc.h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:45:43 -08:00
Malcolm Priestley 28044e0193 staging: vt6656: free skbuff and relocate on bReAllocSkb == FALSE.
bReAllocSkb == FALSE is when data is not fed to user land.

Free and relocate skbuff.

Where data is not sent return = FALSE from RXbBulkInProcessData.

This appears to reduce false errors when a reused skbuff has old data.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:45:43 -08:00
Malcolm Priestley 87c629853e staging: vt6656: no need to bIndicateReceive when no bytes to read.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:45:43 -08:00
Malcolm Priestley 02560efe69 staging: vt6656: [BUG] PIPEnsSendBulkOut free bBoolInUse
Eventually, when there is enough errors we run out of free TX urbs and
connection stalls.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 13:26:41 -07:00
Dan Carpenter c25015c118 Staging: vt6655-6: shift wrap in hostap_set_encryption()
abySeq is an unsigned char so shifting more than 31 bits will lead to a
shift wrapping bug.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 13:26:40 -07:00
Dan Carpenter ff4573a7af Staging: vt6655-6: shift wrap buf in s_vFillTxKey()
byKeyIndex is an unsigned char between 0 and 0xf.  If it is any value
higher than 1, then we will hit an integer wrap issue here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 13:26:40 -07:00
Malcolm Priestley f20fbdf829 staging: vt6656: Keep firmware loading local and release firware.
Firmware is retained unreleased for the entire duration of the
driver.

When done release firmware and if the need be request firmware again.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 13:26:40 -07:00
Malcolm Priestley ab1dd99631 staging: vt6656: [BUG] out of bound array reference in RFbSetPower.
Calling RFbSetPower with uCH zero value will cause out of bound array reference.

This causes 64 bit kernels to oops on boot.

Note: Driver does not function on 64 bit kernels and should be
blacklisted on them.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 13:26:40 -07:00
Greg Kroah-Hartman 6a2a2cdd57 Merge 3.6-rc6 into staging-next
This pulls in the staging tree fixes in 3.6-rc6 into our branch to resolve the
merge issues.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-16 17:17:25 -07:00
Wei Yongjun 70a1fb1933 Staging: vt6656: using is_broadcast_ether_addr() to simplify the code
Using is_broadcast_ether_addr() to simplify the code.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:01:42 -07:00
Justin P. Mattock 4148aa2ce7 staging "vt6656" Typo rename Embeded to Embedded.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:00:56 -07:00
Justin P. Mattock bda7978358 staging "vt6656" Typo rename Caculate to Calculate.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:00:56 -07:00
Justin P. Mattock a0a1f61afa staging "vt6656" Fix typos in comments, and in a printk message.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:00:56 -07:00
Malcolm Priestley aa209eef3c staging: vt6656: [BUG] - Failed connection, incorrect endian.
Hi,

This patch fixes a bug with driver failing to negotiate a connection.

The bug was traced to commit
203e4615ee
staging: vt6656: removed custom definitions of Ethernet packet types

In that patch, definitions in include/linux/if_ether.h replaced ones
in tether.h which had both big and little endian definitions.

include/linux/if_ether.h only refers to big endian values, cpu_to_be16
should be used for the correct endian architectures.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: stable <stable@vger.kernel.org> # 2.6.37+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:54:23 -07:00
Greg Kroah-Hartman 8f8b77bfdc Merge 3.6-rc3 into staging-next
This picks up fixes we want in this branch to allow us to properly test.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-27 07:10:40 -07:00
Greg Kroah-Hartman 4d088876f2 USB: vt6656: remove __devinit* from the struct usb_device_id table
This structure needs to always stick around, even if CONFIG_HOTPLUG
is disabled, otherwise we can oops when trying to probe a device that
was added after the structure is thrown away.

Thanks to Fengguang Wu and Bjørn Mork for tracking this issue down.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reported-by: Bjørn Mork <bjorn@mork.no>
Cc: stable <stable@vger.kernel.org>
CC: Forest Bond <forest@alittletooquiet.net>
CC: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
CC: "David S. Miller" <davem@davemloft.net>
CC: Jesper Juhl <jj@chaosbits.net>
CC: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17 17:50:45 -07:00
Masanari Iida 931846901c staging: vt6656: Fix typo in vt6656
Correct spelling typo in staging/vt6656

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 19:10:12 -07:00
Andy Shevchenko 0f9206fefc staging: vt6656: print small buffers with %*ph
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 19:10:11 -07:00
Jesper Juhl fb841d676b staging: vt6656: don't leak 'param' in vt6656_hostap_ioctl() when returning -EOPNOTSUPP
Don't return -EOPNOTSUPP directly in switch case's since it'll leak
the memory allocated to 'param' when that variable goes out of scope
without having been assigned to anything.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 19:09:06 -07:00
Devendra Naga 3afe5f6ca1 staging/vt6656: cleanup coding style in vResetCommandTimer
the following fixes...

removed spaces at start of a line and used tabs

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 19:13:49 -07:00
Devendra Naga eab6e19307 staging/vt6656: remove unnecessary return in BSSvSecondTxData
this return is at the function end, and function is returning nothing..
i.e a void.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 19:13:49 -07:00
Devendra Naga a984fa5540 staging/vt6656: coding style fix in BSSvSecondTxData
this function seemed bit more coding style fix...

The following fixes:

remove spaces at start of line and use tabs
use space between if and (
give a space in a multiplication operation
use space after = and another variable/constant

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 19:13:49 -07:00
Marcos Paulo de Souza 5328b9ccfc staging: vt6656: Remove unsed macros
These macros were reported by forgotten-macros tool
(https://github.com/marcosps/forgotten_macros).

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 12:43:26 -07:00
Marcos Paulo de Souza 1acc0d62d0 staging: vt6656: Remove all commented macros
These macros were reported by forgotten-macros tool
(https://github.com/marcosps/forgotten_macros).

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 12:43:25 -07:00
Marcos Paulo de Souza a6fadf5c53 staging: vt6656: hostap.c: Remove commented code
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 12:43:25 -07:00
Marcos Paulo de Souza 7f289dae41 staging: vt6656: hostap.c: Remove unused macros and some useless comments
The unused macros were reporteds by forgotten-macros
tool(https://github.com/marcosps/forgotten_macros).

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 12:43:25 -07:00
Marcos Paulo de Souza 728a9ca3cb staging: vt6656: desc.h: Remove commented macros and useless comments
The commented macros are reported by forgotten-macros
tool(https://github.com/marcosps/forgotten_macros).

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 12:43:25 -07:00
Jesper Juhl 9a671f886f staging: vt6656: iwctl: remove a few remaining redundant newlines
I missed a few redundant newlines the first time.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 11:41:31 -07:00
Jesper Juhl 0c5c790109 staging: vt6656: iwctl: Fix up a few remaining brace issues
My previous cleanup patches missed a few cases of
redundant/missing/replaced curly braces. This should fix up the last
ones.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by : Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 11:41:31 -07:00
Jesper Juhl 4063d06043 staging: vt6656: iwctl: fix up spacing around operators
A few cases were missed in my previous cleanup, this takes care of the
last cases of missing space (or too much space (as in a newline))
around operators ('=', '==', ',', '<').

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 11:41:31 -07:00