aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/vt6656
AgeCommit message (Collapse)Author
2014-01-13staging: vt6656: sparse fixes: iwctl_giwgenie use memcpy.Malcolm Priestley
extra is in kernel space use memcpy. sparse warning iwctl.c:1595:42: warning: incorrect type in argument 1 (different address spaces) iwctl.c:1595:42: expected void [noderef] <asn:1>*to iwctl.c:1595:42: got char *extra Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-13staging: vt6656: sparse fixes: iwctl_siwgenie use memcpy.Malcolm Priestley
extra is in kernel space replace copy_from_user with memcpy with no need to error check. We already know that extra is valid by error checking on wrq->length. sparse warning iwctl.c:1567:53: warning: incorrect type in argument 2 (different address spaces) iwctl.c:1567:53: expected void const [noderef] <asn:1>*from iwctl.c:1567:53: got char *extra Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-13staging: vt6656: sparse fixes ethtool_ioctl Use struct ifreq *Malcolm Priestley
Replace useraddr with direct point to struct ifreq->ifr_data sparse warnings main_usb.c:1443:44: warning: cast removes address space of expression main_usb.c:1454:37: warning: incorrect type in argument 2 (different address spaces) main_usb.c:1454:37: expected void const [noderef] <asn:1>*from main_usb.c:1454:37: got void *useraddr main_usb.c:1462:34: warning: incorrect type in argument 1 (different address spaces) main_usb.c:1462:34: expected void [noderef] <asn:1>*to main_usb.c:1462:34: got void *useraddr Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-13staging: vt6656: sparse fixes: dpc.c missing dpc.hMalcolm Priestley
sparse warnings dpc.c:249:5: warning: symbol 'RXbBulkInProcessData' was not declared. Should it be static? dpc.c:1295:6: warning: symbol 'RXvWorkItem' was not declared. Should it be static? dpc.c:1321:6: warning: symbol 'RXvFreeRCB' was not declared. Should it be static? dpc.c:1356:6: warning: symbol 'RXvMngWorkItem' was not declared. Should it be static? Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-09staging: vt6656: rxtx.c Camel case and clean up s_uGetRTSCTSRsvTimeMalcolm Priestley
White space clean Remove unneeded comments. Camel case changes pDevice, byRTSRsvType byPktType cbFrameLength wCurrentRate uRrvTime uRTSTime uCTSTime uAckTime uDataTime } -> { priv, rsv_type pkt_type frame_lenght current_rate rrv_time rts_time cts_time ack_time data_time Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-09staging: vt6656: rxtx.c Camel case and clean up s_uGetTxRsvTimeMalcolm Priestley
White space clean. Remove unneeded comments. Camel case changes pDevice byPktType cbFrameLength wRate bNeedAck uDataTime uAckTime } -> { priv pkt_type frame_length rate need_ack data_time ack_time Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08staging: vt6656: remove an unneeded NULL checkDan Carpenter
We dereference "param->u.wpa_key.key" on the next line so the check here is inconsistent. This is only called from iwctl_siwencodeext() and "param->u.wpa_key.key" is a valid pointer. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08staging: vt6656: CARDqGetNextTBTT replace code using do_div.Malcolm Priestley
uBeaconInterval becomes u32 get next TBTT value using vendor's equation as shown. This patch was checked against the original code and yields exactly the same value. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08staging: vt6656: CARDqGetNextTBTT correct uLowNextTBTTMalcolm Priestley
value uLowNextTBTT yields wrong value. ULL is needed with qwTSF Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: stable@vger.kernel.org # v3.9+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07Staging: vt6656: Reduce line length of bssdb.cSimon Schuster
Long lines are split into multiple ones to reduce the line length. Additionally some alignment fixes are made that previous patches missed. Unfortunately, due to the high indentation levels present in parts of bssdb.c, this patch leaves some lines which are longer than 80 characters. Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de> Signed-off-by: Simon Schuster <linux@rationality.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07Staging: vt6656: Remove explicit comparisons against NULLSebastian Rachuj
Explicit comparisons of pointers agains NULL (like if (p != NULL) ...) are not as readable as the implicit comparison (like if (p) ...). This patch converts all these explicit comparisons to implicit ones. Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de> Signed-off-by: Simon Schuster <linux@rationality.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07Staging: vt6656: Remove bogus parentheses in conditionsSebastian Rachuj
Removes unrequired parentheses around comparisons in complex conditions. Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de> Signed-off-by: Simon Schuster <linux@rationality.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07Staging: vt6656: Combined nested conditionsSimon Schuster
This patch reduces the level of indentation in bssdb.c of the vt6656 driver by transforming nested conditions to a series of logical conjunctions. E.g. if (cond1) { if (cond2) { block(); } } is transformed to if (cond1 && cond2) { block(); } Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de> Signed-off-by: Simon Schuster <linux@rationality.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07Staging: vt6656: Correct usage of bracesSimon Schuster
Conforming to the linux coding style guidelines, a single line block of an if statement does not require curly braces unless another block of the if cascade requires them. Therefore unnecessary curly braces are removed by this patch and missing ones are added. Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de> Signed-off-by: Simon Schuster <linux@rationality.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07Staging: vt6656: Combine "else { if" to "else if"Simon Schuster
This patch combines single ifs within the block of an else to a single else if statement. Therefore code that looks like that else { if (cond) { statements; } else { other_statements; } } is converted to code that looks like that else if (cond) { statements; } else { other_statements; } Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de> Signed-off-by: Simon Schuster <linux@rationality.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07Staging: vt6656: Remove unnecessary spaces in format stringsSimon Schuster
A space in a format string is unnecessary if it is followed by a line feed. These spaces are removed by this patch. Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de> Signed-off-by: Simon Schuster <linux@rationality.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07Staging: vt6656: Remove line feeds before elseSimon Schuster
An else belongs in the same line as the closing curly brace of the previous block. Hence, this patch removes line feeds separating a curly brace from the corresponding else. Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de> Signed-off-by: Simon Schuster <linux@rationality.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07Staging: vt6656: Correct single space mistakesSimon Schuster
Adds missing spaces between an if-statement and its condition as well as between the condition and the following curly brace. At casts there is also a space added between the type and the variable. Spaces that either follow an opening parenthese or the sizeof operator or that preceed semicolons are removed as well. Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de> Signed-off-by: Simon Schuster <linux@rationality.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07Staging: vt6656: Correct operator coding styleSimon Schuster
Adds spaces around operators (like &&, ||, !=, +, ...) and removes spaces before postfix increment and decrement operators. Parentheses around return values are removed, too. Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de> Signed-off-by: Simon Schuster <linux@rationality.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07Staging: vt6656: Remove unnecessary semicolonsSimon Schuster
After some blocks in bssdb.c there are semicolons that are not required to be there. Therefore they are removed with this patch. Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de> Signed-off-by: Simon Schuster <linux@rationality.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07Staging: vt6656: Adjust comments in bssdb.cSimon Schuster
Changes C99-style comments to C89-style ones to conform to the linux coding guidelines. Additionally removes plus and minus signs from the function description comments. Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de> Signed-off-by: Simon Schuster <linux@rationality.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-07Staging: vt6656: Fix indentation of bssdb.cSimon Schuster
Corrects indentation by using tabs instead of spaces. This also includes modification of the alignment of multi-line expressions and statements. Signed-off-by: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de> Signed-off-by: Simon Schuster <linux@rationality.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17staging: vt6656: clean up CARDbSetMediaChannel.Malcolm Priestley
White space and commented out code. Camel case clean up. pDevice -> priv uConnectionChannel -> connection_channel Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17staging: vt6656: Remove unused scStatistic data/functions from driver.Malcolm Priestley
None of these stats reach user. So delete them from driver mib.c and mib.h becomes dead code as result of this patch. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17staging: vt6656: dead code remove mib.c mic.h from driver.Malcolm Priestley
As result of patch staging: vt6656: Remove unused scStatistic data from driver. mib.c mic.h is dead code Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17staging: delete non-required instances of include <linux/init.h>Paul Gortmaker
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10staging: vt6656: Move double definition of MAX_RATE to device_cfg.hMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10staging: vt6656: [BUG] BBvUpdatePreEDThreshold Always set sensitivity on ↵Malcolm Priestley
bScanning byBBPreEDIndex value is initially 0, this means that from cold BBvUpdatePreEDThreshold is never set. This means that sensitivity may be in an ambiguous state, failing to scan any wireless points or at least distant ones. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10staging: vt6656: Replace pStatistic->abyTxPktInfo with struct vnt_tx_pkt_infoMalcolm Priestley
Change s_vSaveTxPktInfo and BSSvUpdateNodeTxCounter to use vnt_tx_pkt_info relayed to BSSvUpdateNodeTxCounter via INTnsProcessData. pStatistic->abyTxPktInfo[byPktNum].byBroadMultiUni is unused and discarded. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10staging: vt6656: s_uCalculateLinkQual use netstats rx valuesMalcolm Priestley
Use netstats rx_packets and rx_frame_errors. Add frame errors to RXbBulkInProcessData The current scStatistic.RxFcsErrCnt only records USB errors not frame errors. The scStatistic.RxOkCnt only recorded successful USB transfers not actual successfully received packets. So a more accurate reading is to use netstats rx_packets and rx_frame_errors. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10staging: vt6656: Get wireless stats qual.qual directly from s_uCalculateLinkQualMalcolm Priestley
Calculate the qual from the tx_packets and wstats.discard.retries and apply to wstats.qual.qual Discard pDevice->scStatistic.LinkQuality. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10staging: vt6656: Remove STAvUpdateTDStatCounter and apply directly to statsMalcolm Priestley
Apply directly to net_device_stats and wireless stats. tx_bytes are relayed from s_vSaveTxPktInfo via scStatistic, so collect them there. All other statistics in STAvUpdateTDStatCounter are dead code and don't reach user. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08staging: vt6656: baseband.c clean up BBbVT3184InitMalcolm Priestley
White space clean up and remove camel case from variables. pDevice-> priv ntStatus -> status wLength ->length pbyAddr -> addr pbyAgc -> agc wLengthAgc ->length_agc abyArray -> array Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03staging: vt6656: clean up s_vGetFreeContextMalcolm Priestley
Camel case clean up pDevice -> priv pContext -> context Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03staging: vt6656: s_vGetFreeContext remove pReturnContextMalcolm Priestley
Just return the context from for loop. Return NULL if end reached. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03staging: vt6656: remove void pointer from s_vGetFreeContextMalcolm Priestley
Replace with struct vnt_usb_send_context. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-02Merge v3.13-rc2 into staging-nextGreg Kroah-Hartman
we want these fixes in here. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25staging: vt6656: Remove unused variable bAES.Malcolm Priestley
bAES flips from false to true but doesn't do anything. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25staging: vt6656: Remove unused variable bLongHeaderMalcolm Priestley
Remove dead bLongHeader code. In s_vFillTxKey use ieee80211_has_a4 to detect long headers for future use. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25staging: vt6656: vnt_beacon_buffer attach mac header.Malcolm Priestley
Attach ieee80211_hdr to vnt_beacon_buffer and remove pointer arithmetic. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25staging: vt6656: csBeacon_xmit merge structures.Malcolm Priestley
Merge structures typedef struct tagSTxShortBufHead and the members of struct vnt_tx_datahead_ab to form single structure vnt_tx_short_buf_head. Remove the duplicate members in struct vnt_beacon_buffer already in typedef struct tagSTxShortBufHead. This removes the need for any pointer arithmetic. 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-25staging: vt6656: [BUG] Fix for TX USB resets from vendors driver.Malcolm Priestley
This fixes resets on heavy TX data traffic. 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. original code BBbVT3184Init ... //2007-0725, RobertChang add, Enable Squelch detect reset option(SQ_RST_Opt), USB (register4, bit1) CONTROLnsRequestIn(pDevice, MESSAGE_TYPE_READ, (WORD)0x600+4, // USB's Reg4's bit1 MESSAGE_REQUEST_MEM, 1, (PBYTE) &byData); byData = byData|2 ; CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_WRITE, (WORD)0x600+4, // USB's Reg4's bit1 MESSAGE_REQUEST_MEM, 1, (PBYTE) &byData); return TRUE;//ntStatus; .... A back port patch is needed for kernels less than 3.10. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: stable@vger.kernel.org # v3.10+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25Staging: vt6655-6: potential NULL dereference in hostap_disable_hostapd()Dan Carpenter
We fixed this to use free_netdev() instead of kfree() but unfortunately free_netdev() doesn't accept NULL pointers. Smatch complains about this, it's not something I discovered through testing. Fixes: 3030d40b5036 ('staging: vt6655: use free_netdev instead of kfree') Fixes: 0a438d5b381e ('staging: vt6656: use free_netdev instead of kfree') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19staging: vt6656: removed the trailing statement should be on next line errorNandini Hanumanthagowda
as per linux coding style trailing statments should not be there at the end of line, instead it should be placed in next line. hence removed that error by moving trailing statement to next line Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19staging: vt6656: added space after coma operator in funtion callNandini Hanumanthagowda
as per coding style a space is required after ',' operator in function calls, hence added the missing space after ',' operator in a function call Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19staging: vt6656: removed all whitespace errorsNandini Hanumanthagowda
removed all whitespace errors from the code like no space at the start of line and indent the code wherever possible Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19staging: vt6656: removed parenthesis from return statementNandini Hanumanthagowda
parenthesis is not required in return statement since its not a fucntion, hence remove parentheses to comply with linux coding style Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19staging: vt6656: indented the code under all function blocksNandini Hanumanthagowda
indented the code under all functions to remove unnecessary space at start of a line and indent code wherver possible errors thrown from checkpatch script Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-19staging: vt6656: indented all if-else statement blocksNandini Hanumanthagowda
indented all if-else statement blocks to remove checkpatch warnings and errors like indent code wherever possible and no spaces at the start of line Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>