summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8712/rtl871x_mp_ioctl.c
AgeCommit message (Collapse)Author
2021-05-19staging: rtl8712: fix the bssid in mp_start_test()Dan Carpenter
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: rtl871x_mp_ioctl: Move a large data struct onto the heapLee Jones
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-04-05staging: rtl8712: add blank lines after declarationsZhansaya Bagdauletkyzy
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>
2020-09-22staging: rtl8712: clean up comparsions to NULLMichael Straube
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/20200919085032.32453-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-14staging: rtl8712: clean up function headersWambui Karuga
Remove unnecessary line-breaks in function headers to improve readability of function headers. Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com> Link: https://lore.kernel.org/r/c14b9e60b1e9bab635bc9527cbd2a2a07436ba44.1570918228.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-14staging: rtl8712: remove unnecessary return variablesWambui Karuga
Remove variables that are only used to hold and return constants and have the functions directly return the constants. Issue found by coccinelle: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com> Link: https://lore.kernel.org/r/f61a0f036af24228c682c6b12c3a8e6cf6736185.1570918228.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01staging: rtl8712: mp_start_test(): Change return valuesNishka Dasgupta
Change return values of function mp_start_test() from _SUCCESS/_FAIL to 0/-ENOMEM and modify call sites accordingly. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26staging: rtl8712: Remove mp_start_joinbss()Nishka Dasgupta
Remove unused function mp_start_joinbss. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-10staging: rtl8712: Removed redundant code from function ↵Deepak Mishra
oid_rt_pro_write_register_hdl In function oid_rt_pro_write_register_hdl, Adapter->ImrContent is assigned with RegRWStruct->value but Adapter->ImrContent is never used anywhere else. So those lines has no impact and are removed removed. As that was the only place where ImrContent was used, so the member variable is removed from the structure _adapter Signed-off-by: Deepak Mishra <linux.dkm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-03staging: rtl8712: add SPDX identifiersMichael Straube
This satisfies a checkpatch warning and is the preferred method for notating the license. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-25Staging: rtl8712: fix spelling errorsJoseph Wright
Found by checkpatch: - s/cacluated/calculated/ - s/convertor/converter/ - s/psudo/pseudo/ - s/halfs/halves/ Signed-off-by: Joseph Wright <rjosephwright@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: rtl8712: spaces preferred around operandsLuis de Bethencourt
Clean up all instances of checkpatch.pl checks: CHECK: spaces preferred around that '+' (and other operands) Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: rtl8712: braces should be used on all armsLuis de Bethencourt
Fix all instances of the following checkpatch.pl check: CHECK: braces {} should be used on all arms of this statement Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: rtl8712: Remove boolean comparisonsLuis de Bethencourt
Boolean tests do not need explicit comparison to true or false. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07staging: rtl8712: rename functionJoshua Clayton
Rename r8712_get_ndis_wlan_bssid_ex_sz() to r8712_get_wlan_bssid_ex_sz(), which corresponds to the struct whose size it measures. Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07staging: rtl8712: remove duplicate structJoshua Clayton
struct ndis_wlan_bssid_ex is a doppelganger of struct wlan_bssid_ex, and is used about a third as often. Switch all instances to wlan_bssid_ex, and remove ndis_wlan_bssid_ex This also gets rid of a use of typedef NDIS_802_11_RATES_EX Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: rtl8712: remove unused functionSudip Mukherjee
mp_query_drv_var() was only being used by oid_rt_pro_query_dr_variable_hdl() but after commit <f4f5a59ff2e746885be3c1c06c1d0e8861a10ce8> mp_query_drv_var() became unused. so it is safe to remove it. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17staging: rtl8712: rtl871x_mp_ioctl.c: Remove some unused functionsRickard Strandqvist
Removes some functions that are not used anywhere: oid_rt_pro_h2c_get_rate_table_hdl() oid_rt_pro_h2c_set_rate_table_hdl() oid_rt_pro_set_pwrstate_hdl() oid_rt_pro_qry_pwrstate_hdl() oid_rt_pro_set_basic_rate_hdl() oid_rt_pro_set_power_tracking_hdl() oid_rt_pro_set_data_rate_ex_hdl() oid_rt_pro_cfg_debug_message_hdl() oid_rt_poll_rx_status_hdl() oid_rt_pro_set_rf_intfs_hdl() oid_rt_wr_attrib_mem_hdl() oid_rt_rd_attrib_mem_hdl() oid_rt_pro8711_pkt_loss_hdl() oid_rt_pro8711_wi_poll_hdl() oid_rt_pro_write16_eeprom_hdl() oid_rt_pro_read16_eeprom_hdl() oid_rt_pro_write_txcmd_hdl() oid_rt_pro_burst_write_register_hdl() oid_rt_pro_burst_read_register_hdl() oid_rt_pro8711_join_bss_hdl() oid_rt_pro_set_pkt_test_mode_hdl() oid_rt_pro_set_tx_agc_offset_hdl() oid_rt_set_crystal_cap_hdl() oid_rt_pro_rw_efuse_pgpkt_hdl() oid_rt_pro_rx_packet_type_hdl() oid_rt_pro_query_dr_variable_hdl() oid_rt_pro_dele_sta_info_hdl() oid_rt_pro_add_sta_info_hdl() oid_rt_pro_encryption_ctrl_hdl() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: rtl8712: remove unused variablesSudip Mukherjee
unused variables are removed. These variables were only assigned some values and after that they were never being used. So they are safe to be removed , and it has been build tested. I left a call to r8712_read32(padapter, TCR) and r8712_read8(padapter, SDIO_HCPWM) . r8712_read32() and r8712_read8() is ultimately calling usb_read32() and usb_read8() respectively. and they are again calling r8712_usbctrl_vendorreq(). this r8712_usbctrl_vendorreq() is communicating through the usb bus and is sending and receiving the control msg. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24staging: r8712u: 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 - return ret; + return C; // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11rtl8712: remove all NDIS_* definitions and use rndis.h insteadPrzemo Firszt
Remove duplicate code.The definitions are already in include/linux/rndis.h Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-01-21staging: r8712u: Fix sparse messageLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-20staging: r8712u: Add the new driver to the mainline kernelLarry Finger
This code is for a completely new version of the Realtek 8192 USB devices such as the D-Link DWA-130. The Realtek code, which was originally for Linux, Windows XP and Windows CE, has been stripped of all code not needed for Linux. In addition, only one additional configuration variable, which enables AP mode, remains. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Tested-by: Frederic Leroy <fredo@starox.org>