Commit Graph

135 Commits

Author SHA1 Message Date
Gustavo A. R. Silva ddb35ab8d9 staging: vt6656: card: mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18 16:21:26 +02:00
Malcolm Priestley c3972591d9 staging: vt6656: vnt_update_ifs set max_min based on short slot time.
Short slot time is controlled by mac80211 so there is no need to find
odfm rates.

Merge PK_TYPE_11B and PK_TYPE_11GA & PK_TYPE_11GB into one else and
switch on short slot time.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 07:41:58 +02:00
Elise Lennion ce439c425b staging: vt6656: Compress return logic into one line.
Compress the return logic into one line avoids unnecessary variable
declarations. In this case it also makes it easier to understand the
function.

Coccinelle was used to find this return statement. However, additional
compressions were done to make the function clearer.

Semantic patch:
@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-17 10:27:55 +02:00
Mikhail Golubev f4190ce37f staging:vt6656:card.c: fix block comments should align the * on each line
Block comments should align the * on each line as reported by checkpatch.pl

Signed-off-by: Mikhail Golubev <golubev.mikhail@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:27 +02:00
Rithvik Patibandla e7c856556a staging:vt6656:card.c: fix camel case issue
Fix "Avoid camel case" issue thrown by checkpatch.pl

Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:10:24 +02:00
Rithvik Patibandla 6d898d6958 staging:vt6656:card.c: fix blank line issue
Fix "Please use a blank line after function declaration" check thrown
by checkpatch.pl

Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:10:24 +02:00
Rithvik Patibandla 7b25c75e55 staging:vt6656:card.c: fix blank lines issue
Fix "Blank lines aren't necessary after an open brace" check thrown by
checkpatch.pl

Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:10:24 +02:00
Rithvik Patibandla a9f47a456a staging:vt6656:card.c:fix alignment checks
Fix "Alignment should match with open paranthesis" check thrown by
checkpatch.pl

Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:10:24 +02:00
Rithvik Patibandla b01a5d7160 staging:vt6656:card.c:Fix comment block issue
Fix "Block comments use * on subsequent lines" and "Block comments use
*/ on trailing lines" warnings thrown by checkpatch.pl

Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:10:24 +02: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
Burcin Akalin a09ad8c7a3 staging: vt6656: Do not use multiple blank lines.
Remove multiple blank lines. Problem found using checkpatch.pl
"CHECK: Please don't use multiple blank lines"

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 16:53:12 +09:00
Burcin Akalin fd49ebb6dd staging: vt6656: Add space around '|'
Add space around operator '|'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '|' (ctx:VxV)

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 16:53:12 +09:00
Amitoj Kaur Chawla 574dddc6d7 staging: vt6656: Prefer using BIT Macro
Replace bit shifting on 1 with the BIT(x) Macro

The semantic patch used to find this is:
@@ int g; @@

-(1 << g)
+BIT(g)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:05:17 -07:00
Amitoj Kaur Chawla 4b1443a248 staging: vt6656: Remove useless initialisation
Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:05:17 -07:00
Abdul Hussain 5699c0f4fc staging: vt6656: Boolean tests don't need comparisons.
This patch remove true and false from boolean tests.

Signed-off-by: Abdul Hussain <habdul@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:26:45 -07:00
Gustavo A. R. Silva 733b3b0794 Staging: vt6656: Fixed typo in a macro name
Fixed typo in a macro name in card.c and device.h files.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-12 19:46:50 -08:00
Tapasweni Pathak 3e46587ef1 staging: vt6656: remove unnecessary else after return
This patch fixes checkpatch.pl warning in files of vt6656
WARNING: else is not generally useful after a break or return

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:41:15 -07:00
Malcolm Priestley a8492a0baf staging: vt6656: remove comments of old functions nolonger present.
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 d78551b945 staging: vt6656: remove return from all void functions
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 c37cbd3706 staging: vt6656: struct vnt_private replace abyBBVGA with bb_vga
Removing type prefix and camel case.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:16:29 -07:00
Malcolm Priestley a641c9ec88 staging: vt6656: struct vnt_private replace bShortSlotTime with short_slot_time
Removing type prefix and camel case

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:16:29 -07:00
Malcolm Priestley d80bf43c82 staging: vt6656: struct vnt_private replace byTopCCKBasicRate with top_cck_basic_rate
Removing type prefix and camel case.

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 3c8a5b2598 staging: vt6656: struct vnt_private replace byTopOFDMBasicRate with top_ofdm_basic_rate
Removing type prefix and camel case.

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 93a7355883 staging: vt6656: struct vnt_private replace wBasicRate with basic_rates
The same name as in struct ieee80211_bss_conf

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 e12471db91 staging: vt6656: struct vnt_private replace byPacketType with packet_type
Removing type prefix and camel case.

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 65df77e2ca staging: vt6656: struct vnt_private replace byBBType with bb_type
Removing type prefix and camel case.

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 ff5fee2229 staging: vt6656: struct vnt_private remove camel case IFS names
Camel case changes
uSIFS -> sifs
uDIFS -> difs
uEIFS -> eifs
uSlot -> slot

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 995c91e0c2 staging: vt6656: struct vnt_private remove uCwMin/uCwMax
Although set these variables are not used.

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 113f0b915b staging: vt6656: struct vnt_private rename qwCurrTSF to current_tsf
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:11:57 -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 d7f2d8f61e staging: vt6656: put radio power off and on into correct state every time.
When radio is off bit GPIO3_INTMD should be on and off when radio is on.

Add these to the tail of vnt_radio_power_off and vnt_radio_power_on
and remove variable bHWRadioOff.

In device_init_registers just check GPIO3_DATA are in correct state and
always power on.

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 409bc044a4 staging: vt6656: struct vnt_private remove unused variable bRadioOff
The variable 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-07-18 16:11:28 -07:00
Malcolm Priestley dc5cfd9be6 staging: vt6656: struct vnt_private remove unused variable bRadioControlOff
This variable is never set.

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 0e951753dc staging: vt6656: rename BBvExitDeepSleep to vnt_exit_deep_sleep
Dropping BB

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 18:01:52 -07:00
Malcolm Priestley e8e072da88 staging: vt6656: rename BBvSetDeepSleep to vnt_set_deep_sleep
Dropping BB

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 18:01:52 -07:00
Malcolm Priestley de8690a2e3 staging: vt6656: rename BBvSetVGAGainOffset to vnt_set_vga_gain_offset
Dropping BB

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 18:01:52 -07:00
Peter Senna Tschudin 42b138d96c staging: vt6556: Cleanup coding style: lines over 80 chars
This patch cleanup the follwoing coding style issues:
 - line over 80 chars
 - spaces on the beginning of a line
 - put { and } on the correct places

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 21:55:29 -07:00
Peter Senna Tschudin 618d7d07bd staging: vt6556: Cleanup coding style: comments
This patch cleanup coding style issues on comments.

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 21:55:29 -07:00
Malcolm Priestley 9fe109c153 staging: vt6656: vnt_update_ifs vendor changes to uSIFS/uDIFS
The latest vendor code makes changes to uSIFS and uDIFS.

The orginal codes have been rearranged into a fall through switch
statement.

These reduce the time that device allows to TX packets and
improves throughput.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08 16:04:22 -07:00
Malcolm Priestley 04f2ff16e0 staging: vt6656: vnt_set_channel remove power setting functions
Power setting is already done in vnt_config and vnt_tx_packet.

Just check that for connection_channel, if invalid return.

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 d3584775e9 staging: vt6656: set BBvSetVGAGainOffset inside vnt_set_bss_mode
vnt_set_bss_mode changes the state of abyBBVGA so move
BBvSetVGAGainOffset to the function.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:25:53 -07:00
Malcolm Priestley d35d5fbb36 staging: vt6656: remove vnt_add_basic_rate
The driver never sets basic rate any more so remove function.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:25:53 -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 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 3f530ded0f staging: vt6656: dead code remove rc4.c/h
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 9ef2184d0e staging: vt6656: dead code remove zonetypes
Remove vntconfiguration.dat, iocmd.h and country.h

Set all channels are enabled as by rf type.

mac80211 will handles zones

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:23:29 -04:00
Malcolm Priestley ee61fde207 staging: vt6656: mac80211 conversion: vnt_update_ifs change basic rates
Use wBasicRate to find ofdm_rate.

wBasicRate is changed to u32 to match struct ieee80211_bss_conf -> basic_rates

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:21:19 -04:00
Malcolm Priestley 205056f350 staging: vt6656: rename BBvCalculateParameter to vnt_get_phy_field
The function returns the phy fields rename to vnt_get_phy_field

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:59:49 -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