aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656/rf.c
AgeCommit message (Collapse)Author
2017-04-08staging: vt6656: Split arguments to avoid 80-char violation in rf.cDan Cashman
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-08staging: vt6656: Replace embedded function name with __func__ in rf.cDan Cashman
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-08staging: vt6656: convert spaces to tabs for rf.cDan Cashman
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-02-16staging: vt6656: Alignment should match open parenthesisArushi Singhal
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>
2016-11-21staging: vt6656: Fix coding style warnings on Block commentsVijai Kumar K
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-10-24staging: vt6656: Remove unnecessary parentheses.Elise Lennion
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-03-10staging: vt6656: Remove unnecessary parenthesesRehas Sachdeva
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>
2015-11-19staging: vt6656: remove address from GPL textOthmar Pasteka
Cleanup errors from checkpatch.pl. Signed-off-by: Othmar Pasteka <pasteka@kabsi.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09staging: vt6656: vnt_rf_setpower: fix missing rate RATE_12MMalcolm Priestley
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>
2014-09-23Staging: vt6656: Merge two lines of code into oneRajbinder Brar
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-07-21staging: vt6656: struct vnt_private rf power table remove camel caseMalcolm Priestley
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-21staging: vt6656: struct vnt_private rename uCurrRSSI to current_rssiMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: struct vnt_private replace byRFType with rf_typeMalcolm Priestley
Remove camel case Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-12staging: vt6656: rf.c cleanup commentsMalcolm Priestley
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-12staging: vt6656: vnt_rf_write_embedded add reg length and IFREGCTL_REGWMalcolm Priestley
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-12staging: vt6656: rf.c remove dead code RFaby11aChannelIndexMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-12staging: vt6656: rf.c clean up channel and power tablesMalcolm Priestley
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-08staging: vt6656: vnt_rf_setpower rate <= RATE_11M check array boundMalcolm Priestley
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-08staging: vt6656: vnt_rf_set_txpower use power for priv->byCurPwrMalcolm Priestley
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-06-26staging: vt6656: remove dead code datarateMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: vt6656: mac80211 conversion: change vnt_rf_set_txpowerMalcolm Priestley
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-05-28staging: vt6656: rf.c replace DBG_PRT debug messagesMalcolm Priestley
replace with dev_dbg Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28staging: vt6656: rf.c Fix typo error at3226*Malcolm Priestley
In commit 78a650dc19ba44e2e07768c6d3b2ff080cf9d245 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-28staging: vt6656: rf.c rename RFbRFTableDownload to vnt_rf_table_download.Malcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28staging: vt6656: rf.c/h rename RFvRSSITodBm to vnt_rf_rssi_to_dbmMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28staging: vt6656: rf.c/h rename RFbRawSetPower to vnt_rf_set_txpowerMalcolm Priestley
Remove raw and use txpower. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28staging: vt6656: rf.c/h rename RFbSetPower to vnt_rf_setpowerMalcolm Priestley
Removing camel case Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28staging: vt6656: rf.c: rename IFRFbWriteEmbedded to vnt_rf_write_embeddedMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28staging: vt6656: IFRFbWriteEmbedded remove camel caseMalcolm Priestley
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-28staging: vt6656: IFRFbWriteEmbedded use ARRAY_SIZEMalcolm Priestley
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-26staging: vt6656: dead code remove control.c/hMalcolm Priestley
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-26staging: vt6656: rename PIPEnsControlOut/CONTROLnsRequestOut to vnt_control_outMalcolm Priestley
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-18staging: vt6656: rndis.h move all to device.hMalcolm Priestley
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-18staging: vt6656: rf.c additional power.Malcolm Priestley
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>
2013-11-25staging: vt6656: Remove always 0 variable dwDiagRefCountMalcolm Priestley
Remove > 0 code. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10staging: vt6656: Fix (most) sparse warnings regarding static functions/variablesValentina Manea
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-05-30staging: vt6656: rf.c: Remove camel case from local variablesMalcolm Priestley
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-30staging: vt6656: rf.c: RFbRFTableDownload: Remove camel case and clean up.Malcolm Priestley
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-30staging: vt6656: rf.c: RFvRSSITodBm Remove camel case and clean up.Malcolm Priestley
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-30staging: vt6656: rf.c: RFbRawSetPower Remove camel case and cleanup.Malcolm Priestley
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-30staging: vt6656: rf.c: RFbSetPower Remove camel case and clean up.Malcolm Priestley
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-03-28staging: vt6656: remove consecutive newlinesAndres More
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-26staging: vt6656: remove unused functionsAndres More
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-25staging: vt6656: remove code placeholdersAndres More
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-11staging: vt6656: replaced custom DWORD definition with u32Andres More
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-02-15staging: vt6656: replaced custom TRUE definition with trueAndres More
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-15staging: vt6656: replaced custom FALSE definition with falseAndres More
Checkpatch findings were not resolved, just direct replacement. sed -i 's/\bFALSE\b/false/g' drivers/staging/vt6656/*.[ch] Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-18staging: vt6656: staging: vt6656 change remaining to vnt_mgmt and remove ↵Malcolm Priestley
typedef. Use struct vnt_manager Move vnt_manager from sMgmtObj to vnt_mgmt. and remove typedef from structures vnt_private vnt_manager vnt_rx_mgmt vnt_tx_mgmt Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging: vt6656: iwctl/key/rf use new structures.Malcolm Priestley
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>
2012-10-22staging: vt6656: [BUG] out of bound array reference in RFbSetPower.Malcolm Priestley
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>