summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8712/rtl871x_xmit.c
AgeCommit message (Collapse)AuthorFilesLines
2021-05-25staging: rtl8712: Removed unnecessary blank linesHriday Hegde1-1/+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-04-09staging: rtl8712: remove (most of) enum WIFI_FRAME_TYPEChristophe JAILLET1-3/+2
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-07staging: rtl8712: Use constants from <linux/ieee80211.h>Christophe JAILLET1-1/+2
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>
2020-09-22staging: rtl8712: use shorter array initializationsMichael Straube1-4/+3
Use empty brace syntax to initialize zero valued arrays. Simplifies and shortens the code a little bit. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200919085032.32453-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-22staging: rtl8712: clean up comparsions to NULLMichael Straube1-12/+12
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>
2020-09-16staging: rtl8712: convert tasklets to use new tasklet_setup() APIAllen Pais1-2/+1
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: Allen Pais <apais@linux.microsoft.com> Link: https://lore.kernel.org/r/20200916061831.57848-1-allen.lkml@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-16staging: rtl8712: switch to common ieee80211 headersPascal Terjan1-1/+1
This patch switches to <linux/ieee80211.h> and <net/cfg80211.h> and deletes a lot of duplicate definitions plus many unused ones. Non obvious changes: - struct ieee80211_ht_cap is different enough that I preferred to keep (and rename) it for now. - mcs_rate in translate_scan was not read after being set, so I deleted that part rather than using the renamed struct - WLAN_CAPABILITY_BSS is replaced with WLAN_CAPABILITY_ESS which is the corresponding one with same value Signed-off-by: Pascal Terjan <pterjan@google.com> Link: https://lore.kernel.org/r/20200609194848.166130-1-pterjan@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13staging: rtl8712: fix multiline derefernce warningsAiman Najjar1-7/+4
This patch fixes remaining checkpatch warnings in rtl871x_xmit.c: WARNING: Avoid multiple line dereference - prefer 'psecuritypriv->PrivacyKeyIndex' 636: FILE: drivers/staging//rtl8712/rtl871x_xmit.c:636: + (u8)psecuritypriv-> + PrivacyKeyIndex); WARNING: Avoid multiple line dereference - prefer 'psecuritypriv->XGrpKeyid' 643: FILE: drivers/staging//rtl8712/rtl871x_xmit.c:643: + (u8)psecuritypriv-> + XGrpKeyid); WARNING: Avoid multiple line dereference - prefer 'psecuritypriv->XGrpKeyid' 652: FILE: drivers/staging//rtl8712/rtl871x_xmit.c:652: + (u8)psecuritypriv-> + XGrpKeyid); Signed-off-by: Aiman Najjar <aiman.najjar@hurranet.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/98805a72b92e9bbf933e05b827d27944663b7bc1.1585508171.git.aiman.najjar@hurranet.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13staging: rtl8712: code improvements to make_wlanhdrAiman Najjar1-63/+60
1. Refactor make_wlanhdr to improve code style. 2. Use ether_addr_copy instead of memcpy to copy addresses. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Aiman Najjar <aiman.najjar@hurranet.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/275773a0379e4a03839cd832d2ed952fd7bfee48.1585508171.git.aiman.najjar@hurranet.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13staging: rtl8712: fix checkpatch warningsAiman Najjar1-8/+7
This patch fixes multiline dereference warnings in rtl871x_xmit.c: WARNING: Avoid multiple line dereference - prefer 'psecuritypriv->XGrptxmickey' 379: FILE: drivers/staging//rtl8712/rtl871x_xmit.c:379: + psecuritypriv-> + XGrptxmickey[psecuritypriv-> WARNING: Avoid multiple line dereference - prefer 'psecuritypriv->XGrpKeyid' 380: FILE: drivers/staging//rtl8712/rtl871x_xmit.c:380: + XGrptxmickey[psecuritypriv-> + XGrpKeyid].skey); Signed-off-by: Aiman Najjar <aiman.najjar@hurranet.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/ddd296c34c5b0206dfe5cf2e6cbe40e0a118c257.1585508171.git.aiman.najjar@hurranet.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13staging: rtl8712: fix long-line checkpatch warningAiman Najjar1-2/+2
This patch fixes the following warning in rtl871x_xmit.c: WARNING: line over 80 characters 130: FILE: drivers/staging//rtl8712/rtl871x_xmit.c:130: + pxmitbuf->pallocated_buf = kmalloc(MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ, Signed-off-by: Aiman Najjar <aiman.najjar@hurranet.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/de477e0d8f352c1d6cd75d64d84ac6f9017db254.1585508171.git.aiman.najjar@hurranet.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13staging: rtl8712: fix checkpatch long-line warningAiman Najjar1-2/+3
This patch fixes these two long-line checkpatch warnings in rtl871x_xmit.c: WARNING: line over 80 characters \#74: FILE: drivers/staging//rtl8712/rtl871x_xmit.c:74: + * Please allocate memory with the sz = (struct xmit_frame) * NR_XMITFRAME, WARNING: line over 80 characters \#79: FILE: drivers/staging//rtl8712/rtl871x_xmit.c:79: + kmalloc(NR_XMITFRAME * sizeof(struct xmit_frame) + 4, GFP_ATOMIC); Signed-off-by: Aiman Najjar <aiman.najjar@hurranet.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/acd523d0d24cc81fae9eb933a066d87815587cee.1585508171.git.aiman.najjar@hurranet.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-16staging: rtl*: Remove tasklet callback castsKees Cook1-3/+2
In order to make the entire kernel usable under Clang's Control Flow Integrity protections, function prototype casts need to be avoided because this will trip CFI checks at runtime (i.e. a mismatch between the caller's expected function prototype and the destination function's prototype). Many of these cases can be found with -Wcast-function-type, which found that the rtl wifi drivers had a bunch of needless function casts. Remove function casts for tasklet callbacks in the various drivers. Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/201911150926.2894A4F973@keescook Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: rtl8712: xmitframe_addmic(): Change return values and typeNishka Dasgupta1-6/+6
Change return values of xmitframe_addmic from _SUCCESS and _FAIL to 0 and -ENOMEM respectively. Modify call sites to check for non-zero values instead of _FAIL. Also change return type from sint to int. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-1-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: rtl8712: r8712_free_xmitbuf(): Change return typeNishka Dasgupta1-3/+2
Change return type of r8712_free_xmitbuf from int to void (and remove its return values) as its return value is never used. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190809052353.5308-5-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: rtl8712: make_wlanhdr(): Change return values and typeNishka Dasgupta1-5/+5
Change return values of make_wlanhdr from _SUCCESS/_FAIL to 0/-EINVAL. 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> Link: https://lore.kernel.org/r/20190809052353.5308-4-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: rtl8712: r8712_update_attrib(): Change return values and typeNishka Dasgupta1-8/+8
Change return values of r8712_update_attrib from _SUCCESS and _FAIL to 0 and -ENOMEM or -EINVAL respectively. Modify call site to check for the new failure conditions. Also modify the return type from sint to int. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190809052353.5308-2-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: rtl8712: _r8712_init_xmit_priv(): Change return values and typeNishka Dasgupta1-7/+7
Change the return values in _r8712_init_xmit_priv from _SUCCESS/_FAIL to 0/-ENOMEM respectively. Change return type from sint to int. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190809052353.5308-1-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 Dasgupta1-4/+4
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-01staging: rtl8712: r8712_xmit_resource_alloc(): Change return valuesNishka Dasgupta1-1/+2
Change call site of function r8712_xmit_resource_alloc to add a check for its return value. Change return values of r8712_xmit_resource_alloc from _SUCCESS/_FAIL to 0/-ENOMEM. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-13staging: rtl8712: Fixed CamelCase wkFilterRxFF0 renamed to wk_filter_rx_ff0Deepak Mishra1-1/+1
In process of cleaning up struct _adapter in drv_types.h, wkFilterRxFF0 is renamed to to wk_filter_rx_ff0 to fix a checkpatch reported issue. Signed-off-by: Deepak Mishra <linux.dkm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20staging: rtl8712: get rid of IS_MCASTMichael Straube1-6/+6
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-18staging: rtl8712: line over 80 characters.Bhagyashri Dighole1-4/+4
Fix coding style issues, which solves checkpatch.pl warning: "WARNING: line over 80 characters". Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-15staging: rtl8712: clean up various indentation and coding style issuesColin Ian King1-4/+4
There are several statements that are indented incorrectly so fix these. Also remove unnecessary { } braces and clean up a comment. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-03staging: rtl8712: add SPDX identifiersMichael Straube1-13/+1
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>
2018-09-10Staging: rtl8712: Add space between else and opening braceAndré Lehmann1-1/+1
issue found by checkpatch Signed-off-by: André Lehmann <lenneman@web.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-19staging: rtl8712: make unsigned length for rtl8717_get{_wpa_, _wpa2_, _}ieStefano Manni1-1/+1
Fixed r8712_get_ie, r8712_get_wpa_ie, r8712_get_wpa2_ie to have a length as unsigned int pointer instead of signed. Sparse warnings: drivers/staging/rtl8712/rtl871x_ioctl_linux.c:173:27: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8712/rtl871x_ioctl_linux.c:173:27: expected signed int *len drivers/staging/rtl8712/rtl871x_ioctl_linux.c:173:27: got unsigned int *<noident> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:613:35: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8712/rtl871x_ioctl_linux.c:613:35: expected signed int *len drivers/staging/rtl8712/rtl871x_ioctl_linux.c:613:35: got unsigned int *<noident> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1411:67: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1411:67: expected signed int *len drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1411:67: got unsigned int *<noident> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1992:33: warning: incorrect type in argument 2 (different signedness) drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1992:33: expected int *rsn_ie_len drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1992:33: got unsigned int *<noident> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1998:33: warning: incorrect type in argument 2 (different signedness) drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1998:33: expected int *rsn_ie_len drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1998:33: got unsigned int *<noident> drivers/staging/rtl8712/rtl871x_mlme.c:1701:59: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8712/rtl871x_mlme.c:1701:59: expected signed int *len drivers/staging/rtl8712/rtl871x_mlme.c:1701:59: got unsigned int *<noident> Signed-off-by: Stefano Manni <stefano.manni@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging: rtl8712: fixed multiple line derefence issuePrasant Jalan1-6/+5
Checkpatch emits WARNING: Avoid multiple line dereference. Checkpatch warning is fixed by: * Trivial indentation improvement and * Using += instead of + helps shortening the statement. Signed-off-by: Prasant Jalan <prasant.jalan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: r8712u: Fix Sparse warning in rtl871x_xmit.cLarry Finger1-3/+4
Sparse reports the following: CHECK drivers/staging/rtl8712/rtl871x_xmit.c drivers/staging/rtl8712/rtl871x_xmit.c:350:44: warning: restricted __le32 degrades to integer drivers/staging/rtl8712/rtl871x_xmit.c:491:23: warning: incorrect type in initializer (different base types) drivers/staging/rtl8712/rtl871x_xmit.c:491:23: expected unsigned short [usertype] *fctrl drivers/staging/rtl8712/rtl871x_xmit.c:491:23: got restricted __le16 *<noident> drivers/staging/rtl8712/rtl871x_xmit.c:580:36: warning: incorrect type in assignment (different base types) drivers/staging/rtl8712/rtl871x_xmit.c:580:36: expected unsigned short [unsigned] [short] [usertype] <noident> drivers/staging/rtl8712/rtl871x_xmit.c:580:36: got restricted __be16 [usertype] <noident> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21staging: rtl8712: Fix coding style warnings on Block commentsVijai Kumar K1-23/+22
Fixed checkpatch.pl warnings related to Block comments in staging/rtl8712/*.c files. Signed-off-by: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07staging : rtl8712: Free memory when kmalloc failsSouptick Joarder1-1/+4
There are few functions where we need to free previously allocated memory when kmalloc fails. Else it may lead to memory leakage. In _init_cmd_priv() and _r8712_init_xmit_priv(), in few places we are not freeing previously allocated memory when kmalloc fails. Signed-off-by: Souptick joarder <jrdr.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12staging: rtl8712: checkpatch cleanup: block comments using a trailing */Raphaël Beamonte1-6/+12
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-30staging: rtl8712: use container_of() instead of LIST_CONTAINOR()Geliang Tang1-1/+1
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>
2016-03-12Staging: rtl8712: Clean up tests if NULL returned on failureBhumika Goyal1-4/+4
Some functions like kmalloc/usb_alloc_urb/kmalloc_array returns NULL as their return value on failure. !x is generally preferred over x==NULL or NULL==x so make use of !x if the value returned on failure by these functions is NULL. Done using coccinelle: @@ expression e; statement S; @@ e = \(kmalloc\|devm_kzalloc\|kmalloc_array \|devm_ioremap\|usb_alloc_urb\|alloc_netdev\)(...); - if(e==NULL) + if(!e) S Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-06drivers: staging: rtl8712: rtl871x_xmit.c: Fix Comparisons should place the ↵Tapan Prakash T1-2/+2
constant on the right side of the test warning Fixed checkpatch.pl warning 'Comparisons should place the constant on the right side of the test' Signed-off-by: Tapan Prakash T <tapanprakasht@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: rtl8712: use list_first_entry_or_null()Geliang Tang1-22/+11
Use list_first_entry_or_null() instead of list_empty() + LIST_CONTAINOR() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: rtl8712: spaces preferred around operandsLuis de Bethencourt1-10/+10
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-25staging: rtl8712: braces should be used on all armsLuis de Bethencourt1-17/+20
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-25staging: rtl8712: Remove boolean comparisonsLuis de Bethencourt1-19/+19
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-03-16Staging: rtl8712: Eliminate use of _cancel_timerVaishali Thakkar1-2/+1
Use timer API function del_timer_sync instead of driver specific function _cancel_timer as besides deactivating a timer, it also ensures that the timer is stopped on all CPUs before the driver exists. Also, variables timer_cancelled and bool are removed as they are no longer needed. @a@ expression x; identifier y; @@ - _cancel_timer (&x, &y); + del_timer_sync (&x); @@type T; identifier a.y;@@ - T y; ...when != y Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-18staging: rtl8712: remove spaces before commasMax Perepelitsyn1-1/+1
checkpatch.pl fix for ERROR: space prohibited before that ',' (ctx:WxE) Signed-off-by: Max Perepelitsyn <mperepelitsyn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: rtl8712: remove unused variablesSudip Mukherjee1-9/+4
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-10-20staging: rtl8712: Fix unnecessary parentheses style warning in rtl871x_xmit.cEsra Altintas1-1/+1
This fixes the following checkpatch.pl warning: WARNING: Unnecessary parentheses - maybe == should be = ? Signed-off-by: Esra Altintas <es.altintas@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23Staging: rtl8712: use kmalloc_array over kmallocTapasweni Pathak1-2/+2
This patch fixes checkpatch.pl warning in file rtl871x_xmit.c WARNING : prefer kmalloc_array over kmalloc with multiply Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23Staging: rtl8712: Missing a blank line after declarationsAybuke Ozdemir1-1/+3
This patch fixes these warning messages found by checkpatch.pl: WARNING : Missing a blank line after declarations. Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23Staging: rtl8712: Remove unnecessary parentheses.Aybuke Ozdemir1-1/+1
This patch fixes checkpatch.pl warning Unnecessary parentheses in rtl871x_xmit.c Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09staging: rtl8712: remove wrapper function _init_workitem()James A Shackleford1-1/+1
The inline function _init_workitem() is just a wrapper around INIT_WORK(). Oddly, this wrapper accepts 3 parameters while INIT_WORK() only accepts 2. The third parameter is unused. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-27staging: rtl8712: remove wrapper function _queue_emptyJames A Shackleford1-2/+2
_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-27staging: rtl8712: remove function get_list_headJames A Shackleford1-9/+7
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-27staging: rtl8712: remove wrapper function get_nextJames A Shackleford1-4/+4
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>