Commit graph

1705 commits

Author SHA1 Message Date
Johnny Kim 53a8440188 staging: wilc1000: add an argument for Handle_SetWfiDrvHandler
Similar to functions of same layer, this patch add an argument for
Handle_SetWfiDrvHandler function. As a result, the redundant typecasting is
removed.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:30 -07:00
Johnny Kim 8a625cade3 staging: wilc1000: use the real data type
This patch changes the type of gu8FlushedJoinReqDrvHandler with his real
data type becasue typecasting is not necessary. In result, typecasting
which is not necessary and some building warnings is removed.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:30 -07:00
Chaehyun Lim 1b128f632d staging: wilc1000: rename WILC_MsgQueueDestroy to wilc_mq_destroy
This patch replaces WILC_MsgQueueDestroy to wilc_mq_destroy to
shorten function name and avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:29 -07:00
Chaehyun Lim b986e33e1e staging: wilc1000: rename WILC_MsgQueueRecv to wilc_mq_recv
This patch replaces WILC_MsgQueueRecv with wilc_mq_recv
to shorten function name and avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:29 -07:00
Chaehyun Lim 79198138a8 staging: wilc1000: rename WILC_MsgQueueSend to wilc_mq_send
This patch replaces WILC_MsgQueueSend with wilc_mq_send to
shorten function name and avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:29 -07:00
Chaehyun Lim cd08fc7813 staging: wilc1000: rename WILC_MsgQueueCreate to wilc_mq_create
This patch replaces WILC_MsgQueueCreate with wilc_mq_create to
shorten function name and avoid CamelCase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:29 -07:00
Chaehyun Lim bd56018a87 staging: wilc1000: replace WILC_ErrNo by int type
This patch replaces WILC_ErrNo with int type.
WILC_ErrNo typedef is also removed.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:29 -07:00
Chaehyun Lim bb9c2e7a9d staging: wilc1000: wilc_msgqueue.c: fix bool comparison style
This patch changes bool comparison style found by checkpatch.pl
CHECK: Using comparison to true is error prone

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:29 -07:00
Chaehyun Lim ce118546d4 staging: wilc1000: wilc_msgqueue.c: remove kfree NULL check
This patch removes kfree NULL check.
WARNING: kfree(NULL) is safe and this check is probably not required.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:29 -07:00
Chaehyun Lim ae177a2afc staging: wilc1000: wilc_msgqueue.c: use ! operator instead of NULL comparison
This patch uses ! operator instead of NULL comparison.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:29 -07:00
Chaehyun Lim 96cab4cdc6 staging: wilc1000: wilc_msgqueue.c: remove unnecessary parentheses
This patch remove unnecessary parentheses found by checkpatch.pl
CHECK: Unnecessary parentheses around pHandle->hSem

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:28 -07:00
Chaehyun Lim b6583f7415 staging: wilc1000: wilc_msgqueue.c: remove blank line before a close brace
This patch removes blank line before a close brace "}"
CHECK: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:28 -07:00
Chaehyun Lim df1890a674 staging: wilc1000: wilc_msgqueue.c: remove multiple blank lines
This patch removes multiple blank lines.
CHECK: Please don't use multiple blank lines

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:28 -07:00
Chaehyun Lim 32728da029 staging: wilc1000: wilc_msgqueue.c: remove blank line after open brace
This patch removes a blank line for open brace "{"
CHECK: Blank lines aren't necessary after an open brace '{'

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:28 -07:00
Chaehyun Lim 6fffc6213d staging: wilc1000: wilc_msgqueue.c: remove braces for single statement
This patch removes braces for single statement blocks.
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:28 -07:00
Chaehyun Lim 8dfaafd639 staging: wilc1000: add a blank line after declaration
This patch adds a blank line after declaration found by checkpatch.pl
WARNING: Missing a blank line after declarations.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:28 -07:00
Raphaël Beamonte 297a1c34da staging: wilc1000: replace MALLOC_WILC_BUFFER() macro to avoid possible memory leak
The MALLOC_WILC_BUFFER() macro was using a return statement, and didn't
take care of possible memory leaks and subsequent bugs when it was failing
after succeeding some allocations. This patch corrects this behavior.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:28 -07:00
Raphaël Beamonte 7a669e5861 staging: wilc1000: remove FREE_WILC_BUFFER()
It was just a wrapper around kfree(), so call that instead.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:28 -07:00
Linus Torvalds dd5cdb48ed Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:
 "Another merge window, another set of networking changes.  I've heard
  rumblings that the lightweight tunnels infrastructure has been voted
  networking change of the year.  But what do I know?

   1) Add conntrack support to openvswitch, from Joe Stringer.

   2) Initial support for VRF (Virtual Routing and Forwarding), which
      allows the segmentation of routing paths without using multiple
      devices.  There are some semantic kinks to work out still, but
      this is a reasonably strong foundation.  From David Ahern.

   3) Remove spinlock fro act_bpf fast path, from Alexei Starovoitov.

   4) Ignore route nexthops with a link down state in ipv6, just like
      ipv4.  From Andy Gospodarek.

   5) Remove spinlock from fast path of act_gact and act_mirred, from
      Eric Dumazet.

   6) Document the DSA layer, from Florian Fainelli.

   7) Add netconsole support to bcmgenet, systemport, and DSA.  Also
      from Florian Fainelli.

   8) Add Mellanox Switch Driver and core infrastructure, from Jiri
      Pirko.

   9) Add support for "light weight tunnels", which allow for
      encapsulation and decapsulation without bearing the overhead of a
      full blown netdevice.  From Thomas Graf, Jiri Benc, and a cast of
      others.

  10) Add Identifier Locator Addressing support for ipv6, from Tom
      Herbert.

  11) Support fragmented SKBs in iwlwifi, from Johannes Berg.

  12) Allow perf PMUs to be accessed from eBPF programs, from Kaixu Xia.

  13) Add BQL support to 3c59x driver, from Loganaden Velvindron.

  14) Stop using a zero TX queue length to mean that a device shouldn't
      have a qdisc attached, use an explicit flag instead.  From Phil
      Sutter.

  15) Use generic geneve netdevice infrastructure in openvswitch, from
      Pravin B Shelar.

  16) Add infrastructure to avoid re-forwarding a packet in software
      that was already forwarded by a hardware switch.  From Scott
      Feldman.

  17) Allow AF_PACKET fanout function to be implemented in a bpf
      program, from Willem de Bruijn"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1458 commits)
  netfilter: nf_conntrack: make nf_ct_zone_dflt built-in
  netfilter: nf_dup{4, 6}: fix build error when nf_conntrack disabled
  net: fec: clear receive interrupts before processing a packet
  ipv6: fix exthdrs offload registration in out_rt path
  xen-netback: add support for multicast control
  bgmac: Update fixed_phy_register()
  sock, diag: fix panic in sock_diag_put_filterinfo
  flow_dissector: Use 'const' where possible.
  flow_dissector: Fix function argument ordering dependency
  ixgbe: Resolve "initialized field overwritten" warnings
  ixgbe: Remove bimodal SR-IOV disabling
  ixgbe: Add support for reporting 2.5G link speed
  ixgbe: fix bounds checking in ixgbe_setup_tc for 82598
  ixgbe: support for ethtool set_rxfh
  ixgbe: Avoid needless PHY access on copper phys
  ixgbe: cleanup to use cached mask value
  ixgbe: Remove second instance of lan_id variable
  ixgbe: use kzalloc for allocating one thing
  flow: Move __get_hash_from_flowi{4,6} into flow_dissector.c
  ixgbe: Remove unused PCI bus types
  ...
2015-09-03 08:08:17 -07:00
Phil Sutter 7d9e437d56 staging: wilc1000: convert to using IFF_NO_QUEUE
Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-18 11:55:07 -07:00
Greg Kroah-Hartman 507d7fc561 staging: wilc1000: fix build warning with setup_timer()
I forgot to properly cast a pointer to unsigned long in a conversion to
setup_timer() which resulted in a build warning.  Fix that up.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 12:59:42 -07:00
Raphaël Beamonte db93ec4f30 staging: wilc1000: remove DECLARE_WILC_BUFFER()
It was just a wrapper to initialize a variable. Initialize it
directly instead.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 12:58:47 -07:00
Raphaël Beamonte dec180c864 staging: wilc1000: remove void function return statements that are not useful
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 12:58:47 -07:00
Chaehyun Lim a78d9a38a5 staging: wilc1000: coreconfigurator.c: fix kmalloc error check
It is added and fixed error check when kmalloc is failed.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 12:50:35 -07:00
Chaehyun Lim 0ac8799878 staging: wilc1000: coreconfigurator.c: use kmalloc instead of WILC_MALLOC
The kmalloc is used to handle host interface message within kernel thread.
The manipulation of host interface message is not called on IRQ context
and I could not find any spinlock inside function.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 12:50:02 -07:00
Chaehyun Lim 280f1fa080 staging: wilc1000: remove unused codes of gps8ConfigPacket
This patch removes unused codes of gps8ConfigPacket declared by global variable.
It is allocated and freed memory within CoreConfiguratorInit and CoreConfiguratorDeInit.
There is no used anywhere except within two functions.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 12:50:02 -07:00
Chaehyun Lim dc0ad74bc4 staging: wilc1000: remove unnecessary void pointer cast
This patch removes unnecessary void pointer cast of WILC_MALLOC.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 12:50:02 -07:00
Chaehyun Lim 636dcf9716 staging: wilc1000: remove WILC_NEW and WILC_NEW_EX
This patch removes WILC_NEW and WILC_NEW_EX defines that are not used anywhere.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 12:47:46 -07:00
Chaehyun Lim 5c07828f5d staging: wilc1000: use kmalloc instead of WILC_NEW
WILC_NEW is replaced by kmallo with GFP_ATOMIC.
This kmalloc is inside a spin_lock_irqsave region.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 12:47:46 -07:00
Chandra S Gorentla 6e3f05bfc0 staging: wilc1000: Process WARN, INFO options of debug levels from user
This patch enables setting the module's debug options WARN and INFO in the
debugfs file 'wilc_debug_level'.  This functionality allows the user to
enable logging of warnings and other information.  Before this change,
writes to this debugfs file set only one option - DEBUG.  Another option
that is enabled by default is ERR.

As a side effect, this patch removes the 'sparse' warning -
'warning: incorrect type in argument 2 (different address spaces)'.

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 12:46:31 -07:00
Greg Kroah-Hartman c4f83a5571 staging: wilc1000: remove unneeded tstrWILC_MsgQueueAttrs typedef
No one uses it, so remove it and all of the NULL parameters being used
to pass it into the msg code.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 11:32:38 -07:00
Greg Kroah-Hartman 2b5f12eac0 staging: wilc1000: delete wilc_osconfig.h
This .h file isn't needed at all, so delete it, and the one line that
added it to the build.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 11:20:57 -07:00
Greg Kroah-Hartman 6e53191d6e staging: wilc1000: delete wilc_log.h
The macros are not used in the driver at all, except in one commented
out line, so just remove the .h file so that no one thinks it is a good
idea to add any code to use them in the future.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 11:17:57 -07:00
Greg Kroah-Hartman 97fd0f07d4 staging: wilc1000: delete wilc_timer.h
It is no longer needed at all, so remove this header file.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 11:12:49 -07:00
Greg Kroah-Hartman 9eb066438b staging: wilc1000: remove WILC_TimerStart()
It was a wrapper around mod_timer() so replace it with the real timer
call and remove wilc_timer.c as it's now empty.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-17 11:10:55 -07:00
Greg Kroah-Hartman 93dee8eea0 staging: wilc1000: remove WILC_TimerCreate()
It was just a wrapper around setup_timer() and could never fail, so just
call the real function, and fix up the function arguments of the
callbacks to be proper timer callback functions.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 20:36:00 -07:00
Greg Kroah-Hartman 4183e9794c staging: wilc1000: remove WILC_TimerDestroy()
It was just a wrapper around del_timer_sync() so call that instead.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 20:35:53 -07:00
Greg Kroah-Hartman 8972d0fe41 staging: wilc1000: remove WILC_TimerStop()
It was just a wrapper around del_timer() so call that instead.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 20:35:45 -07:00
Greg Kroah-Hartman 334e1a5777 staging: wilc1000: remove tstrWILC_TimerAttrs typedef
It was not used for anything, so remove it, and the variables in
wilc_timer.c that were being passed of its type.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 20:35:38 -07:00
Greg Kroah-Hartman da711eb68e staging: wilc1000: remove WILC_TimerHandle typedef
Use the proper structure (struct timer_list) instead, which makes things
much more readable.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 20:35:29 -07:00
Greg Kroah-Hartman 80e29c7a80 staging: wilc1000: remove WILC_Sleep()
It was just a wrapper around usleep_range() so call that directly
instead and remove the now-empty file.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 20:35:21 -07:00
Greg Kroah-Hartman bb7b1a76aa staging: wilc1000: remove commented out WILC_Sleep calls
It's not being called, so delete these lines.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 20:35:05 -07:00
Greg Kroah-Hartman 36a24b4eb6 staging: wilc1000: delete wilc_type.h
The .h file isn't needed at all, so just remove it.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 19:26:20 -07:00
Greg Kroah-Hartman b6d9e0cb14 staging: wilc1000: remove WILC_MemoryFree
It's no longer needed, so remove the empty wrapper function.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 19:22:30 -07:00
Greg Kroah-Hartman 969effe9dc staging: wilc1000: remove WILC_FREE_IF_TRUE macro
Just use kfree, as that's all it resolves itself to.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 19:22:29 -07:00
Johnny Kim 2b05df556e staging: wilc1000: clarify the argument type
This patch replaces the void pointer type in the host interface
functions which process the message from host thread by the real data
type, tstrWILC_WFIDrv because the void pointer type as the arguments
is not clear and concise. In addition, typecasting to the void pointer
type is removed becasue it is not necessary.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 19:02:52 -07:00
Johnny Kim 11f58c88dd staging: wilc1000: change void pointer type to real type
This patch changes the void pointer member of the tstrHostIFmsg to the
real data type because the void pointer type is ambiguous and not
readable.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 19:02:01 -07:00
Johnny Kim 218dc407d4 staging: wilc1000: replace WILC_WFIDrvHandle by tstrWILC_WFIDrv
The structure, WILC_WFIDrvHandle is used to save the pointer address
for the driver handler which is used throughout the driver but it's
not easy to understand what it means. In addition, it doesn't support
the 64 bit machine and also causes the warnings for the 64 bit build.

This patch replaces the WILC_WFIDrvHandle by the tstrWILC_WFIDrv
because the tstrWILC_WFIDrv is real structure to represent the driver
handler and reduces the 64 bit compile warnings. Also, typecasting to
WILC_WFIDrvHandle is not needed by using tstrWILC_WFIDrv as is.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 19:00:49 -07:00
Chaehyun Lim 598f85bfae staging: wilc1000: remove WILC_FREE
Remove WILC_FREE that is replaced by kfree.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:59:47 -07:00
Chaehyun Lim 49188af272 staging: wilc1000: use kfree instead of WILC_FREE
Use kfree instead of WILC_FREE.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:59:47 -07:00
Chaehyun Lim 9b45891aef staging: wilc1000: remove unused memory functions
This patch remove unused memory functions because some macros with this
memory function are deleted.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:59:10 -07:00
Chaehyun Lim 96ac283d64 staging: wilc1000: wilc_memory.h: remove unused define
Remove unused define macro that is never used.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:59:09 -07:00
Joe Perches b3ff291009 staging: wilc1000: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes.

Miscellanea:

o Reflow alignments

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:51:56 -07:00
Shraddha Barke 642ac6c0dc Staging: wilc1000: Remove null check before kfree
kfree on NULL pointer is a no-op.

This patch uses the following semantic patch to find such an instance
where NULL check is present before kfree.

// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>smpl>

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:44:45 -07:00
Chaehyun Lim 071c19e73b staging: wilc1000: remove wilc_strutils.c and wilc_strutils.h
Remove wilc_strutils.c and wilc_strutils.h that are not needed.
wilc_strutils.o is also removed in Makefile.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:42:08 -07:00
Chaehyun Lim 9504f96492 staging: wilc1000: remove WILC_memcpy_INTERNAL
Remove WILC_memcpy_INTERNAL that is used in the WILC_memcpy
because WILC_memcpy is replaced by memcpy.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:42:08 -07:00
Chaehyun Lim f78d5f809e staging: wilc1000: remove WILC_memcpy function
Remove WILC_memcpy function that is changed to memcpy.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:42:08 -07:00
Chaehyun Lim d00d2ba333 staging: wilc1000: use memcpy instead of WILC_memcpy
Use memcpy instead of WILC_memcpy that is a custom function.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:42:08 -07:00
Chaehyun Lim 31126a478f staging: wilc1000: remove WILC_strncmp function
Remove WILC_strncmp function that is changed to strncmp.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim 3f882895c7 staging: wilc1000: use strncmp instead of WILC_strncmp
Use strncmp instead of WILC_strncmp.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim 24e326ea29 staging: wilc1000: remove WILC_strncpy function
Remove WILC_strncpy function that is changed to strncpy.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim 85b509f18a staging: wilc1000: Use strncpy instead of WILC_strncpy
Use strncpy instead of WILC_strncpy that is a custom function

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim 1799cb6188 staging: wilc1000: remove WILC_strlen function
Remove WILC_strlen function that is changed to strlen.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim ff96dfb5b1 staging: wilc1000: use strlen instead of WILC_strlen
Use strlen instead of WILC_strlen that is a custom function.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Chaehyun Lim 7d2b212f88 staging: wilc1000: remove commented code
Remove commented code that is not used.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:39:52 -07:00
Daniel Machon c915aadb5d Staging: wilc1000: wilc_platform.h: Fixed include guard spelling error
Fixed spelling error

Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-08 15:22:58 -07:00
Chandra S Gorentla 78174adaf5 staging: wilc1000: Remove braces for single statement 'if' and 'else'
Fixes the checkpatch.pl warning - braces {} are not necessary for any arm
of this statement

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-08 15:22:12 -07:00
Chandra S Gorentla 17aacd43c8 staging: wilc1000: Remove ' ' before quoted '\n'
Fixes the checkpatch.pl warning -
'unnecessary whitespace before a quoted newline'.

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-08 15:22:12 -07:00
Chandra S Gorentla 1bff1fe8c9 staging: wilc1000: Remove unused extern declarations
'extern' declarations which are not referenced within the file are
removed.

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-08 15:22:12 -07:00
Chandra S Gorentla a2b4041ab6 staging: wilc1000: Add space between the braces
Inserted space between nested braces.  This fixes the checkpatch.pl
error - space required after that close brace '}'.

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-08 15:22:11 -07:00
Chaehyun Lim f6356a9617 staging: wilc1000: remove WILC_memcmp function
Remove WILC_memcmp function because it is changed to memcmp.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:16:58 -07:00
Chaehyun Lim 1a646e7e9e staging: wilc1000: use memcmp instead of WILC_memcmp
Use memcmp instead of WILC_memcmp.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:16:58 -07:00
Chaehyun Lim 70b801cb53 staging: wilc1000: remove WILC_memset function
Remove WILC_memset function because it is changed to memset.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:16:58 -07:00
Chaehyun Lim 2cc468378a staging: wilc1000: use memset instead of WILC_memset
Use memset instead of WILC_memset.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:16:58 -07:00
Daniel Machon 7fc80964e8 wilc1000: wilc_wfi_cfgoperations.c: Fixed initialization of global boolean.
Globals are initialized to zero or NULL by GCC. No need to explicitly initialize them.

Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-05 17:28:14 -07:00
Chandra S Gorentla 6212990a87 drivers: staging: wilc1000: remove space after '('
The character ' ' is removed after the character '('.  This fixes the
checkpatch.pl error - "space prohibited after that open
parenthesis '('".

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-05 12:15:48 -07:00
Chandra S Gorentla a96c47e197 drivers: staging: wilc1000: use 'void' for no arguments functions
Added 'void' keyword in the paranthesis of function definitions, when
there are no arguments to the functions.  This fixes the checkpatch.pl
error - "Bad function definition 'function()' should probably be
function(void)".

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-05 12:15:38 -07:00
Daniel Machon 1913221c0e staging: wilc1000: wilc_cfgoperations.c: Fixed coding styles issues.
Fixed coding styles issues with braces.

Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-05 12:14:48 -07:00
Shraddha Barke eeb1c06295 Staging: wilc1000: Remove typedefs for struct
The Linux kernel coding style guidelines suggest not using typedefs for
structure and enum types. This patch gets rid of the typedefs for
Ack_session_info_t.

The following Coccinelle semantic patch detects the cases for struct type:

@tn@
identifier i;
type td;
@@

-typedef
 struct i { ... }
-td
 ;

@@
type tn.td;
identifier tn.i;
@@

-td
+ struct i

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-05 12:14:48 -07:00
Shraddha Barke 29edbe5e29 Staging : wilc1000: Remove braces for single statement blocks
This patch fixes the following checkpatch.pl warning:

WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 14:13:03 -07:00
Kim, Leo 3369463284 staging: wilc1000: remove unnecessary spcae
This patch removes the warnings reported by checkpatch.pl on
space prohibited between function name and open parenthesis '('

Signed-off-by: Kim, Leo <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:58:28 -07:00
Kim, Leo 4423f3b0d9 staging: wilc1000: remove warnings on the multiple blank lines uses
This patch removes the warnings reported by checkpatch.pl for using
multiple blank lines.

Signed-off-by: Kim, Leo <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:58:27 -07:00
Kim, Leo fc4b95d69c staging: wilc1000: remove braces {} for single statement blocks
This patch removes the warnings reported by checkpatch.pl on
braces {} not necessary for the single statement blocks.

Signed-off-by: Kim, Leo <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:58:27 -07:00
Tony Cho 202f66a816 staging: wilc1000: remove unnecessary inner braces
This patch removes unnecessary inner braces.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:57:24 -07:00
Tony Cho a0261e0b13 staging: wilc1000: remove warnings on unnecessary braces
This patch removes the warnings reported by checkpatch.pl on the braces
{} not necessary for any arm of this statement.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:57:20 -07:00
Jude.Lee 1e553d542b staging: wilc1000: alignment should match open parenthesis
This patch fixes the checks reported by checkpatch.pl
alignment should match open parenthesis

Signed-off-by: Jude.Lee <jude.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:57:14 -07:00
Jude.Lee 232ced3d8f staging: wilc1000: remove multiple blank lines
This patch removes the warnings reported by checkpatch.pl for using
multiple blank lines.

Signed-off-by: Jude.Lee <jude.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:56:04 -07:00
Tony Cho 51a5fcaf71 staging: wilc1000: remove a dead preprocessor conditionals
This patch removes the preprocessor conditionals which are related to
the WILC1000_SINGLE_TRANSFER definition becasue this is not used.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:55:11 -07:00
Tony Cho 229d7402bd staging: wilc1000: remove preprocessor conditionals unused
This patch removes unused preprocessor conditionals for the
PLAT_AML8726_M3_BACKUP and PLAT_AML8726_M3 which are not used and so
dead codes. They are also platform-dependent codes.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:51:42 -07:00
Tony Cho 4aa85772e3 staging: wilc1000: remove the warnings on unnecessary braces
This patch removes the warnings reported by checkpatch.pl on {} not
necessary for the single statement blocks.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:51:42 -07:00
Tony Cho 9c844693ea staging: wilc1000: remove the warnings on missing blank line
This patch removes the warnings reported by checkpatch.pl on missing a blank
line after declaration.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:51:42 -07:00
Tony Cho 0dff54785f staging: wilc1000: remove warnings on the multiple line uses
This patch removes the warnings reported by checkpatch.pl for using
multiple blank lines.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:51:41 -07:00
Tony Cho 9690df3f9d staging: wilc1000: remove dead codes related to SIMULATION
This patch removes preprocessor conditionals (#ifdef or #ifndef) related
to SIMULATION definition from the codes becasue that SIMULATION feature is not
used anymore.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:51:41 -07:00
Tony Cho 5f8966d91e staging: wilc1000: describe the config symbol fully
This patch removes the warnings reported by checkpatch.pl on the short
description for the config symbol in the Kconfig by adding more comments
to describe the config symbol in more detail.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:48:53 -07:00
Tony Cho 1625d2166c staging: wilc1000: remove unnecessary files
This patch removes the following files which are not used anymore.
	- fifo_buffer.c
	- fifo_buffer.h
	- coreconfigsimulator.h
	- wilc_wfi_netdevice.c

Signed-off-by: Robin Hwang <robin.hwang@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:45:57 -07:00
Daniel Machon 6fdb302c1d wilc1000: host_interface.c: global variables do not need to be explicitly initialized to 0 or NULL.
Fixed explicit initialization of global pointer variable.

GCC takes care of this implicitly.

Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:33:51 -07:00
Prasanna Karthik 137b993884 staging:wilc1000: code cleanup Fix reported by coccinelle
Removed {} for single statement if block

Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:33:33 -07:00
Luis de Bethencourt b3a02832e4 staging: wilc1000: switch printks to vsprintf IPv4 extension
Switch printks with IP addresses to use vsprintf extension %pI4.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:32:56 -07:00
Luis de Bethencourt 83cc9be5eb staging: wilc1000: fix typos in PRINT_ERR()
Fix typo "packe" to "packet".

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:32:56 -07:00
Luis de Bethencourt 03b2d5e750 staging: wilc1000: remove whitespaces before quoted newlines
Fix all checkpatch.pl warnings:
WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:32:56 -07:00
Luis de Bethencourt 78c87591d4 staging: wilc1000: add blank lines after declarations
Fix all checkpatch.pl warnings:
WARNING: Missing a blank line after declarations

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:32:56 -07:00
Luis de Bethencourt 2b9d5b4837 staging: wilc1000: remove unnecessary braces
Removing all checkpatch.pl warnings:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:32:56 -07:00
Sunghoon Cho 70e59d9225 staging: wilc1000: remove the warnings on the line over 80 characters
This patch removes the warnings reported by checkpatch.pl on the line
over 80 characters.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:28:44 -07:00
Sunghoon Cho 36901b690d staging: wilc1000: add a blank line after struct declaration
This patch adds a blank line right after a struct declaration.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:28:44 -07:00
Sunghoon Cho 69176e1cbd staging: wilc1000: remove the warnings on the prohibited spaces
This patch removes the warnings reported by checkpatch.pl regarding
prohibited spaces between function name and open parenthesis.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:28:44 -07:00
Chaehyun Lim 9295e2d734 staging: wilc1000: wilc_wfi_netdevice.c: remove blank lines
Remove multiple blank lines.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:28:44 -07:00
Chaehyun Lim 70fb5aa8a5 staging: wilc1000: wilc_wfi_netdevice.c: remove unused variable
Remove variable that is defined but never used.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:28:44 -07:00
Chaehyun Lim 5927139ab5 staging: wilc1000: wilc_wfi_netdevice.c: remove unused codes
Remove if statement that has no any codes.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:28:44 -07:00
Chaehyun Lim 66f1a77ec1 staging: wilc1000: wilc_wfi_netdevice.c: remove commented codes
Remove commented codes.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:27:47 -07:00
Sunil Shahu bf903c1e07 staging: wilc1000: host_interface: add spaces around '='
Fix coding style error by placing spaces around '=' as suggested by
checkpatch.pl script.

Signed-off-by: Sunil Shahu <shshahu@gmail.com>
Reviewed-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:27:46 -07:00
Hari Prasath Gujulan Elango 2d33ff126b staging: wilc1000: use BIT macro
This patch addresses the checkpatch warning advising the usage of the
BIT macro for Bit shift operation.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:26:44 -07:00
Hari Prasath Gujulan Elango ba8f5e6642 staging: wilc1000: remove unused variable msg_len
This patch removes a ununsed variable msg_len and its associated code.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:26:44 -07:00
Hari Prasath Gujulan Elango 690910c0cf staging: wilc1000: remove ununsed variable & associated code
This patch removes the ununsed variable 'priv' at multiple instances and
all its associated code where its assigned a value.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:26:44 -07:00
Hari Prasath Gujulan Elango 810532227a staging: wilc1000: remove ununsed variable
This patch removes ununsed variable 'len'

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:25:39 -07:00
Hari Prasath Gujulan Elango 369f190a70 staging: wilc1000: remove redundant assignment of variable
This patch the removes the redundant assignement of the variable ret as
its being overwritren before being used anywhere.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:25:06 -07:00
Hari Prasath Gujulan Elango 773116ea0b staging: wilc1000: remove unused variable
This patch removes a unused variable timeout and the associated code.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:25:05 -07:00
Hari Prasath Gujulan Elango 53e1096fea staging: wilc1000: remove ununsed variable & corresponding lines
This patch removes a couple of ununsed variable.The lines in which these
variables are assigned are also removed as they are not necessary.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:25:05 -07:00
Hari Prasath Gujulan Elango 04f2a50d41 staging: wilc1000: remove ununsed if..else.. code blocks
This patch removes ununsed if..else... code blocks. Its actually some
dead code.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:25:05 -07:00
Hari Prasath Gujulan Elango ab6ebe3a4b staging: wilc1000: remove redundant initialization of variable
This patch removes the redundant initialization of the variable 'st' as
it is reassigned a new value before its being used anywhere else.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:25:05 -07:00
Hari Prasath Gujulan Elango 6608a38c66 staging: wilc1000: remove ununsed variable and associated line
This patch removes a unused variable 'u16RespLen' that is assigned a
value that is never used. The line that does the assignment is also
removed.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:25:05 -07:00
Chaehyun Lim decc286c7d staging: wilc1000: wilc_wfi_netdevice.c: move statement after declarations
Fix checkpatch warning found by checkpatch.pl
WARNING: Missing a blank line after declarations

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:23:37 -07:00
Chaehyun Lim df493fe8fa staging: wilc1000: wilc_wfi_netdevice.c: Insert blank line after declarations
Fix checkpatch warning found by checkpatch.pl
WARNING: Missing a blank line after declarations

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:23:37 -07:00
Chaehyun Lim 55229a56bb staging: wilc1000: wilc_wfi_netdevice.c: remove braces for single statement block
Fix checkpatch warning found by checkpatch.pl
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:23:36 -07:00
Chaehyun Lim e8b369ea2b staging: wilc1000: wilc_wfi_netdevice.c: remove prohibited space
Fix checkpatch warning found by checkpatch.pl
WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:23:36 -07:00
Chaehyun Lim a241a78952 staging: wilc1000: wilc_wfi_netdevice.c: remove prohibited space before semicolon
Fix checkpatch warning found by checkpatch.pl
WARNING: space prohibited before semicolon

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:23:35 -07:00
Vaishali Thakkar 8ca1b55a49 Staging: wilc1000: Replace memset with eth_zero_addr
Use eth_zero_addr to assign the zero address to the given address
array instead of memset when second argument is address of zero.

The Coccinelle semantic patch that makes this change is as follows:

// <smpl>
@eth_zero_addr@
expression e;
@@

-memset(e,0x00,ETH_ALEN);
+eth_zero_addr(e);
// </smpl>

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:23:35 -07:00
Sudip Mukherjee e26bb71da9 staging: wilc1000: fix build failure
commit 80279fb7ba ("cfg80211: properly send
NL80211_ATTR_DISCONNECTED_BY_AP in disconnect") has changed the api of
cfg80211_disconnected() and caused a build failure.
Add the extra argument as false since it appears from the code that the
disconnection is not locally generated.
And incase of doubt we can use false as that is the default behaviour.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-06 19:18:17 -07:00
Greg Kroah-Hartman 53a20e9e37 staging: wilc1000: disable driver due to build warnings
The wilc1000 has just too many build warnings to be able to enable it
for the 4.2 release.  Given that there have not been any patches
submitted to properly fix these obvious errors, I'm going to disable it
for now.  I will enable it back when the build warning fixes are
submitted, or, if that never happens, I will remove it from the tree.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-26 12:04:47 -07:00
Chaehyun Lim 60cb1e20c4 staging: wilc1000: fix checkpatch warning
Fix warning founded by checkpatch.pl.
WARNING: __func__ should be used instead of gcc specific __FUNCTION__

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 20:20:58 -07:00
Chaehyun Lim 9eac3a1589 staging: wilc1000: remove unnecessary typecast in #define macro
Remove unnecessary typecast in #define macro.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 20:20:57 -07:00
Chaehyun Lim e54d5b75c8 staging: wilc1000: align #define macro
Align #define macro.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 20:20:57 -07:00
Abdul Hussain 0256b5406e Staging: wilc1000: NULL check before some freeing functions is not needed
This patch removes check before freeing the memory
since kfree(NULL) is safe

Signed-off-by: Abdul Hussain <habdul@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 20:20:57 -07:00
Chaehyun Lim 61500fbd77 staging: wilc1000: remove commented code
Remove the commented codes using #if 0.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 20:20:57 -07:00
Sunghoon Cho 1d1c5b24f9 staging: wilc1000: add a blank line
This adds a blank line after struct declaration, WILC_WFI_mon_priv.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:17:06 -07:00
Sunghoon Cho 9f5e9a2bdf staging: wilc1000: remove unnecessary blank line.
This patch removes blank line which is not necesssary after an open
brace.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:17:06 -07:00
Sunghoon Cho 93f822bbe8 staging: wilc1000: remove the warnings on the multiple blank lines.
This patch removes the warnings reported by checkpatch.pl regarding on
the multiple blank line uses.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:17:06 -07:00
Abdul Hussain 25fe2274de Staging: wilc1000: Remove casting the values returned by kmalloc()
This patch removes casting the values returned by memory allocation functions.

Signed-off-by: Abdul Hussain <habdul@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:17:06 -07:00
Hari Prasath Gujulan Elango f0feeaff9c staging: wilc1000: remove unwanted code
This patch removes SIOCDEVPRIVATE + 1 ioctl.  It currently is just a
stub which does some useless printks and returns.  In the original code,
if the user passes priv_cmd.total_len == 0 then it will Oops.  Also it
leaks memory every time it's called.  In the future, we will implement
this functionality using generic API functions

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-16 19:23:25 -07:00
Abdul Hussain 5a66bf20b8 Staging: wilc1000: Boolean tests don't need comparisons
This patch removes unwanted true and false from boolean tests.

Signed-off-by: Abdul Hussain <habdul@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-16 19:23:25 -07:00
Abdul Hussain f717c0ebb3 Staging: wilc1000: Assign proper boolean value
This patch assign proper boolean value to boolean variable.

Signed-off-by: Abdul Hussain <habdul@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-16 19:23:25 -07:00
Chaehyun Lim 3f4d1c09ae staging: wilc1000: align defines
Align some defines in linux_wlan_common.h

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-16 19:23:25 -07:00
Dean Lee c3ea8a7200 staging: wilc1000: rework include wilc_oswrapper.h
rework line '#include "wilc_oswrapper.h"'
it does not used anywhere after change own data type to common data type.

Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-16 19:18:15 -07:00
ChengYi He 30ef5c8b97 staging: wilc1000: remove unnecessary cast
kmalloc() returns void pointer.

Signed-off-by: ChengYi He <chengyihetaipei@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-15 21:52:00 -07:00
Sunghoon Cho 3f5309725e staging: wilc1000: remove the warnings on prohibited spaces.
Remove space prohibited between function name and open parenthesis.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-15 21:50:23 -07:00
Sunghoon Cho c4263e319e staging: wilc1000: remove multiple blank lines.
Remove the warnings for multiple blank lines reported by checkpatch.pl.

Signed-off-by: Sunghoon Cho <ywhsbliss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-15 21:50:22 -07:00
Chaehyun Lim 635c931d6d staging: wilc1000: align defines
Align the lines of some defines in wilc_errorsupport.h

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-15 21:50:22 -07:00
Dean Lee 576917ad24 staging: wilc1000: change WILC_Char to char
change own data type(WILC_Char) to common data type(char)

Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-15 21:50:22 -07:00
Chaehyun Lim c5b72378a2 staging: wilc1000: remove itypes.h
Remove itypes.h that is not needed.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-13 14:45:51 -07:00
Chaehyun Lim 0be1eb7429 staging: wilc1000: remove BOOL_T typedef
Remove BOOL_T typedef.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-13 14:45:51 -07:00
Dean Lee 72ed4dc73d staging: wilc1000: change WILC_BOOL to bool
change own data type(WILC_BOOL) to common data type(bool)
but that's contain true/false value. so change with them.

Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:37:18 -07:00
Chaehyun Lim ab6a167f19 staging: wilc1000: remove unused typedef
Remove unused typedef for custom data types.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 22:37:18 -07:00
Hari Prasath Gujulan Elango 4a01f1c3ab staging: wilc1000: use memdup_user
This patch replaces the kmalloc followed by copy_from_user by the
wrapper routine memdup_user.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:11:32 -07:00
Dean Lee 2235fb69ef staging: wilc1000: modify odd print message
This driver has odd message in print string.
So this patch removes the data type.

Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:09:39 -07:00
Chris Park 1b612a127e staging: wilc1000: fix warning while printing
size_t should print using %zu, but here it was use %lu.
we were getting warning while printing.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:09:38 -07:00
Chaehyun Lim 8a69ebc277 staging: wilc1000: remove WILC_Sint64
remove unused WILC_Sint64.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim fb4ec9caa4 staging: wilc1000: remove WILC_Sint32
Use s32 instead of WILC_Sint32.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim 4320f6febc staging: wilc1000: remove WILC_Sint16
Use s16 instead of WILC_Sint16.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim ca356ada7c staging: wilc1000: remove WILC_Sint8
Use s8 instead of WILC_Sint8.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim 57b298f54e staging: wilc1000: remove WILC_Uint64
Use u64 instead of WILC_Uint64.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim 4e4467fdd6 staging: wilc1000: remove WILC_Uint32
Use u32 instead of WILC_Uint32.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:08:59 -07:00
Chaehyun Lim d85f5326e4 staging: wilc1000: remove WILC_Uint16
Use u16 instead of WILC_Uint16.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:07:59 -07:00
Chaehyun Lim 8a54d91719 staging: wilc1000: remove UWORD32
Use u32 instead of UWORD32.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:07:59 -07:00
Chaehyun Lim 3703480b02 staging: wilc1000: remove UWORD8
Use u8 instead of UWORD8.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-11 09:07:19 -07:00
Stanislav Kholmanskikh 13994d1e05 staging: wilc1000: coreconfigurator: Align enums and defines
Aligned enum members and defines to follow a common style
per enum/(group of defines).

Signed-off-by: Stanislav Kholmanskikh <kholmanskikh.s.s@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:46:32 -07:00
Stanislav Kholmanskikh cea3b20212 staging: wilc1000: coreconfigurator: Change return(X) to return X
Changed 'return(X)' to 'return X' in coreconfigurator.c
to satisfy checkpatch.pl warning:

ERROR: return is not a function, parentheses are not required

Signed-off-by: Stanislav Kholmanskikh <kholmanskikh.s.s@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:46:32 -07:00
Stanislav Kholmanskikh 1fad279db5 staging: wilc1000: coreconfigurator: Remove spaces before "\n"
In accordance to checkpatch.pl, a space before a quoted
newline ("\n") is unnecessary, therefore substituted " \n"
with "\n" in coreconfigurator.c

Signed-off-by: Stanislav Kholmanskikh <kholmanskikh.s.s@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:46:32 -07:00
Johnny Kim 842f1d71f6 staging: wilc1000: remove uninitialized warnings
This patch is for the initialization of the local variables.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:45:34 -07:00
Johnny Kim 8a14330f6d staging: wilc1000: modify printk format
This remove compile warnings about printk format.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:45:16 -07:00
Hari Prasath Gujulan Elango 96baf5a61b staging: wilc1000: fix build warning related to time_after_eq macro
This patch fixes a build warning related to the use of the time_after_eq
macro.Adding a typecast to the second argument suppresses the
warning.This warning was created by one my previous patch.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 17:43:38 -07:00
Madhusudhanan Ravindran 21175ef7e0 staging: wilc1000: remove unused variables
removed few variables which are assigned but
never used.

Signed-off-by: Madhusudhanan Ravindran <mravindr@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-09 10:43:11 -07:00
Dan Carpenter 9ee81443b9 staging: wilc1000: prevent some overflows in debugfs
Add some limits here so we don't corrupt memory.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:09:41 -07:00
Abhishek Sharma d35ebe8025 staging: wilc1000: Remove commented code lines
Removing the commented code lines.

Signed-off-by: Abhishek Sharma <asharm14@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:08:43 -07:00
Abhishek Sharma 542a6bc5cf staging: wilc1000: Remove commented variable declerations
Removing the commented static variable declerations.

Signed-off-by: Abhishek Sharma <asharm14@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:08:43 -07:00
Hari Prasath Gujulan Elango 0dcbea196b staging: wilc1000: remove commented code
Remove commented code from this file.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:08:42 -07:00
Hari Prasath Gujulan Elango aa02a9392e staging: wilc1000: remove ununsed function
The function WILC_WFI_InitPriv() is not used anywhere in the
driver.Hence remove it.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:08:42 -07:00
Hari Prasath Gujulan yyElango 1a093b5fcd staging: wilc1000: use time_after_eq
use the time_after_eq macro for the comparison operation

Signed-off-by: Hari Prasath Gujulan yyElango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:43:07 -07:00
Hari Prasath Gujulan Elango 4d77c6ccfb staging: wilc1000: remove dead code
Remove dead code or commented code

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:43:07 -07:00
Hari Prasath Gujulan Elango 37bc15d8dd staging: wilc1000: remove unnecessary typecast
Remove ununecessary typecast for kzalloc.This patch was generated by
coccinelle tool

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:43:06 -07:00
Chaitanya Dhere 0feae20091 staging: wilc1000: Modification in code to use ARRAY_SIZE macro
In this patch, ARRAY_SIZE() macro is used to determine the
size. This change was detected with the help of coccinelle
tool.

Signed-off-by: Chaitanya Dhere <cvijaydh@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:41:51 -07:00
Sudip Mukherjee 52db752077 staging: wilc1000: fix warning while printing
size_t should print using %zu and unsigned long int should use %lu
but here it was using %d and hence we were getting warning while
printing.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 12:41:51 -07:00
Greg Kroah-Hartman 63d03e4773 staging: wilc1000: remove WILC_Uint8
Just use u8, as that's what you really want in a kernel driver.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:17:47 +09:00
Greg Kroah-Hartman b1413b6084 staging: wilc100: remove WILC_NULL usage
Use the "real" NULL value, don't try to be cute and define your own
value for something that the compiler obviously supports.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:17:47 +09:00
Greg Kroah-Hartman 8e1d4e5cf2 staging: wilc1000: remove unused data types
There's some "custom" data types defined that are never used in the
driver, so remove them before we work on converting the rest to be
"standard" data types.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 14:17:47 +09:00
Arnd Bergmann 0b85618f3a staging: wilc1000: update TODO list
I have crossed off one item on the list, but found a few others that should
not get lost, so here is an update of the wilc1000 list

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:55:40 +09:00
Arnd Bergmann 7a8fd84175 staging: wilc1000: fix compiler warnings
This avoids the remaining warnings that one gets on a normal
build: unused variables, unused labels, and invalid printk
format strings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann 057d1e9793 staging: wilc1000: fix const cast warnings
The wilc1000 driver produces a lot of warnings about invalid
casts between const and non-const variables. This reworks
the code to avoid all those warnings, by marking variables
and function arguments const.

A lot of the types use WILC_Uint8, I change them to const u8
for style reasons, as I'm touching them anyway.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann 83383ea33c staging: wilc1000: remove semaphore wrapper
The various semaphore functions all directly translate into
sema_init(), down() and up(), so we can just remove the API.

This is a mostly automated conversion using simple sed scripts,
plus some manual changes to account for down() returning no
error.

As a positive side-effect, down() no longer hangs after
receiving a signal, as the original code did by looping around
down_interruptible.

The semaphores still need to be turned into mutexes as a
follow-up step.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann e14af67d8f staging: wilc1000: remove EXPORT_SYMTAB
The EXPORT_SYMTAB symbol has not been used in Linux for a very
long time, the driver does not need to set it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann d074f29390 staging: wilc1000: remove unused OS abstraction features
All the remaining features from the OS abstraction layer
are not used at all in the driver, so we can just remove
the remaining references to them.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:46:05 +09:00
Arnd Bergmann 042f19c935 staging: wilc1000: clean up timer feature
The driver has a simple wrapper around timer_list, and an
optional but unused feature to make the timer periodic.

This removes support for the periodic timer and simplifies
the code around timers.

A follow-up should replace the remaining wrapper with
open-coded timers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:22 +09:00
Arnd Bergmann b96ff76a07 staging: wilc1000: clean up sleep wrapper
The driver has a simple wrapper around msleep, as well as
a more advanced sleep function that is unused. This removes
the unused code and the options to turn the feature on or
off.

A follow-up should rework the code to use msleep directly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:22 +09:00
Arnd Bergmann 5f928b9567 staging: wilc1000: simplify semaphore wrapper
The driver has its own API for semaphores. This should
be replaced with mutexes and completions, but for the moment
we can start by removing the obviously unused parts.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:22 +09:00
Arnd Bergmann 71b13e5990 staging: wilc1000: remove unused memory handling code
The driver contains its own abstraction for memory allocation,
most of it unused. This removes the unused parts, but the
rest should also be removed later.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:21 +09:00
Arnd Bergmann 2ed3dc1d3c staging: wilc1000: simplify msgqueue code
The driver contains an abstraction for message queues, with
optional unused features, while the driver requires the main
feature.

This makes the msgqueue code unconditional as it's required
but removes the unused parts.

A later cleanup should remove the entire msgqueue code
and replace it with some normal kernel API.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:21 +09:00
Arnd Bergmann 4ec5d4a4f6 staging: wilc1000: remove unused string functions
The driver provides wrappers for a lot of string operations.
Some of them are unused, while others should be replaced
with normal kernel functions.

This replaces the unused ones for now, and leaves the other
ones for a later cleanup.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:21 +09:00
Arnd Bergmann f155bcf8de staging: wilc1000: remove time wrapper
The abstraction for time in this driver is completely
unused, so remove it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-02 13:45:21 +09:00
Sasha Levin adf1b358a9 staging: wilc1000: off by one in wilc_wfi_cfg80211_mgmt_types
NL80211_IFTYPE_MAX represents the largest interface type number defined,
so declaring the array with that size will actually leave out the last
interface.

This causes invalid memory access whenever this array is used, which starts
happening at boot.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:00:15 +09:00
Arnd Bergmann 691f1a2f03 staging: wilc1000: remove __DRIVER_VERSION__ macro
The driver version is meaningless, and in particular does not
have to be passed from the Makefile. This removes the macros,
but leaves the behavior of printing the 10.2 version untouched
for the moment.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 08:56:57 +09:00
Arnd Bergmann 1999bd5251 staging: wilc1000: remove thread wrapper
The wilc_thread code is a very thin wrapper around kthread,
so just remove it and use kthread directly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 08:56:57 +09:00
Arnd Bergmann 544c69dc83 staging: wilc1000: remove platform version checks
For code that is integrated into mainline Linux, checks for
the OS platform make no sense, because we know that we
are on Linux.

This removes all checks and the associated dead code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 08:56:56 +09:00
Arnd Bergmann e5af056149 staging: wilc1000: remove linux version checks
For code that is integrated into mainline Linux, checks for
the kernel version make no sense, because we know which version
we are compiling against.

This removes all checks and the associated dead code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 08:56:56 +09:00
Arnd Bergmann 9535ebc5e9 staging/wilc1000: fix Kconfig dependencies
The newly added wilc1000 driver lacks several Kconfig dependencies,
resulting in a multitude of randconfig build errors, e.g.:

drivers/built-in.o: In function `WILC_WFI_mgmt_tx_cancel_wait':
binder.c:(.text+0x12bd28): undefined reference to `cfg80211_remain_on_channel_expired'
drivers/built-in.o: In function `WILC_WFI_CfgSetChannel':
binder.c:(.text+0x12c9d8): undefined reference to `ieee80211_frequency_to_channel'
drivers/built-in.o: In function `WILC_WFI_CfgAlloc':
binder.c:(.text+0x132530): undefined reference to `wiphy_new_nm'
drivers/built-in.o: In function `wilc_netdev_init':
binder.c:(.text+0x1356d0): undefined reference to `register_inetaddr_notifier'
drivers/built-in.o: In function `linux_spi_init':
binder.c:(.text+0x210a68): undefined reference to `spi_register_driver'

This change ensures that we always have at least one of SPI or MMC
enabled, and are only able to pick an interface that works. It also
adds all the missing dependencies for networking infrastructure
(cfg80211, wext, and ipv4).

In order to make it readable, I also took the liberty of re-indenting
the Kconfig file to the normal conventions.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-28 09:06:45 -07:00
Guenter Roeck e3cb742c32 staging: wilc1000: Disable for S390
The wilc1000 driver uses definitions such as DEBUG_LEVEL, DEBUG,
and PRINT_INFO. This causes compile errors on S390 which has similar
definitions in its core code. Disable the driver for S390 instead
of giving the non-standard messaging code credit by trying to fix it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-27 21:47:16 -07:00
Guenter Roeck f1a9983002 staging: wilc1000: Include linux/gpio.h instead of asm/gpio.h
Fix:

drivers/staging/wilc1000/linux_wlan.c:18:22: fatal error:
	asm/gpio.h: No such file or directory

Not every architecture has asm/gpio.h. Include linux/gpio.h instead.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-27 16:23:38 -07:00
Johnny Kim c5c77ba18e staging: wilc1000: Add SDIO/SPI 802.11 driver
This driver is for the wilc1000 which is a single chip IEEE 802.11
b/g/n device.
The driver works together with cfg80211, which is the kernel side of
configuration management for wireless devices because the wilc1000
chipset is fullmac where the MLME is managed in hardware.

The driver worked from kernel version 2.6.38 and being now ported
to several others since then.
A TODO file is included as well in this commit.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Rachel Kim <rachel.kim@atmel.com>
Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Chris Park <chris.park@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:36:53 -07:00