summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u/r819xU_cmdpkt.c
AgeCommit message (Collapse)Author
2014-05-26drivers/staging: Remove useless return variablesPeter Senna Tschudin
This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // <smpl> @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret when strict return - ret + C ; // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19staging: rtl8192u: make in r819xU_cmdpkt.c some local functions staticAna Rey
Make some local functions static. Fix sparse warnings in r819xU_cmdpkt.c drivers/staging/rtl8192u/r819xU_cmdpkt.c:185:6: warning: symbol 'cmdpkt_beacontimerinterrupt_819xusb' was not declared. Should it be static? Signed-off-by: Ana Rey <anarey@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16Staging: rtl8192u: fix functions that should not be declared externTeodora Baluta
These functions are already marked extern in the header file drivers/staging/rtl8192u/r819xU_phy.c:1716:13: warning: function 'InitialGainOperateWorkItemCallBack' with external linkage has definition drivers/staging/rtl8192u/r819xU_cmdpkt.c:497:12: warning: function 'cmpk_message_handle_rx' with external linkage has definition Signed-off-by: Teodora Baluta <teobaluta@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-29Merge 3.12-rc3 into staging-nextGreg Kroah-Hartman
We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25Staging: rtl8192u: r819xU_cmdpkt: checking NULL value after doing dev_alloc_skbIker Pedrosa
Checking the return of dev_alloc_skb as stated in the following bug: https://bugzilla.kernel.org/show_bug.cgi?id=60411 Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com> Reported-by: RUC_Soft_Sec rucsoftsec@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25staging: rtl8192u: remove cmpk_message_handle_tx()Xenia Ragiadakou
The function cmpk_message_handle_tx() is called only in r8192U_dm.c in two places. The first call resides outside an #ifdef RTL8192U guard, and since RTL8192U is defined this call can be removed. At the other site this function is called, there is no check on its return value. Since cmpk_message_handle_tx() does not do anything else other than returning true, it can be safely removed. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25staging: rtl8192u: remove unused code from cmpk_message_handle_tx()Xenia Ragiadakou
The file r819xU_cmdpkt.c includes header r8192U.h which defines RTL8192U. This patch removes from cmpk_message_handle_tx() the part of the code that is never used because it resides outside the header guard #ifdef RTL8192U. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: rtl8192u: remove unused macros r819xU_cmdpkt.cXenia Ragiadakou
This patch removes CMPK_DEBOUNCE_CNT and CMPK_PRINT() because they are not used anywhere in the driver. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: rtl8192u: fix line size and identation in r819xU_cmdpkt.cXenia Ragiadakou
This patch limits the line size below 80 characters, when possible, and fixes identation to meet kernel coding style convetions. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: rtl8192u: remove unnecessary line continuations in r819xU_cmdpkt.cXenia Ragiadakou
This patch fixes the following checkpatch warning: WARNING: Avoid unnecessary line continuations Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: rtl8192u: fix comments in r819xU_cmdpkt.cXenia Ragiadakou
This patches fixes comments by: - replacing // comments with /**/ comments - removing unnecessary comments (trailing comments with the function name, comments stating date/author when they are placed inside the function definition) - fixing internal alignment Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: rtl8192u: fix whitespace in r819xU_cmdpkt.cXenia Ragiadakou
This patch fixes whitespaces in r819xU_cmdpkt.c to follow the kernel coding style and to improve code readability. It fixes the spaces around <,=||&&();} and adds or removes tabs to better align variables. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: rtl8192u: fix braces in r819xU_cmdpkt.cXenia Ragiadakou
This patch fixes the brace position according to the linux kernel coding style and removes unnecessary braces. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: rtl8192u: remove commented-out code in r819xU_cmdpkt.cXenia Ragiadakou
This patch removes commented-out code and the comments that refer to it to facilitate code review. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-06Staging: rtl8192u: fix a reversed testDan Carpenter
Sean MacLennan fixed this in the rtl8192e driver and we should fix it here as well. It's pretty harmless. This information comes from the firmware, if we were to hit this bug we would read beyond the end of the array once or twice before returning and update our statistics with bogus data. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16rtl8192u: fix whitespace around if statements in r819xU_cmdpkt.cXenia Ragiadakou
This patch fixes a part of the following checkpatch error: ERROR: space required before the open parenthesis '(' by adding space after if Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13STAGING: rtl8192u: fix checkpatch error by adding space after switchXenia Ragiadakou
This patch fixes the following checkpatch error: ERROR: space required before the open parenthesis '(' Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13STAGING: rtl8192u: fix checkpatch error about pointer position in r819xU_cmdpktXenia Ragiadakou
This patch fixes the pointer position in r819xU_cmdpkt.h and r819xU_cmdpkt.c to meet the kernel coding style conventions. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging/rtl8192u: cleanfile runSebastian Hahn
Run cleanfile on all files inside drivers/staging/rtl819u Signed-off-by: Sebastian Hahn <snsehahn@cip.cs.fau.de> Signed-off-by: Jennifer Naumann <Jennifer.Naumann@informatik.stud.uni-erlangen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01staging:rtl8192u Fix typos and commentsJustin P. Mattock
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-30staging: rtl8192u Fix typos.Justin P. Mattock
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18Staging: rtl8192u: fix some memory corruptionDan Carpenter
When we received a command we incremented a stat counter depending on the type of message. The problem is there were 8 types of commands but there were only 4 counters allocated so it corrupted memory past the end of the rxcmdpkt[] array. The fix is just to remove the counters because they aren't used. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> ACKed-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2010-05-11Staging: drop redundant memsetJulia Lawall
The region set by the call to memset is immediately overwritten by the subsequent call to memcpy. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e1,e2,e3,e4; @@ - memset(e1,e2,e3); memcpy(e1,e4,e3); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: rtl8192u: remove dead codeMauro Carvalho Chehab
Remove #ifse against older kernel versions; Remove codes marked with #if 0; Remove #if 1 Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: rtl8192u: remove bad whitespacesMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: Added Realtek rtl8192u driver to stagingJerry Chuang
Add Realtek linux driver for rtl8192u as provided by Realtek rtl8192u_linux_2.6.0006.1031.2008.tar.gz, send to me C/C staging ML. This version won't compile against upstream, doesn't follow Linux CodingStyle and has their own ieee80211 stack. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>