summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u/r8192U_wx.c
AgeCommit message (Collapse)AuthorFilesLines
2021-03-26r8192U_wx.c: style: avoid multiple blank linesBruno Raoult1-1/+0
fix checkpatch.pl check: CHECK: Please don't use multiple blank lines in drivers/staging/rtl8192u/r8192U_wx.c Signed-off-by: Bruno Raoult <braoult@gmail.com> Link: https://lore.kernel.org/r/2c1f2c668d299ce1895ce97dc7fb9a67d3723e63.1616748922.git.braoult@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-26r8192U_wx.c: style: Unnecessary parenthesesBruno Raoult1-1/+1
fix checkpatch.pl check: CHECK: Unnecessary parentheses around expr in drivers/staging/rtl8192u/r8192U_wx.c Signed-off-by: Bruno Raoult <braoult@gmail.com> Link: https://lore.kernel.org/r/f42993e183e1127dcc9fce3f0ed42dd6d795c647.1616748922.git.braoult@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-26r8192U_wx.c: style: braces all arms of statementBruno Raoult1-2/+2
fix checkpatch.pl check: CHECK: braces {} should be used on all arms of this statement in drivers/staging/rtl8192u/r8192U_wx.c Signed-off-by: Bruno Raoult <braoult@gmail.com> Link: https://lore.kernel.org/r/adbbb5243dca7998a31a786eef277bd85068c63a.1616748922.git.braoult@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-26r8192U_wx.c: style: spaces preferred around operatorsBruno Raoult1-4/+4
fix checkpatch.pl check: CHECK: spaces required around that <op> in drivers/staging/rtl8192u/r8192U_wx.c Signed-off-by: Bruno Raoult <braoult@gmail.com> Link: https://lore.kernel.org/r/e7298c14538ad7a58720585d019a70f637e0cdb1.1616748922.git.braoult@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-26r8192U_wx.c: style: alignment with open parenthesisBruno Raoult1-62/+62
fix checkpatch.pl check: CHECK: Alignment should match open parenthesis in drivers/staging/rtl8192u/r8192U_wx.c Signed-off-by: Bruno Raoult <braoult@gmail.com> Link: https://lore.kernel.org/r/34f4134241f49d1694cbfb9c2185e3ef54284680.1616748922.git.braoult@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-18Staging: rtl8192u: fixed a whitespace coding style issuezhaoxiao1-4/+0
Removed additional whitespaces in the r8192U_wx.c file. Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com> Link: https://lore.kernel.org/r/20210317033219.621-1-zhaoxiao@uniontech.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-16staging: rtl8192u: fixed no space coding style issue.zhaoxiao1-7/+7
Added space around the binary operator for readability in r8192U_wx.c file Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com> Link: https://lore.kernel.org/r/20210315061202.10219-1-zhaoxiao@uniontech.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-15Merge 5.12-rc3 into staging-nextGreg Kroah-Hartman1-2/+4
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rt8192u: Move constant in comparison to the RHSSimone Serra1-1/+1
Fixes checkpatch warning: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Simone Serra <serrazimone@gmail.com> Link: https://lore.kernel.org/r/20210223234102.15784-1-serrazimone@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192u: fix ->ssid overflow in r8192_wx_set_scan()Dan Carpenter1-2/+4
We need to cap len at IW_ESSID_MAX_SIZE (32) to avoid memory corruption. This can be controlled by the user via the ioctl. Fixes: 5f53d8ca3d5d ("Staging: add rtl8192SU wireless usb driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/YEHoAWMOSZBUw91F@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-22staging: rtl8192u: clean up comparsions to NULLMichael Straube1-3/+3
Clean up comparsions to NULL reported by checkpatch. if (x == NULL) -> if (!x) if (x != NULL) -> if (x) Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200919150823.16923-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-22staging: rtl8192u: correct placement of else ifMichael Straube1-3/+1
Move 'else if' to the same line as the closing brace of the corresponding 'if' to follow kernel coding style. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200919150823.16923-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-22staging: rtl8192u: clean up blank line style issuesMichael Straube1-29/+2
Add missing and remove unnecessary blank lines to clear checkpatch issues. CHECK: Please use a blank line after function/struct/union/enum declarations CHECK: Blank lines aren't necessary before a close brace '}' CHECK: Please don't use multiple blank lines CHECK: Blank lines aren't necessary after an open brace '{' Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200919150823.16923-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-18staging: rtl8192u: r8192U_wx: use netdev_warn() instead of printk()Lourdes Pedrajas1-1/+1
printk() is deprecated, use netdev_warn() instead, which is a message printing function specific for network devices. Issue found by checkpatch. Suggested-by: Julia Lawall <julia.lawall@inria.fr> Suggested-by: Stefano Brivio <sbrivio@redhat.com> Signed-off-by: Lourdes Pedrajas <lu@pplo.net> Link: https://lore.kernel.org/r/20200317165917.6260-1-lu@pplo.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-10staging: rtl8192u: remove header include path to ieee80211/Masahiro Yamada1-1/+1
There is no need to add "ccflags-y += -I $(srctree)/$(src)/ieee80211" just for including "dot11d.h". Use the correct relative path for the #include "..." directive. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Link: https://lore.kernel.org/r/20200104162136.19170-2-masahiroy@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: rtl8192u: add proper SPDX identifiers on files that did not have them.Greg Kroah-Hartman1-1/+1
There were a few files for the rtl8192u driver that did not have SPDX identifiers on them, so fix that up. At the same time, remove the "free form" text that specified the license of the file, as that is impossible for any tool to properly parse. Cc: John Whitmore <johnfwhitmore@gmail.com> Cc: Bhanusree Pola <bhanusreemahesh@gmail.com> Cc: Sanjana Sanikommu <sanjana99reddy99@gmail.com> Cc: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-03staging: rtl8192u: make r8192_wx_handlers_def structure constBhumika Goyal1-1/+1
Make this const as it is only stored in a const field of a pci_dev structure. Make the declaration in the header const too. Structure found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09staging: rtl8192u: Fix indentationFu Yong Quah1-3/+3
Fix number of indentaions for block scopes as suggested by Documentation/CodingStyle. Signed-off-by: Fu Yong Quah <quah.fy95@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-18rtl8192u: r8192_priv: Replace semaphore wx_sem with mutexBinoy Jayan1-40/+40
The semaphore 'wx_sem' in r8192_priv is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28Staging: rtl8192u: remove extra blank lines.Ben Marsh1-22/+0
This patch removes blank lines in r8192U_wx.c that were flagged by checkpatch.pl Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: rtl8192u: Fix block comments use * on subsequent lines in r8192U_wx.cByeoungwook Kim1-18/+20
clean up checkpatch warning: WARNING: Block comments use * on subsequent lines Signed-off-by: Byeoungwook Kim <quddnr145@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12staging: rtl8192u: r8192U_wx: fix negative noise and level valuesLuis de Bethencourt1-2/+2
range->max_qual.noise and level are of type uint8, so they shouldn't be assigned a negative number. Assigning them 0x100 - 98, and 0x100 - 78 which are the equivalent to -98 dBm and -78 dBm, respectively, when IW_QUAL_DBM is set. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: rtl8192u: Simplify if conditionKsenija Stanojevic1-1/+1
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-01Staging: rtl8192u: Replace printk() with netdev_dbg()Ksenija Stanojevic1-1/+1
For dynamic debugging netdev_dbg (if there is a ponterto a device net structure) is preferred over printk(), which is the raw way to print something. Issue found by checkpatch.pl. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27staging: rtl8192u: Remove unnecessary ifTapasweni Pathak1-6/+0
Remove the if condition, as the code inside the if condition is commented and does not have any FIXME or TODO comment. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28staging: rtl8192u: Add blank line after variable declarationsGeorgiana Chelu1-0/+2
Fix the following checkpatch.pl warning: WARNING: Missing a blank line after declarations Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16drivers/staging/rtl8192u/r8192U_wx.c: fix warnings issued by sparseOvidiu Toader1-1/+2
This minor patch motivated by eudyptula challenge fixes the following warnings issued by `sparse' in drivers/staging/rtl8192u/r8192U_wx.c: .../r8192U_wx.c:27:5: warning: symbol 'rtl8180_rates' was not declared. Should it be static? .../r8192U_wx.c:961:22: warning: symbol 'r8192_get_wireless_stats' was not declared. Should it be static? .../r8192U_wx.c:990:24: warning: symbol 'r8192_wx_handlers_def' was not declared. Should it be static? Signed-off-by: Ovidiu Toader <ovi@phas.ubc.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26Staging: rtl8192u: r8192U_wx.c Fixed a code-style error about trailing ↵Chaitanya Hazarey1-1/+1
whitespace Fixed the following error reported by running checkpatch.pl ERROR: trailing whitespace Signed-off-by: Chaitanya Hazarey <c@24.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26Staging: rtl8192u: r8192U_wx.c Fixed some more code-style warnings about spacesChaitanya Hazarey1-2/+2
Fixed the following warnings issued by checkpatch.pl WARNING: please, no space before tabs Signed-off-by: Chaitanya Hazarey <c@24.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26Staging: rtl8192u: r8192U_wx.c Fixed code-style warningsChaitanya Hazarey1-1/+12
Fixed some of the following warning generated by checkpatch.pl: WARNING: Missing a blank line after declarations Signed-off-by: Chaitanya Hazarey <c@24.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19Staging: rtl8192u: r8192U_wx.c Removed some more commented out dead codeChaitanya Hazarey1-17/+1
Removed dead code from the file. Signed-off-by: Chaitanya Hazarey <c@24.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19Staging: rtl8192u: r8192U_wx.c Added a single space for code-style issueChaitanya Hazarey1-1/+1
Added a space around '|' to address: ERROR: need consistent spacing around '|' (ctx:VxW) Signed-off-by: Chaitanya Hazarey <c@24.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19Staging: rtl8192u: r8192U_wx.c Removed all C99 commentsChaitanya Hazarey1-65/+65
To address the error - ERROR: do not use C99 // comments Removed all C99 comments. Signed-off-by: Chaitanya Hazarey <c@24.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19Staging: rtl8192u: r8192U_wx.c removed commented dead codeChaitanya Hazarey1-10/+0
Removed dead code, commented out printks and DMESG. Signed-off-by: Chaitanya Hazarey <c@24.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-29Staging: rtl8192u: r8192U_wx.c Fixed a misplaced braceChaitanya Hazarey1-1/+2
Fixed a misplaced brace in a function Signed-off-by: Chaitanya Hazarey <c@24.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28Staging: rtl8192u: r8192U_wx.c Added {} braces and newlinesChaitanya Hazarey1-38/+46
Added {} braces and newlines to address the following: ERROR: else should follow close brace '}' ERROR: space required before the open brace '{' ERROR: trailing statements should be on next line ERROR: space required before the open parenthesis '(' ERROR: that open brace { should be on the previous line Signed-off-by: Chaitanya Hazarey <c@24.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28Staging: rtl8192u: r8192U_wx.c Added missing spacesChaitanya Hazarey1-73/+73
Added spaces needed in the proper places to address: WARNING: please, no spaces at the start of a line WARNING: missing space after struct definition ERROR: spaces required around that '!=' (ctx:WxV) ERROR: spaces required around that '=' (ctx:WxV) ERROR: spaces required around that '=' (ctx:VxW) ERROR: spaces required around that '&&' (ctx:VxV) ERROR: spaces required around that '!=' (ctx:VxV) ERROR: spaces required around that '=' (ctx:VxV) ERROR: spaces required around that '==' (ctx:VxV) ERROR: spaces required around that '<' (ctx:VxV) ERROR: space required before the open parenthesis '(' ERROR: space required before the open brace '{' ERROR: space required after that ',' (ctx:VxV) ERROR: space required after that close brace '}' ERROR: space prohibited before that '--' (ctx:WxO) ERROR: space prohibited before that close parenthesis ')' ERROR: space prohibited after that open parenthesis '(' Signed-off-by: Chaitanya Hazarey <c@24.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-25staging: Convert __FUNCTION__ to __func__Joe Perches1-6/+6
Use the normal mechanism for emitting a function name. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24Staging: rtl8192u: Remove old WIRELESS_EXT supportJoel Pelaez Jorge1-19/+1
Remove support for building against ancient WIRELESS_EXT versions, only leaving support for the current version: 22 Signed-off-by: Joel Pelaez Jorge <joelpelaez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-03staging: rtl8192u: fix checkpatch braces warningRui Miguel Silva1-2/+1
fix some code style related to the use of braces in a one statement block Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11staging: rtl8192u: remove #ifdef JOHN_Xenia Ragiadakou1-199/+1
This patch removes the guards #ifdef JOHN_HWSEC, #ifdef JOHN_DUMP_TXDESC and because the code inside them calls some undefined functions (e.g read_rtl8225, rtl8187_read_phy etc). Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27staging: Update e-mail address for Andrea MerelloAndrea Merello1-1/+1
A lot of files contain reference to my old e-mail address. Now I'm going not to read mail from it anymore, so update it with my current address everywhere. Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-06staging: rtl8192u: fix read_nic_* functionsXenia Ragiadakou1-1/+1
read_nic_*() functions are defined in r8192U_core.c. They call internally usb_control_msg() to read the nic registers and return the value read. Following a remark made by Dan Carpenter, if usb_control_msg() fails, the value returned will be invalid. To accommodate for this, this patch changes the functions to take a pointer as argument to set the value read and return 0 on success and the error status on failure, so that callers of read_nic_*() can check the return status. Some other fixes introduced in read_nic_*() functions are: The expressions (1<<EPROM_*_SHIFT) used to address and set the individual bits of the eeprom register were replaced with EPROM_*_BIT bitmasks to make the code more intuitive. EPROM_*_BIT bitmasks were defined in r8192U_hw.h and EPROM_*_SHIFT were removed. In netdev_err(), which is called in case of failure, the hardcoded function name in the error log message was replaced with __func__ to reduce line size. Also, from the error log message, it was omitted the word "Timeout" and it is just reported the error code since the failure can not only be due to timeout expiration but also due to a memory allocation failure. In case of timeout expiration, usb_start_wait_urb() prints an appropriate log message when debug is enabled. Finally, some minor fixes to the coding style were applied in lines affected by the above changes, including the removal of ifdef DEBUG_RX (the debugging of reads and writes of the nic registers shall be done with explicit check on their return status which will be added in a follow on patch). 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 Ragiadakou1-1/+1
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 r8192U_wx.cXenia Ragiadakou1-16/+16
This patch fixes the pointer position in r8192U_wx.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: use same indent for switch and caseSebastian Hahn1-6/+6
Fix the checkpatch error "switch and case should be at the same indent" Signed-off-by: Sebastian Hahn <snsehahn@cip.cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging/rtl8192u: put { on same line as structJennifer Naumann1-2/+1
This fixes the checkpatch error "open brace '{' following struct go on the same line" in staging/rtl8192u Signed-off-by: Jennifer Naumann <Jennifer.Naumann@informatik.stud.uni-erlangen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging/rtl8192u: cleanfile runSebastian Hahn1-11/+11
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 a typo.Justin P. Mattock1-1/+1
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. Mattock1-4/+4
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>