aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/vt6656/wpactl.c
AgeCommit message (Collapse)Author
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-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-03-11staging: vt6656: replaced custom BYTE definition with u8Andres More
Checkpatch findings were not resolved, only direct replacement. sed -i 's/\bBYTE\b/u8/g' drivers/staging/vt6656/*.[ch] sed -i 's/\bPBYTE\b/u8 */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-07staging: vt6656: channel/control/firmware/int/usbpipe to new structuresMalcolm Priestley
This patch cleans up function declarations, definitions and local variables where 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-07staging: vt6656: Remove QWORD from source and replace with u64.Malcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: vt6656: wpa_set_keys remove fcpfkernelMalcolm Priestley
Only TRUE is ever called, remove FALSE code. Since copy_from_user has been removed, the unlock..lock spin locks have been removed. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: vt6656: dead code removal : wpactl.c/hMalcolm Priestley
Relates to redundant viawget, a proprietary version of wpa supplicant. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging "vt6656" Fix typos in comments, and in a printk message.Justin P. Mattock
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging, vt6656/wpactl.c: Fix mem leak in wpa_ioctl()Jesper Juhl
If we hit the default case in the switch statement in wpa_ioctl() we'll leak the memory allocated to 'param' when the variable goes out of scope without having been assigned to anything. This patch fixes the leak by kfree()'ing the memory before we return from the function. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging, vt6656/wpactl.c: A basic style cleanupJesper Juhl
This patch cleans up the coding style in drivers/staging/vt6656/wpactl.c to closer match the generally accepted kernel CodingStyle. It is by no means a "make it perfect" patch, but it does get the file a fair bit closer to matching the accepted style (whomever was involved in the evolution of this file seriously need to configure their editors to maintain a consistent style - it was a mess). Besides pure style cleanups I also took the liberty of removing some pointless parens, some unneeded casts and removing some commented out code (it was obviously not used and git has it if it's ever needed in the future). Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-09-29Staging: vt6656: potential memory corruptionDan Carpenter
param->u.wpa_key.key_len comes from the user. If it's too large we would write past the end of the array. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25staging: Remove unnecessary semicolons when switch (foo) {...};Joe Perches
Done via perl script: $ cat remove_semi_switch.pl my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/; my $match_balanced_braces = qr/(\{(?:[^\{\}]++|(?-1))*\})/; foreach my $file (@ARGV) { my $f; my $text; my $oldtext; next if ((-d $file)); open($f, '<', $file) or die "$P: Can't open $file for read\n"; $oldtext = do { local($/) ; <$f> }; close($f); next if ($oldtext eq ""); $text = $oldtext; my $count = 0; do { $count = 0; $count += $text =~ s@\b(switch\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx; } while ($count > 0); if ($text ne $oldtext) { my $newfile = $file; open($f, '>', $newfile) or die "$P: Can't open $newfile for write\n"; print $f $text; close($f); } } $ Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25staging: Remove unnecessary semicolons when for (foo) {...};Joe Perches
Done via perl script: $ cat remove_semi_for.pl my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/; my $match_balanced_braces = qr/(\{(?:[^\{\}]++|(?-1))*\})/; foreach my $file (@ARGV) { my $f; my $text; my $oldtext; next if ((-d $file)); open($f, '<', $file) or die "$P: Can't open $file for read\n"; $oldtext = do { local($/) ; <$f> }; close($f); next if ($oldtext eq ""); $text = $oldtext; my $count = 0; do { $count = 0; $count += $text =~ s@\b(for\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx; } while ($count > 0); if ($text ne $oldtext) { my $newfile = $file; open($f, '>', $newfile) or die "$P: Can't open $newfile for write\n"; print $f $text; close($f); } } $ Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25staging: Remove unnecessary semicolons when if (foo) {...};Joe Perches
Done via perl script: $ cat remove_semi_if.pl my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/; my $match_balanced_braces = qr/(\{(?:[^\{\}]++|(?-1))*\})/; foreach my $file (@ARGV) { my $f; my $text; my $oldtext; next if ((-d $file)); open($f, '<', $file) or die "$P: Can't open $file for read\n"; $oldtext = do { local($/) ; <$f> }; close($f); next if ($oldtext eq ""); $text = $oldtext; my $count = 0; do { $count = 0; $count += $text =~ s@\b(if\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx; } while ($count > 0); if ($text ne $oldtext) { my $newfile = $file; open($f, '>', $newfile) or die "$P: Can't open $newfile for write\n"; print $f $text; close($f); } } $ Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14staging: vt6656: Remove NULL check before kfreeIlia Mirkin
This patch was generated by the following semantic patch: // <smpl> @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // </smpl> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31staging: vt6656: removed not useful commentsAndres More
Removed comments about who changed/added lines, they do not seem useful. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-24staging: vt6656: replace IS_ETH_ADDRESS_EQUAL with compare_ether_addrAndres More
Code cleanup, removed custom macro to compare Ethernet addresses. Some checkpatch warnings on indentation were not resolved. The return value of compare_ether_addr was reversed, something to consider. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-23Staging: vt6656: replaced IS_BROADCAST_ADDRESS with is_broadcast_ether_addrAndres More
Replaced and removed the custom definition. Minor checkpatch warnings on long lines and indentation were not cleared. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18Staging: vt6656: code cleanup, fixed 'for' statementsAndres More
Resolved checkpatch findings, but some long lines warnings. ERROR: space required before the open parenthesis '(' ERROR: spaces required around that Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-14Staging: Use kcalloc or kzallocJulia Lawall
Use kcalloc or kzalloc rather than the combination of kmalloc and memset. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,y,flags; statement S; type T; @@ x = - kmalloc + kcalloc ( - y * sizeof(T), + y, sizeof(T), flags); if (x == NULL) S -memset(x, 0, y * sizeof(T)); @@ expression x,size,flags; statement S; @@ -x = kmalloc(size,flags); +x = kzalloc(size,flags); if (x == NULL) S -memset(x, 0, size); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk>
2010-05-11Staging: Drop memory allocation castJulia Lawall
Drop cast on the result of kmalloc and similar functions. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; @@ - (T *) (\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...)) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11staging: vt6656: code cleanup, removed HANDLE definition in ttype.hAndres More
Checkpatch warnings about using externs in .c files were not resolved, neither some long lines on deeply nested code. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: vt6656: incorporated ETH_ALEN macro instead of custom oneAndres More
Replaced custom U_ETHER_ADDR_LEN by ETH_ALEN from <linux/if_ether.h>. Resolved checkpatch findings on the changed lines, mostly indentation. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: vt665x: Clean up include files, Part 1Jim Lieb
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-15Staging: vt6656: Replace net_device->priv accesses with netdev_priv calls.Forest Bond
vt6656: Replace net_device->priv accesses with netdev_priv calls. Signed-off-by: Forest Bond <forest@alittletooquiet.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: Add pristine upstream vt6656 driver sources to drivers/staging/vt6656.Forest Bond
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>