Commit Graph

312 Commits

Author SHA1 Message Date
Arushi Singhal 27f2d03e59 staging: wilc1000: Alignment should match open parenthesis
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-07 06:53:30 +01:00
Tahia Khan 6d642eaa95 staging: wilc1000: Rename network_info member str_rssi to rssi_history
Change name of str_rssi to rssi_history within the network_info
struct for clarity.

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-06 09:17:05 +01:00
Tahia Khan 36d98c1898 staging: wilc1000: Rename tstrRSSI members and change type of u8Full to bool
Remove Hungarian notation and camel casing from all tstrRSSI members'
names. Additionally, change type of u8Full to bool since it only takes
values 1 or 0.

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-06 09:17:05 +01:00
Masahiro Yamada 1cce200081 scripts/spelling.txt: add "deintialize(d)" pattern and fix typo instances
Fix typos and add the following to the scripts/spelling.txt:

  deintializing||deinitializing
  deintialize||deinitialize
  deintialized||deinitialized

Link: http://lkml.kernel.org/r/1481573103-11329-28-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-27 18:43:47 -08:00
Jacob Zachariah aefc958960 staging:wilc1000: Fix line over 80 characters
Fix a checkpatch.pl WARNING: line over 80 characters

Signed-off-by: Jacob Zachariah <jacob_z@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12 13:22:08 +01:00
Aditya Shankar 05a157403c staging: wilc1000: Connect to highest RSSI value for required SSID
Connect to the highest rssi with the required SSID in the shadow
table if the connection criteria is based only on the SSID.
For the first matching SSID, an index to the table is saved.
Later the index is updated if matching SSID has a higher
RSSI value than the last saved index.

However if decision is made based on BSSID, there is only one match
in the table and corresponding index is used.

changes in v2:
initialize sel_bssi_idx to UINT_MAX.
Combine two checks for identifying
sel_bssi_idx value for a SSID.

Signed-off-by: Aditya Shankar <aditya.shankar@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-10 17:37:25 +01:00
Elise Lennion 68a30a6351 staging: wilc1000: Remove unnecessary extern variables.
Extern variables and functions used in only one file were removed
from .h files, and made static in the .c files they're used.

Extern variable wilc_initialized was declared and never used, so it was
removed.

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-17 09:54:15 +02:00
Mihaela Muraru 3b438f2ca9 Staging: wilc1000: Compress return logic into one line
Simplify function returns by merging assignment and return into
one command line.

Delete unnecesarry return variable.

Found with Coccinelle
@@
expression e, ret;
@@

-ret =
+return
        e;
-return ret

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:34 +02:00
Elise Lennion 855d198826 staging: wilc1000: Add blank line after variable declarations.
Fix checkpath warning:

WARNING: Missing a blank line after declarations.

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:24:49 +02:00
Bhumika Goyal 1c40429dfa Staging: wilc1000: constify cfg80211_ops structures
Check for cfg80211_ops structures that are only passed as the first
argument to the function wiphy_new. As this argument is constant, so
cfg80211_ops structures having this property can also be declared
constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct cfg80211_ops i@p = {...};

@ok1@
identifier r1.i;
position p;
expression e1;
@@
wiphy_new(&i@p,e1)

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct cfg80211_ops i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct cfg80211_ops i;

File size before:
   text	   data	    bss	    dec	    hex	filename
  17468	   2417	  14912	  34797	   87ed
drivers/staging/wilc1000/wilc_wfi_cfgoperations.o

File size after:
   text	   data	    bss	    dec	    hex	filename
  18204	   1681	  14912	  34797	   87ed
drivers/staging/wilc1000/wilc_wfi_cfgoperations.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27 13:02:06 +02:00
Colin Ian King 6c08fda030 staging: wilc1000: correctly check if associatedsta has not been found
The current check for associatedsta being set to -1 to indicate it has
not been found is not working because associatedsta is initialized to
zero and will never be -1.  Fix this by initializing it to ~0 and checking
for ~0 instead.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 17:28:21 +02:00
Linus Torvalds 468fc7ed55 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:

 1) Unified UDP encapsulation offload methods for drivers, from
    Alexander Duyck.

 2) Make DSA binding more sane, from Andrew Lunn.

 3) Support QCA9888 chips in ath10k, from Anilkumar Kolli.

 4) Several workqueue usage cleanups, from Bhaktipriya Shridhar.

 5) Add XDP (eXpress Data Path), essentially running BPF programs on RX
    packets as soon as the device sees them, with the option to mirror
    the packet on TX via the same interface.  From Brenden Blanco and
    others.

 6) Allow qdisc/class stats dumps to run lockless, from Eric Dumazet.

 7) Add VLAN support to b53 and bcm_sf2, from Florian Fainelli.

 8) Simplify netlink conntrack entry layout, from Florian Westphal.

 9) Add ipv4 forwarding support to mlxsw spectrum driver, from Ido
    Schimmel, Yotam Gigi, and Jiri Pirko.

10) Add SKB array infrastructure and convert tun and macvtap over to it.
    From Michael S Tsirkin and Jason Wang.

11) Support qdisc packet injection in pktgen, from John Fastabend.

12) Add neighbour monitoring framework to TIPC, from Jon Paul Maloy.

13) Add NV congestion control support to TCP, from Lawrence Brakmo.

14) Add GSO support to SCTP, from Marcelo Ricardo Leitner.

15) Allow GRO and RPS to function on macsec devices, from Paolo Abeni.

16) Support MPLS over IPV4, from Simon Horman.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1622 commits)
  xgene: Fix build warning with ACPI disabled.
  be2net: perform temperature query in adapter regardless of its interface state
  l2tp: Correctly return -EBADF from pppol2tp_getname.
  net/mlx5_core/health: Remove deprecated create_singlethread_workqueue
  net: ipmr/ip6mr: update lastuse on entry change
  macsec: ensure rx_sa is set when validation is disabled
  tipc: dump monitor attributes
  tipc: add a function to get the bearer name
  tipc: get monitor threshold for the cluster
  tipc: make cluster size threshold for monitoring configurable
  tipc: introduce constants for tipc address validation
  net: neigh: disallow transition to NUD_STALE if lladdr is unchanged in neigh_update()
  MAINTAINERS: xgene: Add driver and documentation path
  Documentation: dtb: xgene: Add MDIO node
  dtb: xgene: Add MDIO node
  drivers: net: xgene: ethtool: Use phy_ethtool_gset and sset
  drivers: net: xgene: Use exported functions
  drivers: net: xgene: Enable MDIO driver
  drivers: net: xgene: Add backward compatibility
  drivers: net: phy: xgene: Add MDIO driver
  ...
2016-07-27 12:03:20 -07:00
Avraham Stern 1d76250bd3 nl80211: support beacon report scanning
Beacon report radio measurement requires reporting observed BSSs
on the channels specified in the beacon request. If the measurement
mode is set to passive or active, it requires actually performing a
scan (passive or active, accordingly), and reporting the time that
the scan was started and the time each beacon/probe was received
(both in terms of TSF of the BSS of the requesting AP). If the
request mode is table, this information is optional.
In addition, the radio measurement request specifies the channel
dwell time for the measurement.

In order to use scan for beacon report when the mode is active or
passive, add a parameter to scan request that specifies the
channel dwell time, and add scan start time and beacon received time
to scan results information.

Supporting beacon report is required for Multi Band Operation (MBO).

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2016-07-06 14:51:31 +02:00
Luis de Bethencourt 4562d224ed staging: wilc1000: arrays can't be NULL
hif_drv->usr_scan_req.net.net_info[i] contains found_net_info structs
which have the following element:
u8 bssid[6];

pstrNetworkInfo, of type network_info, also contains an u8 array named
bssid.

request->ssids is an array of cfg80211_ssid structs. Making ssid:
u8 ssid[IEEE80211_MAX_SSID_LEN];

In these 3 cases the arrays are being checked against NULL, which can't
happen. Removing the checks since they will always be true.

Found with smatch:
drivers/staging/wilc1000/host_interface.c:1234 Handle_RcvdNtwrkInfo() warn: this array is probably non-NULL. 'hif_drv->usr_scan_req.net_info[i].bssid'
drivers/staging/wilc1000/host_interface.c:1235 Handle_RcvdNtwrkInfo() warn: this array is probably non-NULL. 'pstrNetworkInfo->bssid'
drivers/staging/wilc1000/host_interface.c:1253 Handle_RcvdNtwrkInfo() warn: this array is probably non-NULL. 'hif_drv->usr_scan_req.net_info[hif_drv->usr_scan_req.rcvd_ch_cnt].bssid'
drivers/staging/wilc1000/host_interface.c:1254 Handle_RcvdNtwrkInfo() warn: this array is probably non-NULL. 'pstrNetworkInfo->bssid'

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-25 14:41:18 -07:00
Linus Torvalds 2f37dd131c Staging and IIO driver update for 4.7-rc1
Here's the big staging and iio driver update for 4.7-rc1.
 
 I think we almost broke even with this release, only adding a few more
 lines than we removed, which isn't bad overall given that there's a
 bunch of new iio drivers added.  The Lustre developers seem to have
 woken up from their sleep and have been doing a great job in cleaning up
 the code and pruning unused or old cruft, the filesystem is almost
 readable :)
 
 Other than that, just a lot of basic coding style cleanups in the churn.
 All have been in linux-next for a while with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlc/00QACgkQMUfUDdst+ynXYQCdG9oEsw4CCItbjGfQau5YVGbd
 TOcAnA19tZz+Wcg3sLT8Zsm979dgVvDt
 =9UG/
 -----END PGP SIGNATURE-----

Merge tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging and IIO driver updates from Greg KH:
 "Here's the big staging and iio driver update for 4.7-rc1.

  I think we almost broke even with this release, only adding a few more
  lines than we removed, which isn't bad overall given that there's a
  bunch of new iio drivers added.

  The Lustre developers seem to have woken up from their sleep and have
  been doing a great job in cleaning up the code and pruning unused or
  old cruft, the filesystem is almost readable :)

  Other than that, just a lot of basic coding style cleanups in the
  churn.  All have been in linux-next for a while with no reported
  issues"

* tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (938 commits)
  Staging: emxx_udc: emxx_udc: fixed coding style issue
  staging/gdm724x: fix "alignment should match open parenthesis" issues
  staging/gdm724x: Fix avoid CamelCase
  staging: unisys: rename misleading var ii with frag
  staging: unisys: visorhba: switch success handling to error handling
  staging: unisys: visorhba: main path needs to flow down the left margin
  staging: unisys: visorinput: handle_locking_key() simplifications
  staging: unisys: visorhba: fail gracefully for thread creation failures
  staging: unisys: visornic: comment restructuring and removing bad diction
  staging: unisys: fix format string %Lx to %llx for u64
  staging: unisys: remove unused struct members
  staging: unisys: visorchannel: correct variable misspelling
  staging: unisys: visorhba: replace functionlike macro with function
  staging: dgnc: Need to check for NULL of ch
  staging: dgnc: remove redundant condition check
  staging: dgnc: fix 'line over 80 characters'
  staging: dgnc: clean up the dgnc_get_modem_info()
  staging: lustre: lnet: enable configuration per NI interface
  staging: lustre: o2iblnd: properly set ibr_why
  staging: lustre: o2iblnd: remove last of kiblnd_tunables_fini
  ...
2016-05-20 22:20:48 -07:00
Kangjie Lu d13829686b staging: wilc1000: fix infoleak in wilc_wfi_cfgoperations
"mac" is an array allocated in stack without being initialized,
and will be sent out via "nla_put". The dump_station() is supposed
to initialize the mac address; otherwise, sensitive data in kernel
stack will be leaked. To fix this, copy the mac address to it.

Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-03 22:57:14 -07:00
Leo Kim b0f1836fad staging: wilc1000: adds a check routine when performed del_key()
This patch is adds a check routine when performed del_key().
We was find this situation while test the 'rmmod sdio'.
That is received inform a .del_key cmd from cfg80211.
If is not exist wep keys, must be ignore a wilc_remove_wep_key() function.
Thus, adds a check routine that key length of wep.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 21:58:42 -07:00
Leo Kim 8006109ba0 staging: wilc1000: adds a cfg80211_disconnected() function
This patch is adds a cfg80211_disconnected() when connection is lost already.
We was find this situation while test the 'rmmod sdio'.
SDIO remove function are include both remove mac_close and unregister net_device.
That is received one more a disconnect cmd from cfg80211.
Driver was already performed disconnect.
If wilc->close value was set to true, adds a call to cfg80211_disconnected().

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 21:58:42 -07:00
Johannes Berg 57fbcce37b cfg80211: remove enum ieee80211_band
This enum is already perfectly aliased to enum nl80211_band, and
the only reason for it is that we get IEEE80211_NUM_BANDS out of
it. There's no really good reason to not declare the number of
bands in nl80211 though, so do that and remove the cfg80211 one.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2016-04-12 15:56:15 +02:00
Chaehyun Lim 086620978b staging: wilc1000: use mutex instead of struct semaphore hSemScanReq
This patch replaces struct semaphore hSemScanReq with struct mutex
scan_req_lock. It is better to use mutex than semaphore.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29 12:39:52 -07:00
Chaehyun Lim 589c667d8a staging: wilc1000: remove unused struct semaphore SemHandleUpdateStats
struct semaphore SemHandleUpdateStats is defined but never used in this
driver, so just remove it.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29 12:39:52 -07:00
Leo Kim 340a84ff96 staging: wilc1000: replaces frame_type with type of struct frame_reg
This patch replaces frame_type with type of struct frame_reg.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim 89febb21c4 staging: wilc1000: replaces g_struct_frame_reg with frame_reg
This patch replaces g_struct_frame_reg with frame_reg.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Roger H. Newell d5e27e8b83 staging: wilc1000: Removed braces from single block statements
This patch corrects warnings generated by checkpatch.pl by
removing braces from single block statements.

Signed-ff-by: Roger H. Newell <newell.roger@gmail.com>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Leo Kim 8827bd88ef staging: wilc1000: fixed kernel panic when firmware is not started
This patch fixed the problems caused by if firmware is not started.
That is why, in nl80211 put current TX power in interface info.
If firmware is not started, this function(get_tx_power) does not work.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-22 22:22:13 -04:00
Anchal Jain 63f803518c staging: wilc1000: Remove a whitespace before parenthesis
Remove a whitespace before parenthesis "("

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 17:58:46 -08:00
Bhaktipriya Shridhar bc63f50cbb staging: wilc1000: Removed unused variables
Variables pcgroup_encrypt_val,pccipher_group,pcwpa_version,
hold different values at different stages of the execution of
connect(), however they are not being used anywhere.
Hence, the unused variables have been removed.

This was done using Coccinelle.

@@ type T; identifier i; constant c; @@
-T i;
<... when != i
-i = c;
...>

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-01 19:41:45 -08:00
Chaehyun Lim 90f209daa4 staging: wilc1000: rename u16reason in disconnect_info
This patch renames u16reason to reason to remove u16 prefix. There is no
need to use prefix to show data type.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim bb76df5a44 staging: wilc1000: rename struct tstrDisconnectNotifInfo
This patch renames struct tstrDisconnectNotifInfo to disconnect_info to
avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 134b4cf2d5 staging: wilc1000: rename u16ConnectStatus in struct connect_info
This patch renames u16ConnectStatus to status to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 3e7477c240 staging: wilc1000: rename u16RespIEsLen in struct connect_info
This patch renames u16RespIEsLen to resp_ies_len to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 61e1326ff6 staging: wilc1000: rename pu8RespIEs in struct connect_info
This patch renames pu8RespIEs to resp_ies to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 4607f9ccbb staging: wilc1000: rename ReqIEsLen in struct connec_info
This patch renames ReqIEsLen to req_ies_len to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 4ff4857076 staging: wilc1000: rename pu8ReqIEs in struct connect_info
This patch renames pu8ReqIEs to req_ies to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim d4a24e082b staging: wilc1000: rename au8bssid in struct connect_info
This patch renames au8bssid to bssid to remove au8 prefix in struct
connect_info. There is no need to use prefix to show data type of this
variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Chaehyun Lim 3b0437e18a staging: wilc1000: rename struct tstrConnectInfo
This patch renames struct tstrConnectInfo to connect_info to avoid
camelcase and removes typedef.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:30:09 -08:00
Leo Kim 79f7dfa549 staging: wilc1000: Revert "staging: wilc1000: remove spaces around '->'"
This reverts commit 6c2ab2398b ("staging: wilc1000: remove spaces around '->'").
It had applied from a incorrectly commit a1b56a4c50
("staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages").

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:29:05 -08:00
Chaehyun Lim a5f0fb5cab staging: wilc1000: handle_cfg_param: remove wrapper struct cfg_param_attr
This struct just wrap struct cfg_param_val. There is no other member
except struct cfg_param_val.
This patch remove struct cfg_param_attr, then struct cfg_param_val is
renamed to struct cfg_param_attr.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:28:33 -08:00
Chris Park d9766d52dc staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages
This patch removes unnecessary log messages.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Chris Park 40bbaac724 staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages
This patch removes unnecessary log messages.
And, it adds a 'break' statement in accordance with the switch-case rule.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Chris Park 64d3546a34 staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages
This patch removes unnecessary log messages and relate variables.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Chris Park a1b56a4c50 staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages
This patch removes the unnecessary log messages which is used with
the HOSTAPD_DBG tag.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Leo Kim 396fa30e4b staging: wilc1000: removes potential null dereference
This patch removes the error reported by smatch.
 - wilc_wfi_cfgoperations.c:674 scan() error:
   potential null dereference 'strHiddenNetwork.net_info'.  (kmalloc returns null)

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 11:47:00 -08:00
Bhumika Goyal 5bc32160c5 Staging: wilc1000: Remove unused function WILC_WFI_update_stats
This patch removes the function WILC_WFI_update_stats as it is not used
anywhere in the kernel. Also remove its declaration from the header
file. Grepped to find the occurences.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 14:43:48 -08:00
Janani Ravichandran 8459af6acf staging: wilc1000: Rearrange statement to respect 80 char limit
Split statement across multiple lines as the line modified is over 80
chars in length.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 17:00:07 -08:00
Janani Ravichandran 3e758b2788 staging: wilc1000: Use kmalloc_array instead of kmalloc
Use kmalloc_array instead of kmalloc for arrays to prevent integer
overflows.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 17:00:07 -08:00
Eva Rachel Retuya 6c2ab2398b staging: wilc1000: remove spaces around '->'
Delete the space around '->' as it is prohibited and breaks the code.
Checkpatch found this issue.

ERROR: spaces prohibited around that '->'

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 16:53:56 -08:00
Eva Rachel Retuya d38f5ba482 staging: wilc1000: Remove initialization of static variables
Address the following checkpatch errors:
* ERROR: do not initialise statics to false
* ERROR: do not initialise statics to 0x00

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-15 18:24:07 -08:00
Alison Schofield 4375cad941 staging: wilc1000: wilc_wfi_cfgoperations: remove cast on void pointers
Remove cast on void pointers. C programming language guarantees
the conversion from void pointer to any other pointer type.

Coccinelle patch:
@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:31:44 -08:00
Dan Carpenter d99ee289b4 staging: wilc1000: fix mgmt_tx()
There was a missing curly brace so this function returns failure instead
of succeeding.

Fixes: 06fb9336ac ('staging: wilc1000: wilc_wfi_cfgoperations.c: replaces PRINT_ER with netdev_err')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:31:50 -08:00