summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712
AgeCommit message (Collapse)AuthorFilesLines
2021-08-09Merge 5.14-rc5 into staging-nextGreg Kroah-Hartman6-38/+61
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-30Staging: rt18712: hal_init: removed filename from beginning comment blockAgam Kohli1-1/+0
Fixed a coding style issue Signed-off-by: Agam Kohli <agamkohli9@gmail.com> Link: https://lore.kernel.org/r/YQLveNI2UrnpeeAt@Agam.localdomain Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8712: error handling refactoringPavel Skripkin2-39/+43
There was strange error handling logic in case of fw load failure. For some reason fw loader callback was doing clean up stuff when fw is not available. I don't see any reason behind doing this. Since this driver doesn't have EEPROM firmware let's just disconnect it in case of fw load failure. Doing clean up stuff in 2 different place which can run concurently is not good idea and syzbot found 2 bugs related to this strange approach. So, in this pacth I deleted all clean up code from fw callback and made a call to device_release_driver() under device_lock(parent) in case of fw load failure. This approach is more generic and it defend driver from UAF bugs, since all clean up code is moved to one place. Fixes: e02a3b945816 ("staging: rtl8712: fix memory leak in rtl871x_load_fw_cb") Fixes: 8c213fa59199 ("staging: r8712u: Use asynchronous firmware loading") Cc: stable <stable@vger.kernel.org> Reported-and-tested-by: syzbot+5872a520e0ce0a7c7230@syzkaller.appspotmail.com Reported-and-tested-by: syzbot+cc699626e48a6ebaf295@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/d49ecc56e97c4df181d7bd4d240b031f315eacc3.1626895918.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8712: get rid of flush_scheduled_workPavel Skripkin5-1/+20
This patch is preparation for following patch for error handling refactoring. flush_scheduled_work() takes (wq_completion)events lock and it can lead to deadlock when r871xu_dev_remove() is called from workqueue. To avoid deadlock sutiation we can change flush_scheduled_work() call to flush_work() call for all possibly scheduled works in this driver, since next patch adds device_release_driver() in case of fw load failure. Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/6e028b4c457eeb7156c76c6ea3cdb3cb0207c7e1.1626895918.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging/rtl8712: Remove all strcpy() uses in favor of strscpy()Len Baker1-1/+1
strcpy() performs no bounds checking on the destination buffer. This could result in linear overflows beyond the end of the buffer, leading to all kinds of misbehaviors. The safe replacement is strscpy(). Signed-off-by: Len Baker <len.baker@gmx.com> Link: https://lore.kernel.org/r/20210717155145.15041-1-len.baker@gmx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8712: Fix alignmentAlexander Greyling1-1/+1
This patch fixes the checkpatch.pl issue: CHECK: Alignment should match open parenthesis. Signed-off-by: Alexander Greyling <alexandergreyling5@gmail.com> Link: https://lore.kernel.org/r/20210710220815.GA1654486@alexlaptop Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8712: Remove some unused #define and enumChristophe JAILLET1-48/+0
These #define and the enum WIFI_REG_DOMAIN are unused. They can be removed. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/6d5b505e7de20fdaba1831557baee1daf4656845.1625470822.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-14staging: rtl8712: fix memory leak in rtl871x_load_fw_cbPavel Skripkin1-0/+3
There is a leak in rtl8712 driver. The problem was in non-freed adapter data if firmware load failed. This leak can be reproduced with this code: https://syzkaller.appspot.com/text?tag=ReproC&x=16612f02d00000, Autoload must fail (to not hit memory leak reported by syzkaller) There are 2 possible ways how rtl871x_load_fw_cb() and r871xu_dev_remove() can be called (in case of fw load error). 1st case: r871xu_dev_remove() then rtl871x_load_fw_cb() In this case r871xu_dev_remove() will wait for completion and then will jump to the end, because rtl871x_load_fw_cb() set intfdata to NULL: if (pnetdev) { struct _adapter *padapter = netdev_priv(pnetdev); /* never exit with a firmware callback pending */ wait_for_completion(&padapter->rtl8712_fw_ready); pnetdev = usb_get_intfdata(pusb_intf); usb_set_intfdata(pusb_intf, NULL); if (!pnetdev) goto firmware_load_fail; ... clean up code here ... } 2nd case: rtl871x_load_fw_cb() then r871xu_dev_remove() In this case pnetdev (from code snippet above) will be zero (because rtl871x_load_fw_cb() set it to NULL) And clean up code won't be executed again. So, in all cases we need to free adapted data in rtl871x_load_fw_cb(), because disconnect function cannot take care of it. And there won't be any race conditions, because complete() call happens after setting intfdata to NULL. In previous patch I moved out free_netdev() from r8712_free_drv_sw() and that's why now it's possible to free adapter data and then call complete. Fixes: 8c213fa59199 ("staging: r8712u: Use asynchronous firmware loading") Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/81e68fe0194499cc2e7692d35bc4dcf167827d8f.1623620630.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-14staging: rtl8712: fix error handling in r871xu_drv_initPavel Skripkin2-13/+13
Previous error handling path was unique for all possible errors and there was unnecessary branching. Also, one step for freeing drv_sw was missing. All these problems was fixed by restructuring error handling path. Also, moved out free_netdev() from r8712_free_drv_sw() for correct error handling. Fixes: 2865d42c78a9 ("staging: r8712u: Add the new driver to the mainline kernel") Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/febb00f72354449bb4d305f373d6d2f47e539ab4.1623620630.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-14staging: rtl8712: remove redundant check in r871xu_drv_initPavel Skripkin1-6/+4
padapter->dvobj_init is initialized rigth before initialization check. There is no need for any branching here. Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/d367e5f39f22af44c545f8710cc18fb00f10e66c.1623620630.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-12staging: rtl8712: Replace printk() with netdev_dbg()Fabio M. De Francesco1-1/+1
Replaced printk() with netdev_dbg() because the latter is preferred in network devices drivers. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210609135659.4054-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8712: Remove unnecessary alias of printk()Fabio M. De Francesco2-24/+1
This module defines four alias for printk(). Removed them all, because they are not used anywhere else in the driver. Converted the only exception to the explicit use of printk(). Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210606034038.9657-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-03Staging: rtl8712: Cleanup coding style warningKhoa Tran Minh1-3/+3
This patch fixes checkpatch warning about multiple line dereference. Signed-off-by: Khoa Tran Minh <ktm8@posteo.de> Link: https://lore.kernel.org/r/YLZ1fc7BsaTo+ixQ@rue.localhost Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-25staging: rtl8712: Removed unnecessary blank linesHriday Hegde4-4/+0
Following lines were fixed as dictated by running checkpatch CHECK: Please don't use multiple blank lines 65: FILE: drivers/staging/rtl8712/xmit_linux.c:65: + CHECK: Blank lines aren't necessary after an open brace '{' 39: FILE: drivers/staging/rtl8712/usb_intf.c:39: +static const struct usb_device_id rtl871x_usb_id_tbl[] = { CHECK: Blank lines aren't necessary after an open brace '{' 849: FILE: drivers/staging/rtl8712/rtl871x_xmit.c:849: +{ CHECK: Please don't use multiple blank lines 260: FILE: drivers/staging/rtl8712/rtl871x_sta_mgt.c:260: + Signed-off-by: Hriday Hegde <hridayhegde1999@gmail.com> Link: https://lore.kernel.org/r/20210521153924.22843-1-hridayhegde1999@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19staging: rtl8712: fix the bssid in mp_start_test()Dan Carpenter1-1/+1
We recently moved "bssid" off the stack, and allocated it with kmalloc() instead. Unfortunately, this one line was overlooked so it will copy random data into the &tgt_network->network instead of the data we want. Fixes: 0b18e5fe6008 ("staging: rtl8712: rtl871x_mp_ioctl: Move a large data struct onto the heap") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YJ6IrfkbdaTHgpEv@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: rtl8712: Fix some tests against some 'data' subtype framesChristophe JAILLET2-7/+7
Commit 6e2baa44c6d1 ("staging: rtl8712: remove enum WIFI_FRAME_SUBTYPE") was wrong because: WIFI_DATA_NULL != IEEE80211_STYPE_NULLFUNC WIFI_DATA_CFACK != IEEE80211_STYPE_DATA_CFACK WIFI_DATA_CFPOLL != IEEE80211_STYPE_DATA_CFPOLL WIFI_DATA_CFACKPOLL != IEEE80211_STYPE_DATA_CFACKPOLL the WIFI_DATA_xxx definitions include WIFI_DATA_TYPE, which is 'BIT(3)'. Restore the previous behavior by adding the missing 'IEEE80211_FTYPE_DATA |' (0x0008, that is to say BIT(3)) when these values are used. Hopefully, the wrong commit was small enough and hand review is possible. Fixes: 6e2baa44c6d1 ("staging: rtl8712: remove enum WIFI_FRAME_SUBTYPE") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/44aebfa3c5ce8f45ae05369c73e9ff77c6d271f9.1619939806.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: rtl8712: remove multiple multiple assignmentsAlexander Vorwerk1-2/+3
Documentation/process/coding-style.rst says (in line 88) "Don't put multiple assignments on a single line either." This patch fixes the coding style issue reported by checkpatch.pl. Signed-off-by: Alexander Vorwerk <alec@vc-celle.de> Link: https://lore.kernel.org/r/20210501234501.5411-1-alec@vc-celle.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: rtl8712: Use list iterators and helpersGuenter Roeck1-4/+2
Use existing list iterators and helper functions. The following coccinelle script was used to convert the code. @@ identifier v1, v2, v3, v4; symbol next; expression e; iterator name list_for_each; statement S; @@ <+... ( - e = v1->next; | - e = get_next(v1); ) ... when != e - while ( \( v1 != e \| e != v1 \) ) + list_for_each (e, v1) { ... - v2 = container_of(e, struct v3, v4); + v2 = list_entry(e, struct v3, v4); ?- if (!v2) S ... ( - e = e->next; | - e = get_next(e); ) ... when != e } ...+> Compile tested only. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210428173523.149958-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: rtl8712: rtl871x_mp_ioctl: Move a large data struct onto the heapLee Jones1-12/+17
Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8712/rtl871x_mp_ioctl.c: In function ‘mp_start_test’: drivers/staging/rtl8712/rtl871x_mp_ioctl.c:204:1: warning: the frame size of 1136 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Cc: Michael Straube <straube.linux@gmail.com> Cc: WLAN FAE <wlanfae@realtek.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210414181129.1628598-21-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: rtl8712: rtl871x_mp_ioctl: Remove a bunch of unused tablesLee Jones1-127/+0
Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8712/rtl871x_mp_ioctl.h:256:34: warning: ‘oid_rtl_seg_81_85’ defined but not used [-Wunused-const-variable=] drivers/staging/rtl8712/rtl871x_mp_ioctl.h:249:34: warning: ‘oid_rtl_seg_81_80_80’ defined but not used [-Wunused-const-variable=] drivers/staging/rtl8712/rtl871x_mp_ioctl.h:240:34: warning: ‘oid_rtl_seg_81_80_40’ defined but not used [-Wunused-const-variable=] drivers/staging/rtl8712/rtl871x_mp_ioctl.h:205:34: warning: ‘oid_rtl_seg_81_80_20’ defined but not used [-Wunused-const-variable=] drivers/staging/rtl8712/rtl871x_mp_ioctl.h:138:34: warning: ‘oid_rtl_seg_81_80_00’ defined but not used [-Wunused-const-variable=] Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: WLAN FAE <wlanfae@realtek.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210414181129.1628598-13-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8712: fix wrong function outputSergei Krainov1-0/+2
Return NULL from r8712_find_network() if no matched wlan_network was found. Code with a bug: while (plist != phead) { pnetwork = container_of(plist, struct wlan_network, list); plist = plist->next; if (!memcmp(addr, pnetwork->network.MacAddress, ETH_ALEN)) break; } spin_unlock_irqrestore(&scanned_queue->lock, irqL); return pnetwork; In this code last processed pnetwork returned if list end was reached and no pnetwork matched test condition. Signed-off-by: Sergei Krainov <sergei.krainov.lkd@gmail.com> Link: https://lore.kernel.org/r/20210409124611.GA3981@test-VirtualBox Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8712: remove (most of) enum WIFI_FRAME_TYPEChristophe JAILLET3-9/+6
The values defined in enum WIFI_FRAME_TYPE are the same the #define IEEE80211_FTYPE_xxx from <linux/ieee80211.h> Use these values to avoid code duplication. WIFI_QOS_DATA_TYPE is a bit more tricky and doesn't have a direct equivalence in <linux/ieee80211.h>. So leave this one as-is for now. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/e009a4ee6429a3f79742f9a912e3f6a650fb33ed.1617911201.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8712: remove enum WIFI_FRAME_SUBTYPEChristophe JAILLET3-40/+8
The values defined in enum WIFI_FRAME_SUBTYPE are the same the #define IEEE80211_STYPE_xxx from <linux/ieee80211.h> Use theses values to avoid code duplication. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/5a6fdcf0b5eb43c3d5511b5badd60bfac9389628.1617911201.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8712: remove struct rtl_ieee80211_ht_cap and ieee80211_ht_addt_infoChristophe JAILLET4-44/+9
struct 'ieee80211_ht_addt_info' is unused and can be removed. struct 'rtl_ieee80211_ht_cap' can be replaced by 'ieee80211_ht_cap' defined in <linux/ieee80211.h> which has the same layout. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/4291cb10744457cc12c89fc9fd414c37d732bc9d.1617911201.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8712: add spaces around '+'Mitali Borkar1-1/+1
Added spaces around '+' to improve readability and adhere to linux kernel coding style. Reported by checkpatch Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com> Link: https://lore.kernel.org/r/YG7uLQLGmAh97xB1@kali Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8712: removed extra blank lineMitali Borkar1-1/+0
Removed an extra blank line so that only one blank line is present in between two functions which separates them out. Reported by checkpatch Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com> Link: https://lore.kernel.org/r/YG5ppTlGhRp5WVgS@kali Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8712: matched alignment with open parenthesisMitali Borkar1-3/+3
Aligned arguments with open parenthesis to meet linux kernel coding style Reported by checkpatch Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com> Link: https://lore.kernel.org/r/YG5xV5q7ODTUTVK/@kali Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07staging: rtl8712: Use constants from <linux/ieee80211.h>Christophe JAILLET5-31/+17
Some constants defined in wifi.h are already defined in <linux/ieee80211.h> with some other (but similar) names. Be consistent and use the ones from <linux/ieee80211.h>. The conversions made are: _SSID_IE_ --> WLAN_EID_SSID _SUPPORTEDRATES_IE_ --> WLAN_EID_SUPP_RATES _DSSET_IE_ --> WLAN_EID_DS_PARAMS _IBSS_PARA_IE_ --> WLAN_EID_IBSS_PARAMS _ERPINFO_IE_ --> WLAN_EID_ERP_INFO _EXT_SUPPORTEDRATES_IE_ --> WLAN_EID_EXT_SUPP_RATES _HT_CAPABILITY_IE_ --> WLAN_EID_HT_CAPABILITY _HT_EXTRA_INFO_IE_ --> WLAN_EID_HT_OPERATION (not used) _HT_ADD_INFO_IE_ --> WLAN_EID_HT_OPERATION _VENDOR_SPECIFIC_IE_ --> WLAN_EID_VENDOR_SPECIFIC _RESERVED47_ --> (not used) Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/fe35fb45323adc3a30f31b7280cec7700fd325d8.1617741313.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-06staging: rtl8712: Remove extra blank linesZhansaya Bagdauletkyzy4-4/+0
Remove extra blank lines after an open brace to adhere to Linux kernel coding style. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Link: https://lore.kernel.org/r/f61f6d330bc3fa53d4d420754d1d461b6cfcb2de.1617708653.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-06staging: rtl8712: Rewrite NULL comparisonsZhansaya Bagdauletkyzy1-5/+5
Replace NULL comparisons with boolean negation to be more consistent with the rest of the Linux kernel code base. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Link: https://lore.kernel.org/r/74471865b399584d73a18696d2008006301dfd71.1617708653.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-06drivers: staging: rtl8712: align arguments with open parenthesisBeatriz Martins de Carvalho1-2/+2
Clean up checks of "Alignment should match open parenthesis" in file mlme_osdep.h Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com> Link: https://lore.kernel.org/r/20210406105124.78498-1-martinsdecarvalhobeatriz@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-06staging: rtl8712: Remove spaces after a castZhansaya Bagdauletkyzy1-5/+5
Remove extra spaces after a cast to conform with Linux kernel coding style. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Link: https://lore.kernel.org/r/f8932bfa35eb7480b69a9c8296bb10fac5a28540.1617697237.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-06staging: rtl8712: remove extra blank linesZhansaya Bagdauletkyzy1-2/+0
Remove extra blank lines to conform with Linux kernel coding style. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Link: https://lore.kernel.org/r/0bf3df788ca46a59ebb990bf2e3effca7080fd1e.1617697237.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-06staging: rtl8712: match parentheses alignmentZhansaya Bagdauletkyzy3-16/+16
Match next line with open parentheses by adding tabs/spaces to conform with Linux kernel coding style. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Link: https://lore.kernel.org/r/664f324330611a78e184a203ece38d4facc9d791.1617697237.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-06staging: rtl8712: add spaces around operatorsZhansaya Bagdauletkyzy4-10/+10
Add spaces around operators to adhere to Linux kernel coding style. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Link: https://lore.kernel.org/r/1fa63e851a6fa403798b95b64d9147c9b3b02c93.1617697237.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-06staging: rtl8712: add space before binary operatorDeborah Brouwer1-1/+1
Add a space before the binary operator "|" to comply with kernel coding style. Identified by checkpatch. Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com> Link: https://lore.kernel.org/r/6db3ca92022376d162289174e201c79017b366db.1617674639.git.deborahbrouwer3563@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-06staging: rtl8712: remove space after castDeborah Brouwer1-3/+3
Remove the unnecessary space immediately after a cast. Identified by checkpatch: CHECK: No space is necessary after a cast. Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com> Link: https://lore.kernel.org/r/b1ba94644f5204505623ffc64614671aac30bbd8.1617674639.git.deborahbrouwer3563@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-06staging: rtl8712: remove a blank lineDeborah Brouwer1-1/+0
A duplicate blank line is removed so that only a single blank line separates two functions. Identified by checkpatch. Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com> Link: https://lore.kernel.org/r/81801604460c8cad8770cb2e1290e1587bf88075.1617674639.git.deborahbrouwer3563@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-06staging: rtl8712: add period within a commentDeborah Brouwer1-2/+2
Add a period to separate repeated words in a comment. The period preserves the meaning of the comment while also stopping the checkpatch warning: WARNING: Possible repeated word: 'fw'. Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com> Link: https://lore.kernel.org/r/f9f48ac6e93e814c51a7ed370d0b2988d2e3a602.1617674639.git.deborahbrouwer3563@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-05staging: rtl8712: remove extra blank linesZhansaya Bagdauletkyzy4-8/+0
Remove extra blank lines to adhere to Linux kernel coding style. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Link: https://lore.kernel.org/r/d56183614a04590bdf3a6280b7f23664a5bb394c.1617568354.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-05staging: rtl8712: add blank lines after declarationsZhansaya Bagdauletkyzy7-0/+18
Add blank lines after function/struct/union/enum declarations to adhere to Linux kernel coding style. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Link: https://lore.kernel.org/r/ffe2ab70ef3cb73d3d6dd19d88804af7ecb568a2.1617568354.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-26drivers: staging: rtl8712: _adapter is declared twiceWan Jiabing1-2/+0
struct _adapter has been declared at 23rd line. Remove the duplicate. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Link: https://lore.kernel.org/r/20210325080050.861273-1-wanjiabing@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-20staging: rtl8712: Fix a possible NULL pointer dereference in function ↵Lee Gibson1-1/+2
r8712_joinbss_event_callback GCC 10 analyzer reports a warning: dereference of NULL The function r8712_find_network can return NULL and is usually checked but no check is present is this case. Fix by adding the check. Signed-off-by: Lee Gibson <leegib@gmail.com> Link: https://lore.kernel.org/r/20210319085836.8259-1-leegib@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-15Merge 5.12-rc3 into staging-nextGreg Kroah-Hartman2-3/+5
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-12staging: rtl8712: fixed whitespace coding style issueSelvakumar Elangovan1-3/+0
Removed additional whitespaces in the rtl8712_xmit.h file. Signed-off-by: Selvakumar Elangovan <selvakumar16197@gmail.com> Link: https://lore.kernel.org/r/20210309150037.17883-1-selvakumar16197@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-12staging: rtl8712: fixed no space coding style issueSelvakumar Elangovan1-1/+1
Added space around the binary operator for readability in rtl8712_xmit.h file Signed-off-by: Selvakumar Elangovan <selvakumar16197@gmail.com> Link: https://lore.kernel.org/r/20210309142547.16974-1-selvakumar16197@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging:rtl8712: replace cap_* definitions with native kernel WLAN_CAPABILITY_*Ivan Safonov2-10/+3
cap_* definitions duplicate WLAN_CAPABILITY_*. Remove cap_* definitions, improve code consistency. Reviewed-by: Mike Ximing Chen <mike.ximing.chen@intel.com> Signed-off-by: Ivan Safonov <insafonov@gmail.com> Link: https://lore.kernel.org/r/20210227222236.581490-5-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging:rtl8712: use IEEE80211_FCTL_* kernel definitionsIvan Safonov1-30/+22
_TO_DS_, _FROM_DS_, _MORE_FRAG_, _RETRY_, _PWRMGT_, _MORE_DATA_, _PRIVACY_, _ORDER_ definitions are duplicate IEEE80211_FCTL_* kernel definitions. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Link: https://lore.kernel.org/r/20210227222236.581490-4-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging:rtl8712: remove unused definitions from wifi.hIvan Safonov1-74/+0
These definitions are not used and will not be useful in the future. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Link: https://lore.kernel.org/r/20210227222236.581490-3-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging:rtl8712: replace get_(d|s)a with ieee80211_get_(D|S)AIvan Safonov2-47/+2
get_da()/get_sa() duplicate native ieee80211_get_(D|S)A functions. Remove get_(d|s)a, use ieee80211_get_(D|S)A instead. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Link: https://lore.kernel.org/r/20210227222236.581490-2-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>