aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/vt6655/ioctl.c
AgeCommit message (Collapse)Author
2013-09-03staging: vt6655: inherit addr_assign_type along with dev_addrBjørn Mork
A device inheriting a random or set address should reflect this in its addr_assign_type. Cc: Forest Bond <forest@alittletooquiet.net> Signed-off-by: Bjørn Mork <bjorn@mork.no> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-24staging: vt6655: info leak in ioctlDan Carpenter
The SCmdLinkStatus struct has a couple holes. There is one between ->bLink and ->wBSSType, and another between ->abySSID and ->uChannel. I've added a memset() to initialize the struct to zero. Since we don't need to clear abySSID any more so I've removed that memset. It was wrong anyway: abySSID has "SSID_MAXLEN + 2" (34) bytes, not "WLAN_SSID_MAXLEN + 1" (33). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-18staging:vt6655:ioctl: Whitespace cleanupsJoe Perches
Neatening only. git diff -w shows no differences. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging: "vt6655" Fix typos in comments.Justin P. Mattock
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13staging: vt6655: print small buffers with %*phAndy Shevchenko
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Forest Bond <forest@alittletooquiet.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09Staging: vt6655: Fix brace coding style issues in ioctl.cmahendra singh meena
This patch fixes up unnecessary brace warnings found in ioctl.c by checkpatch.pl . Signed-off-by: Mahendra Singh Meena <mahendra.devel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-11-30staging: vt6655: integer overflows in private_ioctl()Xi Wang
There are two potential integer overflows in private_ioctl() if userspace passes in a large sList.uItem / sNodeList.uItem. The subsequent call to kmalloc() would allocate a small buffer, leading to a memory corruption. Reported-by: Dan Rosenberg <drosenberg@vsecurity.com> Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23Staging: vt6655: add some range checks before memcpy()Dan Carpenter
There were no range checks in the original code so the user could 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-10-23Staging: vt6655: whitespace fixes to iotcl.cDan Carpenter
The indents didn't line up at all in the original code. I also fixed a bunch of other white issues as I went along. I changed the comment style and removed some commented out code. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26Staging: vt6655-6: potential info leak in private_ioctl()Dan Carpenter
Smatch has a new check for Rosenberg type information leaks where structs are copied to the user with uninitialized stack data in them. In this path, the .uLinkRate member doesn't get initialized so I've set it to zero. 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 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>
2010-08-02Staging: vt6655: replace FALSE with in kernel falseCharles Clément
Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02Staging: vt6655: replace TRUE with in kernel trueCharles Clément
Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-24Staging: vt6655: remove BYTE typedefCharles Clément
Replace all occurrences with unsigned char type. Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-24Staging: vt6655: remove WORD typedefCharles Clément
Replace all occurrences with unsigned short type. Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-24Staging: vt6655: remove DWORD typedefCharles Clément
Replace all occurrences with unsigned long type, except for pointer fields that should be u32 in packed structures and 8-byte-aligned 8 byte long structure QWORD. Thanks to Jiri Slaby for pointing out that simply replacing by unsigned long is wrong on x86-64 arch. Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18Staging: vt6655: remove PDWORD typedefCharles Clément
Use unsigned long * instead. Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18Staging: vt6655: remove PBYTE typedefCharles Clément
Use unsigned char * instead. Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18Staging: vt6655: remove custom ULONG typedefCharles Clément
Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18Staging: vt6655: remove custom UINT typedefCharles Clément
Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18Staging: vt6655: remove custom LONG typedefCharles Clément
Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-17Staging: vt6655: use ETH_ALEN macro instead of custom oneCharles Clément
Replaced custom ethernet address length definition U_ETHER_ADDR_LEN by ETH_ALEN from <linux/if_ether.h>. Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-14Staging: vt6655: remove IN definitionCharles Clément
Remove empty IN definition used to specify input parameters. Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-14Staging: vt6655: remove HANDLE definition and useCharles Clément
Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: vt6655: remove VOID definition and useCharles Clément
Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: vt6655: Rename hostap_set_hostapd, hostap_iotctl.Forest Bond
The functions hostap_set_hostapd, hostap_iotctl clashed with functions of the same name with CONFIG_HOSTAP=y and/or CONFIG_VT6656=y. Signed-off-by: Forest Bond <forest@alittletooquiet.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: vt6655: fix brace coding style issue in ioctl.cNg Kian Yong
This is a patch to the ioctl.c file that fixes up a brace warning found by the checkpatch.pl tool Signed-off-by: Ng Kian Yong <ngky@comp.nus.edu.sg> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: fix assorted typos all over the placeAndré Goddard Rosa
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: vt665x: Remove umem.h Part 1Jim Lieb
Remove references to umem.h macros and refer directly to memcpy functions. Delete the include file. Signed-off-by: Jim Lieb <lieb@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: vt665x: Clean up include files, Part 2Jim 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: vt665x: Text janitor in prep for driver merge, part 2Jim Lieb
Text only changes to remove textual differences between the vt6655 and vt6656 trees in prep for driver merge. Signed-off-by: Jim Lieb <lieb@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: vt6655 textual cleanup in prep for driver mergeJim Lieb
The vt6655 and vt6656 drivers are from a common origin but have drifted apart with minor textual differences. There are two changes: s/DEVICE_PRT/DBG_PRT/g and s/byPktTyp/byPktType/g This significantly reduces the differences between the two file sets in preparation to merging the common code. A few whitespace and text bits were also adjusted. Signed-off-by: Jim Lieb <lieb@canonical.com> Cc: Forest Bond <forest@alittletooquiet.net> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: Add pristine upstream vt6655 driver sourcesForest Bond
Add pristine upstream vt6655 driver sources to drivers/staging/vt6655. These files were literally copied from the driver directory in the upstream source archive, available here: http://www.viaarena.com/Driver/vt6655_linux_src_v1.19.12_x86.zip Signed-off-by: Forest Bond <forest@alittletooquiet.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>