summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8723au
AgeCommit message (Collapse)Author
2015-10-29staging: rtl8723au: core: Remove unnecessary functionsAmitoj Kaur Chawla
Drop functions that are declared but are not being used anywhere. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: r8723au: remove unneeded forward function declarationsAlison Schofield
Remove unneeded forward function declarations. Addresses checkpatch.pl: WARNING: externs should be avoided in .c files Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: r8723au: move function type in line with function nameAlison Schofield
Move function types to be adjacent to the function names in declarations to improve readability. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: r8723au: insert correct spacing around operandsAlison Schofield
Adds required spacing around operands to improve readability. Corrects checkpatch.pl ERROR: spaces required * Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: r8723au: use kernel preferred style for commentingAlison Schofield
Reworked comments per kernel coding style to improve readability. Corrects checkpatch.pl: WARNING: Block comments use * on subsequent lines WARNING: line over 80 characters Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: r8723au: remove externs and include needed header fileAlison Schofield
Remove extern declaration and add include of header file to get same. Addresses checkpatch.pl: WARNING: externs should be avoided in .c files Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: r8723au: replace explicit NULL comparisons with !Alison Schofield
Replace explicit NULL comparison with ! operator to simplify code. Addresses checkpatch.pl: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: r8723au: use kernel preferred style for commentingAlison Schofield
Reworked comments per kernel coding style to improve readability. Corrects checkpatch.pl: WARNING: Block comments use * on subsequent lines WARNING: line over 80 characters Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24Staging: rtl8723au: Use put_unaligned_le32Shraddha Barke
Introduce the use of function put_unaligned_le32. A simplified version of Coccinelle semantic patch used - @@ identifier tmp; expression ptr; expression y,e; type T; @@ - tmp = cpu_to_le32(y); <+... when != tmp - memcpy(ptr, (T)&tmp, ...); + put_unaligned_le32(y,ptr); ...+> ? tmp = e @@ type T; identifier tmp; @@ - T tmp; ...when != tmp Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: r8723au: add & use local variable to simplify referencesAlison Schofield
Add local variable scanned_queue to rtw_createbss_cmd23a_callback() and use it (5x) to simplify references. Addresses checkpatch.pl WARNING: line over 80 characters Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: r8723au: move constant to right of comparison testAlison Schofield
Move constant to right of comparison test to improve readability. Addresses checkpatch.pl: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: r8723au: replace printk() with netdev_err()Alison Schofield
Replace printk() with netdev_err() for uniform error reporting. Issue found by checkpatch. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: rtl8723au: core: rtw_wlan_util: fix misleading indentationLuis de Bethencourt
For loop is outside of the else branch of the above conditional statement. Fixing misleading indentation. Fix a smatch warning: drivers/staging/rtl8723au/core/rtw_wlan_util.c:528 WMMOnAssocRsp23a() warn: curly braces intended? Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17staging: r8723au: move * to be adjacent to pointer nameAlison Schofield
Move * in pointer types to be adjacent to pointer names per Linux coding style. Addresses checkpatch.pl: ERROR: "foo* bar" should be "foo *bar" Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16staging: r8723au: replace NULL and zero comparison tests with ! operatorAlison Schofield
Replace explicit NULL comparison and zero comparison test with ! operator to simplify code. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16staging: rtl8723au: core: rtw_ap: Remove useless intialisationAmitoj Kaur Chawla
Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16staging: rtl8723au: core: rtw_recv: Remove useless initialisationAmitoj Kaur Chawla
Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16staging: rtl8723au: core: rtw_wlan_util: Remove useless intialisationAmitoj Kaur Chawla
Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16staging: rtl8723au: hal: Remove useless intialisationAmitoj Kaur Chawla
Remove intialisation of a variable that is immediately reassigned. The problem was found using coccinelle semantic patch and further opportunities were identified by hand. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16Staging: rtl8723au: rtw_mlme_ext: Remove unnecessary test expressionShivani Bhardwaj
Logical and-ing of a struct and its member should be replaced by the member only as the struct has already been NULL tested before. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16Staging: rtl8723au: rtl8723a_bt-coexist: Remove unused variableShivani Bhardwaj
A variable is initialized and then assigned values in the code but is never used and therefore, should be removed. Semantic patch used: @@ type T; identifier i; constant C; position p != e.p; @@ - T i@p; <+... when != i - i = C; ...+> Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13Staging: rtl8723au: Use snprintf instead rsprintfKsenija Stanojevic
Macro rsprintf is useless, remove it and use existing function snprintf instead. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: rtl8723au: Fix resource leakMateusz Kulikowski
Firmware was not released properly if kmemdup fails. Addresses-Coverity-Id: 1269118 Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16staging: rtl8723au: Clean up getPowerBase()Jes Sorensen
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16staging: rtl8723au: TurboScanOff is always trueJes Sorensen
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16staging: rtl8723au: Tidy up SetTxPowerLevel8723A()Jes Sorensen
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16staging: rtl8723au: Fold getTxPowerIndex() into PHY_SetTxPowerLevel8723A()Jes Sorensen
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16staging: rtl8723au: Eliminate dummy ccxPowerIndexCheck()Jes Sorensen
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16staging: rtl8723au: Simplify eeprom content checkingJes Sorensen
This eliminates the ugly Hal_EEValueCheck() function Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: rtl8723au: hal: Remove braces for single statement blocksShraddha Barke
The linux kernel coding style discourages use of braces for single statement blocks. This patch removes the unnecessary braces. The error was detected using checkpatch.pl. Coccinelle was used to make the change. Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: rtl8723au: remove unnecessary le32_to_cpuMichał Bartoszkiewicz
The values passed to le32_to_cpu are already in the correct byte order. This fixes four "cast to restricted __le32" sparse warnings. Signed-off-by: Michał Bartoszkiewicz <mbartoszkiewicz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: rtl8723au: remove unimplemented function declarationsLuca Ceresoli
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: rtl8723au: core: Remove unused variableShraddha Barke
This patch discards the variable as it is not used anywhere throughout the kernel. Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging/rtl8723au: Use %pM format specifier to print mac addressAlexander Kuleshov
printk() supports %pM format specifier for printing 6-byte MAC/FDDI addresses in hex notation small buffers, let's use it intead of %x:%x... Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14staging: rtl8723au: Fix Sparse errors in rtw_security.cJacob Kiefer
This patch fixes the following sparse errors: CHECK drivers/staging/rtl8723au/core/rtw_security.c drivers/staging/rtl8723au/core/rtw_security.c:189:39: \ warning: incorrect type in assignment (different base types) drivers/staging/rtl8723au/core/rtw_security.c:189:39: \ expected unsigned int [unsigned] [usertype] <noident> drivers/staging/rtl8723au/core/rtw_security.c:189:39: \ got restricted __le32 [usertype] <noident> drivers/staging/rtl8723au/core/rtw_security.c:197:39: \ warning: incorrect type in assignment (different base types) drivers/staging/rtl8723au/core/rtw_security.c:197:39: \ expected unsigned int [unsigned] [usertype] <noident> drivers/staging/rtl8723au/core/rtw_security.c:197:39: \ got restricted __le32 [usertype] <noident> drivers/staging/rtl8723au/core/rtw_security.c:682:39: \ warning: incorrect type in assignment (different base types) drivers/staging/rtl8723au/core/rtw_security.c:682:39: \ expected unsigned int [unsigned] [usertype] <noident> drivers/staging/rtl8723au/core/rtw_security.c:682:39: \ got restricted __le32 [usertype] <noident> drivers/staging/rtl8723au/core/rtw_security.c:694:39: \ warning: incorrect type in assignment (different base types) drivers/staging/rtl8723au/core/rtw_security.c:694:39: \ expected unsigned int [unsigned] [usertype] <noident> drivers/staging/rtl8723au/core/rtw_security.c:694:39: \ got restricted __le32 [usertype] <noident> Signed-off-by: Jacob Kiefer <jtk54@cornell.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07staging: rtl8723au: rtl8723a_hal_init: Improve code readabilityJohannes Postma
This patch improves code readability in the function rtl8723a_cal_txdesc_chksum. It improves the readability of the argument of the function le16_to_cpu. Signed-off-by: Johannes Postma <jgmpostma@gmail.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07staging: rtl8723au: Fix sparse warning: cast to restricted __le16Johannes Postma
usPtr is used as __le16 *, but was defined as u16 *. This was reported by sparse as: drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:1850:29: warning: cast to restricted __le16 This patch fixes the type of usPtr. Signed-off-by: Johannes Postma <jgmpostma@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-05staging: rtl8723au: fix up coding style warnings reported by checkpatch.pl.Ting-Chih Hsiao
remove spaces at the start of a line align enum variable with other parameters Signed-off-by: Ting-Chih Hsiao <s894330@hotmail.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22staging: rtl8723au: fix incorrect type in assignment warningSteve Pennington
Repaced calls to htons and memcpy with a single call to put_unaligned_be16 to fix the following sparse warning: drivers/staging/rtl8723au/core/rtw_recv.c:1557:21: warning: incorrect type in assignment (different base types) drivers/staging/rtl8723au/core/rtw_recv.c:1557:21: expected unsigned short [unsigned] [assigned] [usertype] len drivers/staging/rtl8723au/core/rtw_recv.c:1557:21: got restricted __be16 [usertype] <noident> Signed-off-by: Steve Pennington <sgpenn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14staging:rtl8723au:odm.c:Removing trailing whitespacesJoglekar Tejas
This patch removes the trailing whitespace error given by checkpatch.pl Signed-off-by: Joglekar Tejas <tjogleka@visteon.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-26Merge tag 'staging-4.2-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here's the big, really big, staging tree patches for 4.2-rc1. Loads of stuff in here, almost all just coding style fixes / churn, and a few new drivers as well, one of which I just disabled from the build a few minutes ago due to way too many build warnings. Other than the one "disable this driver" patch, all of these have been in linux-next for quite a while with no reported issues" * tag 'staging-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1163 commits) staging: wilc1000: disable driver due to build warnings Staging: rts5208: fix CHANGE_LINK_STATE value Staging: sm750fb: ddk750_swi2c.c: Insert spaces before parenthesis Staging: sm750fb: ddk750_swi2c.c: Place braces on correct lines Staging: sm750fb: ddk750_swi2c.c: Insert spaces around operators Staging: sm750fb: ddk750_swi2c.c: Replace spaces with tabs Staging: sm750fb: ddk750_swi2c.h: Shorten lines to under 80 characters Staging: sm750fb: ddk750_swi2c.h: Replace spaces with tabs Staging: sm750fb: modedb.h: Shorten lines to under 80 characters Staging: sm750fb: modedb.h: Replace spaces with tabs staging: comedi: addi_apci_3120: rename 'this_board' variables staging: comedi: addi_apci_1516: rename 'this_board' variables staging: comedi: ni_atmio: cleanup ni_getboardtype() staging: comedi: vmk80xx: sanity check context used to get the boardinfo staging: comedi: vmk80xx: rename 'boardinfo' variables staging: comedi: dt3000: rename 'this_board' variables staging: comedi: adv_pci_dio: rename 'this_board' variables staging: comedi: cb_pcidas64: rename 'thisboard' variables staging: comedi: cb_pcidas: rename 'thisboard' variables staging: comedi: me4000: rename 'thisboard' variables ...
2015-06-17staging:rtl8723au: Fix return statement reported by coccinellePrasanna Karthik
Modified return statement and removed local declaration no longer needed. No Compiler warnings. Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17staging: rtl8723au: include/rtl8723a_hal.h: use __leXX types in fw header structDaniele Alessandrelli
This patch makes fields in struct rt_8723a_firmware_hdr use endianness-aware types (__leXX), thus fixing the following sparse warnings: CHECK drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:263:37: warning: cast to restricted __le16 drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:265:39: warning: cast to restricted __le16 drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:277:13: warning: cast to restricted __le16 drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:277:13: warning: cast to restricted __le16 drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:277:13: warning: cast to restricted __le16 Signed-off-by: Daniele Alessandrelli <daniele.alessandrelli@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17staging: rtl8723au: include/rtl8723a_hal.h: fix Rsvd1 size in fw header structDaniele Alessandrelli
The size of field Rsvd1 in struct rt_8723a_firmware_hdr should be u8 otherwise we exceeds the boundaries of "LONG WORD 0". This patch fixes the issue. Signed-off-by: Daniele Alessandrelli <daniele.alessandrelli@gmail.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17staging: rtl8723au: core: Remove unneeded #ifdefsAndreas Ruprecht
In rtw_mlme_ext.c, nested #ifdef blocks form the following structure inside the file: #ifdef CONFIG_8723AU_AP_MODE (line 1323) [...] #ifdef CONFIG_8723AU_AP_MODE (line 1720) [...] #endif (2 more ifdef blocks with CONFIG_8723AU_AP_MODE follow) [...] #endif /* CONFIG_8723AU_AP_MODE */ (line 1763) The inner #ifdefs are unnecessary as they depend on the same condition as the outer #ifdef and can thus be removed. Signed-off-by: Andreas Ruprecht <andreas.ruprecht@fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-13staging:rtl8723au:rtw_ap:space prohibited between function name & '('Joglekar Tejas
This patch removes the warning "space prohibited between function name and open parenthesis"given by checkpatch.pl Signed-off-by: Joglekar Tejas <tjogleka@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-13staging:rtl8723au:ioctl_cfg80211:spaces required around '>'Joglekar Tejas
This patch removes the error given by checkpatch.pl " spaces required around that '>' " Signed-off-by: Joglekar Tejas <tjogleka@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12staging: rtl8723au: issue_probersp(): remove unused parameterLuca Ceresoli
The is_valid_p2p_probereq is never referenced in the function body. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12staging: rtl8723au: use swap() in WMMOnAssocRsp23a()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-06-08staging: rtl8723au: core: remove redundant endianness conversionDavid Decotigny
Source and destination have the same little-endian annotation: this patch removes incorrect byte-swap on non-LE cpus. This addresses the following sparse warning: drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3911:56: warning: incorrect type in argument 1 (different base types) drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3911:56: expected unsigned short [unsigned] [usertype] val drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3911:56: got restricted __le16 [usertype] BA_timeout_value Signed-off-by: David Decotigny <ddecotig@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>