summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8712/rtl871x_mp_ioctl.h
AgeCommit message (Collapse)Author
2020-02-23staging: Replace zero-length array with flexible-array memberGustavo A. R. Silva
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Link: https://lore.kernel.org/r/20200220132908.GA30501@embeddedor 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>
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-03-09Staging: rtl8712: rtl871x_mp_ioctl.h - style fixDerek Robson
Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12staging: rtl8712: checkpatch cleanup: block comments using a trailing */Raphaël Beamonte
Fix checkpatch.pl warning "Block comments use a trailing */ on a separate line" on multiple files of the driver by editing the affected comments. Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: rtl8712: rtl871x_mp_ioctl: Remove exceptional & on function nameAmitoj Kaur Chawla
In this file, function names are otherwise used as pointers without &. The Coccinelle semantic patch that is used to make this change is as follows: // <smpl> @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f @m@ type T; identifier f; @@ T f(...); @@ identifier m.f; @@ - &f + f // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> 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>
2011-09-06staging: r8712u: Merging Realtek's latest (v2.6.6). No power tracking OID.Ali Bahar
The call to oid_rt_pro_set_power_tracking_hdl() is no longer available. The function's definition remains, though it is currently unused. Signed-off-by: Ali Bahar <ali@internetDog.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06staging: r8712u: Merging Realtek's latest (v2.6.6). Removed redundant .mem.Ali Bahar
recv_frame.mem mp_xmit_frame.mem mp_xmit_packet.mem were not used, and so are now removed. Signed-off-by: Ali Bahar <ali@internetDog.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06staging: r8712u: Merging Realtek's latest (v2.6.6). Copyright banners.Ali Bahar
Only copyright banners have been added to these files. No functional changes. Signed-off-by: Ali Bahar <ali@internetDog.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-20staging: rtl8712: fixed coding style issuesJavier M. Mellid
Fixed some style and format issues with headers. Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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>