aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-02-04staging: rtl8192u: Switch from strlcpy to strscpyKumar Kartikeya Dwivedi1-1/+1
strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. This silences the related checkpatch warnings from: 5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy") Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20210131172838.146706-11-memxor@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26Staging: rtl8192u: ieee80211: Use netdev_info() with network devices.Sam Muhammed1-2/+2
netdev_info() should be used instead of printk(KERN_INFO ...) since it's specific to and preferable for printing messages for network devices. Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com> Link: https://lore.kernel.org/r/ce20980cc1947255b8a2de3c1f1364c11c163b9e.1585233434.git.jane.pnx9@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: rtl8192u: fix spacing in ieee80211Stephen Brennan1-7/+7
Checkpatch emits several errors, warnings, and checks about spacing. Apply checkpatch's suggested spacing rules. Signed-off-by: Stephen Brennan <stephen@brennan.io> Link: https://lore.kernel.org/r/20190821143540.4501-4-stephen@brennan.io Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21Staging: rtl8192u: ieee80211: Fix if-else coding style issuePuranjay Mohan1-2/+2
Fix following checkpatch.pl warning by adding braces around if statement: CHECK: braces {} should be used on all arms of this statement Signed-off-by: Puranjay Mohan <puranjay12@gmail.com> 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-2/+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>
2018-07-08staging:rtl8192u: rename HT_EXTCHNL_OFFSET -> enum ht_extension_chan_widthJohn Whitmore1-1/+1
remove the typedef of enumerated type HT_EXTCHNL_OFFSET and replace it with 'enum ht_extension_chan_offset' Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-08staging:rtl8192u: rename HT_CHANNEL_WIDTH -> enum ht_channel_widthJohn Whitmore1-2/+2
remove the typedef HT_CHANNEL_WIDTH and replace with 'enum ht_channel_width' Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-18rtl8192u: ieee80211_device: Replace semaphore wx_sem with mutexBinoy Jayan1-17/+17
The semaphore 'wx_sem' in ieee80211_device 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>
2015-09-29Staging: rtl819u: Fix brace styling issuesmike dupuis1-6/+3
This is a patch to correct two flavors of brace styling issues in ieee80211_softmac_wx.c. Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29Staging: rtl8192u: spaces required around = operatormike dupuis1-5/+5
This is a patch to add spaces around = operators in several instances in ieee80211_softmac_wx.c Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29Staging: rtl8192u: add spaces around == and || operatorsmike dupuis1-1/+1
This is a patch to add missing spaces around == and || operators in one instance in ieee80211_softmac_wx.c. Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29Staging: rtl8192u: move open braces to previous linesmike dupuis1-6/+3
This is a patch to move opening braces to the lines on which their corresponding if-statements exist in ieee80211_softmac_wx.c. Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29Staging: rtl8192u: add missing blank lines after declarationsmike dupuis1-0/+3
This is a patch to add blank lines after declaration ins several instances in iee80211_softmac_wx.c. Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29Staging: rtl8192u: space required after ','mike dupuis1-1/+1
This is a fix to add spaces after commas in ieee80211_softmac_wx.c. Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15Staging: rlt8192u: Remove spaces at the start of linesMike Dupuis1-4/+4
This is a patch to remove spaces at the start of lines in ieee80211_softmac_wx.c. Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15Staging: rtl8192u: do not use C99 // commentsMike Dupuis1-14/+14
This is a patch to convert C99-style comments to C89-style comments in ieee80211_softmac_wx.c. Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15Staging: rtl8192u: suspect code indent for conditional statmentMike Dupuis1-3/+2
This is a patch to correct an improperly indented block of code in ieee80211_softmac_wx.c Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-15Staging: rtl8192u: space required before open parenthesesMike Dupuis1-6/+6
This is a patch to add spaces where required before open parentheses in ieee80211_softmac_wx.c Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: rtl8192u: space prohibited before close parenthesismike dupuis1-2/+2
This is a style change to remove whitespace before close parentheses in ieee80211_softmac_wx.c Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: rtl8192u: space required after close bracesmike dupuis1-3/+3
This is a style change to insert spaces before closed braces in ieee80211_softmac_wx.c Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: rtl8192u: space required before open bracesmike dupuis1-9/+9
This is a change to add spaces before open braces to ieee80211_softmac_wx.c. Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: rtl8192u: Space not allowed after &mike dupuis1-2/+2
This is a change to ieee80211_softmac_wx.c to remove spaces after unary & operators. Signed-off-by: Mike Dupuis <mike.dupuis.0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: rtl819u: ieee80211: Remove unused variableShraddha Barke1-2/+0
This patch discards the variable count as it is not used anywhere throughout the kernel. Build tested it. Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14drivers: staging: rtl8192u: Fix "space required after that ','" errorsGreg Donald1-1/+1
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-03-26Staging: rtl8192u: Fix space issues before '(' and after ')'Haneen Mohammed1-9/+9
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 Mohammed1-2/+2
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-06staging: rtl8192u: ieee80211: replace memset(x,0,ETH_ALEN) by eth_zero_addr(x)Aya Mahfouz1-1/+1
eth_zero_addr() is a wrapper function for memset if 0 is going to be assigned to a mac address. The replacement was done by the following coccinelle script: @header@ @@ #include <linux/etherdevice.h> @eth_zero_addr@ expression e; @@ -memset(e,0,ETH_ALEN); +eth_zero_addr(e); @eth_broadcast_addr@ identifier e; @@ -memset(e,\(0xff\|0xFF\|255\),ETH_ALEN); +eth_broadcast_addr(e); @linux_header depends on !header && (eth_zero_addr || eth_broadcast_addr) @ @@ + #include <linux/etherdevice.h> + @special_header depends on !header && !linux_header && (eth_zero_addr || eth_broadcast_addr) @ @@ + + #include <linux/etherdevice.h> + @custom_header depends on !header && !linux_header && !special_header && (eth_zero_addr || eth_broadcast_addr) @ @@ + + #include <linux/etherdevice.h> Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: rtl8192u: Fix "space prohibited after that open parenthesis '('" errorsGreg Donald1-1/+1
Fix checkpatch.pl "space prohibited after that open parenthesis '('" errors Signed-off-by: Greg Donald <gdonald@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30drivers: staging: rtl8192u: Fix space required after that ',' errorsGreg Donald1-4/+4
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>
2014-05-26drivers/staging: Remove useless return variablesPeter Senna Tschudin1-3/+1
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-05-23staging/rtl8192u: Put EXPORT_SYMBOL just after the exported functionBenoit Taine1-24/+18
Export of symbols statement must be placed right after the definition to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // <smpl> @ r @ identifier f; @@ - EXPORT_SYMBOL(f); @@ identifier r.f; @@ f(...) { ... } + EXPORT_SYMBOL(f); // </smpl> Signed-off-by: Benoit Taine <benoit.taine@lip6.fr> 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-02-14staging/rtl8192u/ieee80211: Fix buffer overflow in ieee80211_softmac_wx.cPeter Huewe1-14/+15
Clang/scan-build complains about a possible buffer overflow in ieee80211_wx_get_name: .../staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c:499:3: warning: String copy function overflows destination buffer strcat(wrqu->name," link.."); .../staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c:497:3: warning: String copy function overflows destination buffer strcat(wrqu->name," linked"); The buffer wrqu->name is only IFNAMSIZ bytes big (currently 16), so if we have a "802.11b/g/n linked" device we overrun the buffer by 3 bytes. -> Use strlcopy / strlcat to populate the name. This is done in a similar fashion in staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c While at it cleaned some whitespace issues. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging/rtl8192u: do not init statics to 0Sebastian Hahn1-1/+1
Fix the checkpatch error "do not initialize statics to 0 or NULL" Signed-off-by: Sebastian Hahn <snsehahn@cip.cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04Staging: rtl8192u: use is_zero_ether_addr() instead of memcmp()Wei Yongjun1-2/+3
Using is_zero_ether_addr() instead of directly use memcmp() to determine if the ethernet address is all zeros. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2010-12-01Staging: rtl8192u: remove dead code to disable dot11dDavid Chosrova1-4/+0
This patch removes all the ENABLE_DOT11D ifdefs. It is always defined for driver. DOT11D has to do with regulatory domains. What prompted this patch was a warning message in Sparse. drivers/staging/rtl8192u/r8192U_core.c:247:1: warning: "eqMacAddr" redefined in file included from drivers/staging/rtl8192u/:81:81: drivers/staging/rtl8192u/dot11d.h:35:1: warning: this is the location of the previous definition Now there are no ifdefs around dot11d.h it made no sense to have this second definition, so I removed that macro as well. ( Thanks Dan ;-) ). Acked-by. Dan Carpenter <error27@gmail.com> Signed-off-by: David Chosrova <dada2372@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: rtl8192u: remove dead codeMauro Carvalho Chehab1-78/+0
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 Chehab1-2/+2
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 Chuang1-0/+693
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>