summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds2017-07-051-3/+2Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull networking updates from David Miller: "Reasonably busy this cycle, but perhaps not as busy as in the 4.12 merge window: 1) Several optimizations for UDP processing under high load from Paolo Abeni. 2) Support pacing internally in TCP when using the sch_fq packet scheduler for this is not practical. From Eric Dumazet. 3) Support mutliple filter chains per qdisc, from Jiri Pirko. 4) Move to 1ms TCP timestamp clock, from Eric Dumazet. 5) Add batch dequeueing to vhost_net, from Jason Wang. 6) Flesh out more completely SCTP checksum offload support, from Davide Caratti. 7) More plumbing of extended netlink ACKs, from David Ahern, Pablo Neira Ayuso, and Matthias Schiffer. 8) Add devlink support to nfp driver, from Simon Horman. 9) Add RTM_F_FIB_MATCH flag to RTM_GETROUTE queries, from Roopa Prabhu. 10) Add stack depth tracking to BPF verifier and use this information in the various eBPF JITs. From Alexei Starovoitov. 11) Support XDP on qed device VFs, from Yuval Mintz. 12) Introduce BPF PROG ID for better introspection of installed BPF programs. From Martin KaFai Lau. 13) Add bpf_set_hash helper for TC bpf programs, from Daniel Borkmann. 14) For loads, allow narrower accesses in bpf verifier checking, from Yonghong Song. 15) Support MIPS in the BPF selftests and samples infrastructure, the MIPS eBPF JIT will be merged in via the MIPS GIT tree. From David Daney. 16) Support kernel based TLS, from Dave Watson and others. 17) Remove completely DST garbage collection, from Wei Wang. 18) Allow installing TCP MD5 rules using prefixes, from Ivan Delalande. 19) Add XDP support to Intel i40e driver, from Björn Töpel 20) Add support for TC flower offload in nfp driver, from Simon Horman, Pieter Jansen van Vuuren, Benjamin LaHaise, Jakub Kicinski, and Bert van Leeuwen. 21) IPSEC offloading support in mlx5, from Ilan Tayari. 22) Add HW PTP support to macb driver, from Rafal Ozieblo. 23) Networking refcount_t conversions, From Elena Reshetova. 24) Add sock_ops support to BPF, from Lawrence Brako. This is useful for tuning the TCP sockopt settings of a group of applications, currently via CGROUPs" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1899 commits) net: phy: dp83867: add workaround for incorrect RX_CTRL pin strap dt-bindings: phy: dp83867: provide a workaround for incorrect RX_CTRL pin strap cxgb4: Support for get_ts_info ethtool method cxgb4: Add PTP Hardware Clock (PHC) support cxgb4: time stamping interface for PTP nfp: default to chained metadata prepend format nfp: remove legacy MAC address lookup nfp: improve order of interfaces in breakout mode net: macb: remove extraneous return when MACB_EXT_DESC is defined bpf: add missing break in for the TCP_BPF_SNDCWND_CLAMP case bpf: fix return in load_bpf_file mpls: fix rtm policy in mpls_getroute net, ax25: convert ax25_cb.refcount from atomic_t to refcount_t net, ax25: convert ax25_route.refcount from atomic_t to refcount_t net, ax25: convert ax25_uid_assoc.refcount from atomic_t to refcount_t net, sctp: convert sctp_ep_common.refcnt from atomic_t to refcount_t net, sctp: convert sctp_transport.refcnt from atomic_t to refcount_t net, sctp: convert sctp_chunk.refcnt from atomic_t to refcount_t net, sctp: convert sctp_datamsg.refcnt from atomic_t to refcount_t net, sctp: convert sctp_auth_bytes.refcnt from atomic_t to refcount_t ...
| * net: manual clean code which call skb_put_[data:zero]yuan linyu2017-06-201-2/+2
| | | | | | | | | | Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
| * networking: introduce and use skb_put_data()Johannes Berg2017-06-161-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common pattern with skb_put() is to just want to memcpy() some data into the new space, introduce skb_put_data() for this. An spatch similar to the one for skb_put_zero() converts many of the places using it: @@ identifier p, p2; expression len, skb, data; type t, t2; @@ ( -p = skb_put(skb, len); +p = skb_put_data(skb, data, len); | -p = (t)skb_put(skb, len); +p = skb_put_data(skb, data, len); ) ( p2 = (t2)p; -memcpy(p2, data, len); | -memcpy(p, data, len); ) @@ type t, t2; identifier p, p2; expression skb, data; @@ t *p; ... ( -p = skb_put(skb, sizeof(t)); +p = skb_put_data(skb, data, sizeof(t)); | -p = (t *)skb_put(skb, sizeof(t)); +p = skb_put_data(skb, data, sizeof(t)); ) ( p2 = (t2)p; -memcpy(p2, data, sizeof(*p)); | -memcpy(p, data, sizeof(*p)); ) @@ expression skb, len, data; @@ -memcpy(skb_put(skb, len), data, len); +skb_put_data(skb, data, len); (again, manually post-processed to retain some comments) Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Staging: rtl8712 : wifi.h: Fixed Macro argument reuseJaya Durga2017-06-251-2/+4
| | | | | | | | | | | | | | | | | | CHECK: Macro argument reuse 'pframe' - possible side-effects? Convert get_tofr_ds macro to inline functions to fix checkpatch check Signed-off-by: Jaya Durga <rjdurga@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: rtl8712: use octal permissionsAleksey Kurbatov2017-05-151-1/+1
| | | | | | | | | | | | | | Using octal permissions instead of symbolic ones is preferred. Signed-off-by: Aleksey Kurbatov <alkbt@yandex.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: rtl8712: ieee80211: fixed camelcase coding style issueJaya Durga2017-05-151-5/+5
| | | | | | | | | | | | | | Fixed coding style issue Signed-off-by: Jaya Durga <rjdurga@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: rtl8712: ieee80211: fixed brace coding style issueJaya Durga2017-05-151-1/+2
|/ | | | | | | Fixed coding style issue Signed-off-by: Jaya Durga <rjdurga@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fixed multiple line derefence issuePrasant Jalan2017-04-081-6/+5Star
| | | | | | | | | | | 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>
* staging: rtl8712: code style fixTejaswini Poluri2017-04-081-5/+5
| | | | | | | | Fixed the warnings from checkpatch.pl on file rtl8712/mlme_linux.c Avoided multiple line dereferences in the code Signed-off-by: Tejaswini Poluri <tejaswinipoluri3@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Invert comparison to reduce indentationNarcisa Ana Maria Vasile2017-03-231-6/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check the condition: "pdata->length < 32" first, to be able to return immediately in case of error and then continue with the rest of the function without one extra indentation level. This was found using the following Coccinelle script: @disable neg_if@ expression e,E; statement S; @@ *if (e) S else { return -E; } @disable neg_if@ expression e,E; statement S; identifier l; @@ *if (e) S else { rc = -E; goto l; } Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Restructure code for clarityNarcisa Ana Maria Vasile2017-03-231-36/+33Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Invert if statements to be able to return immediately in case of error, and to avoid additional else branch. Improve layout of function since there is more horizontal space now. This was found using the following Coccinelle script: @disable neg_if@ expression e,E; statement S; @@ *if (e) S else { return -E; } @disable neg_if@ expression e,E; statement S; identifier l; @@ *if (e) S else { rc = -E; goto l; } Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Invert the test on check_fwstate() to reduce indentationNarcisa Ana Maria Vasile2017-03-231-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Negate if condition to be able to return immediately in case of error, and then continue with the rest of the function without extra indentation level. This was found using the following Coccinelle script: @disable neg_if@ expression e,E; statement S; @@ *if (e) S else { return -E; } @disable neg_if@ expression e,E; statement S; identifier l; @@ *if (e) S else { rc = -E; goto l; } Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Invert if statements to reduce indentation levelNarcisa Ana Maria Vasile2017-03-231-22/+17Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Invert if statements to be able to return immediately in case of error, and to avoid additional else branch, and then continue with the rest of the function without excessive indentation. This was found using the following Coccinelle script: @disable neg_if@ expression e,E; statement S; @@ *if (e) S else { return -E; } @disable neg_if@ expression e,E; statement S; identifier l; @@ *if (e) S else { rc = -E; goto l; } Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: checkpatch: Avoid multiple line dereferencesDing-Chi Wang2017-03-211-6/+4Star
| | | | | | | | | "WARNING: Avoid multiple line dereference - prefer 'poid_par_priv->information_buf_len'" "WARNING: Avoid multiple line dereference - prefer 'padapter->registrypriv.dev_network.Configuration'" "WARNING: Avoid multiple line dereference - prefer 'Adapter->mppriv.workparam.io_value'" Signed-off-by: Ding-Chi Wang <dcwang.tw@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fix bad indentationThibaut SAUTEREAU2017-03-121-1/+1
| | | | | | | Fix bad indentation as reported by checkpatch.pl script. Signed-off-by: Thibaut SAUTEREAU <thibaut.sautereau@telecom-sudparis.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove unnecessary cast on void pointersimran singhal2017-03-091-6/+5Star
| | | | | | | | | | | | | | | | | | | | | | | The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: rtl871x_mp_ioctl.h - style fixDerek Robson2017-03-091-84/+107
| | | | | | | | 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>
* Staging: rtl8712: wlan_bssdef.h - style fixDerek Robson2017-03-061-3/+3
| | | | | | | | 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>
* Staging: rtl8712: wifi.h - style fixDerek Robson2017-03-061-6/+6
| | | | | | | | 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>
* Staging: rtl8712: rtl871x_recv.h - style fixDerek Robson2017-03-061-6/+6
| | | | | | | | 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>
* Staging: rtl8712: rtl871x_pwrctrl.h - style fixDerek Robson2017-03-061-5/+5
| | | | | | | | Fixed style fo block comments Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: rtl871x_mlme.h - style fixDerek Robson2017-03-061-8/+8
| | | | | | | | 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>
* Staging: rtl8712: rtl871x_io.h - style fixDerek Robson2017-03-061-7/+7
| | | | | | | | 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>
* Staging: rtl8712: rtl871x_event.h - style fixDerek Robson2017-03-061-4/+4
| | | | | | | | 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>
* Staging: rtl8712: rtl871x_cmd.h - block commentsDerek Robson2017-03-061-1/+1
| | | | | | | | 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>
* staging: rtl8712: Fix checkpatch.pl warningAlexander Mikhalevich2017-03-061-4/+4
| | | | | | | | WARNING: Avoid multiple line dereference - prefer 'param->u.crypt.key' Signed-off-by: Alexander Mikhalevich <alex.mikhalevich@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove space after a cast.Varsha Rao2017-03-061-1/+1
| | | | | | | | | | This patch fixes the following checkpatch issue: CHECK: No space is necessary after a cast Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Removes the FSF mailing address.Varsha Rao2017-03-061-4/+0Star
| | | | | | | | | | | This patch fixes the checkpatch issue by removing the Free Software Foundation's mailing address from the sample GPL notice. Because the FSF has changed address in the past, and may change again. Linux already includes a copy of the GPL. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Moved logical OR operator to previous line.Varsha Rao2017-03-061-2/+3
| | | | | | | | | | | Moved logical OR operator to previous line to fix the following checkpatch issue: CHECK: Logical continuations should be on the previous line. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove unnecessary parentheses.Varsha Rao2017-03-061-2/+2
| | | | | | | | | | | Removed unnecessary parentheses around pointers to fix the following checkpatch issues: CHECK: Unnecessary parentheses around padapter->xmitpriv CHECK: Unnecessary parentheses around padapter->recvpriv Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Match alignment with open parenthesis.Varsha Rao2017-03-061-2/+2
| | | | | | | | | | Matched function arguments alignment with its open parenthesis. This patch fixes the following checkpatch issue: CHECK: Alignment should match open parenthesis Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sched/headers: Prepare for new header dependencies before moving code to ↵Ingo Molnar2017-03-022-1/+2
| | | | | | | | | | | | | | | | | | | | <linux/sched/signal.h> We are going to split <linux/sched/signal.h> out of <linux/sched.h>, which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder <linux/sched/signal.h> file that just maps to <linux/sched.h> to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
* staging: r8712u: Fix Sparse warnings in rtl871x_mlme.cLarry Finger2017-02-121-5/+4Star
| | | | | | | | | | | | | | | | | Sparse reports the following: CHECK drivers/staging/rtl8712/rtl871x_mlme.c drivers/staging/rtl8712/rtl871x_mlme.c:1653:46: warning: incorrect type in assignment (different base types) drivers/staging/rtl8712/rtl871x_mlme.c:1653:46: expected unsigned int [unsigned] [usertype] DSConfig drivers/staging/rtl8712/rtl871x_mlme.c:1653:46: got restricted __le32 [usertype] <noident> drivers/staging/rtl8712/rtl871x_mlme.c:1656:56: warning: incorrect type in assignment (different base types) drivers/staging/rtl8712/rtl871x_mlme.c:1656:56: expected unsigned int [unsigned] [usertype] ATIMWindow drivers/staging/rtl8712/rtl871x_mlme.c:1656:56: got restricted __le32 [usertype] <noident> drivers/staging/rtl8712/rtl871x_mlme.c:1712:35: warning: incorrect type in assignment (different base types) drivers/staging/rtl8712/rtl871x_mlme.c:1712:35: expected restricted __le16 [addressable] [usertype] cap_info drivers/staging/rtl8712/rtl871x_mlme.c:1712:35: got int Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8712u: Fix Sparse warnings in rtl871x_ioctl_linux.cLarry Finger2017-02-121-2/+2
| | | | | | | | | | Sparse reports the following: CHECK drivers/staging/rtl8712/rtl871x_ioctl_linux.c drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1422:46: warning: restricted __le16 degrades to integer drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1424:46: warning: restricted __le16 degrades to integer Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8712u: Fix Sparse endian warning in rtl871x_recv.cLarry Finger2017-02-121-2/+3
| | | | | | | | | | | Sparse reports the following: CHECK drivers/staging/rtl8712/rtl871x_recv.c drivers/staging/rtl8712/rtl871x_recv.c:657:21: warning: incorrect type in assignment (different base types) drivers/staging/rtl8712/rtl871x_recv.c:657:21: expected unsigned short [unsigned] [assigned] [usertype] len drivers/staging/rtl8712/rtl871x_recv.c:657:21: got restricted __be16 [usertype] <noident> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8712u: Fix Sparse warning in rtl871x_xmit.cLarry Finger2017-02-121-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>
* staging: r8712u: Fix macros used to read/write the TX/RX descriptorsLarry Finger2017-02-121-57/+52Star
| | | | | | | | | Although the driver works on big-endian hardware, Sparse generates a lot of warnings. Many of these are the result of incorrect coding of these macros. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712u: Fix endian settings for structs describing network packetsLarry Finger2017-02-121-42/+42
| | | | | | | | The headers describing a number of network packets do not have the correct endian settings for several types of data. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Fix some Sparse endian messagesLarry Finger2017-02-121-3/+3
| | | | | | | | | | | | | | | 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>
* staging: rtl8712: rtl8712: fixed missing conversion to le32Carlos Palminha2017-02-091-1/+1
| | | | | | | | 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>
* Staging: rtl8712: fix spelling errorsJoseph Wright2017-01-255-12/+12
| | | | | | | | | | | 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>
* staging: rtl: fix possible NULL pointer dereferenceArnd Bergmann2017-01-161-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | gcc-7 detects that wlanhdr_to_ethhdr() in two drivers calls memcpy() with a destination argument that an earlier function call may have set to NULL: staging/rtl8188eu/core/rtw_recv.c: In function 'wlanhdr_to_ethhdr': staging/rtl8188eu/core/rtw_recv.c:1318:2: warning: argument 1 null where non-null expected [-Wnonnull] staging/rtl8712/rtl871x_recv.c: In function 'r8712_wlanhdr_to_ethhdr': staging/rtl8712/rtl871x_recv.c:649:2: warning: argument 1 null where non-null expected [-Wnonnull] I'm fixing this by adding a NULL pointer check and returning failure from the function, which is hopefully already handled properly. This seems to date back to when the drivers were originally added, so backporting the fix to stable seems appropriate. There are other related realtek drivers in the kernel, but none of them contain a function with a similar name or produce this warning. Cc: stable@vger.kernel.org Fixes: 1cc18a22b96b ("staging: r8188eu: Add files for new driver - part 5") Fixes: 2865d42c78a9 ("staging: r8712u: Add the new driver to the mainline kernel") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:rtl8712 Aligned code with open parenthesisScott Matheina2017-01-071-3/+3
| | | | | | | Aligned code with open parenthesis to fix a checkpatch warning Signed-off-by: Scott Matheina <scott@matheina.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:rtl8712: Removed unnecessary parenthesesScott Matheina2017-01-071-2/+2
| | | | | | | Removed unnecessary parentheses identified by checkpatch Signed-off-by: Scott Matheina <scott@matheina.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: used a better macroJannik Becher2017-01-031-1/+1
| | | | | | | | | Fixed a sparse warning. Using be16_to_cpus() to avoid double assignment. Signed-off-by: Jannik Becher <becher.jannik@gmail.com> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: changed u16 to __be16Jannik Becher2017-01-031-5/+5
| | | | | | | | | Fixed sparse warning. Just changed u16 to __be16 and typecasts. Signed-off-by: Jannik Becher <becher.jannik@gmail.com> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: changed cast to __le16Jannik Becher2017-01-031-7/+7
| | | | | | | | | Fixed sparse warning. Changed u16 to __le16 Signed-off-by: Jannik Becher <becher.jannik@gmail.com> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: changed u32 to __le32Jannik Becher2017-01-033-10/+9Star
| | | | | | | | | Fixed sparse warnings. Deleted cpu_to_le32() for enum. I'm not sure why it was there. Signed-off-by: Jannik Becher <becher.jannik@gmail.com> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fixed little endian problemJannik Becher2017-01-031-1/+1
| | | | | | | | | Fixed a sparse warning. Using function le16_to_cpus() to avoid double assignment. Signed-off-by: Jannik Becher <becher.jannik@gmail.com> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: changed uint to __le32Jannik Becher2017-01-031-2/+3
| | | | | | | | | Fixed a sparse warning. Just changed uint to __le32. Signed-off-by: Jannik Becher <becher.jannik@gmail.com> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>