This patch removes pUserVoid that is first argument of
update_scan_time function because it is not used in this function.
Remove argument in the function call also.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch removes pUserVoid that is first argument of
reset_shadow_found function because it is not used in this function.
Remove argument in the function call also.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch removes pUserVoid that is first argument of
clear_shadow_scan function because it is not used in this function.
Remove argument in the function call also.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch passes struct wilc to wilc_send_config_pkt. The function
wilc_wlan_cfg_set and wilc_wlan_cfg_get function will get wilc to replace
wilc_dev with it.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:26 +0000 (15:11 +0900)]
staging: wilc1000: pass wilc to all function pointers of wilc_hif_func
This patch adds new function parameter struct wilc to all function pointers
of struct wilc_hif_func, and all functions of wilc_sdio.c and wilc_spi.c
need to be changed as it's function pointer is changed.
Pass wilc in all the functions call as well.
The wilc will be passed to functions in linux_wlan_sdio.c and linux_wlan_spi.c
to replace with global variable wilc_dev in the next patch.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:25 +0000 (15:11 +0900)]
staging: wilc1000: pass struct wilc to the functions which use hif_func
This patch passes struct wilc to the functions which use hif_func inside.
The function pointers of wilc_hif_func will pass wilc also in the later
patch. Pass wilc to the functions if necessary.
This patch removes PLAT_WMS8304 and it's related codes as well. We will not
use this way of supporting other platform. This will be supported if necessary
by device tree later.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:23 +0000 (15:11 +0900)]
staging: wilc1000: remove spi speed control codes
This patch removes spi speed control codes. We are not using define SPEED to
specify speed of spi, it is not proper way of doing this. It will be
provided by the device tree.
The following functions and variable are removed.
MIN_SPEED, MAX_SPEED, SPEED
wilc_spi_set_max_speed
wilc_spi_max_bus_speed
wilc_spi_default_bus_speed
hif_set_max_bus_speed
hif_set_default_bus_speed
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:22 +0000 (15:11 +0900)]
staging: wilc1000: remove sdio speed control codes
This patch removes spi speed control related functions and variable. We cannot
get exact clock what we need in this way and it can causes some problem in host
side by setting the clock, so remove the codes.
Speed control codes in spi also will removed in next patch, so it's ok to
remove functions in linux_wlan.c and wilc_wlan.c which also not used anymore.
The Following functions and varialbe are removed.
MAX_SPEED, sdio_default_speed
wilc_bus_set_default_speed
wilc_bus_set_max_speed
linux_sdio_set_speed
linux_sdio_get_speed
wilc_sdio_set_max_speed
wilc_sdio_set_default_speed
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 16 Nov 2015 14:05:10 +0000 (15:05 +0100)]
staging/wilc1000: pass struct wilc to most linux_wlan.c functions
We want to get rid of all global variables in this driver, and
instead pass device structures from one function to another.
This changes the linux_wlan.c and wilc_wlan.c to do this
for the most part. There are a few exceptions where these
functions are themselves called from another part of the driver
that does not have an instance pointer at hand. Changing those
would be a follow-up step.
There are a few other globals that will have to get moved
into struct wilc at a later point.
Arnd Bergmann [Mon, 16 Nov 2015 14:05:09 +0000 (15:05 +0100)]
staging/wilc1000: use more regular probing
So far, my patches tried to do equivalent conversions of the
existing code. This one goes beyond that by restructuring
how the devices get probed. In particular, the spi driver
no longer creates the netdev until the device is probed,
and I've removed the global wilc_sdio_func and wilc_spi_dev
variables in favor of retrieving them from the wilc_dev
variable that will eventually get passed through all functions
instead of using a global.
Arnd Bergmann [Mon, 16 Nov 2015 14:05:08 +0000 (15:05 +0100)]
staging/wilc1000: split out bus specific modules
The SPI and SDIO specific code is now separate enough that
we just need to restructure the Makefile and Kconfig logic
a bit and export a couple of symbols from the common module
to have separate bus glue drivers.
The last remaining user of WILC_SDIO macro checks for the correct
time to wait in an interrupt for the PLL to settle. We can
replace this with a runtime check and remove both WILC_SDIO and
WILC_SPI, as we no longer need conditional compilation based on
the hardware type.
Arnd Bergmann [Mon, 16 Nov 2015 14:05:06 +0000 (15:05 +0100)]
staging/wilc1000: turn enable_irq/disable_irq into callbacks
As a preparation for turning the SDIO side of wilc1000 into a separate
module, this removes the last direct caller from the core module into
the sdio specific portion. All calls to wilc_sdio_enable_interrupt()
and wilc_sdio_disable_interrupt() now go through a function pointer
in wilc_hif_func. We also change arguments slightly to pass the device,
as we are already touching those lines and the change will be needed
later to remove the global variables.
Arnd Bergmann [Mon, 16 Nov 2015 14:05:05 +0000 (15:05 +0100)]
staging/wilc1000: pass hif operations through initialization
The wilc_hif_spi and wilc_hif_sdio structures are part of
the bus specific code, and the generic code should have no knowledge
of their addresses.
This changes the code to reference them only from the bus
specific initialization code, which we can then use to split
up the driver into separate modules.
Arnd Bergmann [Mon, 16 Nov 2015 14:05:04 +0000 (15:05 +0100)]
staging/wilc1000: get rid of WILC_SDIO_IRQ_GPIO
Whether the SDIO function uses an internal or external interrupt
should not be a compiletime decision but be determined at runtime.
This changes the code to pass a GPIO number from the init code
as early as possible, and leaves just one #ifdef WILC_SDIO_IRQ_GPIO
to preserve the previous behavior.
All other locations that check for the interrupt method are turned
into runtime checks based on the gpio number (>=0) or the interrupt
number (>0).
Arnd Bergmann [Mon, 16 Nov 2015 14:05:03 +0000 (15:05 +0100)]
staging/wilc1000: use device pointer for phy creation
wilc_create_wiphy tries to get a pointer to a device from the
global wilc_sdio_func variable. This is a layering violation
and we can use the wilc_dev->dev pointer instead.
Arnd Bergmann [Mon, 16 Nov 2015 14:05:01 +0000 (15:05 +0100)]
staging/wilc1000: unify device pointer
struct wilc has two pointers to store the device, one for sdio_func
and one for spi_device. By changing the pointer to a 'struct device',
we can simplify the logic and avoid a few #ifdefs.
Arnd Bergmann [Mon, 16 Nov 2015 14:05:00 +0000 (15:05 +0100)]
staging/wilc1000: move init/exit functions to driver files
The driver interfaces are in linux_wlan_sdio.c and linux_wlan_spi.c, so
this is where the init and exit functions should be. Splitting this up
enables further cleanups, including eventually allowing both modules
to be built together.
Arnd Bergmann [Mon, 16 Nov 2015 14:04:59 +0000 (15:04 +0100)]
staging/wilc1000: move wilc_wlan_inp_t into struct wilc
wilc_wlan_inp_t is an unnecessary indirection and requires linux_wlan.c
to have knowledge of the specific sdio and spi front-ends. This
removes the structure and places io_type directly inside the struct wilc.
The driver provides an interface for custom power management
and detection that is meant to be filled by people customizing
the driver. The default implementation of this is empty, and
we don't actually want people to have to modify the source code.
If anybody needs this, they need to describe the respective
hardware specifics using device tree or platform data and make
the driver handle this is a more general way.
Arnd Bergmann [Mon, 16 Nov 2015 14:04:57 +0000 (15:04 +0100)]
staging/wilc1000: avoid static definitions in header
The wilc_wfi_cfgoperations.h header defines the ieee80211_txrx_stypes
and cipher_suites variables that are only used in wilc_wfi_cfgoperations.c
and should not be shared in a header file.
This moves over all that data into the .c file, and also moves all
the macro definitions from the file that are also not needed here.
Arnd Bergmann [Mon, 16 Nov 2015 14:04:56 +0000 (15:04 +0100)]
staging/wilc1000: use NO_SECURITY instead of NO_ENCRYPT
The linux_wlan.c file uses a set of enums from wilc_wlan_if.h,
with the exception of the NO_ENCRYPT that comes from
wilc_wfi_cfgoperations.h. The two sets of enums clearly have
the same intention but are defined a bit different.
To prepare to clean up the ones in wilc_wfi_cfgoperations.h, this
first changes over the only other user.
Arnd Bergmann [Mon, 16 Nov 2015 14:04:54 +0000 (15:04 +0100)]
staging/wilc1000: use proper naming for global symbols
There are many global symbols in the wilc1000 driver, some of them
with names like "DEBUG_LEVEL" or "probe" that are not acceptable
for globals in the linux kernel as they may easily conflict with other
(equally broken) drivers.
This renames all the globals that do not already start with
wilc or a variation of that to start with wilc_ and to follow
the usual naming conventions.
Arnd Bergmann [Mon, 16 Nov 2015 14:04:53 +0000 (15:04 +0100)]
staging/wilc1000: make symbols static if possible
All symbols that are only referenced in the file that defines
them can be declared 'static' to avoid namespace pollution,
to produce better object code, and to make the source more
readable.
This patch removes host_int_get_rx_power_level function definition and
declaration that is defined at host_interface.c and host_interface.h.
This function is defined but not used anywhere in this driver so just
remove it.
This patch removes host_int_get_assoc_req_info function definition and
declaration that is defined at host_interface.c and host_interface.h.
This function is defined but not used anywhere in this driver so just
remove it.
This patch removes host_int_disconnect_station function definition and
declaration that is defined at host_interface.c and host_interface.h.
This function is defined but not used anywhere so just remove it.
This patch removes host_int_get_start_scan_req function definition and
declaration that is defined at host_interface.c and host_interface.h.
This function is defined but not used anywhere in this driver so just
remove it.
This patch removes host_int_set_start_scan_req function definition and
declaration that is defined at host_interface.c and host_interface.h.
This function is defined but not used anywhere in this driver so that
just remove it.
This patch removes host_int_get_RSNAConfigPSKPassPhrase function
definition and declaration that is defined at host_interface.c and
host_interface.h. This function is defined but not used anywhere in this
driver so just remove it.
This patch removes host_int_set_RSNAConfigPSKPassPhrase function
definition and declaration that is defined at host_interface.c and
host_interface.h. This function is defined but not used anywhere in this
driver so just remove it.
Chaehyun Lim [Sun, 8 Nov 2015 07:49:18 +0000 (16:49 +0900)]
staging: wilc1000: remove host_int_get_pmkid_info
This patch removes host_int_get_pmkid_info function definition and
declaration that is defined at host_interface.c and host_interface.h.
This function is defined but not used anywhere in this driver so just
remove it.
This patch removes host_int_add_tx_gtk declaration that is defined in
host_interface.h file. It can not find any host_int_add_tx_gtk
function definition in this driver so just remove it.
Chaehyun Lim [Sun, 8 Nov 2015 07:49:15 +0000 (16:49 +0900)]
staging: wilc1000: rename u8KeyLen in host_int_add_rx_gtk
This patch changes u8KeyLen to key_len to avoid camelcase.
It is used as local variable in order to save gtk_key_len that is
argument of this function.
Chaehyun Lim [Sun, 8 Nov 2015 07:49:06 +0000 (16:49 +0900)]
staging: wilc1000: fix argument name of host_int_add_rx_gtk
This patch changes struct host_if_drv of host_int_add_rx_gtk function
declaration from hWFIDrv to hif_drv.
With this change, first argument of this function declaration and
definition has same name as hif_drv.
Chaehyun Lim [Sun, 8 Nov 2015 07:49:05 +0000 (16:49 +0900)]
staging: wilc1000: fix return type of host_int_add_rx_gtk
This patch changes return type of host_int_add_rx_gtk from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.
Chaehyun Lim [Sun, 8 Nov 2015 07:49:03 +0000 (16:49 +0900)]
staging: wilc1000: rename u8KeyLen in host_int_add_ptk
This patch changes u8KeyLen to key_len to avoid camelcase.
It is used as local variable in order to save pkt_key_len that is
argument of this function.
Chaehyun Lim [Sun, 8 Nov 2015 07:48:55 +0000 (16:48 +0900)]
staging: wilc1000: fix argument name of host_int_add_ptk
This patch changes struct host_if_drv of host_int_add_ptk function
declaration from hWFIDrv to hif_drv.
With this change, first parameter of this function declaration and
definition has same name as hif_drv.
Chaehyun Lim [Sun, 8 Nov 2015 07:48:54 +0000 (16:48 +0900)]
staging: wilc1000: fix return type of host_int_add_ptk
This patch changes return type of host_int_add_ptk from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.
Gustavo Padovan [Thu, 26 Nov 2015 13:03:56 +0000 (11:03 -0200)]
staging/android: add TODO to de-stage android sync framework
- remove CONFIG_SW_SYNC_USER, it is used only for testing/debugging and
should not be upstreamed.
- port CONFIG_SW_SYNC_USER tests interfaces to use debugfs somehow
- port libsync tests to kselftest
- clean up and ABI check for security issues
- move the sync framework to drivers/base/dma-buf
Cc: Arve Hjønnevåg <arve@android.com> Cc: Riley Andrews <riandrews@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robdclark@gmail.com> Cc: Greg Hackmann <ghackmann@google.com> Cc: John Harrison <John.C.Harrison@Intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Zijlstra [Sun, 13 Dec 2015 21:11:16 +0000 (22:11 +0100)]
sched/wait: Fix the signal handling fix
Jan Stancek reported that I wrecked things for him by fixing things for
Vladimir :/
His report was due to an UNINTERRUPTIBLE wait getting -EINTR, which
should not be possible, however my previous patch made this possible by
unconditionally checking signal_pending().
We cannot use current->state as was done previously, because the
instruction after the store to that variable it can be changed. We must
instead pass the initial state along and use that.
Fixes: 68985633bccb ("sched/wait: Fix signal handling in bit wait helpers") Reported-by: Jan Stancek <jstancek@redhat.com> Reported-by: Chris Mason <clm@fb.com> Tested-by: Jan Stancek <jstancek@redhat.com> Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> Tested-by: Chris Mason <clm@fb.com> Reviewed-by: Paul Turner <pjt@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: tglx@linutronix.de Cc: Oleg Nesterov <oleg@redhat.com> Cc: hpa@zytor.com Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 13 Dec 2015 20:41:10 +0000 (12:41 -0800)]
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixlets from Thomas Gleixner:
"Two trivial fixes which add missing header fileas and forward
declarations so the code will compile even when the magic include
chains are different"
* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/gic-v3: Add missing include for barrier.h
irqchip/gic-v3: Add missing struct device_node declaration
Linus Torvalds [Sun, 13 Dec 2015 20:29:22 +0000 (12:29 -0800)]
Merge tag 'char-misc-4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull fpga driver fixes from Greg KH:
"Only two small fpga driver fixes here, both have been in linux-next
for a while, and resolve some reported issues"
* tag 'char-misc-4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
fpga manager: Fix firmware resource leak on error
fpga manager: remove label
Linus Torvalds [Sun, 13 Dec 2015 19:58:18 +0000 (11:58 -0800)]
Merge tag 'usb-4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB driver fixes from Greg KH:
"Here are a number of small USB fixes for 4.4-rc5. All of them have
been in linux-next. The majority are gadget and phy issues, with a
few new quirks and device ids added as well"
* tag 'usb-4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (32 commits)
USB: add quirk for devices with broken LPM
xhci: fix usb2 resume timing and races.
usb: musb: fail with error when no DMA controller set
usb: gadget: uvc: fix permissions of configfs attributes
usb: musb: core: Fix pm runtime for deferred probe
usb: phy: msm: fix a possible NULL dereference
USB: host: ohci-at91: fix a crash in ohci_hcd_at91_overcurrent_irq
usb: Quiet down false peer failure messages
usb: xhci: fix config fail of FS hub behind a HS hub with MTT
xhci: Fix memory leak in xhci_pme_acpi_rtd3_enable()
usb: Use the USB_SS_MULT() macro to decode burst multiplier for log message
USB: whci-hcd: add check for dma mapping error
usb: core : hub: Fix BOS 'NULL pointer' kernel panic
USB: quirks: Apply ALWAYS_POLL to all ELAN devices
usb-storage: Fix scsi-sd failure "Invalid field in cdb" for USB adapter JMicron
USB: quirks: Fix another ELAN touchscreen
usb: dwc3: gadget: don't prestart interrupt endpoints
USB: serial: Another Infineon flash loader USB ID
USB: cdc_acm: Ignore Infineon Flash Loader utility
USB: cp210x: Remove CP2110 ID from compatibility list
...
Linus Torvalds [Sun, 13 Dec 2015 00:43:44 +0000 (16:43 -0800)]
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC fixes from Arnd Bergmann:
"Here are a bunch of small bug fixes for various ARM platforms, nothing
really sticks out this week, most of either fixes bugs in code that
was just added in 4.4, or that has been broken for many years without
anyone noticing.
at91/sama5d2:
- fix sama5de hardware setup of sd/mmc interface
- proper selection of pinctrl drivers. PIO4 is necessary for sama5d2
imx:
- Fix vf610 SAI clock configuration bug which is discovered by the
newly added master mode support in SAI audio driver.
- Fix buggy L2 cache latency values in vf610 device trees, which may
cause system hang when cpu runs at a higher frequency.
ixp4xx:
- fix prototypes for readl/writel functions
ls2080a:
- use little-endian register access for GPIO and SDHCI
omap:
- Fix clock source for ARM TWD and global timers on am437x
- Always select REGULATOR_FIXED_VOLTAGE for omap2+ instead of when
MACH_OMAP3_PANDORA is selected
- Fix SPI DMA handles for dm816x as only some were mapped
- Fix up mbox cells for dm816x to make mailbox usable