Commit Graph

30 Commits

Author SHA1 Message Date
Malcolm Priestley 463288b981 staging: vt6556: vnt_rf_setpower convert to use ieee80211_channel.
ieee80211_channel contains all the necessary information to change
power according to tx mode required.

vnt_rf_setpower is moved and so that vnt_rf_set_txpower the only
caller becomes static.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/9eab9af8-fde9-1dc6-fced-95c7a36ecc01@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13 14:53:21 +02: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
Ojaswin Mujoo 9df8a97088 staging: vt6656: Fix styling of the comment related to SPDX-License-Identifier
Fix checkpatch.pl styling error related to SPDX-License-Identifier
comment in vt6656/*.h

Signed-off-by: Ojaswin Mujoo <ojaswin25111998@gmail.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-02 09:29:27 +02: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 e96caf368c staging: vt6656: rf.h clean up comments
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 09:03:44 -07:00
Malcolm Priestley f1c840d55b staging: vt6656: vnt_rf_write_embedded add reg length and IFREGCTL_REGW
The rf register always have  *_REG_LEN and IFREGCTL_REGW macros added.

*_REG_LEN is always 23(0x17) replace them with VNT_RF_REG_LEN.

Remove *_REG_LEN and IFREGCTL_REGW from tables and vnt_rf_set_txpower and
apply VNT_RF_REG_LEN and IFREGCTL_REGW in vnt_rf_write_embedded

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-12 13:28:27 -07:00
Malcolm Priestley 0e2b6fe1f4 staging: vt6656: rf.c remove dead code RFaby11aChannelIndex
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-12 13:28:27 -07:00
Malcolm Priestley c49d7550e5 staging: vt6656: rf.c rename RFbRFTableDownload to vnt_rf_table_download.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28 14:10:46 -07:00
Malcolm Priestley 21bba58ae1 staging: vt6656: rf.c/h rename RFvRSSITodBm to vnt_rf_rssi_to_dbm
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28 14:10:46 -07:00
Malcolm Priestley 8543bb9c21 staging: vt6656: rf.c/h rename RFbRawSetPower to vnt_rf_set_txpower
Remove raw and use txpower.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28 14:10:46 -07:00
Malcolm Priestley 4f5290ea3c staging: vt6656: rf.c/h rename RFbSetPower to vnt_rf_setpower
Removing camel case

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28 14:10:46 -07:00
Malcolm Priestley 32c48cb8ba staging: vt6656: rf.c: rename IFRFbWriteEmbedded to vnt_rf_write_embedded
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28 14:10:46 -07:00
Malcolm Priestley f53d9f12c5 staging: vt6656: rf.c additional power.
Provides extra power on weak RSSI.

The values orginate from the vendors driver.

It is applied later in RFbRawSetPower to simplify and check that it doesn't
exceed the max power.

Vendor driver VT6656_Linux_src_v1.21.03_x86_11.04.zip
http://www.viaembedded.com/servlet/downloadSvl?id=1890&download_file_id=14704
This is GPL-licensed code.

vendors code
...
if (pDevice->byRFType == RF_VT3226D0) {
	if (lRSSI == 0){
		lAdditionalPower = 7;
	}
	else if ((lRSSI < -60) && (lRSSI >= -65)){
		lAdditionalPower = 5;
		//lAdditionalPower = 9;
	}
	else if ((lRSSI < -65) && (lRSSI >= -70)){
		lAdditionalPower = 7;
		//lAdditionalPower = 9;
	}
	else if ((lRSSI < -70) && (lRSSI >= -80)){
		lAdditionalPower = 9;
		}
	else if (lRSSI < -80) {
		lAdditionalPower = 9;
	}
}
else {
	if (lRSSI == 0){
		lAdditionalPower = 7;
	}
	else if ((lRSSI < -70) && (lRSSI >= -75)){
		lAdditionalPower = 5;
	}
	else if ((lRSSI < -75) && (lRSSI >= -80)){
			lAdditionalPower = 7;
		}
		else if (lRSSI < -80) {
			lAdditionalPower = 9;
		}
	}

...

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:27 -07: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 da033bfd7a staging: vt6656: iwctl/key/rf use new structures.
This patch 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:32 -08: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
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
Andres More 592ccfebb3 Staging: vt6656: Removed IN definition
Code cleanup, removed empty IN definition used to denote input parameters.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:56 -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
Jim Lieb 193a823caa Staging: vt665x: Typedef and macro cleanup Part 1
Clean up unused typedefs and macros to remove Win32'isms and
misc non-linux constructs.  Text edits to referencing
source for less frequently used macros.

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