summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8712/rtl8712_xmit.c
AgeCommit message (Collapse)Author
2021-06-03Staging: rtl8712: Cleanup coding style warningKhoa Tran Minh
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-04-06staging: rtl8712: add space before binary operatorDeborah Brouwer
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 Brouwer
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 Brouwer
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 Brouwer
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>
2019-08-14staging: rtl8712: r8712_dump_aggr_xframe(): Change type to voidNishka Dasgupta
Change return type of r8712_dump_aggr_xframe from u8 to void as it always returns _SUCCESS and its return value is never used. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-4-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: rtl8712: r8712_xmitframe_aggr_1st(): Change return type to voidNishka Dasgupta
Change return type of r8712_xmitframe_aggr_1st from u8 to void as it always returns _SUCCESS and its return value is never used. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-3-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: rtl8712: r8712_append_mpdu_unit(): Change return typeNishka Dasgupta
Change return type of r8712_append_mpdu_unit from u8 to void and remove its return statement as it always returns only _SUCCESS. Modify call sites to simply call this function instead of checking its return value, and execute all the statements in the if-block for when the function returns _SUCCESS. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-2-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: rtl8712: r8712_construct_txaggr_cmd_hdr(): Change return typeNishka Dasgupta
Change return type of r8712_construct_txaggr_cmd_hdr from u8 to void as it always returns _SUCCESS and its return value is never used. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190809052353.5308-8-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: rtl8712: r8712_construct_txaggr_cmd_desc(): Change return typeNishka Dasgupta
Change return type of r8712_construct_txaggr_cmd_desc from u8 to void (and remove its return statement) as it always returns _SUCCESS and its return value is never stored, checked or otherwise used. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190809052353.5308-7-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: rtl8712: r8712_xmit_direct(): Change return typeNishka Dasgupta
Change return type of r8712_xmit_direct from int to void as its return value is never used. Remove return statement accordingly. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190809052353.5308-6-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-08staging: rtl8712: r8712_xmit_classifier(): Change return values and typeNishka Dasgupta
Change return values of r8712_xmit_classifier from _SUCCESS and _FAIL to 0 and -EINVAL respectively. Modify call site to check for non-zero return values instead of _FAIL. Change return type from sint to int. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20190808064012.12661-10-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-22staging: rtl8712: remove redundant assignment to variable resColin Ian King
The variable res is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190705082554.15588-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20staging: rtl8712: get rid of IS_MCASTMichael Straube
Use is_multicast_ether_addr instead of custom IS_MCAST and remove the now unused IS_MCAST. All buffers are properly aligned. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-27staging: rtl8712: Remove comparison to trueBranden Bonaby
Remove the comparison to true in the if statement. CHECK: Using comparison to true is error prone. Signed-off-by: Branden Bonaby <brandonbonaby94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-27staging: rtl8712: remove unnecessary parenthesesBranden Bonaby
Remove unnecessary parentheses in rtl8712_xmit.c. Reported by checkpatch. Signed-off-by: Branden Bonaby <brandonbonaby94@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-12-19staging: rtl8712: style fix over 80 characters warningsMartin Homuth
This patch fixes various coding style issues in the rtl8712 module as noted by checkpatch.pl by reducing the characters per line to under 80. It fixes the following checkpatch.pl warning: WARNING: line over 80 characters Signed-off-by: Martin Homuth <martin@martinhomuth.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-16staging: rtl8712: Remove explicit NULL comparisonMuhammad Falak R Wani
Replace the explicit "if (val != NULL)" with if (val). Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8712: Fix some Sparse endian messagesLarry Finger
Sparse reports the following: CHECK drivers/staging/rtl8712/rtl8712_xmit.c drivers/staging/rtl8712/rtl8712_xmit.c:564:42: warning: cast from restricted __le32 drivers/staging/rtl8712/rtl8712_xmit.c:569:42: warning: cast from restricted __le32 drivers/staging/rtl8712/rtl8712_xmit.c:571:42: warning: cast from restricted __le32 Each of these cases is transferring a quantity that is little-endian. There is no need for conversion. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09staging: rtl8712: rtl8712: fixed missing conversion to le32Carlos Palminha
Fixed missing conversion to le32, detected by sparse (invalid assignment from int to __le32) Signed-off-by: Carlos Palminha <palminha@synopsys.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>
2016-09-20Staging: rtl8712: rtl8712_xmit: Use !x instead of x == NULLSandhya Bankar
Use !x instead of x == NULL. This patch was found by checkpatch. Signed-off-by: Sandhya Bankar <bankarsandhya512@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-04-29staging: rtl8712: use container_of() instead of LIST_CONTAINOR()Geliang Tang
This patch drops the local definition of LIST_CONTAINOR(), and uses container_of() instead of it. Signed-off-by: Geliang Tang <geliangtang@163.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-10-16Staging: rtl8712: rtl8712_xmit: Remove useless castShivani Bhardwaj
Explicit typecasting of variables is not required and should be removed. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12staging: rtl8712: use swap() in dequeue_xframe_ex()Fabian Frederick
Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08Staging: fixed multiple spelling errors.Carlos E. Garcia
Fixed multiple spelling errors. Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28staging: rtl8712: add new line after declarationsTapasweni Pathak
This patch fixes checkpatch.pl warning in hal_init.c file WARNING : Missing a blank line after declarations Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: rtl8712: remove wrapper function _queue_emptyJames A Shackleford
_queue_empty is an inline wrapper around list_empty. This patch removes this wrapper function and instead calls list_empty directly. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: rtl8712: remove function get_list_headJames A Shackleford
get_list_head is an inline that returns &list->head. This patch removes this inline and directly applies &list->head where applicable. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: rtl8712: remove wrapper function get_nextJames A Shackleford
get_next is just an inline wrapper around return list->next. This patch removes the wrapper and directly uses list->next where applicable. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: rtl8712: remove wrapper function list_deleteJames A Shackleford
list_delete is just an inline wrapper around list_del_init. This patch removes the wrapper and directly uses list_del_init. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26staging: rtl8712: fix a foo * bar errors reported by checkpatchDevendra Naga
fixes the following error: drivers/staging/rtl8712/rtl8712_xmit.c:379: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10staging: delete all duplicated endian crap from rtl8712 driverPaul Gortmaker
This driver had headers like big_endian.h, little_endian.h, swab.h and yet we can throw them all in the trash can and the thing still builds on x86-64 and ppc, just by deleting the references to the deleted files. Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-09-06staging: r8712u: Merging Realtek's latest (v2.6.6). Tx aggregation.Ali Bahar
Tx Aggregation (CONFIG_R8712_TX_AGGR, known as CONFIG_USB_TX_AGGR in the Realtek tarball) is now added. However, its tests have not been successful! The default in the Realtek tarball is to not build it -- and the Release Notes does not seem to list this as a feature. I have tested the driver with and without this feature; the former does not successfully associate when WPA2 is used. 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). Various fixes.Ali Bahar
In r8712_generate_ie(), HT check is no longer done. Removed r8712_add_ht_addt_info(). Changes to defragmentation handling, and queue selection. Get TSSI command. Added an Ad-Hoc check to is_desired_network() r8712_ind_disconnect() now checks for Linked state. r8712_xmit_bh() now schedules an xmit tasklet. 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). Tx-code refactoring.Ali Bahar
Refactor the TX code to prepare for aggregation. 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>
2010-11-16drivers/staging: Remove unnecessary semicolonsJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> 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>