summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8192u
AgeCommit message (Collapse)Author
2015-08-15staging: rtl8192u: Remove unnecessary externsJoe Perches
Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignments Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-04staging: rtl8192u: r819xU_firmware: fix coding styleKent Gustavsson
Line over 80 characters. This is for Eudyptula Challenge Signed-off-by: Kent Gustavsson <kent@minoris.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31staging: rtl8192u: Fix checkpatch issue with comma in r819xU_firmware.cFreeman Zhang
Add space after ',' to fix the error message provided by checkpatch.pl: ERROR: space required after that ',' Signed-off-by: Freeman Zhang <freeman.zhang1992@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-23staging: rtl8192u: remove unneeded boolLuis de Bethencourt
bool Reval is set to match the value of bHalfWirelessN24GMode just to this. The value can be returned directly. Removing uneeded bool. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Suggested-by: Joe Perches <joe@perches.com> Suggested-by: Franks Klaver <fransklaver@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-23staging: rtl8192u: remove bool comparisonsLuis de Bethencourt
Remove explicit true/false comparisons to bool variables. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-23Staging: rtl8192u: pointer math bug in ieee80211_rx_DELBA()Dan Carpenter
Smatch complains because "delba" is a pointer to struct rtl_80211_hdr_3addr so the "delba += sizeof(struct rtl_80211_hdr_3addr);" is clearly wrong. We are reading nonsense data from beyond the end of the buffer and could oops if that memory isn't mapped. It turns out the next two statements are also wrong. We should delete the += sizeof() statement and "delba+2" should be "&delba->payload[2]". "pReasonCode" isn't used so I deleted that. With-Fix-From: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-15Staging: rtl8192u: Replace memset with eth_zero_addrVaishali Thakkar
Use eth_zero_addr to assign the zero address to the given address array instead of memset when second argument is address of zero. Note that the 6 in the third argument of memset appears to represent an ethernet address size (ETH_ALEN). The Coccinelle semantic patch that makes this change is as follows: // <smpl> @eth_zero_addr@ expression e; @@ -memset(e,0x00,6); +eth_zero_addr(e); // </smpl> Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-15drivers: staging: rtl8192u: Fix "space required after that ','" errorsGreg Donald
Fix checkpatch.pl "space required after that ','" errors Signed-off-by: Greg Donald <gdonald@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18staging: rtl8192u: ieee80211: Fix incorrect type in assignmentGaston Gonzalez
Added le16_to_cpu() conversion fixing the following warning in assignment detected by sparse: drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2157:30: warning: invalid assignment: += drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2157:30: left side has type unsigned long drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2157:30: right side has type restricted __le16 Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-13staging: rtl8192u: Removed redundant bool comparisons in r8192U_dm.cHarisangam Sharvari
This patch was detected with the help of coccinelle tool. The redundant comparisons of bool variables are removed in r8192U_dm.c. Signed-off-by: Harisangam Sharvari <sharisan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-13staging: rtl8192u: ieee80211: Fix sparse endianness warnings ieee80211_softmac.cGaston Gonzalez
Fix the following endinness warnings detected by sparse: drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:669:34: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:669:34: expected restricted __le16 [usertype] duration_id drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:669:34: got int drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:679:33: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:679:33: expected restricted __le16 [usertype] algorithm drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:679:33: got int drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1090:32: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1090:32: expected restricted __le16 [usertype] duration_id drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1090:32: got int drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1109:30: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1109:30: expected restricted __le16 [usertype] listen_interval drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1109:30: got int drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3130:24: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3130:24: expected restricted __le16 [usertype] reason drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3130:24: got unsigned char [unsigned] [usertype] asRsn Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08Staging: rtl8192u: Remove two useless lines at ieee80211_wep_nullPedro Marzo Perez
Remove two lines at ieee80211_wep_null which checkpatch.pl reported as errors. The first one because it has a C99 comment style and the second one because it is a void return which is useless. The function ieee80211_wep_null cannot be completely removed because it is exported and used to autoload the module. Signed-off-by: Pedro Marzo Perez <marzo.pedro@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08Staging: rtl8192u: Simplify error check code at prism2_wep_initPedro Marzo Perez
Simplify prism2_wep_init error check code employing goto when a failure is detected. Removed pr_debug which was given a checkpatch.pl error because of literal string splitted across two lines of code, it was seldom going to be printed anyway. Signed-off-by: Pedro Marzo Perez <marzo.pedro@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08staging: rtl8192u: ieee80211: Fix sparse endianness warningsGaston Gonzalez
Fix the following sparse warnings: drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: expected restricted __le16 [usertype] frame_ctl drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: got int drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: warning: invalid assignment: |= drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: left side has type restricted __le16 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: right side has type int Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08staging: rtl8192u/ieee80211/ieee80211_softmac.c: auth parse error code byte ↵Tolga Ceylan
order fix auth_parse() return result is in incorrect le16 byte order. Currently this still works since the user code merely checks if error code is equal to 0. However debug statement in ieee80211_check_auth_response() prints the error code in the incorrect le16 byte order. This fix corrects the byte order as cpu order. Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08staging: rtl8192u: r819xU_firmware.h: fix line over 80 charactersBuţiu Alexandru Octavian
Fixed coding style issue line "over 80 characters" detected by checkpatch.pl in r819xU_firmware.h Signed-off-by: Buţiu Alexandru Octavian <predator5047@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08staging: drivers: rtl8192u: r819xU_firmware.h: removed commented macroBuţiu Alexandru Octavian
Removed commented macro that was no longer needed Signed-off-by: Buţiu Alexandru Octavian <predator5047@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08staging: rtl8192u: Fix indentation issueChaitanya Dhere
This change was detected with help of checkpatch.pl script. Signed-off-by: Chaitanya Dhere <cvijaydh@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08staging: rtl8192u: Patch to modify if, else conditionsChaitanya Dhere
In this patch, the if, else conditions are modified to remove the unnecessary equality checks. This change was detected with help of coccinelle tool. Signed-off-by: Chaitanya Dhere <cvijaydh@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31Staging: rtl8192u: Correct include indentation and openning braces at new linePedro Marzo Perez
Opening braces should never be in a new line. Correct include indentation. Signed-off-by: Pedro Marzo Perez <marzo.pedro@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08staging: rtl8192u: don't redefine container_of()Marti Bolivar
This file already includes <linux/kernel.h>. Signed-off-by: Marti Bolivar <mbolivarmullen@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08rtl8192u: delete another embedded instance of generic reason codesPaul Gortmaker
We have global copies of all these reason codes. We don't need local copies. Worse is that these seem totally unused; a grep for some of the fields comes up empty, and it still compiles after its complete removal. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08rtl8192u: don't duplicate ieee80211 constants for status/auth/reasonPaul Gortmaker
These are all defined as a part of the standard and should not be duplicated on a per-driver basis. Use the global ones and delete the local ones. In switching to <linux/ieee80211.h> we have to delete a local copy of an identical struct that we prepped earlier to have identical field names, and we add explicit include <...> where needed in order to preserve getting a successful compile. This isn't the totality of duplicated data removed, but it is a start. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08rtl8192u: align local ieee80211_wmm_ac_param struct fields with globalPaul Gortmaker
The <linux/ieee80211.h> and this local file both have a struct of the same name. They also have the same field sizes and generally the same fields, as can be seen here: ~/git/linux-head$ git grep -A4 'struct ieee80211_wmm_ac_param {' drivers/staging/rtl8192u/ieee80211/ieee80211.h:struct ieee80211_wmm_ac_param { drivers/staging/rtl8192u/ieee80211/ieee80211.h- u8 ac_aci_acm_aifsn; drivers/staging/rtl8192u/ieee80211/ieee80211.h- u8 ac_ecwmin_ecwmax; drivers/staging/rtl8192u/ieee80211/ieee80211.h- u16 ac_txop_limit; drivers/staging/rtl8192u/ieee80211/ieee80211.h-}; -- include/linux/ieee80211.h:struct ieee80211_wmm_ac_param { include/linux/ieee80211.h- u8 aci_aifsn; /* AIFSN, ACM, ACI */ include/linux/ieee80211.h- u8 cw; /* ECWmin, ECWmax (CW = 2^ECW - 1) */ include/linux/ieee80211.h- __le16 txop_limit; include/linux/ieee80211.h-} __packed; ~/git/linux-head$ Here we just align the local field names with the main system one. Then we can add an include of the system one and delete the local copy in one smooth step in a follow-on commit. Not that the replacement: for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_aci_acm_aifsn/aci_aifsn/g' $i ; done for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_ecwmin_ecwmax/cw/g' $i ; done for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_txop_limit/txop_limit/g' $i ; done implicitly shows that only one of the three fields is currently used. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08rtl8192u: promote auth_mode to a full 8 bitsPaul Gortmaker
Currently LEAP is defined to two locally but the identically named global constant is 128 in <linux/ieee80211.h>. In order for us to switch over to using the global value, we need to adjust the local storage which is currently not enough to hold the larger value. This is now consistent with the similar struct used in drivers/net/wireless/ipw2x00/libipw.h and other drivers. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08rtl8192u: don't trample on <linux/ieee80211.h> struct namespacePaul Gortmaker
In order to start reducing the duplicated code/constants/macros in this driver, we need to include <linux/ieee80211.h> to provide the defacto versions. However this driver has structs with the same name as the ones in the main include, so namespace collision prevents us from doing step #1. Since the structs actually differ in their respective fields, we can't simply delete the local ones without impacting the runtime; a conversion to use the global ones can be considered at a later date if desired. Rename the ones here with a vendor specific prefix so that we won't have the namespace collision, and hence can continue on with the cleanup. Automated conversion done with: for i in `find . -name '*.[ch]'` ; do \ sed -i 's/struct ieee80211_hdr/struct rtl_80211_hdr/g' $i ; \ done Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08staging: rtl8192u: Make core functions staticNickolaus Woodruff
This patch fixes the following sparse warnings in r8192U_core.c: CHECK drivers/staging/rtl8192u/r8192U_core.c drivers/staging/rtl8192u/r8192U_core.c:3212:6: warning: symbol 'rtl819x_watchdog_wqcallback' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3276:6: warning: symbol 'watch_dog_timer_callback' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3282:5: warning: symbol '_rtl8192_up' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3333:5: warning: symbol 'rtl8192_close' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3406:6: warning: symbol 'rtl8192_restart' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:4618:6: warning: symbol 'rtl8192_irq_rx_tasklet' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:4736:6: warning: symbol 'rtl8192_cancel_deferred_work' was not declared. Should it be static? Signed-off-by: Nickolaus Woodruff <nickolauswoodruff@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08Staging: fixed multiple spelling errors.Carlos E. Garcia
Fixed multiple spelling errors. Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03Staging: rtl8192u: use correct array for debug outputDan Carpenter
This is supposed to be ->rates_ex[] instead of ->rates[]. I found this because static checkers complain than ->rates is too small so we're reading beyond the end of the array. It has 12 elements instead of 15. This bug was apparently copy and pasted from ipw2x00. I fixed it before in that driver 428e3cf5f98c ('ipw2x00: printing the wrong array in debug code') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26Staging: rtl8192 Clean up function definitionEddie Kovsky
Change function definition to match its prototype declaration. This fixes the following warning generated by sparse: drivers/staging/rtl8192u/r8192U_core.c:1970:6: warning: symbol 'rtl8192_update_ratr_table' was not declared. Should it be static? Signed-off-by: Eddie Kovsky <ewk@edkovsky.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26staging: rtl8192u: Fix static decleration sparse warning.Cihangir Akturk
The function 'ieee80211_check_auth_response' is used only in this file, so make it static. This patch fixes the following sparse warning. 'ieee80211_check_auth_response' was not declared. Should it be static? Signed-off-by: Cihangir Akturk <cakturk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26Staging: rtl8192u: Fix space issues before '(' and after ')'Haneen Mohammed
Space is required before the open and after the close parenthesis. This patch adds space after 'if' and before '{'. This was done with the help of the following Coccinelle script: @r@ expression E; position p1,p2,p3; @@ if@p1 (E) @p3{@p2 ... } @script:python@ p1 << r.p1; p2 << r.p2; p3 << r.p3; @@ l1 = int (p1[0].line) l2 = int (p2[0].line) l3 = int (p3[0].line) c1 = int (p1[0].column_end) c2 = int (p2[0].column) c3 = int (p3[0].column) if (l1 != l2): cocci.include_match(False) if (l2 == l3 and c3 + 2 == c2): cocci.include_match(False) @@ position r.p1,r.p2,r.p3; expression r.E; @@ -if@p1 (E) @p3{@p2 +if (E) { ... } Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26Staging: rtl8192u: Add space before open parenthesisHaneen Mohammed
Space is required before the open parenthesis. This patch adds space after if to address that issue. This was done with the help of the following Coccinelle script: @r@ position p1,p2; @@ if@p1 (@p2 ...) { ... } @script:python@ p1 << r.p1; p2 << r.p2; @@ l1 = int (p1[0].line) l2 = int (p2[0].line) c1 = int (p1[0].column) c2 = int (p2[0].column) if (l2 == l1 and c1 + 2 != c2): cocci.include_match(False) @@ position r.p1,r.p2; @@ - if@p1 ( + if ( ...) { ... } Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23Staging: rtl8192u: Remove function prototype from .c fileCristina Opriceana
Remove function prototype from r8192U_core.c since it is declared in the r8192U.h header and this is included in r8192U_core.c Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23Staging: rtl8192u: Make function prototypes staticCristina Opriceana
Make functions static since they are used locally and no other files refer them. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20Staging: rtl8192u: Remove unnecessary spacesHatice ERTÜRK
Fix checkpatch.pl issues with "unnecessary whitespace before a quoted newline" in r819xU_phy.c Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18Staging: rtl8192u: Rename struct to avoid CamelCaseCristina Opriceana
This patch renames struct DRxPathSel to dynamic_rx_path_sel in order to keep the notations consistent and to remove the warning: "CHECK: Avoid CamelCase". Done with coccinelle: @@ @@ struct -DRxPathSel +dynamic_rx_path_sel {...} @@ @@ struct -DRxPathSel +dynamic_rx_path_sel Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18Staging: rtl8192u: Do not add new typedefsCristina Opriceana
This patch removes the dig_t and DRxPathSel type definitions in order to avoid the following warning: "WARNING: Do not add new typedefs". Done with coccinelle and this script: @r@ type t; identifier id; @@ typedef struct id {...} t; @script:python get_name@ t << r.t; tdres; @@ coccinelle.tdres = t.replace("_t", ""); @r_match@ type r.t; identifier r.id; identifier get_name.tdres; @@ -typedef struct -id +tdres {...} -t ; @r_replace@ type r.t; identifier get_name.tdres; @@ -t +struct tdres Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: rtl8192u: Simplify if conditionKsenija Stanojevic
This patch removes macro true from if condition since variable priv->ieee80211->LinkDetectInfo.bBusyTraffic is already of type bool. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16staging: rtl8192u: remove return from end of void functionSupriya Karanth
This patch removes the return statement at the end of a void function as it is not necessary. found by checkpatch.pl: WARNING: void function return statements are not generally useful changes made using coccinelle script: @@ @@ ... when != if (...) return; when != if (...) { ... return;} -return; Signed-off-by: Supriya Karanth <iskaranth@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: rtl8192u: Remove parentheses around right side an assignmentHaneen Mohammed
Parentheses are not needed around the right hand side of an assignment. This patch remove parenthese of such occurenses. Issue was detected and solved using the following coccinelle script: @rule1@ identifier x, y, z; expression E1, E2; @@ ( x = (y == z); | x = (E1 == E2); | x = -( ... -) ; ) Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: rtl8192u: Bool tests don't need comparisonsCristina Opriceana
This patch removes explicit true/false comparations to bool variables. Warning found by coccinelle: "WARNING: Comparison to bool" Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16staging: rtl8192u: remove break after returnSupriya Karanth
Remove "break" statement after a "return" statement as it does not get executed. Found by checkpatch.pl - break is not useful after a goto or return Signed-off-by: Supriya Karanth <iskaranth@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: rtl8192u: Remove unnecessary struct and typedefCristina Opriceana
This patch removes the _bss_ht struct and the associated type definition because it is not used and it also introduces the warning: "WARNING: do not add new typedefs". Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: rtl8192u: Remove unnecessary variableCristina Opriceana
This patch detects the cases in which a variable is not modified through the code and it is used as a return value. The variable is detected and removed by coccinelle using the following semantic patch: @@ type T; expression expr; identifier r; constant c; @@ -T r = expr; ... when != r when strict -return r; +return expr; Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: rtl8192u: Combine initialization using setup_timerSomya Anand
The function setup_timer combines the initialization of a timer with the initialization of the timer's function and data fields. So, this patch combines the multiline code for timer initialization using the function setup_timer. This issue is identified via coccinelle script. @@ expression E1, E2, E3; type T; @@ - init_timer(&E1); ... ( - E1.function = E2; ... - E1.data = (T)E3; + setup_timer(&E1, E2, (T)E3); | - E1.data = (T)E3; ... - E1.function = E2; + setup_timer(&E1, E2, (T)E3); | - E1.function = E2; + setup_timer(&E1, E2, 0); ) Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: rtl8192u: Review phrase and fix spelling errorsCristina Opriceana
This patch removes some serious spelling errors and adds small improvements to the phrases in order to make them easier to understand. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: rtl8192u: Fix do not use // c99 comments.Dilek Uzulmez
This patch fixes checkpatch.pl issues with "do not use // C99 comments" errors in ieee80211_rx.c Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: rtl8192u: Added #include <linux/uaccess.h> instead of <asm/uaccess.h>Dilek Uzulmez
The following patch fixes the checkpatch.pl warning: WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h> Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: rtl8192u: Convert use of __constant_<foo> to <foo>Vaishali Thakkar
Using functions of the form __constant_<foo> isn't preferred outside of include/uapi/ as using the function without __constant_ is identical when the argument is a constant. So, this patch replaces __constant_htons with htons. This is done using Coccinelle and semantic patch used for this is as follows: @@identifier x;@@ ( - __constant_htons(x) + htons(x) | - __constant_htonl(x) + htonl(x) | - __constant_ntohs(x) + htons(x) | - __constant_ntohl(x) + htonl(x) ) Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>