aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/wilc1000
AgeCommit message (Collapse)AuthorFilesLines
2017-10-18staging: wilc1000: replace redundant computations with 0Gravatar Colin Ian King 1-3/+3
Shifting and masking strHostIfSetMulti->enabled is redundant since enabled is a bool and so all the shifted and masked values will be zero. Replace them with zero to simplify the code. Detected by CoverityScan, CID#1339458 ("Bad shift operation") and CID#1339506 ("Operands don't affect result"). Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging/wilc1000: Convert timers to use timer_setup()Gravatar Kees Cook 3-20/+28
As part of removing the timer_list.data field, this converts the wilc1000 driver to using from_timer and an explicit per-timer data field, since there doesn't appear to be a way to sanely resolve vif from hif_drv. Cc: Aditya Shankar <aditya.shankar@microchip.com> Cc: Ganesh Krishna <ganesh.krishna@microchip.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-wireless@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-29staging: wilc1000: Blank lines aren't necessary before a close brace '}'Gravatar Keerthi Reddy 1-1/+0
Before closing the brace, the blank line is not needed. That blank line has not meaning here. so remove it. Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-29staging: wilc1000: No space is necessary after a castGravatar Keerthi Reddy 1-1/+1
A space after type casting is not needed. All the other typecasts in this file don't put space after typecast. so remove space after typecast at this line. checked with checkpatch.pl script Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-30staging: wilc1000: fix spelling mistake: "Iinitialization" -> "initialization"Gravatar Colin Ian King 1-1/+1
Trivial fix to spelling mistake in netdev_err message Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-16staging: wilc1000: fix variable signednessGravatar Ilia Sergachev 1-1/+2
txq_count receives a value from wilc_wlan_handle_txq() and therefore should be u32 found using sparse: drivers/staging/wilc1000/linux_wlan.c:306:58: warning: incorrect type in argument 2 (different signedness) Signed-off-by: Ilia Sergachev <ilia.sergachev@unibas.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-16staging: wilc1000: add parameter name to function definitionGravatar Dmitriy Cherkasov 1-2/+2
Add missing parameter name to fix the following checkpatch.pl warning: WARNING: function definition argument 'struct device *' should also have an identifier name Signed-off-by: Dmitriy Cherkasov <dmitriy@oss-tech.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-16staging: wilc1000: fix a typo: "incative" -> "inactive"Gravatar Colin Ian King 1-2/+2
Trivial fix to typos in netdev_err error messages. I should have spotted this in a previous round of spelling mistake checks on this driver but this one slipped through. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-16staging: wilc1000: Neaten refresh_scan - remove always 1 argumentGravatar Joe Perches 1-37/+28
All uses of refresh_scan() have a constant 1 as the second argument. Remove it and neaten the function declaration. Miscellanea: o Remove overly deep indentation by using continue; o Remove unnecessary test of the address of a static array as it's always non-zero o Rename and use proper type for the first void * argument as it's always the struct wilc_priv * o Move variables into loop where used Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-05Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextGravatar Linus Torvalds 2-7/+7
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 ...
2017-06-29staging: wilc1000: fix spelling mistake: "dissconect" -> "disconnect"Gravatar Colin Ian King 1-1/+1
Trivial fix to spelling mistake in netdev_err error message Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-16networking: make skb_push & __skb_push return void pointersGravatar Johannes Berg 1-3/+3
It seems like a historic accident that these return unsigned char *, and in many places that means casts are required, more often than not. Make these functions return void * and remove all the casts across the tree, adding a (u8 *) cast only where the unsigned char pointer was used directly, all done with the following spatch: @@ expression SKB, LEN; typedef u8; identifier fn = { skb_push, __skb_push, skb_push_rcsum }; @@ - *(fn(SKB, LEN)) + *(u8 *)fn(SKB, LEN) @@ expression E, SKB, LEN; identifier fn = { skb_push, __skb_push, skb_push_rcsum }; type T; @@ - E = ((T *)(fn(SKB, LEN))) + E = fn(SKB, LEN) @@ expression SKB, LEN; identifier fn = { skb_push, __skb_push, skb_push_rcsum }; @@ - fn(SKB, LEN)[0] + *(u8 *)fn(SKB, LEN) Note that the last part there converts from push(...)[0] to the more idiomatic *(u8 *)push(...). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-16networking: introduce and use skb_put_data()Gravatar Johannes Berg 2-4/+4
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>
2017-06-13staging: wilc1000: New cfg packet format in handle_set_wfi_drv_handlerGravatar Aditya Shankar 6-48/+71
Change the config packet format used in handle_set_wfi_drv_handler() to align the host driver with the new format used in the wilc firmware. The change updates the format in which the host driver provides the firmware with the drv_handler index and also uses two new fields viz. "mode" and 'name" in the config packet along with this index to directly provide details about the interface and its mode to the firmware instead of having multiple if-else statements in the host driver to decide which interface to configure. This change requires users to move to the newer version of the wilc firmware(14.02 or higher) available on the vendor tree on github or on the linux-firmware project. The existing firmware files on the linux-firmware project are very old and best not used. Signed-off-by: Aditya Shankar <aditya.shankar@microchip.com> Reviewed-by: Arend Van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: wilc1000: add missing blank line after struct declarationGravatar Marko Stankovic 1-0/+1
Fix a missing blank line issue reported by checkpatch.pl Signed-off-by: Marko Stankovic <dartnorris@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: wilc1000: remove excessive blank linesGravatar Marko Stankovic 1-15/+0
Fix the multiple blank lines issue reported by checkpatch.pl Signed-off-by: Marko Stankovic <dartnorris@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: wilc1000: Fixing struct definition layoutGravatar Vincent Siles 1-1/+6
Split struct definition across multiple line to fit in the 80 characters limit Signed-off-by: Vincent Siles <vincent.siles@provenrun.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: wilc1000: Function calls too longGravatar Vincent Siles 1-2/+4
Splitting function calls across multiple lines to fit in the 80 characters limit Signed-off-by: Vincent Siles <vincent.siles@provenrun.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: wilc1000: Function signature too longGravatar Vincent Siles 1-3/+5
Splitting functions signature across several lines to fin in the 80 characters limit Signed-off-by: Vincent Siles <vincent.siles@provenrun.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: wilc1000: Stripping '-' commentsGravatar Vincent Siles 1-3/+3
Removing some '-' comments to fit in the 80 characters limit Signed-off-by: Vincent Siles <vincent.siles@provenrun.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: wilc1000: Last line is emptyGravatar Vincent Siles 1-1/+0
Removing empty line at the end of the file Signed-off-by: Vincent Siles <vincent.siles@provenrun.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: wilc1000: Refactor handling of HT caps fieldsGravatar Jason Litzinger 3-41/+7
This addresses the following sparse warnings: drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2006:51: warning: incorrect type in assignment (different base types) drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2006:51: expected unsigned short [unsigned] [assigned] [usertype] ht_capa_info drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2006:51: got restricted __le16 const [usertype] cap_info drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2011:52: warning: incorrect type in assignment (different base types) drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2011:52: expected unsigned short [unsigned] [assigned] [usertype] ht_ext_params drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2011:52: got restricted __le16 const [usertype] extended_ht_cap_info drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2012:51: warning: incorrect type in assignment (different base types) drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2012:51: expected unsigned int [unsigned] [assigned] [usertype] ht_tx_bf_cap drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2012:51: got restricted __le32 const [usertype] tx_BF_cap_info drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2078:51: warning: incorrect type in assignment (different base types) drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2078:51: expected unsigned short [unsigned] [assigned] [usertype] ht_capa_info drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2078:51: got restricted __le16 const [usertype] cap_info drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2083:52: warning: incorrect type in assignment (different base types) drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2083:52: expected unsigned short [unsigned] [assigned] [usertype] ht_ext_params drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2083:52: got restricted __le16 const [usertype] extended_ht_cap_info drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2084:51: warning: incorrect type in assignment (different base types) drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2084:51: expected unsigned int [unsigned] [assigned] [usertype] ht_tx_bf_cap drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2084:51: got restricted __le32 const [usertype] tx_BF_cap_info This is not the first attempt to address this problem: https://lkml.org/lkml/2017/3/7/808 First, the current code works because the final use of the ht_capa values (in host_interface.c: WILC_HostIf_PackStaParam) packs them into a buffer in little-endian format. Since this matches the byte-order of struct ieee80211_ht_cap, all is seemingly well. What the current code does not do, and what these warnings expose, is clearly communicate what the fields in struct add_sta_param represent -- values with a specific (little endian) byte order. This will lead to problems if the values are ever actually used by the host, and that host is not little endian. The proposed change addresses this by embedding a struct ieee80211_ht_cap into struct add_sta_param. When the values are later packed out, the newly embedded struct is copied directly into the outbound buffer. All 16 and 32 bit types are treated as little endian and marked as such. Future use of the values by the host would still require conversion, or sparse would flag them again. The following items are required for this to be correct: 1. The data is not currently used by the host. 2. struct ieee80211_ht_cap is packed. 3. The packing of the fields matches the order in struct ieee80211_ht_cap. This is similar, I believe, to how the same data is handled in marvell/mwifiex/11n.c. Test-compiled/loaded against staging-next on x86_64 Test-compiled against staging-next for ARM. Applied/built against staging-testing. Testing consists of compilation for the above trees/targets, and a sparse check, no functional testing. Signed-off-by: Jason Litzinger <jlitzingerdev@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-05Merge tag 'staging-4.12-rc1' of ↵Gravatar Linus Torvalds 10-167/+146
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO updates from Greg KH: "Here is the big staging tree update for 4.12-rc1. It's a big one, adding about 350k new lines of crap^Wcode, mostly all in a big dump of media drivers from Intel. But there's other new drivers in here as well, yet-another-wifi driver, new IIO drivers, and a new crypto accelerator. We also deleted a bunch of stuff, mostly in patch cleanups, but also the Android ION code has shrunk a lot, and the Android low memory killer driver was finally deleted, much to the celebration of the -mm developers. All of these have been in linux-next with a few build issues that will show up when you merge to your tree" Merge conflicts in the new rtl8723bs driver (due to the wifi changes this merge window) handled as per linux-next, courtesy of Stephen Rothwell. * tag 'staging-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1182 commits) staging: fsl-mc/dpio: add cpu <--> LE conversion for dpaa2_fd staging: ks7010: remove line continuations in quoted strings staging: vt6656: use tabs instead of spaces staging: android: ion: Fix unnecessary initialization of static variable staging: media: atomisp: fix range checking on clk_num staging: media: atomisp: fix misspelled word in comment staging: media: atomisp: kmap() can't fail staging: atomisp: remove #ifdef for runtime PM functions staging: atomisp: satm include directory is gone atomisp: remove some more unused files atomisp: remove hmm_load/store/clear indirections atomisp: kill off mmgr_free atomisp: clean up the hmm init/cleanup indirections atomisp: handle allocation calls before init in the hmm layer staging: fsl-dpaa2/eth: Add maintainer for Ethernet driver staging: fsl-dpaa2/eth: Add TODO file staging: fsl-dpaa2/eth: Add trace points staging: fsl-dpaa2/eth: Add driver specific stats staging: fsl-dpaa2/eth: Add ethtool support staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver ...
2017-04-28staging: wilc1000: fix unchecked return valueGravatar Pan Bian 1-0/+2
Function dev_alloc_skb() will return a NULL pointer if there is no enough memory. However, in function WILC_WFI_mon_xmit(), its return value is used without validation. This may result in a bad memory access bug. This patch fixes the bug. Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-13cfg80211: move add/change interface monitor flags into paramsGravatar Johannes Berg 1-2/+1
Instead passing both flags, which can be NULL, and vif_params, which are never NULL, move the flags into the vif_params and use BIT(0), which is invalid from userspace, to indicate that the flags were changed. While updating all drivers, fix a small bug in wil6210 where it was setting the flags to 0 instead of leaving them unchanged. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-04-08staging: wilc1000: fix incorrect strncasecmp lengthGravatar Colin Ian King 1-2/+2
The strncasecmp of buff against the literal string RSSI is using variable length which is zero. This should be instead using the variable size instead. Also remove the redundant variable length. Detected by PVS-Studio, warning: V575 Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging: wilc1000: Fix problem with wrong vif indexGravatar Aditya Shankar 1-1/+2
The vif->idx value is always 0 for two interfaces. wl->vif_num = 0; loop { ... vif->idx = wl->vif_num; ... wl->vif_num = i; .... i++; ... } At present, vif->idx is assigned the value of wl->vif_num at the beginning of this block and device is initialized based on this index value. In the next iteration, wl->vif_num is still 0 as it is only updated later but gets assigned to vif->idx in the beginning. This causes problems later when we try to reference a particular interface and also while configuring the firmware. This patch moves the assignment to vif->idx from the beginning of the block to after wl->vif_num is updated with latest value of i. Fixes: commit 735bb39ca3be ("staging: wilc1000: simplify vif[i]->ndev accesses") Cc: <stable@vger.kernel.org> Signed-off-by: Aditya Shankar <aditya.shankar@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging: wilc1000: Use new format for configuring firmwareGravatar Aditya Shankar 1-23/+36
The configuration packet format has changed in the newer wilc firmware versions 14.2 and up. This update ensures that the firmware is initialized correctly by the host and configured in the required mode. Signed-off-by: Aditya Shankar <aditya.shankar@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29drivers/staging/wilc1000: Removing explicit function tracing using dev_dbg/infoGravatar Pushkar Jambhlekar 1-4/+0
ftrace can be used to trace functions. Removing function tracing using dev_dbg/info Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29drivers/staging/wilc1000: Using __func__ instead of hardcoded function nameGravatar Pushkar Jambhlekar 1-2/+2
dev_err: replacing hardcoded function name with '%s' and __func__ Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-17Staging: wilc1000: fix two typos in #define'sGravatar Dylan Leggio 1-6/+6
GAS_INTIAL_REQ should be GAS_INITIAL_REQ. GAS_INTIAL_RSP should be GAS_INITIAL_RSP. Improves readability of code. Signed-off-by: Dylan Leggio <dleggio1@binghamton.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-17staging: wilc1000: fix incorrect copy of pmkid dataGravatar Colin Ian King 1-1/+1
The pmkid data is meant be be copied to the previous item in the pmkidlist, however the code is just copying the data to itself because the src index into pmkidlist is the same as the dst index into pmkidlist. Fix this with i + 1 instead of i. Detected by CoverityScan,CID#13339465 ("Overlapping buffer in memory copy") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16staging: wilc1000: Remove unnecessary bracketsGravatar Tamara Diaconita 1-21/+18
Remove unnecessary brackets and correspondingly unindent code. Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16staging: wilc1000: Correct name of variablesGravatar Tamara Diaconita 1-4/+4
Correct misspelled variables: 'happended' to 'happened' to make the code grammatically correct. Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16staging: wilc1000: Declare variables to top of functionGravatar Tamara Diaconita 1-9/+5
Move declaration of variables to top of function to make the code more readable. Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: wilc1000: Remove useless cast.Gravatar Varsha Rao 1-1/+1
Variable ip_addr is already declared as pointer to u8. Again explicit type casting of ip_addr to u8, is not required. Hence this patch removes it by using the following coccinelle script. @@ type T; T *ptr,p; @@ ( - (T *)(&p) + &p | - (T *)ptr + ptr | - (T *)(ptr) + ptr | - (T)(p) + p ) 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>
2017-03-09staging: wilc1000: removes redundant 'continue' in while loop conditional blocksGravatar Tahia Khan 1-7/+0
Removing 6 continue statements from a while loop. The continue statements are redundant here since control already returns to the beginning of the loop upon exit of any of the conditional blocks. Found using Coccinelle. Signed-off-by: Tahia Khan <tahia.khan@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: wilc1000: Fixes camel-casing in wilc_gnrl_info_receivedGravatar Tahia Khan 2-8/+6
Fixes checkpatch warning by renaming pu8Buffer to buffer and u32Length to length in wilc_gnrl_info_received. Signed-off-by: Tahia Khan <tahia.khan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: wilc1000: Fixes camel-casing in wilc_network_info_receivedGravatar Tahia Khan 2-8/+6
Fixes checkpatch warning by renaming pu8Buffer to buffer and u32Length to length in wilc_network_info_received. Signed-off-by: Tahia Khan <tahia.khan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: wilc1000: Fixes camel-casing in wilc_scan_complete_receivedGravatar Tahia Khan 2-5/+3
Fixes checkpatch warning by renaming pu8Buffer to buffer and u32Length to length in wilc_scan_complete_received. Signed-off-by: Tahia Khan <tahia.khan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09Staging:wilc1000:wilc_spi: Added blank line after function and modified ↵Gravatar Georgios Emmanouil 1-5/+2
comment style Added blank line after function and modified comment style. Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09Staging:wilc1000:wilc_spi: Fixed spelling errorGravatar Georgios Emmanouil 1-4/+4
Fixed spelling error. 'unkmown' to 'unknown'. Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09Staging:wilc1000:wilc_spi: Fixed comment style to the preferred kernel ↵Gravatar Georgios Emmanouil 1-8/+6
comment style Fixed comment style to the preferred kernel comment style. Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09Staging:wilc1000:wilc_sdio: Modified comment style to preferred kernel ↵Gravatar Georgios Emmanouil 1-8/+5
comment style Modified comment style to preferred kernel comment style. Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09Staging:wilc1000:host_interface: Integrated two 'if' statements to a single ↵Gravatar Georgios Emmanouil 1-7/+5
'if' statement Removed unnecessary 'if' statement and integrated the condition to the previous 'if' statement. Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09Staging:wilc1000:host_interface: Removed unnecessary blank lineGravatar Georgios Emmanouil 1-1/+0
Removed unnecessary blank line. Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-07staging: wilc1000: Logical continuations should be on the previous lineGravatar Arushi Singhal 2-8/+8
This patch fixes the checkpatch issue: CHECK: Logical continuations should be on the previous line. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-07staging: wilc1000: function prototype argument should have identifier nameGravatar Arushi Singhal 1-3/+3
function prototype argument should have an identifier name as reported by checkpatch.pl. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-07staging: wilc1000: Alignment should match open parenthesisGravatar Arushi Singhal 4-15/+15
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: wilc1000: add check for kmalloc allocation failure.Gravatar Colin Ian King 1-0/+2
Add a sanity check that wid.val has been allocated, fixes a null pointer deference on stamac when calling ether_add_copy. Detected by CoverityScan, CID#1369537 ("Dereference null return value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>