Re: [PATCH 19/20] staging/wilc1000: use more regular probing

2015-11-10 Thread Andy Shevchenko
On Wed, Nov 11, 2015 at 1:42 AM, Arnd Bergmann wrote: > 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, >

Re: [RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-10 Thread Johannes Berg
On Wed, 2015-11-11 at 02:22 +0200, Luca Coelho wrote: >  > Now that you have all these options in Kconfig, wouldn't it be > possible > to remove the calls to the "static" ieee80211_hw_set() in the drivers > and somehow set all the flags that are defined in Kconfig > automatically? > Since Kconfig

Re: [PATCH 4/5] wcn3620: use new response format for wcn3620 trigger_ba

2015-11-10 Thread fengwei.yin
Hi Bob, On 2015/11/10 22:13, Bob Copeland wrote: On Tue, Nov 10, 2015 at 03:08:53PM +0800, fengwei.yin wrote: Even on 3620, not all cmds switch to wcn36xx_smd_rsp_status_check_v2. And I don't think wcn36xx_smd_rsp_status_check_v2 should bind to 3620 (it may be related with firmware). In patch

Re: [PATCH 01/20] staging/wilc1000: add struct net_device declaration

2015-11-10 Thread Greg Kroah-Hartman
On Wed, Nov 11, 2015 at 01:13:33AM +0100, Arnd Bergmann wrote: > On Tuesday 10 November 2015 16:02:48 Greg Kroah-Hartman wrote: > > On Wed, Nov 11, 2015 at 12:42:21AM +0100, Arnd Bergmann wrote: > > I think this is already fixed in my staging-testing branch, right? > > Ah right. I only got it with

Re: [RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-10 Thread Luca Coelho
On Tue, 2015-11-10 at 09:52 +0100, Johannes Berg wrote: > From: Johannes Berg > > There are many drivers with different behaviour, but in a lot of > systems only a single driver will ever be built. In that case we > could practically get rid of the code for the paths that this > driver/device doe

Re: [PATCH 01/20] staging/wilc1000: add struct net_device declaration

2015-11-10 Thread Arnd Bergmann
On Tuesday 10 November 2015 16:02:48 Greg Kroah-Hartman wrote: > On Wed, Nov 11, 2015 at 12:42:21AM +0100, Arnd Bergmann wrote: > I think this is already fixed in my staging-testing branch, right? Ah right. I only got it with some rare randconfig builds, and assumed the problem was still there bec

Re: [PATCH 01/20] staging/wilc1000: add struct net_device declaration

2015-11-10 Thread Greg Kroah-Hartman
On Wed, Nov 11, 2015 at 12:42:21AM +0100, Arnd Bergmann wrote: > A recent cleanup added a reference to struct net_device, but > that structure is not always visible in the context of the > declaration, so we may get a compile-time error: > > In file included from wilc1000/host_interface.c:5:0: > w

Re: [PATCH 01/20] staging/wilc1000: add struct net_device declaration

2015-11-10 Thread Arnd Bergmann
On Tuesday 10 November 2015 15:47:02 Joe Perches wrote: > On Wed, 2015-11-11 at 00:42 +0100, Arnd Bergmann wrote: > > A recent cleanup added a reference to struct net_device, but > > that structure is not always visible in the context of the > > declaration, so we may get a compile-time error: > >

[PATCH 02/20] staging/wilc1000: remove unused functions

2015-11-10 Thread Arnd Bergmann
A number of symbols in the wilc1000 driver are completely unused and can be removed. This includes two variables that are only written but not read. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/host_interface.c | 295 -- drivers/staging/wilc1000/host_inte

[PATCH 03/20] staging/wilc1000: make symbols static if possible

2015-11-10 Thread Arnd Bergmann
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. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/Makefile | 3 +- drivers/stagi

[PATCH 06/20] staging/wilc1000: use NO_SECURITY instead of NO_ENCRYPT

2015-11-10 Thread Arnd Bergmann
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 fir

[PATCH 07/20] staging/wilc1000: avoid static definitions in header

2015-11-10 Thread Arnd Bergmann
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 ar

[PATCH 13/20] staging/wilc1000: use device pointer for phy creation

2015-11-10 Thread Arnd Bergmann
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. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/linux_w

[PATCH 08/20] staging/wilc1000: remove linux_wlan_{device_power,device_detection}

2015-11-10 Thread Arnd Bergmann
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

[PATCH 01/20] staging/wilc1000: add struct net_device declaration

2015-11-10 Thread Arnd Bergmann
A recent cleanup added a reference to struct net_device, but that structure is not always visible in the context of the declaration, so we may get a compile-time error: In file included from wilc1000/host_interface.c:5:0: wilc1000/host_interface.h:705:46: warning: 'struct net_device' declared insi

[PATCH 09/20] staging/wilc1000: move wilc_wlan_inp_t into struct wilc

2015-11-10 Thread Arnd Bergmann
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. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c | 21 ++

[PATCH 05/20] staging/wilc1000: move extern declarations to headers

2015-11-10 Thread Arnd Bergmann
'extern' declarations belong into a header file rather than a .c file, to ensure that the definition matches the declaration. This moves all declarations into a header file that seems most appropriate for it. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/host_interface.c |

[PATCH 12/20] staging/wilc1000: pass io_type to wilc_netdev_init

2015-11-10 Thread Arnd Bergmann
In order to avoid some of the #ifdefs, this passes the io_type and device pointer as an argument to wilc_netdev_init. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c | 18 -- drivers/staging/wilc1000/linux_wlan_sdio.c| 4 ++-- drivers/staging/w

Re: [PATCH 01/20] staging/wilc1000: add struct net_device declaration

2015-11-10 Thread Joe Perches
On Wed, 2015-11-11 at 00:42 +0100, Arnd Bergmann wrote: > A recent cleanup added a reference to struct net_device, but > that structure is not always visible in the context of the > declaration, so we may get a compile-time error: > > In file included from wilc1000/host_interface.c:5:0: > wilc1000

[PATCH 19/20] staging/wilc1000: use more regular probing

2015-11-10 Thread Arnd Bergmann
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 vari

[PATCH 04/20] staging/wilc1000: use proper naming for global symbols

2015-11-10 Thread Arnd Bergmann
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

[PATCH 00/20] staging/wilc1000: cleanups once again

2015-11-10 Thread Arnd Bergmann
I have rebased the patches once more on top of a lot of renames, and would prefer not to rebase them again. This is the series of fixups that I've posted before, now for today's staging-testing branch. Please apply. Arnd Bergmann (20): staging/wilc1000: add struct net_device declaration stagi

[PATCH 16/20] staging/wilc1000: turn enable_irq/disable_irq into callbacks

2015-11-10 Thread Arnd Bergmann
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

[PATCH 15/20] staging/wilc1000: pass hif operations through initialization

2015-11-10 Thread Arnd Bergmann
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 modu

[PATCH 18/20] staging/wilc1000: split out bus specific modules

2015-11-10 Thread Arnd Bergmann
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. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/Kconfig| 66 +

[PATCH 10/20] staging/wilc1000: move init/exit functions to driver files

2015-11-10 Thread Arnd Bergmann
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. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/linu

[PATCH 11/20] staging/wilc1000: unify device pointer

2015-11-10 Thread Arnd Bergmann
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. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c | 25 +++- d

[PATCH 17/20] staging/wilc1000: remove WILC_SDIO/WILC_SPI macros

2015-11-10 Thread Arnd Bergmann
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. Signed-off-by: Arnd Bergma

[PATCH 14/20] staging/wilc1000: get rid of WILC_SDIO_IRQ_GPIO

2015-11-10 Thread Arnd Bergmann
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.

[PATCH 20/20] staging/wilc1000: pass struct wilc to most linux_wlan.c functions

2015-11-10 Thread Arnd Bergmann
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 dri

Re: [PATCH] rtl8xxxu: rtl8192eu: Map out EFUSE TX power area

2015-11-10 Thread Jes Sorensen
Jakub Sitnicki writes: > TX power values are laid out differently in EFUSE found in RTL8192EU & > RTL8188EU devices. TX power indices and differences for each RF path > are not interleaved (A, B, A, B), as in other chips, but follow one > another (A, B, C, D). > > Signed-off-by: Jakub Sitnicki >

[PATCH] realtek: rtlwifi: rtl8821ae: Fix lockups on boot

2015-11-10 Thread Larry Finger
In commit 54328e64047a5 ("rtlwifi: rtl8821ae: Fix system lockups on boot"), an attempt was made to fix a regression introduced in commit 1277fa2ab2f9 ("rtlwifi: Remove the clear interrupt routine from all drivers"). Unfortunately, there were logic errors in that patch that prevented affected boxes

Re: [PATCH 4/5] wcn3620: use new response format for wcn3620 trigger_ba

2015-11-10 Thread Bob Copeland
On Tue, Nov 10, 2015 at 03:08:53PM +0800, fengwei.yin wrote: > Even on 3620, not all cmds switch to wcn36xx_smd_rsp_status_check_v2. > And I don't think wcn36xx_smd_rsp_status_check_v2 should bind to 3620 (it > may be related with firmware). > > In patch v2, the wcn36xx_smd_rsp_status_check_v2 is

[PATCH v2 5/9] ath10k: remove freq from skb_cb

2015-11-10 Thread Michal Kazior
It was wasteful to keep it in the struct. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/core.h | 1 - drivers/net/wireless/ath/ath10k/htt_tx.c | 9 +++-- drivers/net/wireless/ath/ath10k/mac.c| 5 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dr

[PATCH v2 4/9] ath10k: remove is_offchan

2015-11-10 Thread Michal Kazior
It was wasteful to keep it in the struct. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/core.h | 1 - drivers/net/wireless/ath/ath10k/mac.c | 4 +--- drivers/net/wireless/ath/ath10k/mac.h | 1 + drivers/net/wireless/ath/ath10k/txrx.c | 7 ++- 4 files changed, 8 insertion

[PATCH v2 9/9] ath10k: store msdu_id instead of txbuf pointers

2015-11-10 Thread Michal Kazior
Txbuf is no longer a DMA pool and can be easily tracked with a mere msdu_id. This saves 10 bytes on 64bit systems and 6 bytes on 32bit systems of precious sk_buff control buffer. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/core.h | 6 +--- drivers/net/wireless/ath/ath10k/

[PATCH v2 2/9] ath10k: rename function to adhere to naming convention

2015-11-10 Thread Michal Kazior
All functions should have ath10k_{filename}_ prefixes. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/mac.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 2eb64791

[PATCH v2 7/9] ath10k: fix tx header parsing

2015-11-10 Thread Michal Kazior
Frames are not guaranteed to be 802.11 frames in ath10k_htt_tx() and the tx completion handler. In some cases, like TDLS, they can be Ethernet. Hence checking, e.g. frame_control could yield bogus results and behavior. Fortunately this wasn't a real problem so far because there's no FW/HW combinat

[PATCH v2 1/9] ath10k: merge is_protected with nohwcrypt

2015-11-10 Thread Michal Kazior
It was wasteful to have two flags describing the same thing. While at it fix code style of ath10k_tx_h_use_hwcrypto(). Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/core.h | 1 - drivers/net/wireless/ath/ath10k/htt_tx.c | 3 --- drivers/net/wireless/ath/ath10k/mac.c|

[PATCH v2 6/9] ath10k: pack up flags in skb_cb

2015-11-10 Thread Michal Kazior
It was wasteful to have all the flags as separate bools. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/core.h | 13 +++-- drivers/net/wireless/ath/ath10k/htt_tx.c | 4 ++-- drivers/net/wireless/ath/ath10k/mac.c| 10 +++--- drivers/net/wireless/ath/ath10k/wmi

[PATCH v2 3/9] ath10k: remove txmode from skb_cb

2015-11-10 Thread Michal Kazior
It was wasteful to keep it in the struct because it can be passed as function argument down the tx path. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/core.h | 1 - drivers/net/wireless/ath/ath10k/htt.h| 4 +++- drivers/net/wireless/ath/ath10k/htt_tx.c | 9 +++ dr

[PATCH v2 8/9] ath10k: replace vdev_id and tid in skb cb

2015-11-10 Thread Michal Kazior
This prepares the driver for future ieee80211_txq and wake_tx_queue() support. Signed-off-by: Michal Kazior --- Notes: v2: * fix parsing eth frame as 802.11 drivers/net/wireless/ath/ath10k/core.h | 4 ++-- drivers/net/wireless/ath/ath10k/htt_tx.c | 36 +---

[PATCH v2 0/9] ath10k: clean up ath10k_skb_cb

2015-11-10 Thread Michal Kazior
The ath10k_skb_cb structure wasn't really space efficient. Some stuff is removed or replaced with more compact representation. This cleanup is necessary for future features. The size of ath10k_skb_cb: before after x86-32 26 12 x86-64 34 20 v2: * fix a bug (patch

Re: [PATCH] ath10k: fix invalid NSS for 4x4 devices

2015-11-10 Thread Kalle Valo
Rajkumar Manoharan writes: > The number of spatial streams that are derived from chain mask > for 4x4 devices is using wrong bitmask and conditional check. > This is affecting downlink throughput for QCA99x0 devices. Earlier > cfg_tx_chainmask is not filled by default until user configured it > a

[RFC v2 5/4] mac80211: generate hw flags from include file

2015-11-10 Thread Johannes Berg
From: Johannes Berg Instead of having to list all the hw flags in many places, just list the macro to generate everything in a new include file and include it in the proper places. Unfortunately this breaks docbook processing since that doesn't pre-process the file. It also doesn't generate the

[RFC v2 4/4] mac80211: test the static key code

2015-11-10 Thread Johannes Berg
From: Johannes Berg Make hwsim select a few on/off symbols and check that the result is as expected: * before 'registering' a device the branches are according to the Kconfig default only * 'registering' a device fixes that up to actually check the hardware flags * 'unregistering' again

[RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-10 Thread Johannes Berg
From: Johannes Berg There are many drivers with different behaviour, but in a lot of systems only a single driver will ever be built. In that case we could practically get rid of the code for the paths that this driver/device doesn't need. Doing that, however, would be rather dangerous. As a dec

[RFC v2 1/4] mac80211: add ieee80211_hw_clear()

2015-11-10 Thread Johannes Berg
From: Johannes Berg There are a few hardware flags that *are* valid to change, at least under certain circumstances. Since drivers are doing that, add an inline to make it easier to do correctly. They still need to take care of locking themselves. While at it, remove the pointless return in ieee

[RFC v2 2/4] mac80211: introduce ieee80211_local_check()

2015-11-10 Thread Johannes Berg
From: Johannes Berg This will later allow introducing different behaviour between driver and hw checks. Make mac80211 use the new check function almost everywhere - one place cannot (rate control) and two of them shouldn't get the behaviour I want to introduce (in hw registration.) Signed-off-by

[RFC v2 0/4] mac80211: jump labels for hw flags

2015-11-10 Thread Johannes Berg
Changes since v1: * use struct static_key_false * get rid of all those generated macros and use the optimiser - This was an experiment I thought of on Sunday ... As also explained in the log for patch 3, we have a lot of behaviour differences in mac80211 based on which driver we're working