Commit graph

64 commits

Author SHA1 Message Date
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
3781f88786 staging: vt6656: Align function parameters
Fixes checkpatch.pl warnings "Alignment should match open parenthesis".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-16 08:41:02 +02:00
Simon Sandström
f21997572c staging: vt6656: Add spaces between operators
Fixes checkpatch.pl warnings "spaces preferred around that <operator>".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-16 08:41:02 +02:00
Dan Cashman
38ca74e58f staging: vt6656: Split arguments to avoid 80-char violation in rf.c
Wrap arguments of call to vnt_control_out() to avoid exceeding 80
character limit, but maintain alignment.

Signed-off-by: Daniel Cashman <dan.a.cashman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:51:23 +02:00
Dan Cashman
04a218becb staging: vt6656: Replace embedded function name with __func__ in rf.c
Change embedded function name in vnt_rf_set_txpower with %s format with
__func__ argument to make it consistent with other part of if-else and
kernel coding style standards as reported by checkpatch.

Signed-off-by: Daniel Cashman <dan.a.cashman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:51:23 +02:00
Dan Cashman
a4dc9bd6a3 staging: vt6656: convert spaces to tabs for rf.c
Address checkpatch errors encountered in rf.c by removing use of spaces
and replacing with properly aligned tabs.

Signed-off-by: Daniel Cashman <dan.a.cashman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:51:23 +02:00
Arushi Singhal
8129306658 staging: vt6656: Alignment should match open parenthesis
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis"

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16 10:23:09 -08:00
Vijai Kumar K
354872712e staging: vt6656: Fix coding style warnings on Block comments
Fix checkpatch.pl warnings related to Block comments in
staging/vt6656/rf.c file.

Signed-off-by: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:13:14 +01:00
Elise Lennion
596f144943 staging: vt6656: Remove unnecessary parentheses.
The removed parentheses are unnecessary and don't add readability.

Found using Coccinelle semantic patch:
@@ expression e, e1, e2; @@
e +=
(
        (e1 == e2)
|
-       (e1)
+       e1
)

@@ expression e, e1, e2; @@
e =
(
        (e1 == e2)
|
-       (e1)
+       e1
)

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-24 15:35:03 +02:00
Rehas Sachdeva
dcf8343d54 staging: vt6656: Remove unnecessary parentheses
This patch removes the following checkpatch.pl warnings:
Unnecessary parentheses around al7230_init_table_amode[0][0]
Unnecessary parentheses around al7230_channel_table2[0][0]

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-10 19:21:18 -08: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
163fe301b9 staging: vt6656: vnt_rf_setpower: fix missing rate RATE_12M
When the driver sets this rate a power of zero value is set causing
data flow stoppage until another rate is tried.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org> # v3.17+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 11:31:54 +01:00
Rajbinder Brar
3b9999ec18 Staging: vt6656: Merge two lines of code into one
This patch merges an assignment with an immediately following return of
the assigned variable. The following Coccinelle semantic patch was used
to make this transformation:

@@
expression ret;
identifier f;
@@

-ret=
+return
	f(...);
-return ret;

A variable that became unused due to this transformation was also
removed.

Signed-off-by: Rajbinder Brar <brar.rajbinder@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:42:54 -07:00
Malcolm Priestley
5a97491c33 staging: vt6656: struct vnt_private rf power table remove camel case
Camel case changes
byCCKPwr -> cck_pwr
byOFDMPwrG -> ofdm_pwr_g
byOFDMPwrA -> ofdm_pwr_a
byCurPwr -> power
abyCCKPwrTbl -> cck_pwr_tbl
abyOFDMPwrTbl -> ofdm_pwr_tbl
abyOFDMAPwrTbl -> ofdm_a_pwr_tbl

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:16:28 -07:00
Malcolm Priestley
125cfc6344 staging: vt6656: struct vnt_private rename uCurrRSSI to current_rssi
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:11:58 -07:00
Malcolm Priestley
6242ecaeb6 staging: vt6656: struct vnt_private replace byRFType with rf_type
Remove camel case

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:11:56 -07:00
Malcolm Priestley
ef13cfb4dc staging: vt6656: rf.c cleanup comments
named comments are already referenced in revision history
in high-level comment.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-12 13:28:28 -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
77bdc0a5c6 staging: vt6656: rf.c clean up channel and power tables
Remove comments to channel number execpt where there is a
change to 5gHz channel 15

named comments are already referenced in revision history
in high-level comment.

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
89daee6ff5 staging: vt6656: vnt_rf_setpower rate <= RATE_11M check array bound
decrement channel by one and check array bound.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08 16:03:57 -07:00
Malcolm Priestley
72183c6b0c staging: vt6656: vnt_rf_set_txpower use power for priv->byCurPwr
The byCurPwr value can change state while in another thread,.

Change to local variable power which is the last set value.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08 16:03:57 -07:00
Malcolm Priestley
c6b16e197b staging: vt6656: remove dead code datarate
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:23:31 -04:00
Malcolm Priestley
a23d8a7032 staging: vt6656: mac80211 conversion: change vnt_rf_set_txpower
Remove old eScanState code and use.

priv->hw->conf.chandef.chan->hw_value to find current channel

Check hw_value for bounds of vt3226d0_lo_current_table

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:21:20 -04:00
Malcolm Priestley
5dda2528ef staging: vt6656: rf.c replace DBG_PRT debug messages
replace with dev_dbg

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
c85a81b22d staging: vt6656: rf.c Fix typo error at3226*
In commit 78a650dc19
there was a typo error

abyVT3226_InitTable -> at3226_init_table
abyVT3226D0_InitTable -> at3226d0_init_table

Shoud be vt3226_init_table and vt3226d0_init_table

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
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
d6df2bf2bf staging: vt6656: IFRFbWriteEmbedded remove camel case
Camel case changes
pDevice -> priv
dwData -> data
pbyData -> reg_data

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
25d279d3b2 staging: vt6656: IFRFbWriteEmbedded use ARRAY_SIZE
Replace magic number with ARRAY_SIZE of pbyData

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
62c8526d60 staging: vt6656: dead code remove control.c/h
Replace control.h headers with usbpipe.h

Also add to usbpipe.c its header

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 10:36:50 -07:00
Malcolm Priestley
1390b02a2f staging: vt6656: rename PIPEnsControlOut/CONTROLnsRequestOut to vnt_control_out
Rename all CONTROLnsRequestOut and remove macro from control.h

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
60f8ce8dd6 staging: vt6656: rndis.h move all to device.h
Commands macros are common to all source files.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:30 -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
Malcolm Priestley
c47b0a3453 staging: vt6656: Remove always 0 variable dwDiagRefCount
Remove > 0 code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 12:41:43 -08:00
Valentina Manea
3b1388518a staging: vt6656: Fix (most) sparse warnings regarding static functions/variables
This fixes sparse warnings for functions and variables, e.g.:
* drivers/staging/vt6656/card.c:69:11: warning: symbol 'cwRXBCNTSFOff'
was not declared. Should it be static?

Some warnings were false positives, such as:
* drivers/staging/vt6656/dpc.c:249:5: warning: symbol 'RXbBulkInProcessData'
was not declared. Should it be static?

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 10:57:33 -08:00
Malcolm Priestley
78a650dc19 staging: vt6656: rf.c: Remove camel case from local variables
Camel case changes;
Static declaration
abyAL2230InitTable -> al2230_init_table
abyAL2230ChannelTable0 -> al2230_channel_table0
abyAL2230ChannelTable1 -> al2230_channel_table1

abyAL7230InitTable -> al7230_init_table_amode
abyAL7230ChannelTable0 -> al7230_channel_table0
abyAL7230ChannelTable1 -> al7230_channel_table1
abyAL7230ChannelTable2 -> al7230_channel_table2

abyVT3226_InitTable -> at3226_init_table
abyVT3226D0_InitTable -> at3226d0_init_table
abyVT3226_ChannelTable0 -> vt3226_channel_table0
abyVT3226_ChannelTable1 -> vt3226_channel_table1

abyVT3342A0_InitTable -> vt3342a0_init_table
abyVT3342_ChannelTable0 -> vt3342_channel_table0
abyVT3342_ChannelTable1 -> vt3342_channel_table1

Constant declaration
dwVT3226D0LoCurrentTable -> vt3226d0_lo_current_table

dwAL2230PowerTable -> al2230_power_table

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 21:09:05 +09:00
Malcolm Priestley
d9652aeff9 staging: vt6656: rf.c: RFbRFTableDownload: Remove camel case and clean up.
White space clean up.

Camel case changes;
pDevice -> priv
wLength1 -> length1
wLength2 -> length2
wLength3 -> length3
pbyAddr1 -> addr1
pbyAddr2 -> addr2
pbyAddr3 -> addr3
wLength -> length
wValue -> value
abyArray -> array

No functional changes.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 21:09:05 +09:00
Malcolm Priestley
ecb6ecbb05 staging: vt6656: rf.c: RFvRSSITodBm Remove camel case and clean up.
White space clean up.

Camel case changes;
pDevice -> priv
byCurrRSSI -> rssi
pldBm -> dbm
byIdx -> idx
abyAIROHARF -> airoharf

No functional changes.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 21:09:04 +09:00
Malcolm Priestley
fc20463ed7 staging: vt6656: rf.c: RFbRawSetPower Remove camel case and cleanup.
White space clean up.

Camel case changes;
pDevice -> priv
uRATE -> rate
bResult -> ret
byPwr -> power

Functional change merged as one variable.
dwMax7230Pwr -> power_setting
dwVT3226Pwr -> power_setting
dwVT3342Pwr -> power_setting

Author changes moved to Revision history.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 21:09:04 +09:00
Malcolm Priestley
a628747fb6 staging: vt6656: rf.c: RFbSetPower Remove camel case and clean up.
White space clean up.

Camel case changes;
pDevice -> priv
uRATE -> rate
uCH -> channel
bResult -> ret
byPwr -> power

No functional changes.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 21:09:03 +09: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
52a7e64b06 staging: vt6656: replaced custom DWORD definition with u32
Checkpatch findings were not resolved.

sed -i 's/\bDWORD\b/u32/g' drivers/staging/vt6656/*.[ch]
sed -i 's/\bPDWORD\b/u32 */g' drivers/staging/vt6656/*.[ch]

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
Andres More
4e9b5e2b8b staging: vt6656: replaced custom TRUE definition with true
Checkpatch findings were not resolved, just direct replacement.

sed -i 's/\bTRUE\b/true/g' drivers/staging/vt6656/*.[ch]

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15 10:48:24 -08:00