[PATCH] staging: wilc1000: remove wilc_sdio_init

2015-12-22 Thread Glen Lee
wilc_sdio_init return always 1. It is needless, so just remove it and it's
related codes also.

Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/wilc_sdio.c | 12 
 1 file changed, 12 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_sdio.c 
b/drivers/staging/wilc1000/wilc_sdio.c
index e961b50..caad876 100644
--- a/drivers/staging/wilc1000/wilc_sdio.c
+++ b/drivers/staging/wilc1000/wilc_sdio.c
@@ -185,11 +185,6 @@ static void wilc_sdio_disable_interrupt(struct wilc *dev)
dev_info(>dev, "wilc_sdio_disable_interrupt OUT\n");
 }
 
-static int wilc_sdio_init(void)
-{
-   return 1;
-}
-
 /
  *
  *  Function 0
@@ -611,13 +606,6 @@ static int sdio_init(struct wilc *wilc)
 
g_sdio.irq_gpio = (wilc->dev_irq_num);
 
-   if (!wilc_sdio_init()) {
-   dev_err(>dev, "Failed io init bus...\n");
-   return 0;
-   } else {
-   return 0;
-   }
-
/**
 *  function 0 csa enable
 **/
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 44/45] iwlwifi: fix printf specifier

2015-12-22 Thread Joe Perches
On Mon, 2015-12-21 at 22:50 +0200, Emmanuel Grumbach wrote:
> Smatch warned about a bad specifier being used. Fix that.

I see nothing here other than a signed/unsigned
issue that shouldn't need fixing.  The conversion
from hex to decimal may not be useful.

> Signed-off-by: Emmanuel Grumbach 
> ---
>  drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 
> b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
> index b395854..c15f5be 100644
> --- a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
> +++ b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
> @@ -454,11 +454,11 @@ static void iwl_eeprom_enhanced_txpower(struct device 
> *dev,
>    TXP_CHECK_AND_PRINT(COMMON_TYPE),
>    txp->flags);
>   IWL_DEBUG_EEPROM(dev,
> -  "\t\t chain_A: 0x%02x chain_B: 0X%02x chain_C: 
> 0X%02x\n",
> +  "\t\t chain_A: %d chain_B: %d chain_C: %d\n",
>    txp->chain_a_max, txp->chain_b_max,
>    txp->chain_c_max);
>   IWL_DEBUG_EEPROM(dev,
> -  "\t\t MIMO2: 0x%02x MIMO3: 0x%02x High 
> 20_on_40: 0x%02x Low 20_on_40: 0x%02x\n",
> +  "\t\t MIMO2: %d MIMO3: %d High 20_on_40: 
> 0x%02x Low 20_on_40: 0x%02x\n",
>    txp->mimo2_max, txp->mimo3_max,
>    ((txp->delta_20_in_40 & 0xf0) >> 4),
>    (txp->delta_20_in_40 & 0x0f));

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 44/45] iwlwifi: fix printf specifier

2015-12-22 Thread Grumbach, Emmanuel


On 12/23/2015 06:08 AM, Joe Perches wrote:
> On Mon, 2015-12-21 at 22:50 +0200, Emmanuel Grumbach wrote:
>> Smatch warned about a bad specifier being used. Fix that.
> I see nothing here other than a signed/unsigned
> issue that shouldn't need fixing.  The conversion
> from hex to decimal may not be useful.

Yes so maybe I could just use the 0x%x specifier since
printk-formats.txt seems to say that 0x%x is good for s32 as well. Seems
that the "02" makes it "unsigned only".
Printing those values in hexadecimal is annoying anyway since we usually
express Tx power in decimal.
Thanks for pointing that out!

>> Signed-off-by: Emmanuel Grumbach 
>> ---
>>  drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 
>> b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
>> index b395854..c15f5be 100644
>> --- a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
>> +++ b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
>> @@ -454,11 +454,11 @@ static void iwl_eeprom_enhanced_txpower(struct device 
>> *dev,
>>   TXP_CHECK_AND_PRINT(COMMON_TYPE),
>>   txp->flags);
>>  IWL_DEBUG_EEPROM(dev,
>> - "\t\t chain_A: 0x%02x chain_B: 0X%02x chain_C: 
>> 0X%02x\n",
>> + "\t\t chain_A: %d chain_B: %d chain_C: %d\n",
>>   txp->chain_a_max, txp->chain_b_max,
>>   txp->chain_c_max);
>>  IWL_DEBUG_EEPROM(dev,
>> - "\t\t MIMO2: 0x%02x MIMO3: 0x%02x High 
>> 20_on_40: 0x%02x Low 20_on_40: 0x%02x\n",
>> + "\t\t MIMO2: %d MIMO3: %d High 20_on_40: 
>> 0x%02x Low 20_on_40: 0x%02x\n",
>>   txp->mimo2_max, txp->mimo3_max,
>>   ((txp->delta_20_in_40 & 0xf0) >> 4),
>>   (txp->delta_20_in_40 & 0x0f));
>

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[[linux-nfc] PATCH v1.0 1/1] driver: nfc: st95hf: Fix of build error

2015-12-22 Thread Shikha Singh
Modification in core.c to rename function "irq_handler"
and "irq_thread_handler" to "st95hf_irq_handler" and
"st95hf_irq_thread_handler" respectively. This modification
was done to remove build error.

Signed-off-by: Shikha Singh 
---
 drivers/nfc/st95hf/core.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/nfc/st95hf/core.c b/drivers/nfc/st95hf/core.c
index 526e342..9524b12 100644
--- a/drivers/nfc/st95hf/core.c
+++ b/drivers/nfc/st95hf/core.c
@@ -762,7 +762,7 @@ static int st95hf_response_handler(struct st95hf_context 
*stcontext,
return result;
 }
 
-static irqreturn_t irq_handler(int irq, void  *st95hfcontext)
+static irqreturn_t st95hf_irq_handler(int irq, void  *st95hfcontext)
 {
struct st95hf_context *stcontext  =
(struct st95hf_context *)st95hfcontext;
@@ -776,7 +776,7 @@ static irqreturn_t irq_handler(int irq, void  
*st95hfcontext)
return IRQ_WAKE_THREAD;
 }
 
-static irqreturn_t irq_thread_handler(int irq, void  *st95hfcontext)
+static irqreturn_t st95hf_irq_thread_handler(int irq, void  *st95hfcontext)
 {
int result = 0;
int res_len;
@@ -1140,8 +1140,8 @@ static int st95hf_probe(struct spi_device *nfc_spi_dev)
if (nfc_spi_dev->irq > 0) {
if (devm_request_threaded_irq(_spi_dev->dev,
  nfc_spi_dev->irq,
- irq_handler,
- irq_thread_handler,
+ st95hf_irq_handler,
+ st95hf_irq_thread_handler,
  IRQF_TRIGGER_FALLING,
  "st95hf",
  (void *)st95context) < 0) {
-- 
1.8.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[[linux-nfc] PATCH v1.0 0/1] ST95HF:Fix build err

2015-12-22 Thread Shikha Singh
Modification in st95hf/core.c to resolve build error.
Patch contains only delta in core.c to fix build error
assuming original series of ST95HF driver is already 
applied on NFC-next master branch. 

Shikha Singh (1):
  driver: nfc: st95hf: Fix of build error

 drivers/nfc/st95hf/core.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
1.8.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Mediatek wifi

2015-12-22 Thread Linus Walleij
On Mon, Dec 21, 2015 at 1:09 PM, Anca Emanuel  wrote:

> https://github.com/neurobin/MT7630E is reported to work for wifi.

Yes this works because it contains a forked and bitrotting copy
of the entire Mediatek code drop including a fork of rt2x00 from
the v3.10 kernel. It's not going to last, and I can't
get it to compile properly with the most recent Fedora kernel
relase (v4.3.x-based).

Ubuntu will also run into the problem sooner or later. :(

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [[linux-nfc] PATCH v1.0 1/1] driver: nfc: st95hf: Fix of build error

2015-12-22 Thread Samuel Ortiz
Hi Shikha,

On Tue, Dec 22, 2015 at 04:53:37AM -0500, Shikha Singh wrote:
> Modification in core.c to rename function "irq_handler"
> and "irq_thread_handler" to "st95hf_irq_handler" and
> "st95hf_irq_thread_handler" respectively. This modification
> was done to remove build error.
> 
> Signed-off-by: Shikha Singh 
> ---
>  drivers/nfc/st95hf/core.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
Applied to nfc-next, thanks.

Cheers,
Samuel.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] staging: wilc1000: fix double mutex_unlock on failure path in wilc_wlan_cleanup()

2015-12-22 Thread Dan Carpenter
On Mon, Dec 21, 2015 at 12:46:51AM +0300, Alexey Khoroshilov wrote:
> diff --git a/drivers/staging/wilc1000/wilc_wlan.c 
> b/drivers/staging/wilc1000/wilc_wlan.c
> index a73e99f..4b7c8e9 100644
> --- a/drivers/staging/wilc1000/wilc_wlan.c
> +++ b/drivers/staging/wilc1000/wilc_wlan.c
> @@ -1459,15 +1459,16 @@ void wilc_wlan_cleanup(struct net_device *dev)
>   ret = p->hif_func.hif_read_reg(wilc, WILC_GP_REG_0, );
>   if (!ret) {
>   PRINT_ER("Error while reading reg\n");
> - release_bus(wilc, RELEASE_ALLOW_SLEEP);
> + goto _unlock;

If you're redoing this anyway, could we get rid of the underscore in the
label name?  Just unlock: is fine.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3] bcma: switch GPIO portions to use GPIOLIB_IRQCHIP

2015-12-22 Thread Linus Walleij
On Fri, Dec 18, 2015 at 7:01 PM, Hauke Mehrtens  wrote:
> On 12/18/2015 07:27 AM, Rafał Miłecki wrote:
>> I'm afraid it wasn't tested on BCM47XX (MIPS) :(
>
> Yes, you are probably right.
>
>> On 14 August 2015 at 00:21, Hauke Mehrtens  wrote:
>>> @@ -218,9 +187,8 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)
>>> chip->set   = bcma_gpio_set_value;
>>> chip->direction_input   = bcma_gpio_direction_input;
>>> chip->direction_output  = bcma_gpio_direction_output;
>>> -#if IS_BUILTIN(CONFIG_BCM47XX) || IS_BUILTIN(CONFIG_ARCH_BCM_5301X)
>>> -   chip->to_irq= bcma_gpio_to_irq;
>>> -#endif
>>> +   chip->owner = THIS_MODULE;
>>> +   chip->dev   = bcma_bus_get_host_dev(bus);
>>
>> This assigns >host_pdev->dev which is NULL.
>
> hmm, how do we fix this, as long as bcma does not have a device on mips
> this is a problem. Should we create a new device for mips?

Yes I think MIPS should just create a host device. That
makes things simple and nice. Is it complex to do so?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ath6kl: Use vmalloc to allocate ar->fw for api1 method

2015-12-22 Thread Souptick Joarder
Hi Brent,

On Tue, Dec 22, 2015 at 3:23 AM, Brent Taylor  wrote:
> On Mon, Dec 21, 2015 at 1:23 PM, Souptick Joarder  
> wrote:
>> Hi Brent,
>>
>> On Tue, Dec 1, 2015 at 11:11 AM, Brent Taylor  wrote:
>>> Since commit 8437754c83351d6213c1a47ff029c1126d6042a7, ar->fw is expected 
>>> to be pointing to memory allocated by vmalloc.  If the api1 method (via 
>>> ath6kl_fetch_fw_api1) is used to allocate memory for ar->fw, then kmemdup 
>>> is used.  This patch checks if the firmware being loaded is the 'fw' image, 
>>> then use vmalloc, otherwise use kmalloc.
>>>
>>> Signed-off-by: Brent Taylor 
>>> ---
>>>  drivers/net/wireless/ath/ath6kl/init.c | 7 ++-
>>>  1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/wireless/ath/ath6kl/init.c 
>>> b/drivers/net/wireless/ath/ath6kl/init.c
>>> index 6ae0734..4f2b124d 100644
>>> --- a/drivers/net/wireless/ath/ath6kl/init.c
>>> +++ b/drivers/net/wireless/ath/ath6kl/init.c
>>> @@ -673,10 +673,15 @@ static int ath6kl_get_fw(struct ath6kl *ar, const 
>>> char *filename,
>>> return ret;
>>>
>>> *fw_len = fw_entry->size;
>>> -   *fw = kmemdup(fw_entry->data, fw_entry->size, GFP_KERNEL);
>>> +   if (>fw == fw)
>>> +   *fw = vmalloc(fw_entry->size);
>>> +   else
>>> +   *fw = kmalloc(fw_entry->size, GFP_KERNEL)
>>
>>   Why vmalloc and kmalloc both are required? can't use either
>> vmalloc or kmalloc?
>
> My original problem was that kmemdup (which uses kmalloc) could not
> allocate enough memory

If kmemdump ( which uses kmalloc) could not allocate memory then
using kmalloc again can lead to same problem.
I guess it will be correct to use
*fw = vmalloc(fw_entry->size);
Correct me if i am wrong.

> to hold the firmware that is placed into "ar->fw".  In the function
> ath6kl_core_cleanup (in core.c),
> the "ar->fw" pointer is the only one that uses vfree which was changed in 
> commit
> 8437754c83351d6213c1a47ff029c1126d6042a7.
>
> I was trying to change as little as possible and I wasn't sure if
> there was a reason that any of the
> other firmware items needed to be allocated with kmalloc or if they
> could be changed to use vmalloc.

-Souptick
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ath6kl: Use vmalloc to allocate ar->fw for api1 method

2015-12-22 Thread Kalle Valo
Souptick Joarder  writes:

> Hi Brent,
>
> On Tue, Dec 22, 2015 at 3:23 AM, Brent Taylor  wrote:
>> On Mon, Dec 21, 2015 at 1:23 PM, Souptick Joarder  
>> wrote:
>>> Hi Brent,
>>>
>>> On Tue, Dec 1, 2015 at 11:11 AM, Brent Taylor  wrote:
>>>
 --- a/drivers/net/wireless/ath/ath6kl/init.c
 +++ b/drivers/net/wireless/ath/ath6kl/init.c
 @@ -673,10 +673,15 @@ static int ath6kl_get_fw(struct ath6kl *ar, const 
 char *filename,
 return ret;

 *fw_len = fw_entry->size;
 -   *fw = kmemdup(fw_entry->data, fw_entry->size, GFP_KERNEL);
 +   if (>fw == fw)
 +   *fw = vmalloc(fw_entry->size);
 +   else
 +   *fw = kmalloc(fw_entry->size, GFP_KERNEL)
>>>
>>>   Why vmalloc and kmalloc both are required? can't use either
>>> vmalloc or kmalloc?
>>
>> My original problem was that kmemdup (which uses kmalloc) could not
>> allocate enough memory
>
> If kmemdump ( which uses kmalloc) could not allocate memory then
> using kmalloc again can lead to same problem.
> I guess it will be correct to use
> *fw = vmalloc(fw_entry->size);
> Correct me if i am wrong.

That sounds best. But remember take into account DMA requirements, IIRC
you cannot DMA from vmalloc memory on all platforms.

-- 
Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3] bcma: switch GPIO portions to use GPIOLIB_IRQCHIP

2015-12-22 Thread Hauke Mehrtens
On 12/22/2015 10:01 AM, Linus Walleij wrote:
> On Fri, Dec 18, 2015 at 7:01 PM, Hauke Mehrtens  wrote:
>> On 12/18/2015 07:27 AM, Rafał Miłecki wrote:
>>> I'm afraid it wasn't tested on BCM47XX (MIPS) :(
>>
>> Yes, you are probably right.
>>
>>> On 14 August 2015 at 00:21, Hauke Mehrtens  wrote:
 @@ -218,9 +187,8 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)
 chip->set   = bcma_gpio_set_value;
 chip->direction_input   = bcma_gpio_direction_input;
 chip->direction_output  = bcma_gpio_direction_output;
 -#if IS_BUILTIN(CONFIG_BCM47XX) || IS_BUILTIN(CONFIG_ARCH_BCM_5301X)
 -   chip->to_irq= bcma_gpio_to_irq;
 -#endif
 +   chip->owner = THIS_MODULE;
 +   chip->dev   = bcma_bus_get_host_dev(bus);
>>>
>>> This assigns >host_pdev->dev which is NULL.
>>
>> hmm, how do we fix this, as long as bcma does not have a device on mips
>> this is a problem. Should we create a new device for mips?
> 
> Yes I think MIPS should just create a host device. That
> makes things simple and nice. Is it complex to do so?
> 
> Yours,
> Linus Walleij
> 
Currently the documentation says this for the parent member on struct
gpio_chip:

 * @parent: optional parent device providing the GPIOs

I assume the optional is wrong here.

Hauke
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3] bcma: switch GPIO portions to use GPIOLIB_IRQCHIP

2015-12-22 Thread Linus Walleij
On Tue, Dec 22, 2015 at 1:09 PM, Hauke Mehrtens  wrote:
> On 12/22/2015 10:01 AM, Linus Walleij wrote:
>> On Fri, Dec 18, 2015 at 7:01 PM, Hauke Mehrtens  wrote:
>>> On 12/18/2015 07:27 AM, Rafał Miłecki wrote:
 I'm afraid it wasn't tested on BCM47XX (MIPS) :(
>>>
>>> Yes, you are probably right.
>>>
 On 14 August 2015 at 00:21, Hauke Mehrtens  wrote:
> @@ -218,9 +187,8 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)
> chip->set   = bcma_gpio_set_value;
> chip->direction_input   = bcma_gpio_direction_input;
> chip->direction_output  = bcma_gpio_direction_output;
> -#if IS_BUILTIN(CONFIG_BCM47XX) || IS_BUILTIN(CONFIG_ARCH_BCM_5301X)
> -   chip->to_irq= bcma_gpio_to_irq;
> -#endif
> +   chip->owner = THIS_MODULE;
> +   chip->dev   = bcma_bus_get_host_dev(bus);

 This assigns >host_pdev->dev which is NULL.
>>>
>>> hmm, how do we fix this, as long as bcma does not have a device on mips
>>> this is a problem. Should we create a new device for mips?
>>
>> Yes I think MIPS should just create a host device. That
>> makes things simple and nice. Is it complex to do so?
>>
>> Yours,
>> Linus Walleij
>>
> Currently the documentation says this for the parent member on struct
> gpio_chip:
>
>  * @parent: optional parent device providing the GPIOs
>
> I assume the optional is wrong here.

For just gpiochip it is optional. But if you read on:

GPIO drivers providing IRQs
---
(...)
To use the helpers please keep the following in mind:

- Make sure to assign all relevant members of the struct gpio_chip so that
  the irqchip can initialize. E.g. .dev and .can_sleep shall be set up
  properly.
(...)

Well it's complex. But when adding the gpio character device I
am working with, I will introduce a struct device to the gpio_chip
(or similar sibling gpio_device) which we can then refer, so that
this actually will no longer be a requirement.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] wlcore/wl18xx: fw logger over sdio

2015-12-22 Thread Guy Mishol
From: Shahar Patury 

Enable the FW Logger to work over the SDIO interface in addition
to over UART interface.
In the new design we use fw internal memory instead of packet ram
that was used in older (wl12xx) design.
This change reduces the impact on TP and stability.

A new event was added to notify fw logger is ready for reading.
Dynamic configuration to debugfs was added as well.

Signed-off-by: Shahar Patury 
Signed-off-by: Guy Mishol 
---
V6: Resubmitted again due to patch description update

 drivers/net/wireless/ti/wl18xx/event.c   |2 +
 drivers/net/wireless/ti/wl18xx/event.h   |1 +
 drivers/net/wireless/ti/wl18xx/main.c|9 ++-
 drivers/net/wireless/ti/wlcore/cmd.h |1 -
 drivers/net/wireless/ti/wlcore/debugfs.c |   60 +++
 drivers/net/wireless/ti/wlcore/event.c   |   82 +
 drivers/net/wireless/ti/wlcore/event.h   |9 +++
 drivers/net/wireless/ti/wlcore/io.c  |   11 ++--
 drivers/net/wireless/ti/wlcore/io.h  |4 +-
 drivers/net/wireless/ti/wlcore/main.c|   96 +++--
 drivers/net/wireless/ti/wlcore/rx.c  |1 -
 drivers/net/wireless/ti/wlcore/sysfs.c   |   26 
 drivers/net/wireless/ti/wlcore/wlcore.h  |3 -
 13 files changed, 177 insertions(+), 128 deletions(-)

diff --git a/drivers/net/wireless/ti/wl18xx/event.c 
b/drivers/net/wireless/ti/wl18xx/event.c
index 09c7e09..719907a 100644
--- a/drivers/net/wireless/ti/wl18xx/event.c
+++ b/drivers/net/wireless/ti/wl18xx/event.c
@@ -205,6 +205,8 @@ int wl18xx_process_mailbox_events(struct wl1271 *wl)
 mbox->sc_ssid,
 mbox->sc_pwd_len,
 mbox->sc_pwd);
+   if (vector & FW_LOGGER_INDICATION)
+   wlcore_event_fw_logger(wl);
 
return 0;
 }
diff --git a/drivers/net/wireless/ti/wl18xx/event.h 
b/drivers/net/wireless/ti/wl18xx/event.h
index f3d4f13..070de12 100644
--- a/drivers/net/wireless/ti/wl18xx/event.h
+++ b/drivers/net/wireless/ti/wl18xx/event.h
@@ -41,6 +41,7 @@ enum {
SMART_CONFIG_SYNC_EVENT_ID   = BIT(22),
SMART_CONFIG_DECODE_EVENT_ID = BIT(23),
TIME_SYNC_EVENT_ID   = BIT(24),
+   FW_LOGGER_INDICATION= BIT(25),
 };
 
 enum wl18xx_radar_types {
diff --git a/drivers/net/wireless/ti/wl18xx/main.c 
b/drivers/net/wireless/ti/wl18xx/main.c
index 50cce42..60eda4d 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -461,7 +461,7 @@ static struct wlcore_conf wl18xx_conf = {
},
.fwlog = {
.mode = WL12XX_FWLOG_CONTINUOUS,
-   .mem_blocks   = 2,
+   .mem_blocks   = 0,
.severity = 0,
.timestamp= WL12XX_FWLOG_TIMESTAMP_DISABLED,
.output   = WL12XX_FWLOG_OUTPUT_DBG_PINS,
@@ -584,7 +584,7 @@ static const struct wlcore_partition_set 
wl18xx_ptable[PART_TABLE_LEN] = {
.mem  = { .start = 0x00A0, .size  = 0x00012000 },
.reg  = { .start = 0x00807000, .size  = 0x5000 },
.mem2 = { .start = 0x0080, .size  = 0xB000 },
-   .mem3 = { .start = 0x, .size  = 0x },
+   .mem3 = { .start = 0x00401594, .size  = 0x1020 },
},
[PART_DOWN] = {
.mem  = { .start = 0x, .size  = 0x00014000 },
@@ -602,7 +602,7 @@ static const struct wlcore_partition_set 
wl18xx_ptable[PART_TABLE_LEN] = {
.mem  = { .start = 0x0080, .size  = 0x50FC },
.reg  = { .start = 0x00B00404, .size  = 0x1000 },
.mem2 = { .start = 0x00C0, .size  = 0x0400 },
-   .mem3 = { .start = 0x, .size  = 0x },
+   .mem3 = { .start = 0x00401594, .size  = 0x1020 },
},
[PART_PHY_INIT] = {
.mem  = { .start = WL18XX_PHY_INIT_MEM_ADDR,
@@ -1029,7 +1029,8 @@ static int wl18xx_boot(struct wl1271 *wl)
DFS_CHANNELS_CONFIG_COMPLETE_EVENT |
SMART_CONFIG_SYNC_EVENT_ID |
SMART_CONFIG_DECODE_EVENT_ID |
-   TIME_SYNC_EVENT_ID;
+   TIME_SYNC_EVENT_ID |
+   FW_LOGGER_INDICATION;
 
wl->ap_event_mask = MAX_TX_FAILURE_EVENT_ID;
 
diff --git a/drivers/net/wireless/ti/wlcore/cmd.h 
b/drivers/net/wireless/ti/wlcore/cmd.h
index 8dc46c0..e28e2f23 100644
--- a/drivers/net/wireless/ti/wlcore/cmd.h
+++ b/drivers/net/wireless/ti/wlcore/cmd.h
@@ -626,7 +626,6 @@ struct wl12xx_cmd_remove_peer {
  */
 enum wl12xx_fwlogger_log_mode {
WL12XX_FWLOG_CONTINUOUS,
-   WL12XX_FWLOG_ON_DEMAND
 };
 
 /* 

[PATCH 2/3] NFC: trf7970a: use to_spi_device

2015-12-22 Thread Geliang Tang
Use to_spi_device() instead of open-coding it.

Signed-off-by: Geliang Tang 
---
 drivers/nfc/trf7970a.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c
index f857feb..10842b7 100644
--- a/drivers/nfc/trf7970a.c
+++ b/drivers/nfc/trf7970a.c
@@ -2139,7 +2139,7 @@ static int trf7970a_remove(struct spi_device *spi)
 #ifdef CONFIG_PM_SLEEP
 static int trf7970a_suspend(struct device *dev)
 {
-   struct spi_device *spi = container_of(dev, struct spi_device, dev);
+   struct spi_device *spi = to_spi_device(dev);
struct trf7970a *trf = spi_get_drvdata(spi);
 
dev_dbg(dev, "Suspend\n");
@@ -2155,7 +2155,7 @@ static int trf7970a_suspend(struct device *dev)
 
 static int trf7970a_resume(struct device *dev)
 {
-   struct spi_device *spi = container_of(dev, struct spi_device, dev);
+   struct spi_device *spi = to_spi_device(dev);
struct trf7970a *trf = spi_get_drvdata(spi);
int ret;
 
@@ -2174,7 +2174,7 @@ static int trf7970a_resume(struct device *dev)
 #ifdef CONFIG_PM
 static int trf7970a_pm_runtime_suspend(struct device *dev)
 {
-   struct spi_device *spi = container_of(dev, struct spi_device, dev);
+   struct spi_device *spi = to_spi_device(dev);
struct trf7970a *trf = spi_get_drvdata(spi);
int ret;
 
@@ -2191,7 +2191,7 @@ static int trf7970a_pm_runtime_suspend(struct device *dev)
 
 static int trf7970a_pm_runtime_resume(struct device *dev)
 {
-   struct spi_device *spi = container_of(dev, struct spi_device, dev);
+   struct spi_device *spi = to_spi_device(dev);
struct trf7970a *trf = spi_get_drvdata(spi);
int ret;
 
-- 
2.5.0


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3] staging: wilc1000: fix double mutex_unlock on failure path in wilc_wlan_cleanup()

2015-12-22 Thread Alexey Khoroshilov
If hif_read_reg() or hif_write_reg() fail in wilc_wlan_cleanup(),
it calls release_bus() and continues execution. But it leads to double
release_bus() call that means double unlock of g_linux_wlan->hif_cs mutex.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov 
---
 drivers/staging/wilc1000/wilc_wlan.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c 
b/drivers/staging/wilc1000/wilc_wlan.c
index 83af51b..b8c4a63 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1381,15 +1381,16 @@ void wilc_wlan_cleanup(struct net_device *dev)
ret = wilc->hif_func->hif_read_reg(wilc, WILC_GP_REG_0, );
if (!ret) {
PRINT_ER("Error while reading reg\n");
-   release_bus(wilc, RELEASE_ALLOW_SLEEP);
+   goto unlock;
}
PRINT_ER("Writing ABORT reg\n");
ret = wilc->hif_func->hif_write_reg(wilc, WILC_GP_REG_0,
(reg | ABORT_INT));
if (!ret) {
PRINT_ER("Error while writing reg\n");
-   release_bus(wilc, RELEASE_ALLOW_SLEEP);
+   goto unlock;
}
+unlock:
release_bus(wilc, RELEASE_ALLOW_SLEEP);
wilc->hif_func->hif_deinit(NULL);
 }
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] NFC: trf7970a: use to_spi_device

2015-12-22 Thread Samuel Ortiz
Hi Tang,

On Wed, Dec 23, 2015 at 12:18:42AM +0800, Geliang Tang wrote:
> Use to_spi_device() instead of open-coding it.
> 
> Signed-off-by: Geliang Tang 
> ---
>  drivers/nfc/trf7970a.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
Applied and pushed, thanks.

Cheers,
Samuel.

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] dt: bindings: add bindings for ipq4019 wifi block

2015-12-22 Thread Raja Mani
Add device tree binding documentation details for wifi block present
in Qualcomm IPQ4019 SoC into qcom,ath10k.txt.

Signed-off-by: Raja Mani 
---
 .../bindings/net/wireless/qcom,ath10k.txt  | 87 --
 1 file changed, 82 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt 
b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
index edefc26..ffd0742 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
@@ -1,17 +1,42 @@
 * Qualcomm Atheros ath10k wireless devices
 
-For ath10k devices the calibration data can be provided through Device
-Tree. The node is a child node of the PCI controller.
-
 Required properties:
--compatible : Should be "qcom,ath10k"
+- compatible: Should be one of the following:
+   * "qcom,ath10k"
+   * "qcom,ipq4019-wifi"
 
 Optional properties:
+- reg: Address and length of the register set for the device.
+- core-id: Core number associated to the device.
+- resets: Must contain an entry for each entry in reset-names.
+  See ../reset/reseti.txt for details.
+- reset-names: Must include the list of following reset names,
+  "wifi_cpu_init"
+  "wifi_radio_srif"
+  "wifi_radio_warm"
+  "wifi_radio_cold"
+  "wifi_core_warm"
+  "wifi_core_cold"
+- clocks: List of clock specifiers, must contain an entry for each required
+  entry in clock-names.
+- clock-names: Should contain the clock names "wifi_wcss_cmd", "wifi_wcss_ref",
+   "wifi_wcss_rtc".
+- interrupts: List of interrupt lines. Must contain an entry
+ for each entry in the interrupt-names property.
+- interrupt-names: Must include the entries for MSI interrupt
+  names ("msi0" to "msi15") and legacy interrupt
+  name ("legacy"),
+- qca,msi_addr: MSI interrupt address.
+- qca,msi_base: Base value to add before writing MSI data into
+   MSI address register.
 - qcom,ath10k-calibration-data : calibration data as an array, the
 length can vary between hw versions
+- status: Either "disabled" or "ok".
+
 
+Example (to supply the calibration data alone):
 
-Example:
+In this example, the node is defined as child node of the PCI controller.
 
 pci {
pcie@0 {
@@ -28,3 +53,55 @@ pci {
};
};
 };
+
+Example (to supply ipq4019 SoC wifi block details):
+
+wifi0: wifi@a00 {
+   compatible = "qcom,ipq4019-wifi";
+   reg = <0xa00 0x20>;
+   core-id = <0x0>;
+   resets = < WIFI0_CPU_INIT_RESET>,
+< WIFI0_RADIO_SRIF_RESET>,
+< WIFI0_RADIO_WARM_RESET>,
+< WIFI0_RADIO_COLD_RESET>,
+< WIFI0_CORE_WARM_RESET>,
+< WIFI0_CORE_COLD_RESET>;
+   reset-names = "wifi_cpu_init",
+ "wifi_radio_srif",
+ "wifi_radio_warm",
+ "wifi_radio_cold",
+ "wifi_core_warm",
+ "wifi_core_cold";
+   clocks = < GCC_WCSS2G_CLK>,
+< GCC_WCSS2G_REF_CLK>,
+< GCC_WCSS2G_RTC_CLK>;
+   clock-names = "wifi_wcss_cmd",
+ "wifi_wcss_ref",
+ "wifi_wcss_rtc";
+   interrupts = <0 0x20 0x1>,
+<0 0x21 0x1>,
+<0 0x22 0x1>,
+<0 0x23 0x1>,
+<0 0x24 0x1>,
+<0 0x25 0x1>,
+<0 0x26 0x1>,
+<0 0x27 0x1>,
+<0 0x28 0x1>,
+<0 0x29 0x1>,
+<0 0x2a 0x1>,
+<0 0x2b 0x1>,
+<0 0x2c 0x1>,
+<0 0x2d 0x1>,
+<0 0x2e 0x1>,
+<0 0x2f 0x1>,
+<0 0xa8 0x0>;
+   interrupt-names = "msi0",  "msi1",  "msi2",  "msi3",
+ "msi4",  "msi5",  "msi6",  "msi7",
+ "msi8",  "msi9",  "msi10", "msi11",
+ "msi12", "msi13", "msi14", "msi15",
+ "legacy";
+   status = "ok";
+   qca,msi_addr = <0x0b006040>;
+   qca,msi_base = <0x40>;
+   qcom,ath10k-calibration-data = [ 01 02 03 ... ];
+};
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html