Commit graph

44 commits

Author SHA1 Message Date
Oscar Carter
81969fd8ab staging: vt6656: Check the return value of vnt_control_out_* calls
Check the return value of vnt_control_out_* function calls. When
necessary modify the function prototype to be able to return the new
checked error code.

It's safe to modify all the function prototypes without fix the call
because the only change is the return value from void to int. If before
the call didn't check the return value, now neither.

Signed-off-by: Oscar Carter <oscar.carter@gmx.com>
Link: https://lore.kernel.org/r/20200425134257.4502-2-oscar.carter@gmx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-28 14:16:49 +02:00
Oscar Carter
d12d96ff66 staging: vt6656: Define EnCFG_BBType_MASK as OR between previous defines
Define the EnCFG_BBType_MASK bit as an OR operation between two previous
defines instead of using the OR between two new BIT macros. Thus, the
code is more clear.

Signed-off-by: Oscar Carter <oscar.carter@gmx.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk>
Link: https://lore.kernel.org/r/20200402170103.22520-1-oscar.carter@gmx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13 08:55:28 +02:00
Oscar Carter
a74081b442 staging: vt6656: Use BIT() macro instead of hex value
Use the BIT() macro instead of the hexadecimal value to define the
different bits in registers.

Signed-off-by: Oscar Carter <oscar.carter@gmx.com>
Link: https://lore.kernel.org/r/20200320171056.7841-1-oscar.carter@gmx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-21 10:58:16 +01:00
Quentin Deslandes
7156f7d9c3 staging: vt6656: avoid discarding called function's return code
Change some of the driver's functions in order to handle error codes
instead of discarding them. These function now returns 0 on success and
a negative errno value on error.

Signed-off-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21 08:25:03 +02:00
Nishad Kamdar
b9f46c060c staging: vt6656: Use the correct style for SPDX license Identifier
This patch corrects the style for SPDX license Identifier in mac.h
by using "/* */" in place of "//" as per Linux kernel licensing rules.
Issue found by checkpatch.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:33:54 +01:00
Greg Kroah-Hartman
dd41dab5d5 staging: vt6656: Remove redundant license text
Now that the SPDX tag is in all vt6656 files, that identifies the
license in a specific and legally-defined manner.  So the extra GPL text
wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28 13:20:47 +01:00
Greg Kroah-Hartman
6b4c6ce892 staging: vt6656: add SPDX identifiers to all vt6656 driver files
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the vt6656 driver files with the correct SPDX license identifier
based on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Forest Bond <forest@alittletooquiet.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28 13:20:47 +01:00
Simon Sandström
6ddcf34f11 staging: vt6656: Add missing identifier names
Fix all "function definition argument '...' should also have an
identifier name" warnings in vt6656. Use identifier name from each
corresponding C file.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-05 11:41:39 +01:00
Othmar Pasteka
a85994d546 staging: vt6656: remove address from GPL text
Cleanup errors from checkpatch.pl.

Signed-off-by: Othmar Pasteka <pasteka@kabsi.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-19 16:53:09 -08:00
Malcolm Priestley
387983b49f staging: vt6656: remove unused macros
Remove macros start are unlikely to be reused

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-18 16:11:28 -07:00
Malcolm Priestley
f752c2e37d staging: vt6656: mac.h clean up macros
White space and comment clean up

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-18 16:11:28 -07:00
Malcolm Priestley
ae9593ec37 staging: vt6656: dead code remove tmacro.h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:23:32 -04:00
Malcolm Priestley
4cada363ee staging: vt6656: rename MACvWriteBeaconInterval to vnt_mac_set_beacon_interval
Drop write for set

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:57:38 -07:00
Malcolm Priestley
05827c93df staging: vt6656: rename MACvDisableBarkerPreambleMd to vnt_mac_disable_barker_preamble_mode
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:57:38 -07:00
Malcolm Priestley
a085edc682 staging: vt6656: rename MACvEnableBarkerPreambleMd to vnt_mac_enable_barker_preamble_mode
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:57:38 -07:00
Malcolm Priestley
83a0ee45f5 staging: vt6656: rename MACvDisableProtectMD to vnt_mac_disable_protect_mode
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:57:38 -07:00
Malcolm Priestley
ccbf4415d6 staging: vt6656: rename MACvEnableProtectMD to vnt_mac_enable_protect_mode
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:57:38 -07:00
Malcolm Priestley
1cd34eaa28 staging: vt6656: rename MACvWriteBSSIDAddress to vnt_mac_set_bssid_addr
drop write for set and shorten address.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:57:38 -07:00
Malcolm Priestley
57dc49a6c0 staging: vt6656: rename MACvWriteWord to vnt_mac_write_word
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:57:37 -07:00
Malcolm Priestley
369575377e staging: vt6656: rename MACvRegBitsOff to vnt_mac_reg_bits_off
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:57:37 -07:00
Malcolm Priestley
a9bed1df5b staging: vt6656: rename MACvRegBitsOff to vnt_mac_reg_bits_off
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:57:37 -07:00
Malcolm Priestley
a7a93e3251 staging: vt6656: rename MACvSetKeyEntry to vnt_mac_set_keyentry
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:57:37 -07:00
Malcolm Priestley
cd731941a0 staging: vt6656: rename MACvDisableKeyEntry to vnt_mac_disable_keyentry
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:57:37 -07:00
Malcolm Priestley
05089fbc52 staging: vt6656: rename MACvSetBBType to vnt_mac_set_bb_type
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:57:37 -07:00
Malcolm Priestley
aa6907da1f staging: vt6656: rename MACbShutdown to vnt_mac_shutdown
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:57:37 -07:00
Malcolm Priestley
d10079105f staging: vt6656: rename MACvWriteMultiAddr to vnt_mac_set_filter
The function sets the mac filter so rename to vnt_mac_set_filter

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:57:37 -07:00
Malcolm Priestley
96f6975bd3 staging: vt6656: Create new function to set led state.
Create vnt_mac_set_led to set state and led.

state has two modes LEDSTS_TMLEN which sets the blink rate
on TX activity and LEDSTS_STS which sets the led.

As result of this patch ControlvMaskByte becomes dead code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 10:36:49 -07:00
Malcolm Priestley
954e8142a5 staging: vt6656: MACvSetKeyEntry change u32 pdwKey to u8 pointer
Change pdwKey u32 pointer to key u8 pointer.

Callers are already u8 remove u32 pointer cast.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 10:36:48 -07:00
Malcolm Priestley
83bf96fe51 staging: vt6656: MACvSetKeyEntry create structure to write key
Create structure for wKeyCtl , pbyAddr and pbyKey

wKeyCtl(key_ctl) and pbyAddr(addr) form an union of 64 bits with swap
of two 32 bits. pbyKey(key) has a length of WLAN_KEY_LEN_CCMP(16)
bytes.

swap is needed because high order 32 bits needs to written out first.

pbyKey is memcpy on to key.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-25 15:13:59 -07:00
Malcolm Priestley
9190c4d286 staging: vt6656: MACvDisableKeyEntry fix sizeof uEntryIdx to u8
Remove byData and change all callers to u8.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 04:46:07 +09:00
Malcolm Priestley
0ca3e288dd staging: vt6656: device_set_multi: covert mc_filter to u64
Convert mc_filter to u64, preform netdev_for_each_mc_addr
mask filtering.

In MACvWriteMultiAddr endian correct mc_filter and write
the entire multicast once.

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-14 09:20:51 -08:00
Andres More
9fbafdd9ad staging: vt6656: remove consecutive newlines
Several sed -i '/^$/{ N /^\n$/ D }' drivers/staging/vt6656/*.[ch]

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28 16:06:27 -07:00
Andres More
e1970fce11 staging: vt6656: remove unused functions
Removed defined symbols not being used elsewhere.
Only compile tested.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-26 16:13:21 -07:00
Andres More
00d0603cbd staging: vt6656: remove code placeholders
Removed comments from coding template.
sed -i '/^\/\*---/d' drivers/staging/vt6656/*.[ch]

Signed-off-by: Andres More <more.andres@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:06:09 -07:00
Andres More
4fcf94980c staging: vt6656: removed no longer useful ttype.h file
Removed includes and added linux/types.h instead when needed.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11 09:18:47 -07:00
Malcolm Priestley
98583c095c staging: vt6656: change baseband/mac/wcmd/wctl to new structures.
This patch also cleans up function declarations, definitions and local variables
were appropriate replacing types defined in "ttype.h" with linux/types.h.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 11:13:14 -08:00
Marcos Paulo de Souza
ba768b917f drivers: staging: vt6656: Remove not used returned data of function
This function always return TRUE, and it is not used by the funtions
who calls it.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-22 13:36:25 -08:00
Andres More
d9d1ccb51f Staging: vt6656: code cleanup, resolved checkpatch findings in headers
Resolved whitespace-related checkpatch findings in .h files

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:35:33 -07:00
Andres More
cc856e61ee Staging: vt6656: removed custom UCHAR/USHORT/UINT/ULONG/ULONGLONG typedefs
Cleared all checkpatch warnings but 'do not add new typedefs' ones.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-18 14:51:08 -07:00
Andres More
e7b07d1d89 Staging: vt6656: code cleanup, fixed comments style at the end of headers
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:01 -07:00
Andres More
8611a29ab9 Staging: vt6656: removed VOID/PVOID definitions
Warnings about the usage of externs in .c files were not resolved here.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:01 -07:00
Jim Lieb
3e362598fd Staging: vt665x: Remove umem.h Part 2
Remove references to umem.h macros and refer directly to memcpy
functions.  Delete the include file.

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:08 -07:00
Jim Lieb
9d26d60f99 Staging: vt665x: Clean up include files, Part 1
Remove cplusplus lines from include files
Remove needless ifdefs on includes to conform with C
conventions.  Remove misc commented code/includes
Update TODO

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:07 -07:00
Forest Bond
92b9679711 Staging: Add pristine upstream vt6656 driver sources to drivers/staging/vt6656.
Add pristine upstream vt6656 driver sources to drivers/staging/vt6656.  These
files were copied from the driver directory in the upstream source archive,
available here:

  http://www.viaarena.com/Driver/VT6656_Linux_src_v1.19_12_x86.zip

After copying, trailing whitespace was stripped.  This is GPL-licensed code.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:32 -07:00