Re: [PATCH V2 03/17] staging: wilc1000: wilc_wlan_cfg_get: add argument struct net_device

2015-11-04 Thread Greg KH
On Fri, Oct 30, 2015 at 06:47:09PM +0900, Glen Lee wrote:
> Adds argument struct net_device and use netdev private data member wilc
> instead of g_linux_wlan, pass dev to the functions as well.
> 
> Signed-off-by: Glen Lee 
> ---
>  drivers/staging/wilc1000/coreconfigurator.c | 3 ++-
>  drivers/staging/wilc1000/linux_wlan.c   | 2 +-
>  drivers/staging/wilc1000/wilc_wlan.c| 8 ++--
>  drivers/staging/wilc1000/wilc_wlan.h| 3 ++-
>  4 files changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
> b/drivers/staging/wilc1000/coreconfigurator.c
> index 3b4a950..530d64a 100644
> --- a/drivers/staging/wilc1000/coreconfigurator.c
> +++ b/drivers/staging/wilc1000/coreconfigurator.c
> @@ -595,7 +595,8 @@ s32 send_config_pkt(struct net_device *dev, u8 mode, 
> struct wid *wids,
>   for (counter = 0; counter < count; counter++) {
>   PRINT_INFO(CORECONFIG_DBG, "Sending CFG packet 
> [%d][%d]\n", !counter,
>  (counter == count - 1));
> - if (!wilc_wlan_cfg_get(!counter,
> + if (!wilc_wlan_cfg_get(dev,
> +!counter,
>  wids[counter].id,
>  (counter == count - 1),
>  drv)) {
> diff --git a/drivers/staging/wilc1000/linux_wlan.c 
> b/drivers/staging/wilc1000/linux_wlan.c
> index d0161cd..4ed324c 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -1153,7 +1153,7 @@ int wilc1000_wlan_init(struct net_device *dev, 
> perInterface_wlan_t *p_nic)
>  
>   wilc_bus_set_max_speed();
>  
> - if (wilc_wlan_cfg_get(1, WID_FIRMWARE_VERSION, 1, 0)) {
> + if (wilc_wlan_cfg_get(dev, 1, WID_FIRMWARE_VERSION, 1, 0)) {
>   int size;
>   char Firmware_ver[20];
>  
> diff --git a/drivers/staging/wilc1000/wilc_wlan.c 
> b/drivers/staging/wilc1000/wilc_wlan.c
> index 16224ce..768fd30 100644
> --- a/drivers/staging/wilc1000/wilc_wlan.c
> +++ b/drivers/staging/wilc1000/wilc_wlan.c
> @@ -1809,12 +1809,16 @@ int wilc_wlan_cfg_set(int start, u32 wid, u8 *buffer, 
> u32 buffer_size,
>  
>   return ret_size;
>  }
> -int wilc_wlan_cfg_get(int start, u32 wid, int commit, u32 drvHandler)
> +int wilc_wlan_cfg_get(struct net_device *dev, int start, u32 wid, int commit,
> +   u32 drvHandler)
>  {
>   wilc_wlan_dev_t *p = _wlan;
>   u32 offset;
>   int ret_size;
> + perInterface_wlan_t *nic = netdev_priv(dev);
> + struct wilc *wilc;
>  
> + wilc = nic->wilc;

As you really want 'wilc', why not just pass that instead of a struct
net_device *?  You don't have to make it this complex :)

thanks,

greg k-h
--
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 V2 04/17] staging: wilc1000: wilc_wlan_cfg_set: add argument struct net_device

2015-11-04 Thread Greg KH
On Fri, Oct 30, 2015 at 06:47:10PM +0900, Glen Lee wrote:
> This patch adds new argument net_device and use netdev private data member
> wilc instead of g_linux_wlan, pass dev to the functions also.
> 
> Signed-off-by: Glen Lee 
> ---
>  drivers/staging/wilc1000/coreconfigurator.c |  3 +-
>  drivers/staging/wilc1000/linux_wlan.c   | 86 
> ++---
>  drivers/staging/wilc1000/wilc_wlan.c|  9 ++-
>  drivers/staging/wilc1000/wilc_wlan.h|  4 +-
>  4 files changed, 53 insertions(+), 49 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
> b/drivers/staging/wilc1000/coreconfigurator.c
> index 530d64a..74fb556 100644
> --- a/drivers/staging/wilc1000/coreconfigurator.c
> +++ b/drivers/staging/wilc1000/coreconfigurator.c
> @@ -616,7 +616,8 @@ s32 send_config_pkt(struct net_device *dev, u8 mode, 
> struct wid *wids,
>   } else if (mode == SET_CFG) {
>   for (counter = 0; counter < count; counter++) {
>   PRINT_D(CORECONFIG_DBG, "Sending config SET PACKET 
> WID:%x\n", wids[counter].id);
> - if (!wilc_wlan_cfg_set(!counter,
> + if (!wilc_wlan_cfg_set(dev,
> +!counter,
>  wids[counter].id,
>  wids[counter].val,
>  wids[counter].size,
> diff --git a/drivers/staging/wilc1000/linux_wlan.c 
> b/drivers/staging/wilc1000/linux_wlan.c
> index 4ed324c..6ffa2a1 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -662,53 +662,53 @@ static int linux_wlan_init_test_config(struct 
> net_device *dev, struct wilc *p_ni
>  
>   *(int *)c_val = 1;
>  
> - if (!wilc_wlan_cfg_set(1, WID_SET_DRV_HANDLER, c_val, 4, 0, 0))
> + if (!wilc_wlan_cfg_set(dev, 1, WID_SET_DRV_HANDLER, c_val, 4, 0, 0))
>   goto _fail_;
>  
>   /*to tell fw that we are going to use PC test - WILC specific*/
>   c_val[0] = 0;
> - if (!wilc_wlan_cfg_set(0, WID_PC_TEST_MODE, c_val, 1, 0, 0))
> + if (!wilc_wlan_cfg_set(dev, 0, WID_PC_TEST_MODE, c_val, 1, 0, 0))
>   goto _fail_;
>  
>   c_val[0] = INFRASTRUCTURE;
> - if (!wilc_wlan_cfg_set(0, WID_BSS_TYPE, c_val, 1, 0, 0))
> + if (!wilc_wlan_cfg_set(dev, 0, WID_BSS_TYPE, c_val, 1, 0, 0))
>   goto _fail_;
>  
>   /* c_val[0] = RATE_AUTO; */
>   c_val[0] = RATE_AUTO;
> - if (!wilc_wlan_cfg_set(0, WID_CURRENT_TX_RATE, c_val, 1, 0, 0))
> + if (!wilc_wlan_cfg_set(dev, 0, WID_CURRENT_TX_RATE, c_val, 1, 0, 0))
>   goto _fail_;
>  
>   c_val[0] = G_MIXED_11B_2_MODE;
> - if (!wilc_wlan_cfg_set(0, WID_11G_OPERATING_MODE, c_val, 1, 0, 0))
> + if (!wilc_wlan_cfg_set(dev, 0, WID_11G_OPERATING_MODE, c_val, 1, 0, 0))
>   goto _fail_;
>  
>   c_val[0] = 1;
> - if (!wilc_wlan_cfg_set(0, WID_CURRENT_CHANNEL, c_val, 1, 0, 0))
> + if (!wilc_wlan_cfg_set(dev, 0, WID_CURRENT_CHANNEL, c_val, 1, 0, 0))
>   goto _fail_;
>  
>   c_val[0] = G_SHORT_PREAMBLE;
> - if (!wilc_wlan_cfg_set(0, WID_PREAMBLE, c_val, 1, 0, 0))
> + if (!wilc_wlan_cfg_set(dev, 0, WID_PREAMBLE, c_val, 1, 0, 0))
>   goto _fail_;
>  
>   c_val[0] = AUTO_PROT;
> - if (!wilc_wlan_cfg_set(0, WID_11N_PROT_MECH, c_val, 1, 0, 0))
> + if (!wilc_wlan_cfg_set(dev, 0, WID_11N_PROT_MECH, c_val, 1, 0, 0))
>   goto _fail_;
>  
>   c_val[0] = ACTIVE_SCAN;
> - if (!wilc_wlan_cfg_set(0, WID_SCAN_TYPE, c_val, 1, 0, 0))
> + if (!wilc_wlan_cfg_set(dev, 0, WID_SCAN_TYPE, c_val, 1, 0, 0))
>   goto _fail_;
>  
>   c_val[0] = SITE_SURVEY_OFF;
> - if (!wilc_wlan_cfg_set(0, WID_SITE_SURVEY, c_val, 1, 0, 0))
> + if (!wilc_wlan_cfg_set(dev, 0, WID_SITE_SURVEY, c_val, 1, 0, 0))
>   goto _fail_;
>  
>   *((int *)c_val) = 0x; /* Never use RTS-CTS */
> - if (!wilc_wlan_cfg_set(0, WID_RTS_THRESHOLD, c_val, 2, 0, 0))
> + if (!wilc_wlan_cfg_set(dev, 0, WID_RTS_THRESHOLD, c_val, 2, 0, 0))
>   goto _fail_;
>  
>   *((int *)c_val) = 2346;
> - if (!wilc_wlan_cfg_set(0, WID_FRAG_THRESHOLD, c_val, 2, 0, 0))
> + if (!wilc_wlan_cfg_set(dev, 0, WID_FRAG_THRESHOLD, c_val, 2, 0, 0))
>   goto _fail_;
>  
>   /*  SSID
>  */
> @@ -719,23 +719,23 @@ static int linux_wlan_init_test_config(struct 
> net_device *dev, struct wilc *p_ni
>   /*  to enable Broadcast SSID suppport ) 
>  */
>   /*  --  
>  */
>   c_val[0] = 0;
> - if (!wilc_wlan_cfg_set(0, WID_BCAST_SSID, c_val, 1, 0, 0))
> + if (!wilc_wlan_cfg_set(dev, 0, WID_BCAST_SSID, c_val, 1, 0, 0))
>   goto 

Re: [PATCH RESEND 12/12] staging: wilc1000: add argument wilc and use it instead of g_linux_wlan

2015-11-04 Thread Greg KH
On Thu, Oct 29, 2015 at 12:18:52PM +0900, Glen Lee wrote:
> This patch adds new argument wilc to linux_sdio_cmd53 and linux_sdio_cmd52
> , and use it instead of g_linux_wlan. Pass wilc to the functions as well.
> The void type wilc will be changed with struct wilc when SDIO and SPI
> modules are reworked.
> 
> Signed-off-by: Glen Lee 
> ---
>  drivers/staging/wilc1000/linux_wlan_sdio.c |  8 ++--
>  drivers/staging/wilc1000/linux_wlan_sdio.h |  4 +-
>  drivers/staging/wilc1000/wilc_sdio.c   | 66 
> +++---
>  drivers/staging/wilc1000/wilc_wlan_if.h|  4 +-
>  4 files changed, 41 insertions(+), 41 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/linux_wlan_sdio.c 
> b/drivers/staging/wilc1000/linux_wlan_sdio.c
> index bf05e22..8150d6f 100644
> --- a/drivers/staging/wilc1000/linux_wlan_sdio.c
> +++ b/drivers/staging/wilc1000/linux_wlan_sdio.c
> @@ -53,9 +53,9 @@ static void wilc_sdio_interrupt(struct sdio_func *func)
>  }
>  
>  
> -int linux_sdio_cmd52(sdio_cmd52_t *cmd)
> +int linux_sdio_cmd52(void *wilc, sdio_cmd52_t *cmd)

Again, why a void *?  Please use the correct type, you know what it is,
that way you can get rid of horrid stuff like this:

>  {
> - struct sdio_func *func = g_linux_wlan->wilc_sdio_func;
> + struct sdio_func *func = ((struct wilc*)wilc)->wilc_sdio_func;

All of those casts should not be needed.

thanks,

greg k-h
--
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: mwifiex problem: incompatible network settings

2015-11-04 Thread Julien Cubizolles
Amitkumar Karwar  writes:

> Thanks for the logs. I compared your network manager log with the one
> on my setup. Both are same. Basically network manager log doesn't show
> security info (WPA/WPA2, encryption mode etc). So we can't rely on
> that.
> I checked your kernel log shared in previous email. It's
> incomplete. It didn't include information when connection was actually
> attempted. Probably you can run "dmesg -c >> dmesg.log" in loop with
> some delay to capture complete info. Otherwise sharing
> "/var/log/messages" is also an option.
> I have created a driver debug patch(attached). Could you please apply it and 
> share complete dmesg log?

I applied your patch. Here are the dmesg logs when logging to a WPA
network with authentification (dmesg-WPA.log, ssid southcentral) and a
network without authentification (dmesg-noWPA.log, ssid FreeWifi).

Let me know if you need anything else.

> Btw, do you see the problem if AP is configured in WPA2 security mode?

Good catch, I changed my access point to WPA2 and now I can connect to
it ! I attached the corresponding dmesg logs (dmesg-WPA2.log, ssid 
southcentral).

> Regards,
> Amitkumar


dmesg-WPA.log
Description: Binary data


dmesg-noWPA.log
Description: Binary data


dmesg-WPA2.log
Description: Binary data


Re: [PATCH V2 01/12] staging: wilc1000: fix return type of host_int_del_beacon

2015-11-04 Thread Greg KH
On Fri, Oct 30, 2015 at 08:17:37AM +0900, Chaehyun Lim wrote:
> This patch changes return type of host_int_del_beacon 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.
> 
> Signed-off-by: Chaehyun Lim 
> ---
> V2: resend because 11/12 patch is changed.

Due to changes sent before your series, this series does not apply.
Please refresh and resend.

thanks,

greg k-h
--
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 1/5] staging: wilc1000: change enum variable name with lower case

2015-11-04 Thread Greg KH
On Tue, Nov 03, 2015 at 04:20:58PM +0900, Glen Lee wrote:
> This patch changes WID_TYPE with wid_type which is preferred style.
> 
> Signed-off-by: Glen Lee 
> ---
>  drivers/staging/wilc1000/coreconfigurator.h | 2 +-
>  drivers/staging/wilc1000/wilc_wlan_if.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Some of these patches applied, some did not, please refresh and resend
the ones I didn't take.

thanks,

greg k-h
--
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 RESEND 11/12] staging: wilc1000: rename os_context to wilc

2015-11-04 Thread Greg KH
On Thu, Oct 29, 2015 at 12:18:51PM +0900, Glen Lee wrote:
> This patch rename os_context to wilc because it is used as struct wilc and
> move os_private from struct wilc_wlan_os_context_t to struct wilc_wlan_inp_t.
> Finally, delete wilc_wlan_os_context_t.
> 
> Signed-off-by: Glen Lee 
> ---
>  drivers/staging/wilc1000/linux_wlan.c   | 2 +-
>  drivers/staging/wilc1000/wilc_sdio.c| 6 +++---
>  drivers/staging/wilc1000/wilc_spi.c | 6 +++---
>  drivers/staging/wilc1000/wilc_wlan_if.h | 6 +-
>  4 files changed, 8 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/linux_wlan.c 
> b/drivers/staging/wilc1000/linux_wlan.c
> index 017799f..d0161cd 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -1012,7 +1012,7 @@ void linux_to_wlan(wilc_wlan_inp_t *nwi, struct wilc 
> *nic)
>  
>   PRINT_D(INIT_DBG, "Linux to Wlan services ...\n");
>  
> - nwi->os_context.os_private = (void *)nic;
> + nwi->wilc = (void *)nic;

Why do you need the cast to a void * here?


>  
>  #ifdef WILC_SDIO
>   nwi->io_func.io_type = HIF_SDIO;
> diff --git a/drivers/staging/wilc1000/wilc_sdio.c 
> b/drivers/staging/wilc1000/wilc_sdio.c
> index 300c571..82f68eb 100644
> --- a/drivers/staging/wilc1000/wilc_sdio.c
> +++ b/drivers/staging/wilc1000/wilc_sdio.c
> @@ -14,7 +14,7 @@
>  #define WILC_SDIO_BLOCK_SIZE 512
>  
>  typedef struct {
> - void *os_context;
> + void *wilc;

This should be a struct wilc *, right?  Don't add a void pointer for
something that you know what it is.

thanks,

greg k-h
--
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 v2 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast

2015-11-04 Thread Johannes Berg
On Wed, 2015-11-04 at 22:59 +0200, Julian Anastasov wrote:
> 
> Patches 1 and 3 look correct to me,
> 
> Reviewed-by: Julian Anastasov 

Thanks for checking!

> If the patches are lost in the merge window you
> can also consider one minor optimization, see below...

Oh, yeah, they probably are - sorry Dave.

> > - } else if (rt->rt_type == RTN_BROADCAST)
> > + } else if (rt->rt_type == RTN_BROADCAST) {
> >   IP_UPD_PO_STATS_BH(net, IPSTATS_MIB_INBCAST, skb-
> >len);
> > + } else {
> 
> } else if (unlikely(skb->pkt_type != PACKET_HOST)) {
> 
> May be such check can save some cycles because
> it is more common to see PACKET_HOST packets...

I had thought about that based on your earlier comments, but then I
didn't quite see the point. However, perhaps we could invert the check
below to check the pkt_type first, hoping it'll have some kind of cache
effect?

johannes
--
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 V2 02/17] staging: wilc1000: send_config_pkt: add argument struct net_device

2015-11-04 Thread Greg KH
On Fri, Oct 30, 2015 at 06:47:08PM +0900, Glen Lee wrote:
> This patch adds new argument struct net_device and pass dev to the function
> as well.
> 
> Signed-off-by: Glen Lee 
> ---
>  drivers/staging/wilc1000/coreconfigurator.c |   3 +-
>  drivers/staging/wilc1000/coreconfigurator.h |   3 +-
>  drivers/staging/wilc1000/host_interface.c   | 196 
> +---
>  drivers/staging/wilc1000/wilc_wlan_if.h |   1 +
>  4 files changed, 156 insertions(+), 47 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
> b/drivers/staging/wilc1000/coreconfigurator.c
> index e10c6ff..3b4a950 100644
> --- a/drivers/staging/wilc1000/coreconfigurator.c
> +++ b/drivers/staging/wilc1000/coreconfigurator.c
> @@ -586,7 +586,8 @@ s32 DeallocateAssocRespInfo(tstrConnectRespInfo 
> *pstrConnectRespInfo)
>   *  @date1 Mar 2012
>   *  @version 1.0
>   */
> -s32 send_config_pkt(u8 mode, struct wid *wids, u32 count, u32 drv)
> +s32 send_config_pkt(struct net_device *dev, u8 mode, struct wid *wids,
> + u32 count, u32 drv)
>  {
>   s32 counter = 0, ret = 0;
>  

But you don't do anything with this new argument?

And why struct net_device, why not your "local" structure instead?

thanks,

greg k-h
--
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 01/38] staging: wilc1000: rename pu8IPAddr of fuction Handle_set_IPAddress

2015-11-04 Thread Greg KH
On Mon, Nov 02, 2015 at 05:50:44PM +0900, Glen Lee wrote:
> From: Leo Kim 
> 
> This patch renames pu8IPAddr of fuction Handle_set_IPAddress to ip_addr
> to avoid CamelCase naming convention.
> 
> Signed-off-by: Leo Kim 
> Signed-off-by: Glen Lee 
> ---
>  drivers/staging/wilc1000/host_interface.c | 13 +++--
>  1 file changed, 7 insertions(+), 6 deletions(-)

This series doesn't apply probably because I didn't take your previous
series.  Please resend after you refresh and resend that one.

thanks,

greg k-h
--
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 v2 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast

2015-11-04 Thread Julian Anastasov

Hello,

On Wed, 4 Nov 2015, Johannes Berg wrote:

> From: Johannes Berg 
> 
> In order to solve a problem with 802.11, the so-called hole-196 attack,
> add an option (sysctl) called "drop_unicast_in_l2_multicast" which, if
> enabled, causes the stack to drop IPv4 unicast packets encapsulated in
> link-layer multi- or broadcast frames. Such frames can (as an attack)
> be created by any member of the same wireless network and transmitted
> as valid encrypted frames since the symmetric key for broadcast frames
> is shared between all stations.
> 
> Additionally, enabling this option provides compliance with a SHOULD
> clause of RFC 1122.
> 
> Signed-off-by: Johannes Berg 

Patches 1 and 3 look correct to me,

Reviewed-by: Julian Anastasov 

If the patches are lost in the merge window you
can also consider one minor optimization, see below...

> ---
>  Documentation/networking/ip-sysctl.txt |  7 +++
>  include/uapi/linux/ip.h|  1 +
>  net/ipv4/devinet.c |  2 ++
>  net/ipv4/ip_input.c| 26 +-
>  4 files changed, 35 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/networking/ip-sysctl.txt 
> b/Documentation/networking/ip-sysctl.txt
> index 05915be86235..35c4c43dd8de 100644
> --- a/Documentation/networking/ip-sysctl.txt
> +++ b/Documentation/networking/ip-sysctl.txt
> @@ -1208,6 +1208,13 @@ promote_secondaries - BOOLEAN
>   promote a corresponding secondary IP address instead of
>   removing all the corresponding secondary IP addresses.
>  
> +drop_unicast_in_l2_multicast - BOOLEAN
> + Drop any unicast IP packets that are received in link-layer
> + multicast (or broadcast) frames.
> + This behavior (for multicast) is actually a SHOULD in RFC
> + 1122, but is disabled by default for compatibility reasons.
> + Default: off (0)
> +
>  
>  tag - INTEGER
>   Allows you to write a number, which can be used as required.
> diff --git a/include/uapi/linux/ip.h b/include/uapi/linux/ip.h
> index 08f894d2ddbd..584834f7e95c 100644
> --- a/include/uapi/linux/ip.h
> +++ b/include/uapi/linux/ip.h
> @@ -165,6 +165,7 @@ enum
>   IPV4_DEVCONF_IGMPV2_UNSOLICITED_REPORT_INTERVAL,
>   IPV4_DEVCONF_IGMPV3_UNSOLICITED_REPORT_INTERVAL,
>   IPV4_DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,
> + IPV4_DEVCONF_DROP_UNICAST_IN_L2_MULTICAST,
>   __IPV4_DEVCONF_MAX
>  };
>  
> diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
> index cebd9d31e65a..dbbab28a52a4 100644
> --- a/net/ipv4/devinet.c
> +++ b/net/ipv4/devinet.c
> @@ -2192,6 +2192,8 @@ static struct devinet_sysctl_table {
> "promote_secondaries"),
>   DEVINET_SYSCTL_FLUSHING_ENTRY(ROUTE_LOCALNET,
> "route_localnet"),
> + DEVINET_SYSCTL_FLUSHING_ENTRY(DROP_UNICAST_IN_L2_MULTICAST,
> +   "drop_unicast_in_l2_multicast"),
>   },
>  };
>  
> diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
> index b1209b63381f..a442b6bd9441 100644
> --- a/net/ipv4/ip_input.c
> +++ b/net/ipv4/ip_input.c
> @@ -359,8 +359,32 @@ static int ip_rcv_finish(struct net *net, struct sock 
> *sk, struct sk_buff *skb)
>   rt = skb_rtable(skb);
>   if (rt->rt_type == RTN_MULTICAST) {
>   IP_UPD_PO_STATS_BH(net, IPSTATS_MIB_INMCAST, skb->len);
> - } else if (rt->rt_type == RTN_BROADCAST)
> + } else if (rt->rt_type == RTN_BROADCAST) {
>   IP_UPD_PO_STATS_BH(net, IPSTATS_MIB_INBCAST, skb->len);
> + } else {

} else if (unlikely(skb->pkt_type != PACKET_HOST)) {

May be such check can save some cycles because
it is more common to see PACKET_HOST packets...

> + struct in_device *in_dev = __in_dev_get_rcu(skb->dev);
> +
> + /* RFC 1122 3.3.6:
> +  *
> +  *   When a host sends a datagram to a link-layer broadcast
> +  *   address, the IP destination address MUST be a legal IP
> +  *   broadcast or IP multicast address.
> +  *
> +  *   A host SHOULD silently discard a datagram that is received
> +  *   via a link-layer broadcast (see Section 2.4) but does not
> +  *   specify an IP multicast or broadcast destination address.
> +  *
> +  * This doesn't explicitly say L2 *broadcast*, but broadcast is
> +  * in a way a form of multicast and the most common use case for
> +  * this is 802.11 protecting against cross-station spoofing (the
> +  * so-called "hole-196" attack) so do it for both.
> +  */
> + if (in_dev &&
> + IN_DEV_ORCONF(in_dev, DROP_UNICAST_IN_L2_MULTICAST) &&
> + (skb->pkt_type == PACKET_BROADCAST ||
> +  skb->pkt_type == 

Re: [PATCH RESEND 12/12] staging: wilc1000: add argument wilc and use it instead of g_linux_wlan

2015-11-04 Thread glen lee


On 2015년 11월 05일 05:41, Greg KH wrote:

On Thu, Oct 29, 2015 at 12:18:52PM +0900, Glen Lee wrote:

This patch adds new argument wilc to linux_sdio_cmd53 and linux_sdio_cmd52
, and use it instead of g_linux_wlan. Pass wilc to the functions as well.
The void type wilc will be changed with struct wilc when SDIO and SPI
modules are reworked.

Signed-off-by: Glen Lee 
---
  drivers/staging/wilc1000/linux_wlan_sdio.c |  8 ++--
  drivers/staging/wilc1000/linux_wlan_sdio.h |  4 +-
  drivers/staging/wilc1000/wilc_sdio.c   | 66 +++---
  drivers/staging/wilc1000/wilc_wlan_if.h|  4 +-
  4 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan_sdio.c 
b/drivers/staging/wilc1000/linux_wlan_sdio.c
index bf05e22..8150d6f 100644
--- a/drivers/staging/wilc1000/linux_wlan_sdio.c
+++ b/drivers/staging/wilc1000/linux_wlan_sdio.c
@@ -53,9 +53,9 @@ static void wilc_sdio_interrupt(struct sdio_func *func)
  }
  
  
-int linux_sdio_cmd52(sdio_cmd52_t *cmd)

+int linux_sdio_cmd52(void *wilc, sdio_cmd52_t *cmd)

Again, why a void *?  Please use the correct type, you know what it is,
that way you can get rid of horrid stuff like this:


  {
-   struct sdio_func *func = g_linux_wlan->wilc_sdio_func;
+   struct sdio_func *func = ((struct wilc*)wilc)->wilc_sdio_func;

All of those casts should not be needed.


I was planning to change this void type with struct wilc as I commented in 
changelog.
But as you pointed out, I will do this after fixing current SDIO modules.

Regards,
glen lee.



thanks,

greg k-h


--
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] nl80211: fix compiler warnning

2015-11-04 Thread Wei Fang
This patch fixes the following warning:

net/wireless/nl80211.c: In function ‘__cfg80211_wdev_from_attrs’:
net/wireless/nl80211.c:80: warning: ‘wdev_id’ may be used uninitialized in this 
function

This can never happen because if have_wdev_id is true, wdev_id
will be set, and if false, the code using wdev_id is not reachable.
Set wdev_id to 0 just to silence the compiler warning.

Signed-off-by: Wei Fang 
---
 net/wireless/nl80211.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 5d8748b..7ed3523 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -77,7 +77,7 @@ __cfg80211_wdev_from_attrs(struct net *netns, struct nlattr 
**attrs)
struct wireless_dev *result = NULL;
bool have_ifidx = attrs[NL80211_ATTR_IFINDEX];
bool have_wdev_id = attrs[NL80211_ATTR_WDEV];
-   u64 wdev_id;
+   u64 wdev_id = 0;
int wiphy_idx = -1;
int ifidx = -1;
 
-- 
1.7.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


Configurable scan dwell time?

2015-11-04 Thread Ben Greear

It looks to me like the channel dwell time when scanning (SW scanning, mac80211)
is fixed at 1/9 of a second.  I'd like to make this configurable...is that 
something
that might be welcome upstream?

My plan is to add to the netlink API around starting a scan and allow 
user-space to
configure a dwell time in milliseconds.

Thanks,
Ben

--
Ben Greear 
Candela Technologies Inc  http://www.candelatech.com

--
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 V2 04/17] staging: wilc1000: wilc_wlan_cfg_set: add argument struct net_device

2015-11-04 Thread Greg KH
On Thu, Nov 05, 2015 at 10:39:59AM +0900, glen lee wrote:
> >>+int wilc_wlan_cfg_set(struct net_device *dev, int start, u32 wid, u8 
> >>*buffer,
> >>+ u32 buffer_size, int commit, u32 drvHandler)
> >>  {
> >>wilc_wlan_dev_t *p = _wlan;
> >>u32 offset;
> >>int ret_size;
> >>+   perInterface_wlan_t *nic = netdev_priv(dev);
> >>+   struct wilc *wilc;
> >>+   wilc = nic->wilc;
> >Again here, pass in a struct wilc *.
> 
> Thank you for your advise,
> I can use local structure wilc as you said but there are print line inside 
> the function.
> The custom print lines will be changed with netdev_xxx format later, so I 
> need to pass dev if necessary.
> I used wilc if net_device is unnecessary or unavailable.
> For this reason, Is this OK to use net_device if it is necessary?

You have a pointer to net_device in struct wilc, right?  Use that
pointer when you need it, wilc is your "primary" thing, not struct
net_device, to pass around.  You should never have to cast back and
forth when calling internal functions like this.

thanks,

greg k-h
--
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 V2 04/17] staging: wilc1000: wilc_wlan_cfg_set: add argument struct net_device

2015-11-04 Thread glen lee



On 2015년 11월 05일 05:46, Greg KH wrote:

On Fri, Oct 30, 2015 at 06:47:10PM +0900, Glen Lee wrote:

This patch adds new argument net_device and use netdev private data member
wilc instead of g_linux_wlan, pass dev to the functions also.

Signed-off-by: Glen Lee 
---
  drivers/staging/wilc1000/coreconfigurator.c |  3 +-
  drivers/staging/wilc1000/linux_wlan.c   | 86 ++---
  drivers/staging/wilc1000/wilc_wlan.c|  9 ++-
  drivers/staging/wilc1000/wilc_wlan.h|  4 +-
  4 files changed, 53 insertions(+), 49 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
b/drivers/staging/wilc1000/coreconfigurator.c
index 530d64a..74fb556 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -616,7 +616,8 @@ s32 send_config_pkt(struct net_device *dev, u8 mode, struct 
wid *wids,
} else if (mode == SET_CFG) {
for (counter = 0; counter < count; counter++) {
PRINT_D(CORECONFIG_DBG, "Sending config SET PACKET 
WID:%x\n", wids[counter].id);
-   if (!wilc_wlan_cfg_set(!counter,
+   if (!wilc_wlan_cfg_set(dev,
+  !counter,
   wids[counter].id,
   wids[counter].val,
   wids[counter].size,
diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 4ed324c..6ffa2a1 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -662,53 +662,53 @@ static int linux_wlan_init_test_config(struct net_device 
*dev, struct wilc *p_ni
  
  	*(int *)c_val = 1;
  
-	if (!wilc_wlan_cfg_set(1, WID_SET_DRV_HANDLER, c_val, 4, 0, 0))

+   if (!wilc_wlan_cfg_set(dev, 1, WID_SET_DRV_HANDLER, c_val, 4, 0, 0))
goto _fail_;
  
  	/*to tell fw that we are going to use PC test - WILC specific*/

c_val[0] = 0;
-   if (!wilc_wlan_cfg_set(0, WID_PC_TEST_MODE, c_val, 1, 0, 0))
+   if (!wilc_wlan_cfg_set(dev, 0, WID_PC_TEST_MODE, c_val, 1, 0, 0))
goto _fail_;
  
  	c_val[0] = INFRASTRUCTURE;

-   if (!wilc_wlan_cfg_set(0, WID_BSS_TYPE, c_val, 1, 0, 0))
+   if (!wilc_wlan_cfg_set(dev, 0, WID_BSS_TYPE, c_val, 1, 0, 0))
goto _fail_;
  
  	/* c_val[0] = RATE_AUTO; */

c_val[0] = RATE_AUTO;
-   if (!wilc_wlan_cfg_set(0, WID_CURRENT_TX_RATE, c_val, 1, 0, 0))
+   if (!wilc_wlan_cfg_set(dev, 0, WID_CURRENT_TX_RATE, c_val, 1, 0, 0))
goto _fail_;
  
  	c_val[0] = G_MIXED_11B_2_MODE;

-   if (!wilc_wlan_cfg_set(0, WID_11G_OPERATING_MODE, c_val, 1, 0, 0))
+   if (!wilc_wlan_cfg_set(dev, 0, WID_11G_OPERATING_MODE, c_val, 1, 0, 0))
goto _fail_;
  
  	c_val[0] = 1;

-   if (!wilc_wlan_cfg_set(0, WID_CURRENT_CHANNEL, c_val, 1, 0, 0))
+   if (!wilc_wlan_cfg_set(dev, 0, WID_CURRENT_CHANNEL, c_val, 1, 0, 0))
goto _fail_;
  
  	c_val[0] = G_SHORT_PREAMBLE;

-   if (!wilc_wlan_cfg_set(0, WID_PREAMBLE, c_val, 1, 0, 0))
+   if (!wilc_wlan_cfg_set(dev, 0, WID_PREAMBLE, c_val, 1, 0, 0))
goto _fail_;
  
  	c_val[0] = AUTO_PROT;

-   if (!wilc_wlan_cfg_set(0, WID_11N_PROT_MECH, c_val, 1, 0, 0))
+   if (!wilc_wlan_cfg_set(dev, 0, WID_11N_PROT_MECH, c_val, 1, 0, 0))
goto _fail_;
  
  	c_val[0] = ACTIVE_SCAN;

-   if (!wilc_wlan_cfg_set(0, WID_SCAN_TYPE, c_val, 1, 0, 0))
+   if (!wilc_wlan_cfg_set(dev, 0, WID_SCAN_TYPE, c_val, 1, 0, 0))
goto _fail_;
  
  	c_val[0] = SITE_SURVEY_OFF;

-   if (!wilc_wlan_cfg_set(0, WID_SITE_SURVEY, c_val, 1, 0, 0))
+   if (!wilc_wlan_cfg_set(dev, 0, WID_SITE_SURVEY, c_val, 1, 0, 0))
goto _fail_;
  
  	*((int *)c_val) = 0x; /* Never use RTS-CTS */

-   if (!wilc_wlan_cfg_set(0, WID_RTS_THRESHOLD, c_val, 2, 0, 0))
+   if (!wilc_wlan_cfg_set(dev, 0, WID_RTS_THRESHOLD, c_val, 2, 0, 0))
goto _fail_;
  
  	*((int *)c_val) = 2346;

-   if (!wilc_wlan_cfg_set(0, WID_FRAG_THRESHOLD, c_val, 2, 0, 0))
+   if (!wilc_wlan_cfg_set(dev, 0, WID_FRAG_THRESHOLD, c_val, 2, 0, 0))
goto _fail_;
  
  	/*  SSID */

@@ -719,23 +719,23 @@ static int linux_wlan_init_test_config(struct net_device 
*dev, struct wilc *p_ni
/*  to enable Broadcast SSID suppport ) 
 */
/*  --  
 */
c_val[0] = 0;
-   if (!wilc_wlan_cfg_set(0, WID_BCAST_SSID, c_val, 1, 0, 0))
+   if (!wilc_wlan_cfg_set(dev, 0, WID_BCAST_SSID, c_val, 1, 0, 0))
goto _fail_;
  
  	c_val[0] = 1;

-   if (!wilc_wlan_cfg_set(0, WID_QOS_ENABLE, c_val, 1, 

[PATCH RESEND 19/38] staging: wilc1000: remove extern function in c file and move it to header file.

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch removes extern resolve_disconnect_aberration in c file and move
it to proper header file. Rename argument also to match with declaration.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 drivers/staging/wilc1000/linux_wlan.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 72c4797..f73817a 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -420,5 +420,5 @@ void host_int_freeJoinParams(void *pJoinParams);
 
 s32 host_int_get_statistics(struct host_if_drv *hWFIDrv,
struct rf_info *pstrStatistics);
-
+void resolve_disconnect_aberration(struct host_if_drv *hif_drv);
 #endif
diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 432f0be..3aedc28 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -38,7 +38,6 @@
  #define _linux_wlan_device_removal()  {}
 
 extern bool g_obtainingIP;
-extern void resolve_disconnect_aberration(void *drvHandler);
 extern u8 multicast_mac_addr_list[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN];
 extern struct timer_list hDuringIpTimer;
 
-- 
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


[PATCH RESEND 28/38] staging: wilc1000: fixes braces {} should be used on all arms of this statement

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch fixes the checks reported by checkpatch.pl
for braces {} should be used on all arms of this statement.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 2fac99d..893c741 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -477,12 +477,11 @@ int linux_wlan_get_firmware(struct net_device *dev)
nic = netdev_priv(dev);
wilc = nic->wilc;
 
-   if (nic->iftype == AP_MODE)
+   if (nic->iftype == AP_MODE) {
firmware = AP_FIRMWARE;
-   else if (nic->iftype == STATION_MODE)
+   } else if (nic->iftype == STATION_MODE) {
firmware = STA_FIRMWARE;
-
-   else {
+   } else {
PRINT_D(INIT_DBG, "Get P2P_CONCURRENCY_FIRMWARE\n");
firmware = P2P_CONCURRENCY_FIRMWARE;
}
-- 
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


[PATCH RESEND 30/38] staging: wilc1000: remove goto from linux_wlan_firmware_download

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch remove goto feature from linux_wlan_firmware_download function.
Goto feature is return result.
So, remove goto functions and it was replaced with the return value directly.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index fcc8119..003165d 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -553,14 +553,13 @@ static int linux_wlan_firmware_download(struct net_device 
*dev)
 
if (!wilc->firmware) {
PRINT_ER("Firmware buffer is NULL\n");
-   ret = -ENOBUFS;
-   goto _FAIL_;
+   return -ENOBUFS;
}
PRINT_D(INIT_DBG, "Downloading Firmware ...\n");
ret = wilc_wlan_firmware_download(wilc->firmware->data,
  wilc->firmware->size);
if (ret < 0)
-   goto _FAIL_;
+   return ret;
 
PRINT_D(INIT_DBG, "Freeing FW buffer ...\n");
PRINT_D(INIT_DBG, "Releasing firmware\n");
@@ -568,8 +567,7 @@ static int linux_wlan_firmware_download(struct net_device 
*dev)
 
PRINT_D(INIT_DBG, "Download Succeeded\n");
 
-_FAIL_:
-   return ret;
+   return 0;
 }
 
 static int linux_wlan_init_test_config(struct net_device *dev, struct wilc 
*p_nic)
-- 
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


[PATCH RESEND 32/38] staging: wilc1000: remove goto from wlan_initialize_threads

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch remove goto feature from wlan_initialize_threads function.
Goto feature is 'wilc->close=0' & return result.
So, remove goto feature and it was replaced with the return value directly,
as well as removed unused ret variable.
Also, execute 'wilc->close=0' before return.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index c529a15..3c8155e 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -911,7 +911,6 @@ int wlan_initialize_threads(struct net_device *dev)
 {
perInterface_wlan_t *nic;
struct wilc *wilc;
-   int ret = 0;
 
nic = netdev_priv(dev);
wilc = nic->wilc;
@@ -922,16 +921,12 @@ int wlan_initialize_threads(struct net_device *dev)
 "K_TXQ_TASK");
if (!wilc->txq_thread) {
PRINT_ER("couldn't create TXQ thread\n");
-   ret = -ENOBUFS;
-   goto _fail_2;
+   wilc->close = 0;
+   return -ENOBUFS;
}
down(>txq_thread_started);
 
return 0;
-
-_fail_2:
-   wilc->close = 0;
-   return ret;
 }
 
 static void wlan_deinitialize_threads(struct net_device *dev)
-- 
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


[PATCH RESEND 33/38] staging: wilc1000: remove goto from mac_open

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch removes goto from mac_open function. If address is invalid, goto
handles deinit process and return result.
So, just call deinit process and return the error value directly instead of
goto statement.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 10 +++---
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 3c8155e..6492103 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1124,8 +1124,9 @@ int mac_open(struct net_device *ndev)
 
if (!is_valid_ether_addr(ndev->dev_addr)) {
PRINT_ER("Error: Wrong MAC address\n");
-   ret = -EINVAL;
-   goto _err_;
+   wilc_deinit_host_int(ndev);
+   wilc1000_wlan_deinit(ndev);
+   return -EINVAL;
}
 
wilc_mgmt_frame_register(nic->wilc_netdev->ieee80211_ptr->wiphy,
@@ -1140,11 +1141,6 @@ int mac_open(struct net_device *ndev)
wl->open_ifcs++;
nic->mac_opened = 1;
return 0;
-
-_err_:
-   wilc_deinit_host_int(ndev);
-   wilc1000_wlan_deinit(ndev);
-   return ret;
 }
 
 struct net_device_stats *mac_stats(struct net_device *dev)
-- 
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


[PATCH RESEND 27/38] staging: wilc1000: rename pBSSID of function linux_wlan_set_bssid

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames pBSSID of function linux_wlan_set_bssid to bssid
to avoid CamelCase naming convention.
Also, prototype linux_wlan_set_bssid in wilc_wfi_cfgoperations.c is moved to
wilc_wfi_netdevice.h.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 4 ++--
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 --
 drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 +
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 6758cbc..2fac99d 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -358,7 +358,7 @@ struct net_device *get_if_handler(struct wilc *wilc, u8 
*mac_header)
return NULL;
 }
 
-int linux_wlan_set_bssid(struct net_device *wilc_netdev, u8 *pBSSID)
+int linux_wlan_set_bssid(struct net_device *wilc_netdev, u8 *bssid)
 {
int i = 0;
int ret = -1;
@@ -370,7 +370,7 @@ int linux_wlan_set_bssid(struct net_device *wilc_netdev, u8 
*pBSSID)
 
for (i = 0; i < wilc->vif_num; i++)
if (wilc->vif[i].ndev == wilc_netdev) {
-   memcpy(wilc->vif[i].bssid, pBSSID, 6);
+   memcpy(wilc->vif[i].bssid, bssid, 6);
ret = 0;
break;
}
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 32b93d3..e8c8272 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -505,8 +505,6 @@ int WILC_WFI_Set_PMKSA(u8 *bssid, struct wilc_priv *priv)
 
 
 }
-int linux_wlan_set_bssid(struct net_device *wilc_netdev, u8 *pBSSID);
-
 
 /**
  *  @brief  CfgConnectResult
diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h 
b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
index 07917ea..9b11b71 100644
--- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
+++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
@@ -219,4 +219,5 @@ void wilc1000_wlan_deinit(struct net_device *dev);
 void WILC_WFI_mgmt_rx(struct wilc *wilc, u8 *buff, u32 size);
 u16 Set_machw_change_vir_if(struct net_device *dev, bool bValue);
 int linux_wlan_get_firmware(struct net_device *dev);
+int linux_wlan_set_bssid(struct net_device *wilc_netdev, u8 *bssid);
 #endif
-- 
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


[PATCH RESEND 29/38] staging: wilc1000: remove goto from linux_wlan_start_firmware

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch remove goto feature from linux_wlan_start_firmware function.
Goto feature is return result.
So, remove goto functions and it was replaced with the return value directly.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 893c741..fcc8119 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -529,19 +529,18 @@ static int linux_wlan_start_firmware(struct net_device 
*dev)
ret = wilc_wlan_start();
if (ret < 0) {
PRINT_ER("Failed to start Firmware\n");
-   goto _fail_;
+   return ret;
}
 
PRINT_D(INIT_DBG, "Waiting for Firmware to get ready ...\n");
ret = linux_wlan_lock_timeout(>sync_event, 5000);
if (ret) {
PRINT_D(INIT_DBG, "Firmware start timed out");
-   goto _fail_;
+   return ret;
}
PRINT_D(INIT_DBG, "Firmware successfully started\n");
 
-_fail_:
-   return ret;
+   return 0;
 }
 static int linux_wlan_firmware_download(struct net_device *dev)
 {
-- 
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


[PATCH RESEND 26/38] staging: wilc1000: rename Bssid1 of function get_if_handler

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames Bssid1 of function get_if_handler to bssid1
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 64b7c4f..6758cbc 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -333,14 +333,14 @@ void linux_wlan_mac_indicate(struct wilc *wilc, int flag)
 
 struct net_device *get_if_handler(struct wilc *wilc, u8 *mac_header)
 {
-   u8 *bssid, *Bssid1;
+   u8 *bssid, *bssid1;
int i = 0;
 
bssid = mac_header + 10;
-   Bssid1 = mac_header + 4;
+   bssid1 = mac_header + 4;
 
for (i = 0; i < wilc->vif_num; i++)
-   if (!memcmp(Bssid1, wilc->vif[i].bssid, ETH_ALEN) ||
+   if (!memcmp(bssid1, wilc->vif[i].bssid, ETH_ALEN) ||
!memcmp(bssid, wilc->vif[i].bssid, ETH_ALEN))
return wilc->vif[i].ndev;
 
@@ -348,9 +348,9 @@ struct net_device *get_if_handler(struct wilc *wilc, u8 
*mac_header)
for (i = 0; i < 25; i++)
PRINT_D(INIT_DBG, "%02x ", mac_header[i]);
bssid = mac_header + 18;
-   Bssid1 = mac_header + 12;
+   bssid1 = mac_header + 12;
for (i = 0; i < wilc->vif_num; i++)
-   if (!memcmp(Bssid1, wilc->vif[i].bssid, ETH_ALEN) ||
+   if (!memcmp(bssid1, wilc->vif[i].bssid, ETH_ALEN) ||
!memcmp(bssid, wilc->vif[i].bssid, ETH_ALEN))
return wilc->vif[i].ndev;
 
-- 
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


[PATCH RESEND 31/38] staging: wilc1000: fixes missing a blank line after declarations

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch fixes the warnings reported by checkpatch.pl
for Missing a blank line after declarations.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 003165d..c529a15 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -542,6 +542,7 @@ static int linux_wlan_start_firmware(struct net_device *dev)
 
return 0;
 }
+
 static int linux_wlan_firmware_download(struct net_device *dev)
 {
perInterface_wlan_t *nic;
@@ -880,6 +881,7 @@ static int wlan_deinit_locks(struct net_device *dev)
 
return 0;
 }
+
 void linux_to_wlan(wilc_wlan_inp_t *nwi, struct wilc *nic)
 {
PRINT_D(INIT_DBG, "Linux to Wlan services ...\n");
-- 
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


[PATCH RESEND 38/38] staging: wilc1000: rename pu8UdpBuffer of mac_xmit function

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch rename pu8UdpBuffer variable of mac_xmit function to udp_buf
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 7a07e43..f82ecb9 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1219,7 +1219,7 @@ int mac_xmit(struct sk_buff *skb, struct net_device *ndev)
perInterface_wlan_t *nic;
struct tx_complete_data *tx_data = NULL;
int queue_count;
-   char *pu8UdpBuffer;
+   char *udp_buf;
struct iphdr *ih;
struct ethhdr *eth_h;
struct wilc *wilc;
@@ -1252,10 +1252,11 @@ int mac_xmit(struct sk_buff *skb, struct net_device 
*ndev)
 
ih = (struct iphdr *)(skb->data + sizeof(struct ethhdr));
 
-   pu8UdpBuffer = (char *)ih + sizeof(struct iphdr);
-   if ((pu8UdpBuffer[1] == 68 && pu8UdpBuffer[3] == 67) ||
-   (pu8UdpBuffer[1] == 67 && pu8UdpBuffer[3] == 68))
-   PRINT_D(GENERIC_DBG, "DHCP Message transmitted, type:%x %x 
%x\n", pu8UdpBuffer[248], pu8UdpBuffer[249], pu8UdpBuffer[250]);
+   udp_buf = (char *)ih + sizeof(struct iphdr);
+   if ((udp_buf[1] == 68 && udp_buf[3] == 67) ||
+   (udp_buf[1] == 67 && udp_buf[3] == 68))
+   PRINT_D(GENERIC_DBG, "DHCP Message transmitted, type:%x %x 
%x\n",
+   udp_buf[248], udp_buf[249], udp_buf[250]);
 
PRINT_D(TX_DBG, "Sending packet - Size = %d - Address = %p - SKB = 
%p\n", tx_data->size, tx_data->buff, tx_data->skb);
PRINT_D(TX_DBG, "Adding tx packet to TX Queue\n");
-- 
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


[PATCH V3 3/3] ath10k: Fix peerid configuration in htt tx desc for htt version < 3.4

2015-11-04 Thread Vasanthakumar Thiagarajan
Of a word in struct htt_data_tx_desc htt version >= 3.4 firmware uses
LSB 16-bit for frequency configuration which is used for offchannel tx
and MSB 16-bit is for peerid. But other firmwares using version 2.X
(10.1, 10.2.2, 10.2.4 and 10.4) are using 32-bit for peerid in htt tx
desc. So far no issue is found with the existing code setting peerid and
freq for HTT version 2.X, this could be mainly because of 0 as frequecy
(home channel) is being always passed with those firmwares. There may be
issues when non-zero freq is passed with firmware using < 3.4 htt version.
To be safe use target_version_major and target_version_minor along with
htt-op-version before configuring peer id and freq in htt tx desc. This
patch extends ath10k_mac_tx_frm_has_freq() to check for htt_op_version_tlv
and uses the helper while setting peerid in htt_tx_desc.

Fixes: 8d6d36243610 ("ath10k: fix offchan reliability")
Signed-off-by: Vasanthakumar Thiagarajan 
---
 drivers/net/wireless/ath/ath10k/htt.h|  9 +++--
 drivers/net/wireless/ath/ath10k/htt_tx.c | 11 +--
 drivers/net/wireless/ath/ath10k/mac.c|  5 +++--
 drivers/net/wireless/ath/ath10k/mac.h|  1 +
 4 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt.h 
b/drivers/net/wireless/ath/ath10k/htt.h
index 74ccfb29..2b87ed6 100644
--- a/drivers/net/wireless/ath/ath10k/htt.h
+++ b/drivers/net/wireless/ath/ath10k/htt.h
@@ -166,8 +166,13 @@ struct htt_data_tx_desc {
__le16 len;
__le16 id;
__le32 frags_paddr;
-   __le16 peerid;
-   __le16 freq;
+   union {
+   __le32 peerid;
+   struct {
+   __le16 peerid;
+   __le16 freq;
+   } __packed offchan_tx;
+   } __packed;
u8 prefetch[0]; /* start of frame, for FW classification engine */
 } __packed;
 
diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c 
b/drivers/net/wireless/ath/ath10k/htt_tx.c
index bd8f264..8f76b9d 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -688,8 +688,15 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff 
*msdu)
skb_cb->htt.txbuf->cmd_tx.len = __cpu_to_le16(msdu->len);
skb_cb->htt.txbuf->cmd_tx.id = __cpu_to_le16(msdu_id);
skb_cb->htt.txbuf->cmd_tx.frags_paddr = __cpu_to_le32(frags_paddr);
-   skb_cb->htt.txbuf->cmd_tx.peerid = __cpu_to_le16(HTT_INVALID_PEERID);
-   skb_cb->htt.txbuf->cmd_tx.freq = __cpu_to_le16(skb_cb->htt.freq);
+   if (ath10k_mac_tx_frm_has_freq(ar)) {
+   skb_cb->htt.txbuf->cmd_tx.offchan_tx.peerid =
+   __cpu_to_le16(HTT_INVALID_PEERID);
+   skb_cb->htt.txbuf->cmd_tx.offchan_tx.freq =
+   __cpu_to_le16(skb_cb->htt.freq);
+   } else {
+   skb_cb->htt.txbuf->cmd_tx.peerid =
+   __cpu_to_le32(HTT_INVALID_PEERID);
+   }
 
trace_ath10k_htt_tx(ar, msdu_id, msdu->len, vdev_id, tid);
ath10k_dbg(ar, ATH10K_DBG_HTT,
diff --git a/drivers/net/wireless/ath/ath10k/mac.c 
b/drivers/net/wireless/ath/ath10k/mac.c
index 363a99c..76484a9 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3287,7 +3287,7 @@ static void ath10k_tx_h_add_p2p_noa_ie(struct ath10k *ar,
}
 }
 
-static bool ath10k_mac_tx_frm_has_freq(struct ath10k *ar)
+bool ath10k_mac_tx_frm_has_freq(struct ath10k *ar)
 {
/* FIXME: Not really sure since when the behaviour changed. At some
 * point new firmware stopped requiring creation of peer entries for
@@ -3296,7 +3296,8 @@ static bool ath10k_mac_tx_frm_has_freq(struct ath10k *ar)
 * because that's when the `freq` was introduced to TX_FRM HTT command.
 */
return (ar->htt.target_version_major >= 3 &&
-   ar->htt.target_version_minor >= 4);
+   ar->htt.target_version_minor >= 4 &&
+   ar->htt.op_version == ATH10K_FW_HTT_OP_VERSION_TLV);
 }
 
 static int ath10k_mac_tx_wmi_mgmt(struct ath10k *ar, struct sk_buff *skb)
diff --git a/drivers/net/wireless/ath/ath10k/mac.h 
b/drivers/net/wireless/ath/ath10k/mac.h
index e3cefe4..f504804 100644
--- a/drivers/net/wireless/ath/ath10k/mac.h
+++ b/drivers/net/wireless/ath/ath10k/mac.h
@@ -74,6 +74,7 @@ void ath10k_mac_tx_lock(struct ath10k *ar, int reason);
 void ath10k_mac_tx_unlock(struct ath10k *ar, int reason);
 void ath10k_mac_vif_tx_lock(struct ath10k_vif *arvif, int reason);
 void ath10k_mac_vif_tx_unlock(struct ath10k_vif *arvif, int reason);
+bool ath10k_mac_tx_frm_has_freq(struct ath10k *ar);
 
 static inline struct ath10k_vif *ath10k_vif_to_arvif(struct ieee80211_vif *vif)
 {
-- 
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  

[PATCH V3 0/3] Fix few WMI/HTT interfaces

2015-11-04 Thread Vasanthakumar Thiagarajan
This patch set fixes mismatch in peer_assoc complete wmi command for
version 10.4 and peer_id configuration for HTT version < 3.4.

V2:
- Add cover letter
- Rename ath10k_mac_need_offchan_tx_work() to
  ath10k_mac_tx_frm_has_freq(). Add htt-op-version check
  to the helper and use it in ath10k_htt_tx() while configuring
  peerid.

V3:
- Rebase on top of ath:master TOT

Vasanthakumar Thiagarajan (3):
  ath10k: Fix peer assoc complete WMI command for 10.4
  ath10k: Rename the helper which is used for off-channel tx
  ath10k: Fix peerid configuration in htt tx desc for htt version < 3.4

 drivers/net/wireless/ath/ath10k/htt.h|  9 ++--
 drivers/net/wireless/ath/ath10k/htt_tx.c | 11 --
 drivers/net/wireless/ath/ath10k/mac.c|  9 
 drivers/net/wireless/ath/ath10k/mac.h|  1 +
 drivers/net/wireless/ath/ath10k/wmi.c| 37 +++-
 drivers/net/wireless/ath/ath10k/wmi.h|  5 +
 6 files changed, 63 insertions(+), 9 deletions(-)

-- 
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


[PATCH V3 2/3] ath10k: Rename the helper which is used for off-channel tx

2015-11-04 Thread Vasanthakumar Thiagarajan
Rename ath10k_mac_need_offchan_tx_work() to ath10k_mac_tx_frm_has_freq()
to make it more meaningful. This helper will be used in the future
change. No functionality change.

Signed-off-by: Vasanthakumar Thiagarajan 
---
 drivers/net/wireless/ath/ath10k/mac.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c 
b/drivers/net/wireless/ath/ath10k/mac.c
index a53e213..363a99c 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3287,7 +3287,7 @@ static void ath10k_tx_h_add_p2p_noa_ie(struct ath10k *ar,
}
 }
 
-static bool ath10k_mac_need_offchan_tx_work(struct ath10k *ar)
+static bool ath10k_mac_tx_frm_has_freq(struct ath10k *ar)
 {
/* FIXME: Not really sure since when the behaviour changed. At some
 * point new firmware stopped requiring creation of peer entries for
@@ -3295,8 +3295,8 @@ static bool ath10k_mac_need_offchan_tx_work(struct ath10k 
*ar)
 * tx credit replenishment and reliability). Assuming it's at least 3.4
 * because that's when the `freq` was introduced to TX_FRM HTT command.
 */
-   return !(ar->htt.target_version_major >= 3 &&
-ar->htt.target_version_minor >= 4);
+   return (ar->htt.target_version_major >= 3 &&
+   ar->htt.target_version_minor >= 4);
 }
 
 static int ath10k_mac_tx_wmi_mgmt(struct ath10k *ar, struct sk_buff *skb)
@@ -3680,7 +3680,7 @@ static void ath10k_tx(struct ieee80211_hw *hw,
ATH10K_SKB_CB(skb)->vdev_id = ar->scan.vdev_id;
spin_unlock_bh(>data_lock);
 
-   if (ath10k_mac_need_offchan_tx_work(ar)) {
+   if (!ath10k_mac_tx_frm_has_freq(ar)) {
ATH10K_SKB_CB(skb)->htt.freq = 0;
ATH10K_SKB_CB(skb)->htt.is_offchan = true;
 
-- 
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


[PATCH V3 1/3] ath10k: Fix peer assoc complete WMI command for 10.4

2015-11-04 Thread Vasanthakumar Thiagarajan
There is an extra 4-byte member when compared to WMI 10.2 added to
assoc complete command in WMI 10.4. This new member is used for 160Mhz
related configuration. This WMI command mismatch between host and
firmware does not cause any real issues because this new member is not
used in 10.4 firmwares so far (10.4.1.00030-1). This difference in WMI
command interface brings in a new wmi_ops for 10.4 gen_peer_assoc().
No noticeable functionality differences with this change can be seen
with the current 10.4 firmwares, but the WMI interface has to be
fixed to work with future 10.4 firmwares which may be using this new
member.

Signed-off-by: Vasanthakumar Thiagarajan 
---
 drivers/net/wireless/ath/ath10k/wmi.c | 37 ++-
 drivers/net/wireless/ath/ath10k/wmi.h |  5 +
 2 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c 
b/drivers/net/wireless/ath/ath10k/wmi.c
index 56806d9..9021079 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -6376,6 +6376,16 @@ ath10k_wmi_peer_assoc_fill_10_2(struct ath10k *ar, void 
*buf,
cmd->info0 = __cpu_to_le32(info0);
 }
 
+static void
+ath10k_wmi_peer_assoc_fill_10_4(struct ath10k *ar, void *buf,
+   const struct wmi_peer_assoc_complete_arg *arg)
+{
+   struct wmi_10_4_peer_assoc_complete_cmd *cmd = buf;
+
+   ath10k_wmi_peer_assoc_fill_10_2(ar, buf, arg);
+   cmd->peer_bw_rxnss_override = 0;
+}
+
 static int
 ath10k_wmi_peer_assoc_check_arg(const struct wmi_peer_assoc_complete_arg *arg)
 {
@@ -6465,6 +6475,31 @@ ath10k_wmi_10_2_op_gen_peer_assoc(struct ath10k *ar,
 }
 
 static struct sk_buff *
+ath10k_wmi_10_4_op_gen_peer_assoc(struct ath10k *ar,
+ const struct wmi_peer_assoc_complete_arg *arg)
+{
+   size_t len = sizeof(struct wmi_10_4_peer_assoc_complete_cmd);
+   struct sk_buff *skb;
+   int ret;
+
+   ret = ath10k_wmi_peer_assoc_check_arg(arg);
+   if (ret)
+   return ERR_PTR(ret);
+
+   skb = ath10k_wmi_alloc_skb(ar, len);
+   if (!skb)
+   return ERR_PTR(-ENOMEM);
+
+   ath10k_wmi_peer_assoc_fill_10_4(ar, skb->data, arg);
+
+   ath10k_dbg(ar, ATH10K_DBG_WMI,
+  "wmi peer assoc vdev %d addr %pM (%s)\n",
+  arg->vdev_id, arg->addr,
+  arg->peer_reassoc ? "reassociate" : "new");
+   return skb;
+}
+
+static struct sk_buff *
 ath10k_wmi_10_2_op_gen_pdev_get_temperature(struct ath10k *ar)
 {
struct sk_buff *skb;
@@ -7584,6 +7619,7 @@ static const struct wmi_ops wmi_10_4_ops = {
.gen_peer_delete = ath10k_wmi_op_gen_peer_delete,
.gen_peer_flush = ath10k_wmi_op_gen_peer_flush,
.gen_peer_set_param = ath10k_wmi_op_gen_peer_set_param,
+   .gen_peer_assoc = ath10k_wmi_10_4_op_gen_peer_assoc,
.gen_set_psmode = ath10k_wmi_op_gen_set_psmode,
.gen_set_sta_ps = ath10k_wmi_op_gen_set_sta_ps,
.gen_set_ap_ps = ath10k_wmi_op_gen_set_ap_ps,
@@ -7603,7 +7639,6 @@ static const struct wmi_ops wmi_10_4_ops = {
.fw_stats_fill = ath10k_wmi_10_4_op_fw_stats_fill,
 
/* shared with 10.2 */
-   .gen_peer_assoc = ath10k_wmi_10_2_op_gen_peer_assoc,
.gen_request_stats = ath10k_wmi_op_gen_request_stats,
.gen_pdev_get_temperature = ath10k_wmi_10_2_op_gen_pdev_get_temperature,
 };
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h 
b/drivers/net/wireless/ath/ath10k/wmi.h
index a35c91e..80d3f1c 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -5799,6 +5799,11 @@ struct wmi_10_2_peer_assoc_complete_cmd {
__le32 info0; /* WMI_PEER_ASSOC_INFO0_ */
 } __packed;
 
+struct wmi_10_4_peer_assoc_complete_cmd {
+   struct wmi_10_2_peer_assoc_complete_cmd cmd;
+   __le32 peer_bw_rxnss_override;
+} __packed;
+
 struct wmi_peer_assoc_complete_arg {
u8 addr[ETH_ALEN];
u32 vdev_id;
-- 
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 RESEND 12/12] staging: wilc1000: add argument wilc and use it instead of g_linux_wlan

2015-11-04 Thread Greg KH
On Thu, Nov 05, 2015 at 11:22:47AM +0900, glen lee wrote:
> 
> On 2015년 11월 05일 05:41, Greg KH wrote:
> >On Thu, Oct 29, 2015 at 12:18:52PM +0900, Glen Lee wrote:
> >>This patch adds new argument wilc to linux_sdio_cmd53 and linux_sdio_cmd52
> >>, and use it instead of g_linux_wlan. Pass wilc to the functions as well.
> >>The void type wilc will be changed with struct wilc when SDIO and SPI
> >>modules are reworked.
> >>
> >>Signed-off-by: Glen Lee 
> >>---
> >>  drivers/staging/wilc1000/linux_wlan_sdio.c |  8 ++--
> >>  drivers/staging/wilc1000/linux_wlan_sdio.h |  4 +-
> >>  drivers/staging/wilc1000/wilc_sdio.c   | 66 
> >> +++---
> >>  drivers/staging/wilc1000/wilc_wlan_if.h|  4 +-
> >>  4 files changed, 41 insertions(+), 41 deletions(-)
> >>
> >>diff --git a/drivers/staging/wilc1000/linux_wlan_sdio.c 
> >>b/drivers/staging/wilc1000/linux_wlan_sdio.c
> >>index bf05e22..8150d6f 100644
> >>--- a/drivers/staging/wilc1000/linux_wlan_sdio.c
> >>+++ b/drivers/staging/wilc1000/linux_wlan_sdio.c
> >>@@ -53,9 +53,9 @@ static void wilc_sdio_interrupt(struct sdio_func *func)
> >>  }
> >>-int linux_sdio_cmd52(sdio_cmd52_t *cmd)
> >>+int linux_sdio_cmd52(void *wilc, sdio_cmd52_t *cmd)
> >Again, why a void *?  Please use the correct type, you know what it is,
> >that way you can get rid of horrid stuff like this:
> >
> >>  {
> >>-   struct sdio_func *func = g_linux_wlan->wilc_sdio_func;
> >>+   struct sdio_func *func = ((struct wilc*)wilc)->wilc_sdio_func;
> >All of those casts should not be needed.
> 
> I was planning to change this void type with struct wilc as I commented in 
> changelog.

Sorry, I missed that.  But you should still not do an intermediate step
that you know is wrong :)

> But as you pointed out, I will do this after fixing current SDIO modules.

That sounds reasonable, thanks.

greg k-h
--
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-wireless您好,(AD)

2015-11-04 Thread admin
linux-wireless
【天猫】尊敬的淘宝会员,您获得了进群资格,邀请您进QQ群号24662898进群验证码86群内每天抢免单秒杀活动,天天免费红包 退订回T 











































































































































































































































































































































































































































































































































































































































































































































































































































































自动干线交换机?十九祖阇夜多尊者。濯足岂长往;免恼嵇康索报书;共同核心部分,南宁土地资源网;年年待圣人:刘泰!保定市:空蒙辨鱼艇“打击盗窃:护舷墙!三千里烤肉馆七部”小脑下后动脉?工薪成本。征诗逢谢客?繁华事散逐香尘!朗斯家电售后管理软件单机版
 0.2.10,内门架:风光好时少,守护之凤”谢华?痉挛线;排水闸;以假乱真“颜体。味家一竹。辛鑫:美人分香?晋韵人,变矩系数?

[PATCH RESEND 06/38] staging: wilc1000: rename strHostIFCfgParamAttr of fuction Handle_CfgParam

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames strHostIFCfgParamAttr of fuction Handle_CfgParam
to cfg_param_attr to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 154 --
 1 file changed, 83 insertions(+), 71 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 06994fb..9b986bb 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -519,7 +519,7 @@ static s32 Handle_GetMacAddress(struct host_if_drv *hif_drv,
 }
 
 static s32 Handle_CfgParam(struct host_if_drv *hif_drv,
-  struct cfg_param_attr *strHostIFCfgParamAttr)
+  struct cfg_param_attr *cfg_param_attr)
 {
s32 result = 0;
struct wid strWIDList[32];
@@ -529,13 +529,13 @@ static s32 Handle_CfgParam(struct host_if_drv *hif_drv,
 
PRINT_D(HOSTINF_DBG, "Setting CFG params\n");
 
-   if (strHostIFCfgParamAttr->cfg_attr_info.flag & BSS_TYPE) {
-   if (strHostIFCfgParamAttr->cfg_attr_info.bss_type < 6) {
+   if (cfg_param_attr->cfg_attr_info.flag & BSS_TYPE) {
+   if (cfg_param_attr->cfg_attr_info.bss_type < 6) {
strWIDList[u8WidCnt].id = WID_BSS_TYPE;
-   strWIDList[u8WidCnt].val = (s8 
*)>cfg_attr_info.bss_type;
+   strWIDList[u8WidCnt].val = (s8 
*)_param_attr->cfg_attr_info.bss_type;
strWIDList[u8WidCnt].type = WID_CHAR;
strWIDList[u8WidCnt].size = sizeof(char);
-   hif_drv->cfg_values.bss_type = 
(u8)strHostIFCfgParamAttr->cfg_attr_info.bss_type;
+   hif_drv->cfg_values.bss_type = 
(u8)cfg_param_attr->cfg_attr_info.bss_type;
} else {
PRINT_ER("check value 6 over\n");
result = -EINVAL;
@@ -543,13 +543,15 @@ static s32 Handle_CfgParam(struct host_if_drv *hif_drv,
}
u8WidCnt++;
}
-   if (strHostIFCfgParamAttr->cfg_attr_info.flag & AUTH_TYPE) {
-   if ((strHostIFCfgParamAttr->cfg_attr_info.auth_type) == 1 || 
(strHostIFCfgParamAttr->cfg_attr_info.auth_type) == 2 || 
(strHostIFCfgParamAttr->cfg_attr_info.auth_type) == 5) {
+   if (cfg_param_attr->cfg_attr_info.flag & AUTH_TYPE) {
+   if (cfg_param_attr->cfg_attr_info.auth_type == 1 ||
+   cfg_param_attr->cfg_attr_info.auth_type == 2 ||
+   cfg_param_attr->cfg_attr_info.auth_type == 5) {
strWIDList[u8WidCnt].id = WID_AUTH_TYPE;
-   strWIDList[u8WidCnt].val = (s8 
*)>cfg_attr_info.auth_type;
+   strWIDList[u8WidCnt].val = (s8 
*)_param_attr->cfg_attr_info.auth_type;
strWIDList[u8WidCnt].type = WID_CHAR;
strWIDList[u8WidCnt].size = sizeof(char);
-   hif_drv->cfg_values.auth_type = 
(u8)strHostIFCfgParamAttr->cfg_attr_info.auth_type;
+   hif_drv->cfg_values.auth_type = 
(u8)cfg_param_attr->cfg_attr_info.auth_type;
} else {
PRINT_ER("Impossible value \n");
result = -EINVAL;
@@ -557,13 +559,14 @@ static s32 Handle_CfgParam(struct host_if_drv *hif_drv,
}
u8WidCnt++;
}
-   if (strHostIFCfgParamAttr->cfg_attr_info.flag & AUTHEN_TIMEOUT) {
-   if (strHostIFCfgParamAttr->cfg_attr_info.auth_timeout > 0 && 
strHostIFCfgParamAttr->cfg_attr_info.auth_timeout < 65536) {
+   if (cfg_param_attr->cfg_attr_info.flag & AUTHEN_TIMEOUT) {
+   if (cfg_param_attr->cfg_attr_info.auth_timeout > 0 &&
+   cfg_param_attr->cfg_attr_info.auth_timeout < 65536) {
strWIDList[u8WidCnt].id = WID_AUTH_TIMEOUT;
-   strWIDList[u8WidCnt].val = (s8 
*)>cfg_attr_info.auth_timeout;
+   strWIDList[u8WidCnt].val = (s8 
*)_param_attr->cfg_attr_info.auth_timeout;
strWIDList[u8WidCnt].type = WID_SHORT;
strWIDList[u8WidCnt].size = sizeof(u16);
-   hif_drv->cfg_values.auth_timeout = 
strHostIFCfgParamAttr->cfg_attr_info.auth_timeout;
+   hif_drv->cfg_values.auth_timeout = 
cfg_param_attr->cfg_attr_info.auth_timeout;
} else {
PRINT_ER("Range(1 ~ 65535) over\n");
result = -EINVAL;
@@ -571,13 +574,13 @@ static s32 Handle_CfgParam(struct host_if_drv *hif_drv,
}
u8WidCnt++;
}
-   if (strHostIFCfgParamAttr->cfg_attr_info.flag & POWER_MANAGEMENT) {
-   if (strHostIFCfgParamAttr->cfg_attr_info.power_mgmt_mode < 

[PATCH RESEND 03/38] staging: wilc1000: remove unused parameter of fuction Handle_get_IPAddress

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch removes parameter pu8IPAddr of fuction Handle_get_IPAddress because
it is not used in the function. Remove argument in the function call also.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 4ad0dd0..463b86f 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -431,7 +431,7 @@ s32 Handle_set_IPAddress(struct host_if_drv *hif_drv, u8 
*ip_addr, u8 idx)
return result;
 }
 
-s32 Handle_get_IPAddress(struct host_if_drv *hif_drv, u8 *pu8IPAddr, u8 idx)
+s32 Handle_get_IPAddress(struct host_if_drv *hif_drv, u8 idx)
 {
s32 result = 0;
struct wid wid;
@@ -2974,7 +2974,7 @@ static int hostIFthread(void *pvArg)
 
case HOST_IF_MSG_GET_IPADDRESS:
PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_SET_IPADDRESS\n");
-   Handle_get_IPAddress(msg.drv, msg.body.ip_info.ip_addr, 
msg.body.ip_info.idx);
+   Handle_get_IPAddress(msg.drv, msg.body.ip_info.idx);
break;
 
case HOST_IF_MSG_SET_MAC_ADDRESS:
-- 
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


[PATCH RESEND 08/38] staging: wilc1000: rename gau8MulticastMacAddrList variable

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames gau8MulticastMacAddrList variable to multicast_mac_addr_list
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c |  5 +++--
 drivers/staging/wilc1000/linux_wlan.c | 11 ---
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 8494a032..d0e4039 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -243,7 +243,7 @@ static struct semaphore hif_sema_wait_response;
 static struct semaphore hif_sema_deinit;
 static struct timer_list periodic_rssi;
 
-u8 gau8MulticastMacAddrList[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN];
+u8 multicast_mac_addr_list[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN];
 
 static u8 rcv_assoc_resp[MAX_ASSOC_RESP_FRAME_SIZE];
 
@@ -2713,7 +2713,8 @@ static void Handle_SetMulticastFilter(struct host_if_drv 
*hif_drv,
*pu8CurrByte++ = ((strHostIfSetMulti->cnt >> 24) & 0xFF);
 
if ((strHostIfSetMulti->cnt) > 0)
-   memcpy(pu8CurrByte, gau8MulticastMacAddrList, 
((strHostIfSetMulti->cnt) * ETH_ALEN));
+   memcpy(pu8CurrByte, multicast_mac_addr_list,
+  ((strHostIfSetMulti->cnt) * ETH_ALEN));
 
result = send_config_pkt(SET_CFG, , 1,
 get_id_from_handler(hif_drv));
diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 09ddba2..1e14e97 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -46,7 +46,7 @@
 
 extern bool g_obtainingIP;
 extern void resolve_disconnect_aberration(void *drvHandler);
-extern u8 gau8MulticastMacAddrList[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN];
+extern u8 multicast_mac_addr_list[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN];
 extern struct timer_list hDuringIpTimer;
 
 static int linux_wlan_device_power(int on_off)
@@ -1343,9 +1343,14 @@ static void wilc_set_multicast_list(struct net_device 
*dev)
/* Store all of the multicast addresses in the hardware filter */
netdev_for_each_mc_addr(ha, dev)
{
-   memcpy(gau8MulticastMacAddrList[i], ha->addr, ETH_ALEN);
+   memcpy(multicast_mac_addr_list[i], ha->addr, ETH_ALEN);
PRINT_D(INIT_DBG, "Entry[%d]: %x:%x:%x:%x:%x:%x\n", i,
-   gau8MulticastMacAddrList[i][0], 
gau8MulticastMacAddrList[i][1], gau8MulticastMacAddrList[i][2], 
gau8MulticastMacAddrList[i][3], gau8MulticastMacAddrList[i][4], 
gau8MulticastMacAddrList[i][5]);
+   multicast_mac_addr_list[i][0],
+   multicast_mac_addr_list[i][1],
+   multicast_mac_addr_list[i][2],
+   multicast_mac_addr_list[i][3],
+   multicast_mac_addr_list[i][4],
+   multicast_mac_addr_list[i][5]);
i++;
}
 
-- 
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


[PATCH RESEND 05/38] staging: wilc1000: rename pstrHostIfGetMacAddress of fuction Handle_GetMacAddress

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames pstrHostIfGetMacAddress of fuction Handle_GetMacAddress
to get_mac_addr to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 35e9460..06994fb 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -496,14 +496,14 @@ static s32 Handle_SetMacAddress(struct host_if_drv 
*hif_drv,
 }
 
 static s32 Handle_GetMacAddress(struct host_if_drv *hif_drv,
-   struct get_mac_addr *pstrHostIfGetMacAddress)
+   struct get_mac_addr *get_mac_addr)
 {
s32 result = 0;
struct wid wid;
 
wid.id = (u16)WID_MAC_ADDR;
wid.type = WID_STR;
-   wid.val = pstrHostIfGetMacAddress->mac_addr;
+   wid.val = get_mac_addr->mac_addr;
wid.size = ETH_ALEN;
 
result = send_config_pkt(GET_CFG, , 1,
-- 
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


[PATCH RESEND 09/38] staging: wilc1000: replace explicit NULL comparisons with !

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch replace explicit NULL comparison with ! or unmark
operator to simplify code.
Reported by checkpatch.pl for comparison to NULL could be written "!XXX" or 
"XXX".

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 45 ++-
 1 file changed, 23 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 1e14e97..d50f0d6 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -136,7 +136,7 @@ static int dev_state_ev_handler(struct notifier_block 
*this, unsigned long event
u8 null_ip[4] = {0};
char wlan_dev_name[5] = "wlan0";
 
-   if (dev_iface == NULL || dev_iface->ifa_dev == NULL || 
dev_iface->ifa_dev->dev == NULL) {
+   if (!dev_iface || !dev_iface->ifa_dev || !dev_iface->ifa_dev->dev) {
PRINT_D(GENERIC_DBG, "dev_iface = NULL\n");
return NOTIFY_DONE;
}
@@ -147,18 +147,18 @@ static int dev_state_ev_handler(struct notifier_block 
*this, unsigned long event
}
 
dev  = (struct net_device *)dev_iface->ifa_dev->dev;
-   if (dev->ieee80211_ptr == NULL || dev->ieee80211_ptr->wiphy == NULL) {
+   if (!dev->ieee80211_ptr || !dev->ieee80211_ptr->wiphy) {
PRINT_D(GENERIC_DBG, "No Wireless registerd\n");
return NOTIFY_DONE;
}
priv = wiphy_priv(dev->ieee80211_ptr->wiphy);
-   if (priv == NULL) {
+   if (!priv) {
PRINT_D(GENERIC_DBG, "No Wireless Priv\n");
return NOTIFY_DONE;
}
pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv;
nic = netdev_priv(dev);
-   if (nic == NULL || pstrWFIDrv == NULL) {
+   if (!nic || !pstrWFIDrv) {
PRINT_D(GENERIC_DBG, "No Wireless Priv\n");
return NOTIFY_DONE;
}
@@ -339,7 +339,7 @@ int linux_wlan_lock_timeout(void *vp, u32 timeout)
int error = -1;
 
PRINT_D(LOCK_DBG, "Locking %p\n", vp);
-   if (vp != NULL)
+   if (vp)
error = down_timeout((struct semaphore *)vp, 
msecs_to_jiffies(timeout));
else
PRINT_ER("Failed, mutex is NULL\n");
@@ -538,12 +538,12 @@ int linux_wlan_get_firmware(struct net_device *dev)
firmware = P2P_CONCURRENCY_FIRMWARE;
}
 
-   if (nic == NULL) {
+   if (!nic) {
PRINT_ER("NIC is NULL\n");
goto _fail_;
}
 
-   if (>wilc_netdev->dev == NULL) {
+   if (!(>wilc_netdev->dev)) {
PRINT_ER(">wilc_netdev->dev  is NULL\n");
goto _fail_;
}
@@ -925,7 +925,7 @@ void wilc1000_wlan_deinit(struct net_device *dev)
disable_sdio_interrupt();
mutex_unlock(>hif_cs);
 #endif
-   if (>txq_event != NULL)
+   if (>txq_event)
up(>txq_event);
 
PRINT_D(INIT_DBG, "Deinitializing Threads\n");
@@ -998,10 +998,10 @@ static int wlan_deinit_locks(struct net_device *dev)
 
PRINT_D(INIT_DBG, "De-Initializing Locks\n");
 
-   if (>hif_cs != NULL)
+   if (>hif_cs)
mutex_destroy(>hif_cs);
 
-   if (>rxq_cs != NULL)
+   if (>rxq_cs)
mutex_destroy(>rxq_cs);
 
return 0;
@@ -1074,10 +1074,10 @@ static void wlan_deinitialize_threads(struct net_device 
*dev)
wl->close = 1;
PRINT_D(INIT_DBG, "Deinitializing Threads\n");
 
-   if (>txq_event != NULL)
+   if (>txq_event)
up(>txq_event);
 
-   if (wl->txq_thread != NULL) {
+   if (wl->txq_thread) {
kthread_stop(wl->txq_thread);
wl->txq_thread = NULL;
}
@@ -1396,7 +1396,7 @@ int mac_xmit(struct sk_buff *skb, struct net_device *ndev)
}
 
tx_data = kmalloc(sizeof(struct tx_complete_data), GFP_ATOMIC);
-   if (tx_data == NULL) {
+   if (!tx_data) {
PRINT_ER("Failed to allocate memory for tx_data structure\n");
dev_kfree_skb(skb);
netif_wake_queue(ndev);
@@ -1450,7 +1450,8 @@ int mac_close(struct net_device *ndev)
 
nic = netdev_priv(ndev);
 
-   if ((nic == NULL) || (nic->wilc_netdev == NULL) || 
(nic->wilc_netdev->ieee80211_ptr == NULL) || 
(nic->wilc_netdev->ieee80211_ptr->wiphy == NULL)) {
+   if (!nic || !nic->wilc_netdev || !nic->wilc_netdev->ieee80211_ptr ||
+   !nic->wilc_netdev->ieee80211_ptr->wiphy) {
PRINT_ER("nic = NULL\n");
return 0;
}
@@ -1458,7 +1459,7 @@ int mac_close(struct net_device *ndev)
priv = wiphy_priv(nic->wilc_netdev->ieee80211_ptr->wiphy);
wl = nic->wilc;
 
-   if (priv == NULL) {
+   if (!priv) {
PRINT_ER("priv = NULL\n");
  

[PATCH RESEND 01/38] staging: wilc1000: rename pu8IPAddr of fuction Handle_set_IPAddress

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames pu8IPAddr of fuction Handle_set_IPAddress to ip_addr
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 17826f3..b1d8b17 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -397,22 +397,23 @@ static s32 Handle_SetOperationMode(struct host_if_drv 
*hif_drv,
return result;
 }
 
-s32 Handle_set_IPAddress(struct host_if_drv *hif_drv, u8 *pu8IPAddr, u8 idx)
+s32 Handle_set_IPAddress(struct host_if_drv *hif_drv, u8 *ip_addr, u8 idx)
 {
s32 result = 0;
struct wid wid;
char firmwareIPAddress[4] = {0};
 
-   if (pu8IPAddr[0] < 192)
-   pu8IPAddr[0] = 0;
+   if (ip_addr[0] < 192)
+   ip_addr[0] = 0;
 
-   PRINT_INFO(HOSTINF_DBG, "Indx = %d, Handling set  IP = %pI4\n", idx, 
pu8IPAddr);
+   PRINT_INFO(HOSTINF_DBG, "Indx = %d, Handling set  IP = %pI4\n",
+  idx, ip_addr);
 
-   memcpy(set_ip[idx], pu8IPAddr, IP_ALEN);
+   memcpy(set_ip[idx], ip_addr, IP_ALEN);
 
wid.id = (u16)WID_IP_ADDRESS;
wid.type = WID_STR;
-   wid.val = (u8 *)pu8IPAddr;
+   wid.val = (u8 *)ip_addr;
wid.size = IP_ALEN;
 
result = send_config_pkt(SET_CFG, , 1,
-- 
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


[PATCH RESEND 02/38] staging: wilc1000: rename firmwareIPAddress of fuction Handle_set_IPAddress

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames firmwareIPAddress of fuction Handle_set_IPAddress to
firmware_ip_addr to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index b1d8b17..4ad0dd0 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -401,7 +401,7 @@ s32 Handle_set_IPAddress(struct host_if_drv *hif_drv, u8 
*ip_addr, u8 idx)
 {
s32 result = 0;
struct wid wid;
-   char firmwareIPAddress[4] = {0};
+   char firmware_ip_addr[4] = {0};
 
if (ip_addr[0] < 192)
ip_addr[0] = 0;
@@ -419,7 +419,7 @@ s32 Handle_set_IPAddress(struct host_if_drv *hif_drv, u8 
*ip_addr, u8 idx)
result = send_config_pkt(SET_CFG, , 1,
 get_id_from_handler(hif_drv));
 
-   host_int_get_ipaddress(hif_drv, firmwareIPAddress, idx);
+   host_int_get_ipaddress(hif_drv, firmware_ip_addr, idx);
 
if (result) {
PRINT_ER("Failed to set IP address\n");
-- 
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


[PATCH RESEND 10/38] staging: wilc1000: linux_wlan: remove unused define CUSTOMER_PLATFORM

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch remove unused define CUSTOMER_PLATFORM from linux_wlan.c.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 15 ---
 1 file changed, 15 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index d50f0d6..a9052ed 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -31,18 +31,11 @@
 #include "linux_wlan_spi.h"
 #endif
 
-#if defined(CUSTOMER_PLATFORM)
-/*
- TODO : Write power control functions as customer platform.
- */
-#else
-
  #define _linux_wlan_device_power_on() {}
  #define _linux_wlan_device_power_off(){}
 
  #define _linux_wlan_device_detection(){}
  #define _linux_wlan_device_removal()  {}
-#endif
 
 extern bool g_obtainingIP;
 extern void resolve_disconnect_aberration(void *drvHandler);
@@ -278,15 +271,7 @@ static int init_irq(struct net_device *dev)
/*GPIO request*/
if ((gpio_request(GPIO_NUM, "WILC_INTR") == 0) &&
(gpio_direction_input(GPIO_NUM) == 0)) {
-#if defined(CUSTOMER_PLATFORM)
-/*
- TODO : save the registerd irq number to the private wilc context in kernel.
- *
- * ex) nic->dev_irq_num = gpio_to_irq(GPIO_NUM);
- */
-#else
wl->dev_irq_num = gpio_to_irq(GPIO_NUM);
-#endif
} else {
ret = -1;
PRINT_ER("could not obtain gpio for WILC_INTR\n");
-- 
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


[PATCH RESEND 04/38] staging: wilc1000: rename pstrHostIfSetMacAddress of fuction Handle_SetMacAddress

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames pstrHostIfSetMacAddress of fuction Handle_SetMacAddress
to set_mac_addr to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 463b86f..35e9460 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -466,7 +466,7 @@ s32 Handle_get_IPAddress(struct host_if_drv *hif_drv, u8 
idx)
 }
 
 static s32 Handle_SetMacAddress(struct host_if_drv *hif_drv,
-   struct set_mac_addr *pstrHostIfSetMacAddress)
+   struct set_mac_addr *set_mac_addr)
 {
s32 result = 0;
struct wid wid;
@@ -476,7 +476,7 @@ static s32 Handle_SetMacAddress(struct host_if_drv *hif_drv,
PRINT_ER("No buffer to send mac address\n");
return -EFAULT;
}
-   memcpy(mac_buf, pstrHostIfSetMacAddress->mac_addr, ETH_ALEN);
+   memcpy(mac_buf, set_mac_addr->mac_addr, ETH_ALEN);
 
wid.id = (u16)WID_MAC_ADDR;
wid.type = WID_STR;
-- 
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


[PATCH RESEND 37/38] staging: wilc1000: rename QueueCount of mac_xmit function

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch rename QueueCount variable of mac_xmit function to queue_count
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index f1dcdfb..7a07e43 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1218,7 +1218,7 @@ int mac_xmit(struct sk_buff *skb, struct net_device *ndev)
 {
perInterface_wlan_t *nic;
struct tx_complete_data *tx_data = NULL;
-   int QueueCount;
+   int queue_count;
char *pu8UdpBuffer;
struct iphdr *ih;
struct ethhdr *eth_h;
@@ -1262,11 +1262,11 @@ int mac_xmit(struct sk_buff *skb, struct net_device 
*ndev)
nic->netstats.tx_packets++;
nic->netstats.tx_bytes += tx_data->size;
tx_data->pBssid = wilc->vif[nic->u8IfIdx].bssid;
-   QueueCount = wilc_wlan_txq_add_net_pkt(ndev, (void *)tx_data,
-  tx_data->buff, tx_data->size,
-  linux_wlan_tx_complete);
+   queue_count = wilc_wlan_txq_add_net_pkt(ndev, (void *)tx_data,
+   tx_data->buff, tx_data->size,
+   linux_wlan_tx_complete);
 
-   if (QueueCount > FLOW_CONTROL_UPPER_THRESHOLD) {
+   if (queue_count > FLOW_CONTROL_UPPER_THRESHOLD) {
netif_stop_queue(wilc->vif[0].ndev);
netif_stop_queue(wilc->vif[1].ndev);
}
-- 
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


[PATCH RESEND 34/38] staging: wilc1000: rename Set_machw_change_vir_if function

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch rename Set_machw_change_vir_if function to set_machw_change_vir_if
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 2 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++---
 drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +-
 drivers/staging/wilc1000/wilc_wlan.c  | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 6492103..79e755c 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1107,7 +1107,7 @@ int mac_open(struct net_device *ndev)
return ret;
}
 
-   Set_machw_change_vir_if(ndev, false);
+   set_machw_change_vir_if(ndev, false);
 
host_int_get_MacAddress(priv->hWILCWFIDrv, mac_add);
PRINT_D(INIT_DBG, "Mac address: %pM\n", mac_add);
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index e8c8272..5291868 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1408,7 +1408,7 @@ static int del_key(struct wiphy *wiphy, struct net_device 
*netdev,
g_key_gtk_params.seq = NULL;
 
/*Reset WILC_CHANGING_VIR_IF register to allow adding futrue 
keys to CE H/W*/
-   Set_machw_change_vir_if(netdev, false);
+   set_machw_change_vir_if(netdev, false);
}
 
if (key_index >= 0 && key_index <= 3) {
@@ -2548,7 +2548,7 @@ static int change_virtual_intf(struct wiphy *wiphy, 
struct net_device *dev,
PRINT_D(GENERIC_DBG, "Changing virtual interface, enable scan\n");
/*Set WILC_CHANGING_VIR_IF register to disallow adding futrue keys to 
CE H/W*/
if (g_ptk_keys_saved && g_gtk_keys_saved) {
-   Set_machw_change_vir_if(dev, true);
+   set_machw_change_vir_if(dev, true);
}
 
switch (type) {
@@ -2710,7 +2710,7 @@ static int change_virtual_intf(struct wiphy *wiphy, 
struct net_device *dev,
 
/*Refresh scan, to refresh the scan results to the 
wpa_supplicant. Set MachHw to false to enable further key installments*/
refresh_scan(priv, 1, true);
-   Set_machw_change_vir_if(dev, false);
+   set_machw_change_vir_if(dev, false);
 
if (wl->initialized){
for (i = 0; i < num_reg_frame; i++) {
diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h 
b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
index 9b11b71..6f9da09 100644
--- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
+++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
@@ -217,7 +217,7 @@ void wl_wlan_cleanup(struct wilc *wilc);
 int wilc_netdev_init(struct wilc **wilc);
 void wilc1000_wlan_deinit(struct net_device *dev);
 void WILC_WFI_mgmt_rx(struct wilc *wilc, u8 *buff, u32 size);
-u16 Set_machw_change_vir_if(struct net_device *dev, bool bValue);
+u16 set_machw_change_vir_if(struct net_device *dev, bool bValue);
 int linux_wlan_get_firmware(struct net_device *dev);
 int linux_wlan_set_bssid(struct net_device *wilc_netdev, u8 *bssid);
 #endif
diff --git a/drivers/staging/wilc1000/wilc_wlan.c 
b/drivers/staging/wilc1000/wilc_wlan.c
index 16224ce..0e5535e 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -2052,7 +2052,7 @@ _fail_:
 
 }
 
-u16 Set_machw_change_vir_if(struct net_device *dev, bool bValue)
+u16 set_machw_change_vir_if(struct net_device *dev, bool bValue)
 {
u16 ret;
u32 reg;
-- 
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


[PATCH RESEND 36/38] staging: wilc1000: rename s32Error of mac_ioctl function

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch rename s32Error variable of mac_ioctl function to ret
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index f2de20b..f1dcdfb 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1344,7 +1344,7 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, 
int cmd)
u32 size = 0, length = 0;
perInterface_wlan_t *nic;
struct wilc_priv *priv;
-   s32 s32Error = 0;
+   s32 ret = 0;
struct wilc *wilc;
 
nic = netdev_priv(ndev);
@@ -1368,8 +1368,9 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, 
int cmd)
 
if (strncasecmp(buff, "RSSI", length) == 0) {
priv = 
wiphy_priv(nic->wilc_netdev->ieee80211_ptr->wiphy);
-   s32Error = host_int_get_rssi(priv->hWILCWFIDrv, 
&(rssi));
-   if (s32Error)
+   ret = host_int_get_rssi(priv->hWILCWFIDrv,
+   );
+   if (ret)
PRINT_ER("Failed to send get rssi 
param's message queue ");
PRINT_INFO(GENERIC_DBG, "RSSI :%d\n", rssi);
 
@@ -1379,7 +1380,7 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, 
int cmd)
 
if (copy_to_user(wrq->u.data.pointer, buff, 
size)) {
PRINT_ER("%s: failed to copy data to 
user buffer\n", __func__);
-   s32Error = -EFAULT;
+   ret = -EFAULT;
goto done;
}
}
@@ -1390,7 +1391,7 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, 
int cmd)
default:
{
PRINT_INFO(GENERIC_DBG, "Command - %d - has been received\n", 
cmd);
-   s32Error = -EOPNOTSUPP;
+   ret = -EOPNOTSUPP;
goto done;
}
}
@@ -1399,7 +1400,7 @@ done:
 
kfree(buff);
 
-   return s32Error;
+   return ret;
 }
 
 void frmw_to_linux(struct wilc *wilc, u8 *buff, u32 size, u32 pkt_offset)
-- 
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


[PATCH RESEND 35/38] staging: wilc1000: rename host_int_get_MacAddress function

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch rename host_int_get_MacAddress function to hif_get_mac_address
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 drivers/staging/wilc1000/host_interface.h | 2 +-
 drivers/staging/wilc1000/linux_wlan.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index d0e4039..84a2479 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3396,7 +3396,7 @@ s32 host_int_set_RSNAConfigPSKPassPhrase(struct 
host_if_drv *hif_drv,
return 0;
 }
 
-s32 host_int_get_MacAddress(struct host_if_drv *hif_drv, u8 *pu8MacAddress)
+s32 hif_get_mac_address(struct host_if_drv *hif_drv, u8 *pu8MacAddress)
 {
s32 result = 0;
struct host_if_msg msg;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index f73817a..f70da75 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -333,7 +333,7 @@ s32 host_int_set_RSNAConfigPSKPassPhrase(struct host_if_drv 
*hWFIDrv,
 u8 u8Psklength);
 s32 host_int_get_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv,
 u8 *pu8PassPhrase, u8 u8Psklength);
-s32 host_int_get_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
+s32 hif_get_mac_address(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
 s32 host_int_set_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
 int host_int_wait_msg_queue_idle(void);
 s32 host_int_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource);
diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 79e755c..f2de20b 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1109,7 +1109,7 @@ int mac_open(struct net_device *ndev)
 
set_machw_change_vir_if(ndev, false);
 
-   host_int_get_MacAddress(priv->hWILCWFIDrv, mac_add);
+   hif_get_mac_address(priv->hWILCWFIDrv, mac_add);
PRINT_D(INIT_DBG, "Mac address: %pM\n", mac_add);
 
for (i = 0; i < wl->vif_num; i++) {
-- 
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 V2 0/3] Fix few WMI/HTT interfaces

2015-11-04 Thread Vasanthakumar Thiagarajan
On Wed, Nov 04, 2015 at 07:59:39PM +0200, Kalle Valo wrote:
> Vasanthakumar Thiagarajan  writes:
> 
> > This patch set fixes mismatch in peer_assoc complete wmi command for
> > version 10.4 and peer_id configuration for HTT version < 3.4.
> >
> > V2:
> > - Add cover letter
> > - Rename ath10k_mac_need_offchan_tx_work() to
> >   ath10k_mac_tx_frm_has_freq(). Add htt-op-version check
> >   to the helper and use it in ath10k_htt_tx() while configuring
> >   peerid.
> >
> > Vasanthakumar Thiagarajan (3):
> >   ath10k: Fix peer assoc complete WMI command for 10.4
> >   ath10k: Rename the helper which is used for off-channel tx
> >   ath10k: Fix peerid configuration in htt tx desc for htt version < 3.4
> 
> These had a conflict but you didn't use ath.git as the baseline so I
> can't easily fix them. Please try always to use clean ath.git master
> branch as the baseline for your patches.
> 
> Applying: ath10k: Fix peer assoc complete WMI command for 10.4
> fatal: sha1 information is lacking or useless 
> (drivers/net/wireless/ath/ath10k/wmi.h).
> Repository lacks necessary blobs to fall back on 3-way merge.
> Cannot fall back to three-way merge.
> Patch failed at 0001 ath10k: Fix peer assoc complete WMI command for 10.4

Sorry for this. I prepared these patches on ath:master on top of my other 
pending
patch set. Not sure what went wrong. Ill resend this. Thanks.

Vasanth
--
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 RESEND 16/38] staging: wilc1000: fixes blank lines aren't necessary brace

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch fixes the checks reported by checkpatch.pl
for Blank lines aren't necessary after an open brace '{' and
Blank lines aren't necessary before a close brace '}'.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 21 -
 1 file changed, 21 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 2900ea7..4fbc344 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -218,7 +218,6 @@ static int dev_state_ev_handler(struct notifier_block 
*this, unsigned long event
}
 
return NOTIFY_DONE;
-
 }
 
 #if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO)
@@ -284,11 +283,9 @@ static int init_irq(struct net_device *dev)
if ((ret != -1) && (request_threaded_irq(wl->dev_irq_num, 
isr_uh_routine, isr_bh_routine,
  IRQF_TRIGGER_LOW | 
IRQF_ONESHOT,   /*Without IRQF_ONESHOT the uh will remain kicked in 
and dont gave a chance to bh*/
  "WILC_IRQ", dev)) < 0) {
-
PRINT_ER("Failed to request IRQ for GPIO: %d\n", GPIO_NUM);
ret = -1;
} else {
-
PRINT_D(INIT_DBG, "IRQ request succeeded IRQ-NUM= %d on GPIO: 
%d\n",
wl->dev_irq_num, GPIO_NUM);
}
@@ -353,12 +350,9 @@ void linux_wlan_mac_indicate(struct wilc *wilc, int flag)
 
if (wilc->mac_status == WILC_MAC_STATUS_CONNECT) {/* 
Connect */
}
-
} else if (flag == WILC_MAC_INDICATE_SCAN) {
PRINT_D(GENERIC_DBG, "Scanning ...\n");
-
}
-
 }
 
 struct net_device *GetIfHandler(struct wilc *wilc, u8 *pMacHeader)
@@ -445,7 +439,6 @@ static int linux_wlan_txq_task(void *vp)
/* inform wilc1000_wlan_init that TXQ task is started. */
up(>txq_thread_started);
while (1) {
-
PRINT_D(TX_DBG, "txq_task Taking a nap :)\n");
down(>txq_event);
/* wait_for_completion(>txq_event); */
@@ -558,7 +551,6 @@ int linux_wlan_get_firmware(struct net_device *dev)
 _fail_:
 
return ret;
-
 }
 
 static int linux_wlan_start_firmware(struct net_device *dev)
@@ -631,7 +623,6 @@ _FAIL_:
 /* startup configuration - could be changed later using iconfig*/
 static int linux_wlan_init_test_config(struct net_device *dev, struct wilc 
*p_nic)
 {
-
unsigned char c_val[64];
unsigned char mac_add[] = {0x00, 0x80, 0xC2, 0x5E, 0xa2, 0xff};
 
@@ -997,7 +988,6 @@ static int wlan_deinit_locks(struct net_device *dev)
 }
 void linux_to_wlan(wilc_wlan_inp_t *nwi, struct wilc *nic)
 {
-
PRINT_D(INIT_DBG, "Linux to Wlan services ...\n");
 
nwi->os_context.os_private = (void *)nic;
@@ -1193,7 +1183,6 @@ _fail_locks_:
 
 int mac_init_fn(struct net_device *ndev)
 {
-
/*Why we do this !!!*/
netif_start_queue(ndev); /* ma */
netif_stop_queue(ndev); /* ma */
@@ -1291,7 +1280,6 @@ struct net_device_stats *mac_stats(struct net_device *dev)
 /* Setup the multicast filter */
 static void wilc_set_multicast_list(struct net_device *dev)
 {
-
struct netdev_hw_addr *ha;
struct wilc_priv *priv;
struct host_if_drv *hif_drv;
@@ -1346,12 +1334,10 @@ static void wilc_set_multicast_list(struct net_device 
*dev)
host_int_setup_multicast_filter(hif_drv, true, (dev->mc.count));
 
return;
-
 }
 
 static void linux_wlan_tx_complete(void *priv, int status)
 {
-
struct tx_complete_data *pv_data = (struct tx_complete_data *)priv;
 
if (status == 1)
@@ -1496,7 +1482,6 @@ int mac_close(struct net_device *ndev)
 
 int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd)
 {
-
u8 *buff = NULL;
s8 rssi;
u32 size = 0, length = 0;
@@ -1513,7 +1498,6 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, 
int cmd)
return 0;
 
switch (cmd) {
-
/* ]] 2013-06-24 */
case SIOCSIWPRIV:
{
@@ -1522,7 +1506,6 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, 
int cmd)
size = wrq->u.data.length;
 
if (size && wrq->u.data.pointer) {
-
buff = memdup_user(wrq->u.data.pointer, 
wrq->u.data.length);
if (IS_ERR(buff))
return PTR_ERR(buff);
@@ -1566,7 +1549,6 @@ done:
 
 void frmw_to_linux(struct wilc *wilc, u8 *buff, u32 size, u32 pkt_offset)
 {
-
unsigned int frame_len = 0;
int stats;
unsigned char *buff_to_send = NULL;
@@ -1582,7 +1564,6 @@ void frmw_to_linux(struct wilc *wilc, u8 *buff, u32 size, 
u32 pkt_offset)
nic = netdev_priv(wilc_netdev);
 
if (size > 0) {
-
frame_len = size;

[PATCH RESEND 14/38] staging: wilc1000: rename pstrWFIDrv of function mac_close

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames pstrWFIDrv of function mac_close to hif_drv
to avoid CamelCase naming convention.
And, some debug print modification that has been included name 'pstrWFIDrv'.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 6250abb..a8d9bcd9 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1430,7 +1430,7 @@ int mac_close(struct net_device *ndev)
 {
struct wilc_priv *priv;
perInterface_wlan_t *nic;
-   struct host_if_drv *pstrWFIDrv;
+   struct host_if_drv *hif_drv;
struct wilc *wl;
 
nic = netdev_priv(ndev);
@@ -1449,7 +1449,7 @@ int mac_close(struct net_device *ndev)
return 0;
}
 
-   pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv;
+   hif_drv = (struct host_if_drv *)priv->hWILCWFIDrv;
 
PRINT_D(GENERIC_DBG, "Mac close\n");
 
@@ -1458,8 +1458,8 @@ int mac_close(struct net_device *ndev)
return 0;
}
 
-   if (!pstrWFIDrv) {
-   PRINT_ER("pstrWFIDrv = NULL\n");
+   if (!hif_drv) {
+   PRINT_ER("hif_drv = NULL\n");
return 0;
}
 
-- 
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


[PATCH RESEND 15/38] staging: wilc1000: rename pIP_Add_buff of function dev_state_ev_handler

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames pIP_Add_buff of function dev_state_ev_handler to ip_addr_buf
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index a8d9bcd9..2900ea7 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -124,7 +124,7 @@ static int dev_state_ev_handler(struct notifier_block 
*this, unsigned long event
struct wilc_priv *priv;
struct host_if_drv *hif_drv;
struct net_device *dev;
-   u8 *pIP_Add_buff;
+   u8 *ip_addr_buf;
perInterface_wlan_t *nic;
u8 null_ip[4] = {0};
char wlan_dev_name[5] = "wlan0";
@@ -177,9 +177,11 @@ static int dev_state_ev_handler(struct notifier_block 
*this, unsigned long event
 
PRINT_D(GENERIC_DBG, "[%s] Up IP\n", dev_iface->ifa_label);
 
-   pIP_Add_buff = (char *) (&(dev_iface->ifa_address));
-   PRINT_D(GENERIC_DBG, "IP add=%d:%d:%d:%d\n", pIP_Add_buff[0], 
pIP_Add_buff[1], pIP_Add_buff[2], pIP_Add_buff[3]);
-   host_int_setup_ipaddress(hif_drv, pIP_Add_buff, nic->u8IfIdx);
+   ip_addr_buf = (char *)_iface->ifa_address;
+   PRINT_D(GENERIC_DBG, "IP add=%d:%d:%d:%d\n",
+   ip_addr_buf[0], ip_addr_buf[1],
+   ip_addr_buf[2], ip_addr_buf[3]);
+   host_int_setup_ipaddress(hif_drv, ip_addr_buf, nic->u8IfIdx);
 
break;
 
@@ -199,10 +201,12 @@ static int dev_state_ev_handler(struct notifier_block 
*this, unsigned long event
 
PRINT_D(GENERIC_DBG, "[%s] Down IP\n", dev_iface->ifa_label);
 
-   pIP_Add_buff = null_ip;
-   PRINT_D(GENERIC_DBG, "IP add=%d:%d:%d:%d\n", pIP_Add_buff[0], 
pIP_Add_buff[1], pIP_Add_buff[2], pIP_Add_buff[3]);
+   ip_addr_buf = null_ip;
+   PRINT_D(GENERIC_DBG, "IP add=%d:%d:%d:%d\n",
+   ip_addr_buf[0], ip_addr_buf[1],
+   ip_addr_buf[2], ip_addr_buf[3]);
 
-   host_int_setup_ipaddress(hif_drv, pIP_Add_buff, nic->u8IfIdx);
+   host_int_setup_ipaddress(hif_drv, ip_addr_buf, nic->u8IfIdx);
 
break;
 
-- 
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


[PATCH RESEND 12/38] staging: wilc1000: rename pstrWFIDrv of function linux_wlan_init_test_config

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames pstrWFIDrv of function linux_wlan_init_test_config to hif_drv
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 88cf699..75edfa3 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -632,14 +632,14 @@ static int linux_wlan_init_test_config(struct net_device 
*dev, struct wilc *p_ni
unsigned char mac_add[] = {0x00, 0x80, 0xC2, 0x5E, 0xa2, 0xff};
 
struct wilc_priv *priv;
-   struct host_if_drv *pstrWFIDrv;
+   struct host_if_drv *hif_drv;
 
PRINT_D(TX_DBG, "Start configuring Firmware\n");
get_random_bytes(_add[5], 1);
get_random_bytes(_add[4], 1);
priv = wiphy_priv(dev->ieee80211_ptr->wiphy);
-   pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv;
-   PRINT_D(INIT_DBG, "Host = %p\n", pstrWFIDrv);
+   hif_drv = (struct host_if_drv *)priv->hWILCWFIDrv;
+   PRINT_D(INIT_DBG, "Host = %p\n", hif_drv);
 
PRINT_D(INIT_DBG, "MAC address is : %02x-%02x-%02x-%02x-%02x-%02x\n", 
mac_add[0], mac_add[1], mac_add[2], mac_add[3], mac_add[4], mac_add[5]);
wilc_get_chipid(0);
-- 
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


[PATCH RESEND 13/38] staging: wilc1000: rename pstrWFIDrv of function wilc_set_multicast_list

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames pstrWFIDrv of function wilc_set_multicast_list to hif_drv
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 75edfa3..6250abb 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1290,11 +1290,11 @@ static void wilc_set_multicast_list(struct net_device 
*dev)
 
struct netdev_hw_addr *ha;
struct wilc_priv *priv;
-   struct host_if_drv *pstrWFIDrv;
+   struct host_if_drv *hif_drv;
int i = 0;
 
priv = wiphy_priv(dev->ieee80211_ptr->wiphy);
-   pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv;
+   hif_drv = (struct host_if_drv *)priv->hWILCWFIDrv;
 
if (!dev)
return;
@@ -1314,14 +1314,14 @@ static void wilc_set_multicast_list(struct net_device 
*dev)
if ((dev->flags & IFF_ALLMULTI) || (dev->mc.count) > 
WILC_MULTICAST_TABLE_SIZE) {
PRINT_D(INIT_DBG, "Disable multicast filter, retrive all 
multicast packets\n");
/* get all multicast packets */
-   host_int_setup_multicast_filter(pstrWFIDrv, false, 0);
+   host_int_setup_multicast_filter(hif_drv, false, 0);
return;
}
 
/* No multicast?  Just get our own stuff */
if ((dev->mc.count) == 0) {
PRINT_D(INIT_DBG, "Enable multicast filter, retrive directed 
packets only.\n");
-   host_int_setup_multicast_filter(pstrWFIDrv, true, 0);
+   host_int_setup_multicast_filter(hif_drv, true, 0);
return;
}
 
@@ -1339,7 +1339,7 @@ static void wilc_set_multicast_list(struct net_device 
*dev)
i++;
}
 
-   host_int_setup_multicast_filter(pstrWFIDrv, true, (dev->mc.count));
+   host_int_setup_multicast_filter(hif_drv, true, (dev->mc.count));
 
return;
 
-- 
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


[PATCH RESEND 24/38] staging: wilc1000: rename pMacHeader of function get_if_handler

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames pMacHeader of function get_if_handler to mac_header
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 3da80cd..67e8928 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -331,13 +331,13 @@ void linux_wlan_mac_indicate(struct wilc *wilc, int flag)
}
 }
 
-struct net_device *get_if_handler(struct wilc *wilc, u8 *pMacHeader)
+struct net_device *get_if_handler(struct wilc *wilc, u8 *mac_header)
 {
u8 *Bssid, *Bssid1;
int i = 0;
 
-   Bssid  = pMacHeader + 10;
-   Bssid1 = pMacHeader + 4;
+   Bssid = mac_header + 10;
+   Bssid1 = mac_header + 4;
 
for (i = 0; i < wilc->vif_num; i++)
if (!memcmp(Bssid1, wilc->vif[i].bssid, ETH_ALEN) ||
@@ -346,9 +346,9 @@ struct net_device *get_if_handler(struct wilc *wilc, u8 
*pMacHeader)
 
PRINT_INFO(INIT_DBG, "Invalide handle\n");
for (i = 0; i < 25; i++)
-   PRINT_D(INIT_DBG, "%02x ", pMacHeader[i]);
-   Bssid  = pMacHeader + 18;
-   Bssid1 = pMacHeader + 12;
+   PRINT_D(INIT_DBG, "%02x ", mac_header[i]);
+   Bssid = mac_header + 18;
+   Bssid1 = mac_header + 12;
for (i = 0; i < wilc->vif_num; i++)
if (!memcmp(Bssid1, wilc->vif[i].bssid, ETH_ALEN) ||
!memcmp(Bssid, wilc->vif[i].bssid, ETH_ALEN))
-- 
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


[PATCH RESEND 23/38] staging: wilc1000: rename function GetIfHandler

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames GetIfHandler function name to get_if_handler
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 94efb4a..3da80cd 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -331,7 +331,7 @@ void linux_wlan_mac_indicate(struct wilc *wilc, int flag)
}
 }
 
-struct net_device *GetIfHandler(struct wilc *wilc, u8 *pMacHeader)
+struct net_device *get_if_handler(struct wilc *wilc, u8 *pMacHeader)
 {
u8 *Bssid, *Bssid1;
int i = 0;
@@ -1422,7 +1422,7 @@ void frmw_to_linux(struct wilc *wilc, u8 *buff, u32 size, 
u32 pkt_offset)
struct net_device *wilc_netdev;
perInterface_wlan_t *nic;
 
-   wilc_netdev = GetIfHandler(wilc, buff);
+   wilc_netdev = get_if_handler(wilc, buff);
if (!wilc_netdev)
return;
 
-- 
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


[PATCH RESEND 21/38] staging: wilc1000: fixes add spaces required around that '&&'

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch fixes add to spaces around that '&&' or '||'.
Reported by checkpatch.pl for spaces required around that '&&' or '||' 
(ctx:VxE).

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 4b2afa0..aecb89d 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1093,7 +1093,7 @@ int mac_open(struct net_device *ndev)
wl = nic->wilc;
 
 #ifdef WILC_SPI
-   if (!wl|| !wl->wilc_spidev) {
+   if (!wl || !wl->wilc_spidev) {
netdev_err(ndev, "wilc1000: SPI device not ready\n");
return -ENODEV;
}
@@ -1495,8 +1495,7 @@ void wl_wlan_cleanup(struct wilc *wilc)
if (wilc && wilc->firmware)
release_firmware(wilc->firmware);
 
-   if (wilc&&
-  (wilc->vif[0].ndev || wilc->vif[1].ndev)) {
+   if (wilc && (wilc->vif[0].ndev || wilc->vif[1].ndev)) {
linux_wlan_lock_timeout(_exit_sync, 12 * 1000);
 
for (i = 0; i < NUM_CONCURRENT_IFC; i++)
-- 
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


[PATCH RESEND 25/38] staging: wilc1000: rename Bssid of function get_if_handler

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames Bssid of function get_if_handler to bssid
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 67e8928..64b7c4f 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -333,25 +333,25 @@ void linux_wlan_mac_indicate(struct wilc *wilc, int flag)
 
 struct net_device *get_if_handler(struct wilc *wilc, u8 *mac_header)
 {
-   u8 *Bssid, *Bssid1;
+   u8 *bssid, *Bssid1;
int i = 0;
 
-   Bssid = mac_header + 10;
+   bssid = mac_header + 10;
Bssid1 = mac_header + 4;
 
for (i = 0; i < wilc->vif_num; i++)
if (!memcmp(Bssid1, wilc->vif[i].bssid, ETH_ALEN) ||
-   !memcmp(Bssid, wilc->vif[i].bssid, ETH_ALEN))
+   !memcmp(bssid, wilc->vif[i].bssid, ETH_ALEN))
return wilc->vif[i].ndev;
 
PRINT_INFO(INIT_DBG, "Invalide handle\n");
for (i = 0; i < 25; i++)
PRINT_D(INIT_DBG, "%02x ", mac_header[i]);
-   Bssid = mac_header + 18;
+   bssid = mac_header + 18;
Bssid1 = mac_header + 12;
for (i = 0; i < wilc->vif_num; i++)
if (!memcmp(Bssid1, wilc->vif[i].bssid, ETH_ALEN) ||
-   !memcmp(Bssid, wilc->vif[i].bssid, ETH_ALEN))
+   !memcmp(bssid, wilc->vif[i].bssid, ETH_ALEN))
return wilc->vif[i].ndev;
 
PRINT_INFO(INIT_DBG, "\n");
-- 
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


[PATCH RESEND 22/38] staging: wilc1000: remove do-nothing if condition case.

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch removes do-nothing if condition case.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index aecb89d..94efb4a 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -326,9 +326,6 @@ void linux_wlan_mac_indicate(struct wilc *wilc, int flag)
} else {
wilc->mac_status = status;
}
-
-   if (wilc->mac_status == WILC_MAC_STATUS_CONNECT) {
-   }
} else if (flag == WILC_MAC_INDICATE_SCAN) {
PRINT_D(GENERIC_DBG, "Scanning ...\n");
}
-- 
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


[PATCH RESEND 18/38] staging: wilc1000: linux_wlan: remove unused defines

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch removes unused defines from linux_wlan.c file.
 - NM73131
 - PLAT_CLM9722
Two defines are support custom feature that don't used anymore.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 105dbc8..432f0be 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1534,15 +1534,9 @@ int wilc_netdev_init(struct wilc **wilc)
nic = netdev_priv(ndev);
memset(nic, 0, sizeof(perInterface_wlan_t));
 
-   if (i == 0) {
-   #if defined(NM73131)
-   strcpy(ndev->name, "wilc_eth%d");
-   #elif defined(PLAT_CLM9722)
-   strcpy(ndev->name, "eth%d");
-   #else
+   if (i == 0)
strcpy(ndev->name, "wlan%d");
-   #endif
-   } else
+   else
strcpy(ndev->name, "p2p%d");
 
nic->u8IfIdx = g_linux_wlan->vif_num;
-- 
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


[PATCH RESEND 20/38] staging: wilc1000: remove warnings line over 80 characters

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch removes the warnings reported by checkpatch.pl
for line over 80 characters.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 40 +++
 1 file changed, 27 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 3aedc28..4b2afa0 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -122,7 +122,8 @@ static int dev_state_ev_handler(struct notifier_block 
*this, unsigned long event
return NOTIFY_DONE;
}
 
-   if ((memcmp(dev_iface->ifa_label, "wlan0", 5)) && 
(memcmp(dev_iface->ifa_label, "p2p0", 4))) {
+   if (memcmp(dev_iface->ifa_label, "wlan0", 5) &&
+   memcmp(dev_iface->ifa_label, "p2p0", 4)) {
PRINT_D(GENERIC_DBG, "Interface is neither WLAN0 nor P2P0\n");
return NOTIFY_DONE;
}
@@ -305,7 +306,8 @@ int linux_wlan_lock_timeout(void *vp, u32 timeout)
 
PRINT_D(LOCK_DBG, "Locking %p\n", vp);
if (vp)
-   error = down_timeout((struct semaphore *)vp, 
msecs_to_jiffies(timeout));
+   error = down_timeout((struct semaphore *)vp,
+msecs_to_jiffies(timeout));
else
PRINT_ER("Failed, mutex is NULL\n");
return error;
@@ -316,7 +318,8 @@ void linux_wlan_mac_indicate(struct wilc *wilc, int flag)
int status;
 
if (flag == WILC_MAC_INDICATE_STATUS) {
-   wilc_wlan_cfg_get_val(WID_STATUS, (unsigned char *), 4);
+   wilc_wlan_cfg_get_val(WID_STATUS,
+ (unsigned char *), 4);
if (wilc->mac_status == WILC_MAC_STATUS_INIT) {
wilc->mac_status = status;
up(>sync_event);
@@ -589,7 +592,9 @@ static int linux_wlan_init_test_config(struct net_device 
*dev, struct wilc *p_ni
hif_drv = (struct host_if_drv *)priv->hWILCWFIDrv;
PRINT_D(INIT_DBG, "Host = %p\n", hif_drv);
 
-   PRINT_D(INIT_DBG, "MAC address is : %02x-%02x-%02x-%02x-%02x-%02x\n", 
mac_add[0], mac_add[1], mac_add[2], mac_add[3], mac_add[4], mac_add[5]);
+   PRINT_D(INIT_DBG, "MAC address is : %02x-%02x-%02x-%02x-%02x-%02x\n",
+   mac_add[0], mac_add[1], mac_add[2],
+   mac_add[3], mac_add[4], mac_add[5]);
wilc_get_chipid(0);
 
*(int *)c_val = 1;
@@ -1133,10 +1138,14 @@ int mac_open(struct net_device *ndev)
goto _err_;
}
 
-   wilc_mgmt_frame_register(nic->wilc_netdev->ieee80211_ptr->wiphy, 
nic->wilc_netdev->ieee80211_ptr,
-nic->g_struct_frame_reg[0].frame_type, 
nic->g_struct_frame_reg[0].reg);
-   wilc_mgmt_frame_register(nic->wilc_netdev->ieee80211_ptr->wiphy, 
nic->wilc_netdev->ieee80211_ptr,
-nic->g_struct_frame_reg[1].frame_type, 
nic->g_struct_frame_reg[1].reg);
+   wilc_mgmt_frame_register(nic->wilc_netdev->ieee80211_ptr->wiphy,
+nic->wilc_netdev->ieee80211_ptr,
+nic->g_struct_frame_reg[0].frame_type,
+nic->g_struct_frame_reg[0].reg);
+   wilc_mgmt_frame_register(nic->wilc_netdev->ieee80211_ptr->wiphy,
+nic->wilc_netdev->ieee80211_ptr,
+nic->g_struct_frame_reg[1].frame_type,
+nic->g_struct_frame_reg[1].reg);
netif_wake_queue(ndev);
wl->open_ifcs++;
nic->mac_opened = 1;
@@ -1168,14 +1177,16 @@ static void wilc_set_multicast_list(struct net_device 
*dev)
if (!dev)
return;
 
-   PRINT_D(INIT_DBG, "Setting Multicast List with count = %d.\n", 
dev->mc.count);
+   PRINT_D(INIT_DBG, "Setting Multicast List with count = %d.\n",
+   dev->mc.count);
 
if (dev->flags & IFF_PROMISC) {
PRINT_D(INIT_DBG, "Set promiscuous mode ON, retrive all 
packets\n");
return;
}
 
-   if ((dev->flags & IFF_ALLMULTI) || (dev->mc.count) > 
WILC_MULTICAST_TABLE_SIZE) {
+   if ((dev->flags & IFF_ALLMULTI) ||
+   (dev->mc.count) > WILC_MULTICAST_TABLE_SIZE) {
PRINT_D(INIT_DBG, "Disable multicast filter, retrive all 
multicast packets\n");
host_int_setup_multicast_filter(hif_drv, false, 0);
return;
@@ -1256,7 +1267,8 @@ int mac_xmit(struct sk_buff *skb, struct net_device *ndev)
ih = (struct iphdr *)(skb->data + sizeof(struct ethhdr));
 
pu8UdpBuffer = (char *)ih + sizeof(struct iphdr);
-   if ((pu8UdpBuffer[1] == 68 && pu8UdpBuffer[3] == 67) || 
(pu8UdpBuffer[1] == 67 && pu8UdpBuffer[3] == 68))
+   if ((pu8UdpBuffer[1] == 68 && pu8UdpBuffer[3] == 67) 

[PATCH RESEND 11/38] staging: wilc1000: rename pstrWFIDrv of function dev_state_ev_handler

2015-11-04 Thread Glen Lee
From: Leo Kim 

This patch renames pstrWFIDrv of function dev_state_ev_handler to hif_drv
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/linux_wlan.c | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index a9052ed..88cf699 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -122,7 +122,7 @@ static int dev_state_ev_handler(struct notifier_block 
*this, unsigned long event
 {
struct in_ifaddr *dev_iface = (struct in_ifaddr *)ptr;
struct wilc_priv *priv;
-   struct host_if_drv *pstrWFIDrv;
+   struct host_if_drv *hif_drv;
struct net_device *dev;
u8 *pIP_Add_buff;
perInterface_wlan_t *nic;
@@ -149,9 +149,9 @@ static int dev_state_ev_handler(struct notifier_block 
*this, unsigned long event
PRINT_D(GENERIC_DBG, "No Wireless Priv\n");
return NOTIFY_DONE;
}
-   pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv;
+   hif_drv = (struct host_if_drv *)priv->hWILCWFIDrv;
nic = netdev_priv(dev);
-   if (!nic || !pstrWFIDrv) {
+   if (!nic || !hif_drv) {
PRINT_D(GENERIC_DBG, "No Wireless Priv\n");
return NOTIFY_DONE;
}
@@ -166,20 +166,20 @@ static int dev_state_ev_handler(struct notifier_block 
*this, unsigned long event
 
/*If we are in station mode or client mode*/
if (nic->iftype == STATION_MODE || nic->iftype == CLIENT_MODE) {
-   pstrWFIDrv->IFC_UP = 1;
+   hif_drv->IFC_UP = 1;
g_obtainingIP = false;
del_timer();
PRINT_D(GENERIC_DBG, "IP obtained , enable scan\n");
}
 
if (bEnablePS)
-   host_int_set_power_mgmt(pstrWFIDrv, 1, 0);
+   host_int_set_power_mgmt(hif_drv, 1, 0);
 
PRINT_D(GENERIC_DBG, "[%s] Up IP\n", dev_iface->ifa_label);
 
pIP_Add_buff = (char *) (&(dev_iface->ifa_address));
PRINT_D(GENERIC_DBG, "IP add=%d:%d:%d:%d\n", pIP_Add_buff[0], 
pIP_Add_buff[1], pIP_Add_buff[2], pIP_Add_buff[3]);
-   host_int_setup_ipaddress(pstrWFIDrv, pIP_Add_buff, 
nic->u8IfIdx);
+   host_int_setup_ipaddress(hif_drv, pIP_Add_buff, nic->u8IfIdx);
 
break;
 
@@ -188,21 +188,21 @@ static int dev_state_ev_handler(struct notifier_block 
*this, unsigned long event
 
PRINT_INFO(GENERIC_DBG, "\n == IP Address Released 
===\n\n");
if (nic->iftype == STATION_MODE || nic->iftype == CLIENT_MODE) {
-   pstrWFIDrv->IFC_UP = 0;
+   hif_drv->IFC_UP = 0;
g_obtainingIP = false;
}
 
if (memcmp(dev_iface->ifa_label, wlan_dev_name, 5) == 0)
-   host_int_set_power_mgmt(pstrWFIDrv, 0, 0);
+   host_int_set_power_mgmt(hif_drv, 0, 0);
 
-   resolve_disconnect_aberration(pstrWFIDrv);
+   resolve_disconnect_aberration(hif_drv);
 
PRINT_D(GENERIC_DBG, "[%s] Down IP\n", dev_iface->ifa_label);
 
pIP_Add_buff = null_ip;
PRINT_D(GENERIC_DBG, "IP add=%d:%d:%d:%d\n", pIP_Add_buff[0], 
pIP_Add_buff[1], pIP_Add_buff[2], pIP_Add_buff[3]);
 
-   host_int_setup_ipaddress(pstrWFIDrv, pIP_Add_buff, 
nic->u8IfIdx);
+   host_int_setup_ipaddress(hif_drv, pIP_Add_buff, nic->u8IfIdx);
 
break;
 
-- 
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 RESEND 01/38] staging: wilc1000: rename pu8IPAddr of fuction Handle_set_IPAddress

2015-11-04 Thread Dan Carpenter
Why are you resending these?

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: Configurable scan dwell time?

2015-11-04 Thread Michal Kazior
On 5 November 2015 at 00:58, Ben Greear  wrote:
> It looks to me like the channel dwell time when scanning (SW scanning,
> mac80211)
> is fixed at 1/9 of a second.  I'd like to make this configurable...is that
> something
> that might be welcome upstream?
>
> My plan is to add to the netlink API around starting a scan and allow
> user-space to
> configure a dwell time in milliseconds.

I've actually tried doing something like this some time ago:

 - http://thread.gmane.org/gmane.linux.kernel.wireless.general/111255
 - http://thread.gmane.org/gmane.linux.kernel.wireless.general/111251


Michał
--
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: Configurable scan dwell time?

2015-11-04 Thread Johannes Berg
On Thu, 2015-11-05 at 07:41 +0100, Michal Kazior wrote:
> On 5 November 2015 at 00:58, Ben Greear 
> wrote:
> > It looks to me like the channel dwell time when scanning (SW
> > scanning,
> > mac80211)
> > is fixed at 1/9 of a second.  I'd like to make this
> > configurable...is that
> > something
> > that might be welcome upstream?
> > 
> > My plan is to add to the netlink API around starting a scan and
> > allow
> > user-space to
> > configure a dwell time in milliseconds.
> 
> I've actually tried doing something like this some time ago:
> 
>  - http://thread.gmane.org/gmane.linux.kernel.wireless.general/111255
>  - http://thread.gmane.org/gmane.linux.kernel.wireless.general/111251
> 

And as I said back then, I'm rather opposed to this. We risk adding API
that either nobody uses, or that ends up getting used in ways that
weren't intended (say for certain measurements) and then will break
things when scanning is changed in firmware, etc.

Let the scanning be. It's intended to find networks, not really
something else. Piggy-backing survey onto it was mostly a mistake. For
other things, do some more reasonable measurement commands.

johannes
--
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] staging: wilc1000: fix kbuild test robot error

2015-11-04 Thread Glen Lee
This patch fixes build warning and error reported by kbuild test robot.
It is fixed by including netdevice.h.

>> drivers/staging/wilc1000/wilc_wlan_if.h:940:27: warning: 'struct net_device'
 declared inside parameter list
int wilc_wlan_init(struct net_device *dev, wilc_wlan_inp_t *inp);
>> drivers/staging/wilc1000/wilc_wlan_if.h:940:27: warning: its scope is only
 this definition or declaration, which is probably not what you want
>> drivers/staging/wilc1000/wilc_wlan.c:1954:5: error: conflicting types for
 'wilc_wlan_init'
int wilc_wlan_init(struct net_device *dev, wilc_wlan_inp_t *inp)

Fixes: 30135ce ("staging: wilc1000: wilc_wlan_init: add argument struct 
net_device")
Reported-by: kbuild test robot 
Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/wilc_wlan_if.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h 
b/drivers/staging/wilc1000/wilc_wlan_if.h
index f11003d..12cbc4b 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -12,6 +12,7 @@
 
 #include 
 #include "linux_wlan_common.h"
+#include 
 
 /
  *
-- 
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] wil6210: hold wil->mutex while managing vrings

2015-11-04 Thread Kalle Valo
Maya Erez  writes:

> From: Vladimir Kondratiev 
>
> To prevent race when connect flow may run in parallel with
> the disconnect event.
>
> Scenario leading to the bug is: while running connect flow on the AP,
> STA sends disconnect. log follows.
>
> <7>[  668.736269] wil6210 :01:00.0: wlan0: DBG[ WMI]Configure for 
> connection CID 1
> <7>[  668.736269] wil6210 :01:00.0: wlan0: DBG[MISC]wil_vring_init_tx() 
> max_mpdu_size 2048
> <7>[  668.736301] wil6210 :01:00.0: wlan0: DBG[MISC]wil_vring_alloc()
> <7>[  668.736363] wil6210 :01:00.0: wlan0: DBG[MISC]vring[1024] 
> 0xffbe8000:d962ce08 0xdb244000
> <7>[  668.736394] wil6210 :01:00.0: wlan0: DBG[ WMI]Head 0x00880300 -> 
> 0x00880308
> <7>[  668.736394] wil6210 :01:00.0: wlan0: DBG[ WMI]WMI command 0x0821 
> [28]
> <7>[  668.736426] DBG[ WMI]Cmd : 20 00 24 00 00 00 00 00 00 00 21 08 
> 00 00 00 00   .$...!.
> <7>[  668.736426] DBG[ WMI]cmd : 00 00 00 00 00 00 5f 5c 00 00 00 00 
> 00 04 00 08  .._\
> <7>[  668.736457] DBG[ WMI]cmd 0010: 01 01 00 00 00 00 00 00 00 00 ff 0f  
> 
> <7>[  668.736488] wil6210 :01:00.0: wlan0: DBG[ IRQ]Pseudo IRQ 0x0004
> <7>[  668.736519] wil6210 :01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1824 
> (reply_id 0x1821)
> <7>[  668.736519] wil6210 :01:00.0: wlan0: DBG[ 
> IRQ]wil6210_mask_irq_pseudo()
> <7>[  668.736519] wil6210 :01:00.0: wlan0: DBG[ IRQ]ISR MISC 0x2000
> <7>[  668.736551] wil6210 :01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1003 
> (reply_id 0x1821)
> <7>[  668.736551] wil6210 :01:00.0: wlan0: DBG[ WMI]Disconnect 
> 04:ce:14:00:07:70 reason [proto 3 wmi 4]
> <7>[  668.736582] wil6210 :01:00.0: wlan0: DBG[MISC]wil6210_disconnect()
> <7>[  668.736613] wil6210 :01:00.0: wlan0: DBG[ IRQ]Thread IRQ
> <7>[  668.736613] wil6210 :01:00.0: wlan0: DBG[ IRQ]Thread ISR MISC 
> 0x2000
> <7>[  668.736644] wil6210 :01:00.0: wlan0: DBG[ IRQ]MBOX event
> <7>[  668.736644] wil6210 :01:00.0: wlan0: DBG[ WMI]Mbox head 00880330 
> tail 00880328
> <7>[  668.736676] wil6210 :01:00.0: wlan0: DBG[ WMI]Mbox evt 001a 0010 
>  00
> <7>[  668.736676] wil6210 :01:00.0: wlan0: DBG[ WMI]WMI event 0x1821 MID 
> 0 @3255145 msec
> <7>[  668.736707] DBG[ WMI]evt : 1a 00 10 00 00 00 00 10 00 00 21 18 
> 69 ab 31 00  ..!.i.1.
> <7>[  668.736707] DBG[ WMI]evt 0010: 01 01 00 00 00 00 00 00  
> 
> <7>[  668.736738] wil6210 :01:00.0: wlan0: DBG[ WMI]queue_work -> 0
> <7>[  668.736738] wil6210 :01:00.0: wlan0: DBG[ WMI]wmi_recv_cmd -> 1 
> events queued
> <7>[  668.736769] wil6210 :01:00.0: wlan0: DBG[ 
> IRQ]wil6210_unmask_irq_pseudo()
> <7>[  668.736832] wil6210 :01:00.0: wlan0: DBG[MISC]Disconnect 
> 04:ce:14:00:07:70, CID=1, reason=3
> <7>[  668.736832] wil6210 :01:00.0: wlan0: 
> DBG[MISC]wil_disconnect_cid(CID 1, status 1)
> <7>[  668.736894] wil6210 :01:00.0: wlan0: DBG[MISC]wil_vring_fini_tx() 
> id=1
> <7>[  668.736894] wil6210 :01:00.0: wlan0: DBG[MISC]free Tx vring 1 
> [1024] 0xffbe8000:d962ce08 0xdb244000
> <7>[  668.736957] wil6210 :01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1821 
> (reply_id 0x1821)
> <7>[  668.736988] wil6210 :01:00.0: wlan0: DBG[ WMI]Complete WMI 0x1821
> <7>[  668.737019] wil6210 :01:00.0: wlan0: DBG[ 
> WMI]wmi_call(0x0821->0x1821) completed in 0 msec
> <3>[  668.737019] wil6210 :01:00.0: wlan0: Tx config failed, status 0x01
> <7>[  668.739518] wil6210 :01:00.0: wlan0: 
> DBG[MISC]wil_cfg80211_del_station(04:ce:14:00:07:70, reason=2)
> <7>[  668.739550] wil6210 :01:00.0: wlan0: DBG[MISC]wil6210_disconnect()
> <7>[  668.739550] wil6210 :01:00.0: wlan0: 
> DBG[MISC]_wil6210_disconnect(bssid=04:ce:14:00:07:70, reason=2, ev-)
> <7>[  668.739581] wil6210 :01:00.0: wlan0: DBG[MISC]Disconnect 
> 04:ce:14:00:07:70, CID=-2, reason=2
> <7>[  668.742705] wil6210 :01:00.0: wlan0: DBG[MISC]free Tx vring 1 
> [1024] 0x  (null):d962ce08 0x  (null)
> <3>[  668.742736] __dma_free_remap: trying to free invalid coherent area:   
> (null)
>
> Signed-off-by: Vladimir Kondratiev 
> Signed-off-by: Maya Erez 

[...]

> --- a/drivers/net/wireless/ath/wil6210/txrx.c
> +++ b/drivers/net/wireless/ath/wil6210/txrx.c
> @@ -160,6 +160,7 @@ static void wil_vring_free(struct wil6210_priv *wil, 
> struct vring *vring,
>   struct device *dev = wil_to_dev(wil);
>   size_t sz = vring->size * sizeof(vring->va[0]);
>  
> + WARN_ON(!mutex_is_locked(>mutex));
>   if (tx) {
>   int vring_index = vring - wil->vring_tx;
>  
> @@ -749,6 +750,7 @@ int wil_vring_init_tx(struct wil6210_priv *wil, int id, 
> int size,
>  
>   wil_dbg_misc(wil, "%s() max_mpdu_size %d\n", __func__,
>cmd.vring_cfg.tx_sw_ring.max_mpdu_size);
> + 

[PATCH 4/4] ath10k: add QCA9377 hw1.0 support

2015-11-04 Thread Bartosz Markowski
Add new BMI target version and chip id revision. Register it
on supported chips list.

Signed-off-by: Bartosz Markowski 
---
 drivers/net/wireless/ath/ath10k/core.c | 18 ++
 drivers/net/wireless/ath/ath10k/hw.h   |  3 +++
 drivers/net/wireless/ath/ath10k/pci.c  |  2 ++
 3 files changed, 23 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/core.c 
b/drivers/net/wireless/ath/ath10k/core.c
index b80b8f372354..f41329617ae4 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -160,6 +160,24 @@ static const struct ath10k_hw_params 
ath10k_hw_params_list[] = {
.board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ,
},
},
+{
+.id = QCA9377_HW_1_0_DEV_VERSION,
+.dev_id = QCA9377_1_0_DEVICE_ID,
+.name = "qca9377 hw1.0",
+.patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR,
+.uart_pin = 6,
+.otp_exe_param = 0,
+.channel_counters_freq_hz = 88000,
+.max_probe_resp_desc_thres = 0,
+.fw = {
+.dir = QCA9377_HW_1_0_FW_DIR,
+.fw = QCA9377_HW_1_0_FW_FILE,
+.otp = QCA9377_HW_1_0_OTP_FILE,
+.board = QCA9377_HW_1_0_BOARD_DATA_FILE,
+.board_size = QCA9377_BOARD_DATA_SZ,
+.board_ext_size = QCA9377_BOARD_EXT_DATA_SZ,
+},
+},
{
.id = QCA9377_HW_1_1_DEV_VERSION,
.dev_id = QCA9377_1_0_DEVICE_ID,
diff --git a/drivers/net/wireless/ath/ath10k/hw.h 
b/drivers/net/wireless/ath/ath10k/hw.h
index 13aacbdc98e6..713c2bcea178 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -48,6 +48,8 @@
 #define QCA6174_HW_3_0_VERSION 0x0502
 #define QCA6174_HW_3_2_VERSION 0x0503
 
+/* QCA9377 target BMI version signatures */
+#define QCA9377_HW_1_0_DEV_VERSION 0x0502
 #define QCA9377_HW_1_1_DEV_VERSION 0x05020001
 
 enum qca6174_pci_rev {
@@ -69,6 +71,7 @@ enum qca6174_chip_id_rev {
 };
 
 enum qca9377_chip_id_rev {
+   QCA9377_HW_1_0_CHIP_ID_REV = 0x0,
QCA9377_HW_1_1_CHIP_ID_REV = 0x1,
 };
 
diff --git a/drivers/net/wireless/ath/ath10k/pci.c 
b/drivers/net/wireless/ath/ath10k/pci.c
index 14dce2a1b39f..679a3ebb34af 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -86,6 +86,8 @@ static const struct ath10k_pci_supp_chip 
ath10k_pci_supp_chips[] = {
{ QCA6174_2_1_DEVICE_ID, QCA6174_HW_3_2_CHIP_ID_REV },
 
{ QCA99X0_2_0_DEVICE_ID, QCA99X0_HW_2_0_CHIP_ID_REV },
+
+   { QCA9377_1_0_DEVICE_ID, QCA9377_HW_1_0_CHIP_ID_REV },
{ QCA9377_1_0_DEVICE_ID, QCA9377_HW_1_1_CHIP_ID_REV },
 };
 
-- 
2.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


[PATCH 2/4] ath10k: update missing hw_params of QCA9377 hw1.1

2015-11-04 Thread Bartosz Markowski
The uart_pin was incorrectly configured for QCA9377
and the recently added hw_params were omitted.

Signed-off-by: Bartosz Markowski 
---
 drivers/net/wireless/ath/ath10k/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c 
b/drivers/net/wireless/ath/ath10k/core.c
index c8f6ca284b9d..a30d41559134 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -141,8 +141,10 @@ static const struct ath10k_hw_params 
ath10k_hw_params_list[] = {
.id = QCA9377_HW_1_1_DEV_VERSION,
.name = "qca9377 hw1.1",
.patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR,
-   .uart_pin = 7,
+   .uart_pin = 6,
.otp_exe_param = 0,
+   .channel_counters_freq_hz = 88000,
+   .max_probe_resp_desc_thres = 0,
.fw = {
.dir = QCA9377_HW_1_0_FW_DIR,
.fw = QCA9377_HW_1_0_FW_FILE,
-- 
2.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


[PATCH 3/4] ath10k: introduce dev_id to hw_params

2015-11-04 Thread Bartosz Markowski
A follow up patch introducing a QCA9377 hw1.0 support will need
this device identification helper for an explicit distinction of
HWs, as apparently both QCA6174 hw3.0 and QCA9377 share the same BMI
target version (0x0502000x). For the QCA9377 hw1.1 previously
added we were just lucky we did not overlap with the same chip_id_rev.

Signed-off-by: Bartosz Markowski 
---
 drivers/net/wireless/ath/ath10k/core.c | 27 ++-
 drivers/net/wireless/ath/ath10k/core.h |  1 +
 drivers/net/wireless/ath/ath10k/hw.h   |  6 ++
 drivers/net/wireless/ath/ath10k/pci.c  |  6 --
 4 files changed, 33 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c 
b/drivers/net/wireless/ath/ath10k/core.c
index a30d41559134..b80b8f372354 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -51,6 +51,7 @@ MODULE_PARM_DESC(rawmode, "Use raw 802.11 frame datapath");
 static const struct ath10k_hw_params ath10k_hw_params_list[] = {
{
.id = QCA988X_HW_2_0_VERSION,
+   .dev_id = QCA988X_2_0_DEVICE_ID,
.name = "qca988x hw2.0",
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
@@ -69,6 +70,25 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] 
= {
},
{
.id = QCA6174_HW_2_1_VERSION,
+   .dev_id = QCA6164_2_1_DEVICE_ID,
+   .name = "qca6164 hw2.1",
+   .patch_load_addr = QCA6174_HW_2_1_PATCH_LOAD_ADDR,
+   .uart_pin = 6,
+   .otp_exe_param = 0,
+   .channel_counters_freq_hz = 88000,
+   .max_probe_resp_desc_thres = 0,
+   .fw = {
+   .dir = QCA6174_HW_2_1_FW_DIR,
+   .fw = QCA6174_HW_2_1_FW_FILE,
+   .otp = QCA6174_HW_2_1_OTP_FILE,
+   .board = QCA6174_HW_2_1_BOARD_DATA_FILE,
+   .board_size = QCA6174_BOARD_DATA_SZ,
+   .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ,
+   },
+   },
+   {
+   .id = QCA6174_HW_2_1_VERSION,
+   .dev_id = QCA6174_2_1_DEVICE_ID,
.name = "qca6174 hw2.1",
.patch_load_addr = QCA6174_HW_2_1_PATCH_LOAD_ADDR,
.uart_pin = 6,
@@ -86,6 +106,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] 
= {
},
{
.id = QCA6174_HW_3_0_VERSION,
+   .dev_id = QCA6174_2_1_DEVICE_ID,
.name = "qca6174 hw3.0",
.patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR,
.uart_pin = 6,
@@ -103,6 +124,7 @@ static const struct ath10k_hw_params 
ath10k_hw_params_list[] = {
},
{
.id = QCA6174_HW_3_2_VERSION,
+   .dev_id = QCA6174_2_1_DEVICE_ID,
.name = "qca6174 hw3.2",
.patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR,
.uart_pin = 6,
@@ -121,6 +143,7 @@ static const struct ath10k_hw_params 
ath10k_hw_params_list[] = {
},
{
.id = QCA99X0_HW_2_0_DEV_VERSION,
+   .dev_id = QCA99X0_2_0_DEVICE_ID,
.name = "qca99x0 hw2.0",
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
@@ -139,6 +162,7 @@ static const struct ath10k_hw_params 
ath10k_hw_params_list[] = {
},
{
.id = QCA9377_HW_1_1_DEV_VERSION,
+   .dev_id = QCA9377_1_0_DEVICE_ID,
.name = "qca9377 hw1.1",
.patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR,
.uart_pin = 6,
@@ -1265,7 +1289,8 @@ static int ath10k_init_hw_params(struct ath10k *ar)
for (i = 0; i < ARRAY_SIZE(ath10k_hw_params_list); i++) {
hw_params = _hw_params_list[i];
 
-   if (hw_params->id == ar->target_version)
+   if (hw_params->id == ar->target_version &&
+   hw_params->dev_id == ar->dev_id)
break;
}
 
diff --git a/drivers/net/wireless/ath/ath10k/core.h 
b/drivers/net/wireless/ath/ath10k/core.h
index 4a2301589902..622d3816eaf4 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -636,6 +636,7 @@ struct ath10k {
 
struct ath10k_hw_params {
u32 id;
+   u16 dev_id;
const char *name;
u32 patch_load_addr;
int uart_pin;
diff --git a/drivers/net/wireless/ath/ath10k/hw.h 
b/drivers/net/wireless/ath/ath10k/hw.h
index 01bf2244f54c..13aacbdc98e6 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -22,6 +22,12 @@
 
 #define ATH10K_FW_DIR  "ath10k"
 
+#define QCA988X_2_0_DEVICE_ID   (0x003c)
+#define 

[patch] NFC: nci: memory leak in nci_core_conn_create()

2015-11-04 Thread Dan Carpenter
I've moved the check for "number_destination_params" forward a few lines
to avoid leaking "cmd".

Fixes: caa575a86ec1 ('NFC: nci: fix possible crash in nci_core_conn_create')
Signed-off-by: Dan Carpenter 

diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 10c99a5..fbb7a2b 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -610,14 +610,14 @@ int nci_core_conn_create(struct nci_dev *ndev, u8 
destination_type,
struct nci_core_conn_create_cmd *cmd;
struct core_conn_create_data data;
 
+   if (!number_destination_params)
+   return -EINVAL;
+
data.length = params_len + sizeof(struct nci_core_conn_create_cmd);
cmd = kzalloc(data.length, GFP_KERNEL);
if (!cmd)
return -ENOMEM;
 
-   if (!number_destination_params)
-   return -EINVAL;
-
cmd->destination_type = destination_type;
cmd->number_destination_params = number_destination_params;
memcpy(cmd->params, params, params_len);
--
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 1/4] ath10k: fix the currently supported QCA9377 target version name

2015-11-04 Thread Bartosz Markowski
When introducing the original QCA9377 support, the chip target
version was wrongly picked. The chip advertising itself with
bmi target value equal to 0x05020001 is in fact a 1.1 revision.
I realized this once I got a real 1.1 hw to play with.

Signed-off-by: Bartosz Markowski 
---
 drivers/net/wireless/ath/ath10k/core.c | 4 ++--
 drivers/net/wireless/ath/ath10k/hw.h   | 8 ++--
 drivers/net/wireless/ath/ath10k/pci.c  | 2 +-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c 
b/drivers/net/wireless/ath/ath10k/core.c
index aa9bd92ac4ed..c8f6ca284b9d 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -138,8 +138,8 @@ static const struct ath10k_hw_params 
ath10k_hw_params_list[] = {
},
},
{
-   .id = QCA9377_HW_1_0_DEV_VERSION,
-   .name = "qca9377 hw1.0",
+   .id = QCA9377_HW_1_1_DEV_VERSION,
+   .name = "qca9377 hw1.1",
.patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
.otp_exe_param = 0,
diff --git a/drivers/net/wireless/ath/ath10k/hw.h 
b/drivers/net/wireless/ath/ath10k/hw.h
index 39966a05c1cc..01bf2244f54c 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -42,6 +42,8 @@
 #define QCA6174_HW_3_0_VERSION 0x0502
 #define QCA6174_HW_3_2_VERSION 0x0503
 
+#define QCA9377_HW_1_1_DEV_VERSION 0x05020001
+
 enum qca6174_pci_rev {
QCA6174_PCI_REV_1_1 = 0x11,
QCA6174_PCI_REV_1_3 = 0x13,
@@ -60,6 +62,10 @@ enum qca6174_chip_id_rev {
QCA6174_HW_3_2_CHIP_ID_REV = 10,
 };
 
+enum qca9377_chip_id_rev {
+   QCA9377_HW_1_1_CHIP_ID_REV = 0x1,
+};
+
 #define QCA6174_HW_2_1_FW_DIR  "ath10k/QCA6174/hw2.1"
 #define QCA6174_HW_2_1_FW_FILE "firmware.bin"
 #define QCA6174_HW_2_1_OTP_FILE"otp.bin"
@@ -85,8 +91,6 @@ enum qca6174_chip_id_rev {
 #define QCA99X0_HW_2_0_PATCH_LOAD_ADDR 0x1234
 
 /* QCA9377 1.0 definitions */
-#define QCA9377_HW_1_0_DEV_VERSION 0x05020001
-#define QCA9377_HW_1_0_CHIP_ID_REV 0x1
 #define QCA9377_HW_1_0_FW_DIR  ATH10K_FW_DIR "/QCA9377/hw1.0"
 #define QCA9377_HW_1_0_FW_FILE "firmware.bin"
 #define QCA9377_HW_1_0_OTP_FILE"otp.bin"
diff --git a/drivers/net/wireless/ath/ath10k/pci.c 
b/drivers/net/wireless/ath/ath10k/pci.c
index 3fca200b986c..c444b43f183d 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -92,7 +92,7 @@ static const struct ath10k_pci_supp_chip 
ath10k_pci_supp_chips[] = {
{ QCA6174_2_1_DEVICE_ID, QCA6174_HW_3_2_CHIP_ID_REV },
 
{ QCA99X0_2_0_DEVICE_ID, QCA99X0_HW_2_0_CHIP_ID_REV },
-   { QCA9377_1_0_DEVICE_ID, QCA9377_HW_1_0_CHIP_ID_REV },
+   { QCA9377_1_0_DEVICE_ID, QCA9377_HW_1_1_CHIP_ID_REV },
 };
 
 static void ath10k_pci_buffer_cleanup(struct ath10k *ar);
-- 
2.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


[PATCH 0/4] update ath10k support for QCA9377 chips

2015-11-04 Thread Bartosz Markowski
* Clarifying the naming scheme for QCA9377 targets
* Adding the dev_id mathod (RFC) as a HW identification helper
* updating missing hw_params for 1.1 target

Bartosz Markowski (4):
  ath10k: fix the currently supported QCA9377 target version name
  ath10k: update missing hw_params of QCA9377 hw1.1
  ath10k: introduce dev_id to hw_params
  ath10k: add QCA9377 hw1.0 support

 drivers/net/wireless/ath/ath10k/core.c | 53 +++---
 drivers/net/wireless/ath/ath10k/core.h |  1 +
 drivers/net/wireless/ath/ath10k/hw.h   | 17 +--
 drivers/net/wireless/ath/ath10k/pci.c  |  8 ++---
 4 files changed, 67 insertions(+), 12 deletions(-)

-- 
2.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


[PATCH] mac80211: don't advertise NL80211_FEATURE_FULL_AP_CLIENT_STATE

2015-11-04 Thread Johannes Berg
From: Johannes Berg 

For now, this feature doesn't actually work. To avoid shipping a
kernel that has it enabled but where it can't be used disable it
for now - we can re-enable it when it's fixed.

This partially reverts 44674d9c2267 ("mac80211: advertise support
for full station state in AP mode").

Cc: Ayala Beker 
Signed-off-by: Johannes Berg 
---
 net/mac80211/main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 858f6b1cb149..175ffcf7fb06 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -541,8 +541,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t 
priv_data_len,
   NL80211_FEATURE_HT_IBSS |
   NL80211_FEATURE_VIF_TXPOWER |
   NL80211_FEATURE_MAC_ON_CREATE |
-  NL80211_FEATURE_USERSPACE_MPM |
-  NL80211_FEATURE_FULL_AP_CLIENT_STATE;
+  NL80211_FEATURE_USERSPACE_MPM;
 
if (!ops->hw_scan)
wiphy->features |= NL80211_FEATURE_LOW_PRIORITY_SCAN |
-- 
2.6.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


[PATCH V2 0/3] Fix few WMI/HTT interfaces

2015-11-04 Thread Vasanthakumar Thiagarajan
This patch set fixes mismatch in peer_assoc complete wmi command for
version 10.4 and peer_id configuration for HTT version < 3.4.

V2:
- Add cover letter
- Rename ath10k_mac_need_offchan_tx_work() to
  ath10k_mac_tx_frm_has_freq(). Add htt-op-version check
  to the helper and use it in ath10k_htt_tx() while configuring
  peerid.

Vasanthakumar Thiagarajan (3):
  ath10k: Fix peer assoc complete WMI command for 10.4
  ath10k: Rename the helper which is used for off-channel tx
  ath10k: Fix peerid configuration in htt tx desc for htt version < 3.4

 drivers/net/wireless/ath/ath10k/htt.h|  9 ++--
 drivers/net/wireless/ath/ath10k/htt_tx.c | 11 --
 drivers/net/wireless/ath/ath10k/mac.c|  9 
 drivers/net/wireless/ath/ath10k/mac.h|  1 +
 drivers/net/wireless/ath/ath10k/wmi.c| 37 +++-
 drivers/net/wireless/ath/ath10k/wmi.h|  5 +
 6 files changed, 63 insertions(+), 9 deletions(-)

-- 
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


[PATCH] wil6210: hold wil->mutex while managing vrings

2015-11-04 Thread Maya Erez
From: Vladimir Kondratiev 

To prevent race when connect flow may run in parallel with
the disconnect event.

Scenario leading to the bug is: while running connect flow on the AP,
STA sends disconnect. log follows.

<7>[  668.736269] wil6210 :01:00.0: wlan0: DBG[ WMI]Configure for 
connection CID 1
<7>[  668.736269] wil6210 :01:00.0: wlan0: DBG[MISC]wil_vring_init_tx() 
max_mpdu_size 2048
<7>[  668.736301] wil6210 :01:00.0: wlan0: DBG[MISC]wil_vring_alloc()
<7>[  668.736363] wil6210 :01:00.0: wlan0: DBG[MISC]vring[1024] 
0xffbe8000:d962ce08 0xdb244000
<7>[  668.736394] wil6210 :01:00.0: wlan0: DBG[ WMI]Head 0x00880300 -> 
0x00880308
<7>[  668.736394] wil6210 :01:00.0: wlan0: DBG[ WMI]WMI command 0x0821 [28]
<7>[  668.736426] DBG[ WMI]Cmd : 20 00 24 00 00 00 00 00 00 00 21 08 00 
00 00 00   .$...!.
<7>[  668.736426] DBG[ WMI]cmd : 00 00 00 00 00 00 5f 5c 00 00 00 00 00 
04 00 08  .._\
<7>[  668.736457] DBG[ WMI]cmd 0010: 01 01 00 00 00 00 00 00 00 00 ff 0f
  
<7>[  668.736488] wil6210 :01:00.0: wlan0: DBG[ IRQ]Pseudo IRQ 0x0004
<7>[  668.736519] wil6210 :01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1824 
(reply_id 0x1821)
<7>[  668.736519] wil6210 :01:00.0: wlan0: DBG[ 
IRQ]wil6210_mask_irq_pseudo()
<7>[  668.736519] wil6210 :01:00.0: wlan0: DBG[ IRQ]ISR MISC 0x2000
<7>[  668.736551] wil6210 :01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1003 
(reply_id 0x1821)
<7>[  668.736551] wil6210 :01:00.0: wlan0: DBG[ WMI]Disconnect 
04:ce:14:00:07:70 reason [proto 3 wmi 4]
<7>[  668.736582] wil6210 :01:00.0: wlan0: DBG[MISC]wil6210_disconnect()
<7>[  668.736613] wil6210 :01:00.0: wlan0: DBG[ IRQ]Thread IRQ
<7>[  668.736613] wil6210 :01:00.0: wlan0: DBG[ IRQ]Thread ISR MISC 
0x2000
<7>[  668.736644] wil6210 :01:00.0: wlan0: DBG[ IRQ]MBOX event
<7>[  668.736644] wil6210 :01:00.0: wlan0: DBG[ WMI]Mbox head 00880330 tail 
00880328
<7>[  668.736676] wil6210 :01:00.0: wlan0: DBG[ WMI]Mbox evt 001a 0010  
00
<7>[  668.736676] wil6210 :01:00.0: wlan0: DBG[ WMI]WMI event 0x1821 MID 0 
@3255145 msec
<7>[  668.736707] DBG[ WMI]evt : 1a 00 10 00 00 00 00 10 00 00 21 18 69 
ab 31 00  ..!.i.1.
<7>[  668.736707] DBG[ WMI]evt 0010: 01 01 00 00 00 00 00 00
  
<7>[  668.736738] wil6210 :01:00.0: wlan0: DBG[ WMI]queue_work -> 0
<7>[  668.736738] wil6210 :01:00.0: wlan0: DBG[ WMI]wmi_recv_cmd -> 1 
events queued
<7>[  668.736769] wil6210 :01:00.0: wlan0: DBG[ 
IRQ]wil6210_unmask_irq_pseudo()
<7>[  668.736832] wil6210 :01:00.0: wlan0: DBG[MISC]Disconnect 
04:ce:14:00:07:70, CID=1, reason=3
<7>[  668.736832] wil6210 :01:00.0: wlan0: DBG[MISC]wil_disconnect_cid(CID 
1, status 1)
<7>[  668.736894] wil6210 :01:00.0: wlan0: DBG[MISC]wil_vring_fini_tx() id=1
<7>[  668.736894] wil6210 :01:00.0: wlan0: DBG[MISC]free Tx vring 1 [1024] 
0xffbe8000:d962ce08 0xdb244000
<7>[  668.736957] wil6210 :01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1821 
(reply_id 0x1821)
<7>[  668.736988] wil6210 :01:00.0: wlan0: DBG[ WMI]Complete WMI 0x1821
<7>[  668.737019] wil6210 :01:00.0: wlan0: DBG[ 
WMI]wmi_call(0x0821->0x1821) completed in 0 msec
<3>[  668.737019] wil6210 :01:00.0: wlan0: Tx config failed, status 0x01
<7>[  668.739518] wil6210 :01:00.0: wlan0: 
DBG[MISC]wil_cfg80211_del_station(04:ce:14:00:07:70, reason=2)
<7>[  668.739550] wil6210 :01:00.0: wlan0: DBG[MISC]wil6210_disconnect()
<7>[  668.739550] wil6210 :01:00.0: wlan0: 
DBG[MISC]_wil6210_disconnect(bssid=04:ce:14:00:07:70, reason=2, ev-)
<7>[  668.739581] wil6210 :01:00.0: wlan0: DBG[MISC]Disconnect 
04:ce:14:00:07:70, CID=-2, reason=2
<7>[  668.742705] wil6210 :01:00.0: wlan0: DBG[MISC]free Tx vring 1 [1024] 
0x  (null):d962ce08 0x  (null)
<3>[  668.742736] __dma_free_remap: trying to free invalid coherent area:   
(null)

Signed-off-by: Vladimir Kondratiev 
Signed-off-by: Maya Erez 
---
 drivers/net/wireless/ath/wil6210/main.c | 18 +-
 drivers/net/wireless/ath/wil6210/txrx.c |  3 +++
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/wil6210/main.c 
b/drivers/net/wireless/ath/wil6210/main.c
index bb69a59..48687f1 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -401,20 +401,26 @@ void wil_bcast_fini(struct wil6210_priv *wil)
 
 static void wil_connect_worker(struct work_struct *work)
 {
-   int rc;
+   int rc, cid, ringid;
struct wil6210_priv *wil = container_of(work, struct wil6210_priv,
connect_worker);
struct net_device *ndev = wil_to_ndev(wil);
 
-   int cid = wil->pending_connect_cid;
-   int ringid = wil_find_free_vring(wil);
+   mutex_lock(>mutex);
 
+   cid = 

[PATCH V2 2/3] ath10k: Rename the helper which is used for off-channel tx

2015-11-04 Thread Vasanthakumar Thiagarajan
Rename ath10k_mac_need_offchan_tx_work() to ath10k_mac_tx_frm_has_freq()
to make it more meaningful. This helper will be used in the future
change. No functionality change.

Signed-off-by: Vasanthakumar Thiagarajan 
---
 drivers/net/wireless/ath/ath10k/mac.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c 
b/drivers/net/wireless/ath/ath10k/mac.c
index a7411fe..f121021 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3280,7 +3280,7 @@ static void ath10k_tx_h_add_p2p_noa_ie(struct ath10k *ar,
}
 }
 
-static bool ath10k_mac_need_offchan_tx_work(struct ath10k *ar)
+static bool ath10k_mac_tx_frm_has_freq(struct ath10k *ar)
 {
/* FIXME: Not really sure since when the behaviour changed. At some
 * point new firmware stopped requiring creation of peer entries for
@@ -3288,8 +3288,8 @@ static bool ath10k_mac_need_offchan_tx_work(struct ath10k 
*ar)
 * tx credit replenishment and reliability). Assuming it's at least 3.4
 * because that's when the `freq` was introduced to TX_FRM HTT command.
 */
-   return !(ar->htt.target_version_major >= 3 &&
-ar->htt.target_version_minor >= 4);
+   return (ar->htt.target_version_major >= 3 &&
+   ar->htt.target_version_minor >= 4);
 }
 
 static int ath10k_mac_tx_wmi_mgmt(struct ath10k *ar, struct sk_buff *skb)
@@ -3673,7 +3673,7 @@ static void ath10k_tx(struct ieee80211_hw *hw,
ATH10K_SKB_CB(skb)->vdev_id = ar->scan.vdev_id;
spin_unlock_bh(>data_lock);
 
-   if (ath10k_mac_need_offchan_tx_work(ar)) {
+   if (!ath10k_mac_tx_frm_has_freq(ar)) {
ATH10K_SKB_CB(skb)->htt.freq = 0;
ATH10K_SKB_CB(skb)->htt.is_offchan = true;
 
-- 
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


[PATCH V2 3/3] ath10k: Fix peerid configuration in htt tx desc for htt version < 3.4

2015-11-04 Thread Vasanthakumar Thiagarajan
Of a word in struct htt_data_tx_desc htt version >= 3.4 firmware uses
LSB 16-bit for frequency configuration which is used for offchannel tx
and MSB 16-bit is for peerid. But other firmwares using version 2.X
(10.1, 10.2.2, 10.2.4 and 10.4) are using 32-bit for peerid in htt tx
desc. So far no issue is found with the existing code setting peerid and
freq for HTT version 2.X, this could be mainly because of 0 as frequecy
(home channel) is being always passed with those firmwares. There may be
issues when non-zero freq is passed with firmware using < 3.4 htt version.
To be safe use target_version_major and target_version_minor along with
htt-op-version before configuring peer id and freq in htt tx desc. This
patch extends ath10k_mac_tx_frm_has_freq() to check for htt_op_version_tlv
and uses the helper while setting peerid in htt_tx_desc.

Fixes: 8d6d36243610 ("ath10k: fix offchan reliability")
Signed-off-by: Vasanthakumar Thiagarajan 
---
 drivers/net/wireless/ath/ath10k/htt.h|  9 +++--
 drivers/net/wireless/ath/ath10k/htt_tx.c | 11 +--
 drivers/net/wireless/ath/ath10k/mac.c|  5 +++--
 drivers/net/wireless/ath/ath10k/mac.h|  1 +
 4 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt.h 
b/drivers/net/wireless/ath/ath10k/htt.h
index 2bad50e..44fb4f2 100644
--- a/drivers/net/wireless/ath/ath10k/htt.h
+++ b/drivers/net/wireless/ath/ath10k/htt.h
@@ -166,8 +166,13 @@ struct htt_data_tx_desc {
__le16 len;
__le16 id;
__le32 frags_paddr;
-   __le16 peerid;
-   __le16 freq;
+   union {
+   __le32 peerid;
+   struct {
+   __le16 peerid;
+   __le16 freq;
+   } __packed offchan_tx;
+   } __packed;
u8 prefetch[0]; /* start of frame, for FW classification engine */
 } __packed;
 
diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c 
b/drivers/net/wireless/ath/ath10k/htt_tx.c
index 1682397..2dcea48 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -681,8 +681,15 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff 
*msdu)
skb_cb->htt.txbuf->cmd_tx.len = __cpu_to_le16(msdu->len);
skb_cb->htt.txbuf->cmd_tx.id = __cpu_to_le16(msdu_id);
skb_cb->htt.txbuf->cmd_tx.frags_paddr = __cpu_to_le32(frags_paddr);
-   skb_cb->htt.txbuf->cmd_tx.peerid = __cpu_to_le16(HTT_INVALID_PEERID);
-   skb_cb->htt.txbuf->cmd_tx.freq = __cpu_to_le16(skb_cb->htt.freq);
+   if (ath10k_mac_tx_frm_has_freq(ar)) {
+   skb_cb->htt.txbuf->cmd_tx.offchan_tx.peerid =
+   __cpu_to_le16(HTT_INVALID_PEERID);
+   skb_cb->htt.txbuf->cmd_tx.offchan_tx.freq =
+   __cpu_to_le16(skb_cb->htt.freq);
+   } else {
+   skb_cb->htt.txbuf->cmd_tx.peerid =
+   __cpu_to_le32(HTT_INVALID_PEERID);
+   }
 
trace_ath10k_htt_tx(ar, msdu_id, msdu->len, vdev_id, tid);
ath10k_dbg(ar, ATH10K_DBG_HTT,
diff --git a/drivers/net/wireless/ath/ath10k/mac.c 
b/drivers/net/wireless/ath/ath10k/mac.c
index f121021..7fe51bf 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3280,7 +3280,7 @@ static void ath10k_tx_h_add_p2p_noa_ie(struct ath10k *ar,
}
 }
 
-static bool ath10k_mac_tx_frm_has_freq(struct ath10k *ar)
+bool ath10k_mac_tx_frm_has_freq(struct ath10k *ar)
 {
/* FIXME: Not really sure since when the behaviour changed. At some
 * point new firmware stopped requiring creation of peer entries for
@@ -3289,7 +3289,8 @@ static bool ath10k_mac_tx_frm_has_freq(struct ath10k *ar)
 * because that's when the `freq` was introduced to TX_FRM HTT command.
 */
return (ar->htt.target_version_major >= 3 &&
-   ar->htt.target_version_minor >= 4);
+   ar->htt.target_version_minor >= 4 &&
+   ar->htt.op_version == ATH10K_FW_HTT_OP_VERSION_TLV);
 }
 
 static int ath10k_mac_tx_wmi_mgmt(struct ath10k *ar, struct sk_buff *skb)
diff --git a/drivers/net/wireless/ath/ath10k/mac.h 
b/drivers/net/wireless/ath/ath10k/mac.h
index e3cefe4..f504804 100644
--- a/drivers/net/wireless/ath/ath10k/mac.h
+++ b/drivers/net/wireless/ath/ath10k/mac.h
@@ -74,6 +74,7 @@ void ath10k_mac_tx_lock(struct ath10k *ar, int reason);
 void ath10k_mac_tx_unlock(struct ath10k *ar, int reason);
 void ath10k_mac_vif_tx_lock(struct ath10k_vif *arvif, int reason);
 void ath10k_mac_vif_tx_unlock(struct ath10k_vif *arvif, int reason);
+bool ath10k_mac_tx_frm_has_freq(struct ath10k *ar);
 
 static inline struct ath10k_vif *ath10k_vif_to_arvif(struct ieee80211_vif *vif)
 {
-- 
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  

[PATCH V2 1/3] ath10k: Fix peer assoc complete WMI command for 10.4

2015-11-04 Thread Vasanthakumar Thiagarajan
There is an extra 4-byte member when compared to WMI 10.2 added to
assoc complete command in WMI 10.4. This new member is used for 160Mhz
related configuration. This WMI command mismatch between host and
firmware does not cause any real issues because this new member is not
used in 10.4 firmwares so far (10.4.1.00030-1). This difference in WMI
command interface brings in a new wmi_ops for 10.4 gen_peer_assoc().
No noticeable functionality differences with this change can be seen
with the current 10.4 firmwares, but the WMI interface has to be
fixed to work with future 10.4 firmwares which may be using this new
member.

Signed-off-by: Vasanthakumar Thiagarajan 
---
 drivers/net/wireless/ath/ath10k/wmi.c | 37 ++-
 drivers/net/wireless/ath/ath10k/wmi.h |  5 +
 2 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c 
b/drivers/net/wireless/ath/ath10k/wmi.c
index 7569db0..e8614ab 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -6328,6 +6328,16 @@ ath10k_wmi_peer_assoc_fill_10_2(struct ath10k *ar, void 
*buf,
cmd->info0 = __cpu_to_le32(info0);
 }
 
+static void
+ath10k_wmi_peer_assoc_fill_10_4(struct ath10k *ar, void *buf,
+   const struct wmi_peer_assoc_complete_arg *arg)
+{
+   struct wmi_10_4_peer_assoc_complete_cmd *cmd = buf;
+
+   ath10k_wmi_peer_assoc_fill_10_2(ar, buf, arg);
+   cmd->peer_bw_rxnss_override = 0;
+}
+
 static int
 ath10k_wmi_peer_assoc_check_arg(const struct wmi_peer_assoc_complete_arg *arg)
 {
@@ -6417,6 +6427,31 @@ ath10k_wmi_10_2_op_gen_peer_assoc(struct ath10k *ar,
 }
 
 static struct sk_buff *
+ath10k_wmi_10_4_op_gen_peer_assoc(struct ath10k *ar,
+ const struct wmi_peer_assoc_complete_arg *arg)
+{
+   size_t len = sizeof(struct wmi_10_4_peer_assoc_complete_cmd);
+   struct sk_buff *skb;
+   int ret;
+
+   ret = ath10k_wmi_peer_assoc_check_arg(arg);
+   if (ret)
+   return ERR_PTR(ret);
+
+   skb = ath10k_wmi_alloc_skb(ar, len);
+   if (!skb)
+   return ERR_PTR(-ENOMEM);
+
+   ath10k_wmi_peer_assoc_fill_10_4(ar, skb->data, arg);
+
+   ath10k_dbg(ar, ATH10K_DBG_WMI,
+  "wmi peer assoc vdev %d addr %pM (%s)\n",
+  arg->vdev_id, arg->addr,
+  arg->peer_reassoc ? "reassociate" : "new");
+   return skb;
+}
+
+static struct sk_buff *
 ath10k_wmi_10_2_op_gen_pdev_get_temperature(struct ath10k *ar)
 {
struct sk_buff *skb;
@@ -7536,6 +7571,7 @@ static const struct wmi_ops wmi_10_4_ops = {
.gen_peer_delete = ath10k_wmi_op_gen_peer_delete,
.gen_peer_flush = ath10k_wmi_op_gen_peer_flush,
.gen_peer_set_param = ath10k_wmi_op_gen_peer_set_param,
+   .gen_peer_assoc = ath10k_wmi_10_4_op_gen_peer_assoc,
.gen_set_psmode = ath10k_wmi_op_gen_set_psmode,
.gen_set_sta_ps = ath10k_wmi_op_gen_set_sta_ps,
.gen_set_ap_ps = ath10k_wmi_op_gen_set_ap_ps,
@@ -7555,7 +7591,6 @@ static const struct wmi_ops wmi_10_4_ops = {
.fw_stats_fill = ath10k_wmi_10_4_op_fw_stats_fill,
 
/* shared with 10.2 */
-   .gen_peer_assoc = ath10k_wmi_10_2_op_gen_peer_assoc,
.gen_request_stats = ath10k_wmi_op_gen_request_stats,
 };
 
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h 
b/drivers/net/wireless/ath/ath10k/wmi.h
index a8ea93e..ab6d218 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -5741,6 +5741,11 @@ struct wmi_10_2_peer_assoc_complete_cmd {
__le32 info0; /* WMI_PEER_ASSOC_INFO0_ */
 } __packed;
 
+struct wmi_10_4_peer_assoc_complete_cmd {
+   struct wmi_10_2_peer_assoc_complete_cmd cmd;
+   __le32 peer_bw_rxnss_override;
+} __packed;
+
 struct wmi_peer_assoc_complete_arg {
u8 addr[ETH_ALEN];
u32 vdev_id;
-- 
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


[PATCH v2 3/4] ipv4: add option to drop gratuitous ARP packets

2015-11-04 Thread Johannes Berg
From: Johannes Berg 

In certain 802.11 wireless deployments, there will be ARP proxies
that use knowledge of the network to correctly answer requests.
To prevent gratuitous ARP frames on the shared medium from being
a problem, on such deployments wireless needs to drop them.

Enable this by providing an option called "drop_gratuitous_arp".

Signed-off-by: Johannes Berg 
---
 Documentation/networking/ip-sysctl.txt | 6 ++
 include/uapi/linux/ip.h| 1 +
 net/ipv4/arp.c | 8 
 net/ipv4/devinet.c | 2 ++
 4 files changed, 17 insertions(+)

diff --git a/Documentation/networking/ip-sysctl.txt 
b/Documentation/networking/ip-sysctl.txt
index a2169651254e..428fb48a19fc 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -1215,6 +1215,12 @@ drop_unicast_in_l2_multicast - BOOLEAN
1122, but is disabled by default for compatibility reasons.
Default: off (0)
 
+drop_gratuitous_arp - BOOLEAN
+   Drop all gratuitous ARP frames, for example if there's a known
+   good ARP proxy on the network and such frames need not be used
+   (or in the case of 802.11, must not be used to prevent attacks.)
+   Default: off (0)
+
 
 tag - INTEGER
Allows you to write a number, which can be used as required.
diff --git a/include/uapi/linux/ip.h b/include/uapi/linux/ip.h
index 584834f7e95c..f291569768dd 100644
--- a/include/uapi/linux/ip.h
+++ b/include/uapi/linux/ip.h
@@ -166,6 +166,7 @@ enum
IPV4_DEVCONF_IGMPV3_UNSOLICITED_REPORT_INTERVAL,
IPV4_DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,
IPV4_DEVCONF_DROP_UNICAST_IN_L2_MULTICAST,
+   IPV4_DEVCONF_DROP_GRATUITOUS_ARP,
__IPV4_DEVCONF_MAX
 };
 
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 59b3e0e8fd51..36006a59c7f0 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -735,6 +735,14 @@ static int arp_process(struct net *net, struct sock *sk, 
struct sk_buff *skb)
(!IN_DEV_ROUTE_LOCALNET(in_dev) && ipv4_is_loopback(tip)))
goto out;
 
+ /*
+  *For some 802.11 wireless deployments (and possibly other networks),
+  *there will be an ARP proxy and gratuitous ARP frames are attacks
+  *and thus should not be accepted.
+  */
+   if (IN_DEV_ORCONF(in_dev, DROP_GRATUITOUS_ARP) && sip == tip)
+   goto out;
+
 /*
  * Special case: We must set Frame Relay source Q.922 address
  */
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index dbbab28a52a4..3d835313575e 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -2185,6 +2185,8 @@ static struct devinet_sysctl_table {
"igmpv3_unsolicited_report_interval"),
DEVINET_SYSCTL_RW_ENTRY(IGNORE_ROUTES_WITH_LINKDOWN,
"ignore_routes_with_linkdown"),
+   DEVINET_SYSCTL_RW_ENTRY(DROP_GRATUITOUS_ARP,
+   "drop_gratuitous_arp"),
 
DEVINET_SYSCTL_FLUSHING_ENTRY(NOXFRM, "disable_xfrm"),
DEVINET_SYSCTL_FLUSHING_ENTRY(NOPOLICY, "disable_policy"),
-- 
2.6.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


[PATCH v2 2/4] ipv6: add option to drop unicast encapsulated in L2 multicast

2015-11-04 Thread Johannes Berg
From: Johannes Berg 

In order to solve a problem with 802.11, the so-called hole-196 attack,
add an option (sysctl) called "drop_unicast_in_l2_multicast" which, if
enabled, causes the stack to drop IPv6 unicast packets encapsulated in
link-layer multi- or broadcast frames. Such frames can (as an attack)
be created by any member of the same wireless network and transmitted
as valid encrypted frames since the symmetric key for broadcast frames
is shared between all stations.

Signed-off-by: Johannes Berg 
---
 Documentation/networking/ip-sysctl.txt |  6 ++
 include/linux/ipv6.h   |  1 +
 include/uapi/linux/ipv6.h  |  1 +
 net/ipv6/addrconf.c|  8 
 net/ipv6/ip6_input.c   | 10 ++
 5 files changed, 26 insertions(+)

diff --git a/Documentation/networking/ip-sysctl.txt 
b/Documentation/networking/ip-sysctl.txt
index 35c4c43dd8de..a2169651254e 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -1660,6 +1660,12 @@ stable_secret - IPv6 address
 
By default the stable secret is unset.
 
+drop_unicast_in_l2_multicast - BOOLEAN
+   Drop any unicast IPv6 packets that are received in link-layer
+   multicast (or broadcast) frames.
+
+   By default this is turned off.
+
 icmp/*:
 ratelimit - INTEGER
Limit the maximal rates for sending ICMPv6 packets.
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 0ef2a97ccdb5..34317cb6a6fc 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -50,6 +50,7 @@ struct ipv6_devconf {
__s32   mc_forwarding;
 #endif
__s32   disable_ipv6;
+   __s32   drop_unicast_in_l2_multicast;
__s32   accept_dad;
__s32   force_tllao;
__s32   ndisc_notify;
diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h
index 38b4fef20219..4c413570efe8 100644
--- a/include/uapi/linux/ipv6.h
+++ b/include/uapi/linux/ipv6.h
@@ -174,6 +174,7 @@ enum {
DEVCONF_USE_OIF_ADDRS_ONLY,
DEVCONF_ACCEPT_RA_MIN_HOP_LIMIT,
DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,
+   DEVCONF_DROP_UNICAST_IN_L2_MULTICAST,
DEVCONF_MAX
 };
 
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index d72fa90d6feb..35f880bcf626 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4672,6 +4672,7 @@ static inline void ipv6_store_devconf(struct ipv6_devconf 
*cnf,
array[DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN] = 
cnf->ignore_routes_with_linkdown;
/* we omit DEVCONF_STABLE_SECRET for now */
array[DEVCONF_USE_OIF_ADDRS_ONLY] = cnf->use_oif_addrs_only;
+   array[DEVCONF_DROP_UNICAST_IN_L2_MULTICAST] = 
cnf->drop_unicast_in_l2_multicast;
 }
 
 static inline size_t inet6_ifla6_size(void)
@@ -5734,6 +5735,13 @@ static struct addrconf_sysctl_table
.proc_handler   = 
addrconf_sysctl_ignore_routes_with_linkdown,
},
{
+   .procname   = "drop_unicast_in_l2_multicast",
+   .data   = 
_devconf.drop_unicast_in_l2_multicast,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = proc_dointvec,
+   },
+   {
/* sentinel */
}
},
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index 9075acf081dd..31ac3c56da4b 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -134,6 +134,16 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, 
struct packet_type *pt
IPV6_ADDR_MC_SCOPE(>daddr) == 1)
goto err;
 
+   /* If enabled, drop unicast packets that were encapsulated in link-layer
+* multicast or broadcast to protected against the so-called "hole-196"
+* attack in 802.11 wireless.
+*/
+   if (!ipv6_addr_is_multicast(>daddr) &&
+   (skb->pkt_type == PACKET_BROADCAST ||
+skb->pkt_type == PACKET_MULTICAST) &&
+   idev->cnf.drop_unicast_in_l2_multicast)
+   goto err;
+
/* RFC4291 2.7
 * Nodes must not originate a packet to a multicast address whose scope
 * field contains the reserved value 0; if such a packet is received, it
-- 
2.6.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


[PATCH v2 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast

2015-11-04 Thread Johannes Berg
From: Johannes Berg 

In order to solve a problem with 802.11, the so-called hole-196 attack,
add an option (sysctl) called "drop_unicast_in_l2_multicast" which, if
enabled, causes the stack to drop IPv4 unicast packets encapsulated in
link-layer multi- or broadcast frames. Such frames can (as an attack)
be created by any member of the same wireless network and transmitted
as valid encrypted frames since the symmetric key for broadcast frames
is shared between all stations.

Additionally, enabling this option provides compliance with a SHOULD
clause of RFC 1122.

Signed-off-by: Johannes Berg 
---
 Documentation/networking/ip-sysctl.txt |  7 +++
 include/uapi/linux/ip.h|  1 +
 net/ipv4/devinet.c |  2 ++
 net/ipv4/ip_input.c| 26 +-
 4 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/Documentation/networking/ip-sysctl.txt 
b/Documentation/networking/ip-sysctl.txt
index 05915be86235..35c4c43dd8de 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -1208,6 +1208,13 @@ promote_secondaries - BOOLEAN
promote a corresponding secondary IP address instead of
removing all the corresponding secondary IP addresses.
 
+drop_unicast_in_l2_multicast - BOOLEAN
+   Drop any unicast IP packets that are received in link-layer
+   multicast (or broadcast) frames.
+   This behavior (for multicast) is actually a SHOULD in RFC
+   1122, but is disabled by default for compatibility reasons.
+   Default: off (0)
+
 
 tag - INTEGER
Allows you to write a number, which can be used as required.
diff --git a/include/uapi/linux/ip.h b/include/uapi/linux/ip.h
index 08f894d2ddbd..584834f7e95c 100644
--- a/include/uapi/linux/ip.h
+++ b/include/uapi/linux/ip.h
@@ -165,6 +165,7 @@ enum
IPV4_DEVCONF_IGMPV2_UNSOLICITED_REPORT_INTERVAL,
IPV4_DEVCONF_IGMPV3_UNSOLICITED_REPORT_INTERVAL,
IPV4_DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,
+   IPV4_DEVCONF_DROP_UNICAST_IN_L2_MULTICAST,
__IPV4_DEVCONF_MAX
 };
 
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index cebd9d31e65a..dbbab28a52a4 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -2192,6 +2192,8 @@ static struct devinet_sysctl_table {
  "promote_secondaries"),
DEVINET_SYSCTL_FLUSHING_ENTRY(ROUTE_LOCALNET,
  "route_localnet"),
+   DEVINET_SYSCTL_FLUSHING_ENTRY(DROP_UNICAST_IN_L2_MULTICAST,
+ "drop_unicast_in_l2_multicast"),
},
 };
 
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
index b1209b63381f..a442b6bd9441 100644
--- a/net/ipv4/ip_input.c
+++ b/net/ipv4/ip_input.c
@@ -359,8 +359,32 @@ static int ip_rcv_finish(struct net *net, struct sock *sk, 
struct sk_buff *skb)
rt = skb_rtable(skb);
if (rt->rt_type == RTN_MULTICAST) {
IP_UPD_PO_STATS_BH(net, IPSTATS_MIB_INMCAST, skb->len);
-   } else if (rt->rt_type == RTN_BROADCAST)
+   } else if (rt->rt_type == RTN_BROADCAST) {
IP_UPD_PO_STATS_BH(net, IPSTATS_MIB_INBCAST, skb->len);
+   } else {
+   struct in_device *in_dev = __in_dev_get_rcu(skb->dev);
+
+   /* RFC 1122 3.3.6:
+*
+*   When a host sends a datagram to a link-layer broadcast
+*   address, the IP destination address MUST be a legal IP
+*   broadcast or IP multicast address.
+*
+*   A host SHOULD silently discard a datagram that is received
+*   via a link-layer broadcast (see Section 2.4) but does not
+*   specify an IP multicast or broadcast destination address.
+*
+* This doesn't explicitly say L2 *broadcast*, but broadcast is
+* in a way a form of multicast and the most common use case for
+* this is 802.11 protecting against cross-station spoofing (the
+* so-called "hole-196" attack) so do it for both.
+*/
+   if (in_dev &&
+   IN_DEV_ORCONF(in_dev, DROP_UNICAST_IN_L2_MULTICAST) &&
+   (skb->pkt_type == PACKET_BROADCAST ||
+skb->pkt_type == PACKET_MULTICAST))
+   goto drop;
+   }
 
return dst_input(skb);
 
-- 
2.6.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


[PATCH v2 4/4] ipv6: add option to drop unsolicited neighbor advertisements

2015-11-04 Thread Johannes Berg
From: Johannes Berg 

In certain 802.11 wireless deployments, there will be NA proxies
that use knowledge of the network to correctly answer requests.
To prevent unsolicitd advertisements on the shared medium from
being a problem, on such deployments wireless needs to drop them.

Enable this by providing an option called "drop_unsolicited_na".

Signed-off-by: Johannes Berg 
---
 Documentation/networking/ip-sysctl.txt | 7 +++
 include/linux/ipv6.h   | 1 +
 include/uapi/linux/ipv6.h  | 1 +
 net/ipv6/addrconf.c| 8 
 net/ipv6/ndisc.c   | 9 +
 5 files changed, 26 insertions(+)

diff --git a/Documentation/networking/ip-sysctl.txt 
b/Documentation/networking/ip-sysctl.txt
index 428fb48a19fc..77992f1173c3 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -1672,6 +1672,13 @@ drop_unicast_in_l2_multicast - BOOLEAN
 
By default this is turned off.
 
+drop_unsolicited_na - BOOLEAN
+   Drop all unsolicited neighbor advertisements, for example if there's
+   a known good NA proxy on the network and such frames need not be used
+   (or in the case of 802.11, must not be used to prevent attacks.)
+
+   By default this is turned off.
+
 icmp/*:
 ratelimit - INTEGER
Limit the maximal rates for sending ICMPv6 packets.
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 34317cb6a6fc..9231bfdc7c92 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -56,6 +56,7 @@ struct ipv6_devconf {
__s32   ndisc_notify;
__s32   suppress_frag_ndisc;
__s32   accept_ra_mtu;
+   __s32   drop_unsolicited_na;
struct ipv6_stable_secret {
bool initialized;
struct in6_addr secret;
diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h
index 4c413570efe8..ec117b65d5a5 100644
--- a/include/uapi/linux/ipv6.h
+++ b/include/uapi/linux/ipv6.h
@@ -175,6 +175,7 @@ enum {
DEVCONF_ACCEPT_RA_MIN_HOP_LIMIT,
DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,
DEVCONF_DROP_UNICAST_IN_L2_MULTICAST,
+   DEVCONF_DROP_UNSOLICITED_NA,
DEVCONF_MAX
 };
 
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 35f880bcf626..e7dd0a0c5126 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4673,6 +4673,7 @@ static inline void ipv6_store_devconf(struct ipv6_devconf 
*cnf,
/* we omit DEVCONF_STABLE_SECRET for now */
array[DEVCONF_USE_OIF_ADDRS_ONLY] = cnf->use_oif_addrs_only;
array[DEVCONF_DROP_UNICAST_IN_L2_MULTICAST] = 
cnf->drop_unicast_in_l2_multicast;
+   array[DEVCONF_DROP_UNSOLICITED_NA] = cnf->drop_unsolicited_na;
 }
 
 static inline size_t inet6_ifla6_size(void)
@@ -5742,6 +5743,13 @@ static struct addrconf_sysctl_table
.proc_handler   = proc_dointvec,
},
{
+   .procname   = "drop_unsolicited_na",
+   .data   = _devconf.drop_unsolicited_na,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = proc_dointvec,
+   },
+   {
/* sentinel */
}
},
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 3e0f855e1bea..0737bc23ea39 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -887,6 +887,7 @@ static void ndisc_recv_na(struct sk_buff *skb)
offsetof(struct nd_msg, opt));
struct ndisc_options ndopts;
struct net_device *dev = skb->dev;
+   struct inet6_dev *idev = __in6_dev_get(dev);
struct inet6_ifaddr *ifp;
struct neighbour *neigh;
 
@@ -906,6 +907,14 @@ static void ndisc_recv_na(struct sk_buff *skb)
return;
}
 
+   /* For some 802.11 wireless deployments (and possibly other networks),
+* there will be a NA proxy and unsolicitd packets are attacks
+* and thus should not be accepted.
+*/
+   if (idev && idev->cnf.drop_unsolicited_na &&
+   !msg->icmph.icmp6_solicited)
+   return;
+
if (!ndisc_parse_options(msg->opt, ndoptlen, )) {
ND_PRINTK(2, warn, "NS: invalid ND option\n");
return;
-- 
2.6.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


Re: [PATCH 3/4] ipv4: add option to drop gratuitous ARP packets

2015-11-04 Thread Johannes Berg
On Sat, 2015-04-11 at 13:59 +0300, Julian Anastasov wrote:
> 
> May be only arptable_filter can help here to
> protect ARP?
> 

Finally reviving an ancient thread ...

I checked, butI don't see a way to match tip==sip. You can match on
each, but not against each other.

johannes
--
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 0/3] Add new WMI defines to 10.4

2015-11-04 Thread Kalle Valo
Vasanthakumar Thiagarajan  writes:

> This patch set does not have any real functionality changes.
> Adds new WMI defines to be in sync with 10.4 firmware.
>
> Vasanthakumar Thiagarajan (3):
>   ath10k: Add new service defines for 10.4
>   ath10k: Add new WMI cmd/event defines for 10.4
>   ath10k: Add new pdev params defines to 10.4

All three applied, thanks.

-- 
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 v2] ath10k: Add support for pktlog in QCA99X0

2015-11-04 Thread Kalle Valo
Vivek Natarajan  writes:

> This patch adds pktlog support for 10.4 fw versions.
>
> Signed-off-by: Vivek Natarajan 

Applied, thanks.

-- 
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 1/2] ath10k: Add abstraction layer for peer flags

2015-11-04 Thread Kalle Valo
 writes:

> From: Tamizh chelvam 
>
> Abstraction layer for peer flags is added to fix ABI breakage.
>
> Signed-off-by: Tamizh chelvam 
> Signed-off-by: SenthilKumar Jegadeesan 

Both patches applied, thanks.

-- 
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 4/4] ath10k: add QCA9377 hw1.0 support

2015-11-04 Thread Kalle Valo
Bartosz Markowski  writes:

> Add new BMI target version and chip id revision. Register it
> on supported chips list.
>
> Signed-off-by: Bartosz Markowski 

This one has whitespace issues:

drivers/net/wireless/ath/ath10k/core.c:163: code indent should use tabs where 
possible
drivers/net/wireless/ath/ath10k/core.c:163: please, no spaces at the start of a 
line
drivers/net/wireless/ath/ath10k/core.c:164: code indent should use tabs where 
possible
drivers/net/wireless/ath/ath10k/core.c:164: please, no spaces at the start of a 
line
drivers/net/wireless/ath/ath10k/core.c:165: code indent should use tabs where 
possible
drivers/net/wireless/ath/ath10k/core.c:165: please, no spaces at the start of a 
line
drivers/net/wireless/ath/ath10k/core.c:166: code indent should use tabs where 
possible
drivers/net/wireless/ath/ath10k/core.c:166: please, no spaces at the start of a 
line
drivers/net/wireless/ath/ath10k/core.c:167: code indent should use tabs where 
possible
drivers/net/wireless/ath/ath10k/core.c:167: please, no spaces at the start of a 
line
drivers/net/wireless/ath/ath10k/core.c:168: code indent should use tabs where 
possible
drivers/net/wireless/ath/ath10k/core.c:168: please, no spaces at the start of a 
line
drivers/net/wireless/ath/ath10k/core.c:169: code indent should use tabs where 
possible
drivers/net/wireless/ath/ath10k/core.c:169: please, no spaces at the start of a 
line
drivers/net/wireless/ath/ath10k/core.c:170: code indent should use tabs where 
possible
drivers/net/wireless/ath/ath10k/core.c:170: please, no spaces at the start of a 
line
drivers/net/wireless/ath/ath10k/core.c:171: code indent should use tabs where 
possible
drivers/net/wireless/ath/ath10k/core.c:171: please, no spaces at the start of a 
line
drivers/net/wireless/ath/ath10k/core.c:172: code indent should use tabs where 
possible
drivers/net/wireless/ath/ath10k/core.c:172: please, no spaces at the start of a 
line


-- 
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


[PATCH] iw: Added libnl-tiny support (regenerated)

2015-11-04 Thread Dima Krasner
johannes - here's a single, regenerated patch.

>From 4f37fc8ed29607e1614713e86527f0cd209cdb6d Mon Sep 17 00:00:00 2001
From: Dima Krasner 
Date: Wed, 4 Nov 2015 18:33:37 +0200
Subject: [PATCH] Added libnl-tiny support

---
 Makefile |  8 
 iw.c | 10 --
 iw.h |  2 +-
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index e61825e..4077020 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,8 @@ OBJS += $(OBJS-y) $(OBJS-Y)
 ALL = iw
 
 ifeq ($(NO_PKG_CONFIG),)
+NLTINYFOUND := $(shell $(PKG_CONFIG) libnl-tiny && echo Y)
+ifneq ($(NLTINYFOUND),Y)
 NL3xFOUND := $(shell $(PKG_CONFIG) --atleast-version=3.2 libnl-3.0 && echo Y)
 ifneq ($(NL3xFOUND),Y)
 NL31FOUND := $(shell $(PKG_CONFIG) --exact-version=3.1 libnl-3.1 && echo Y)
@@ -40,6 +42,12 @@ endif
 endif
 endif
 endif
+endif
+
+ifeq ($(NLTINYFOUND),Y)
+CFLAGS += -DCONFIG_LIBNL_TINY
+NLLIBNAME = libnl-tiny
+endif
 
 ifeq ($(NL1FOUND),Y)
 NLLIBNAME = libnl-1
diff --git a/iw.c b/iw.c
index 0f511d9..f702e92 100644
--- a/iw.c
+++ b/iw.c
@@ -23,8 +23,14 @@
 #include "nl80211.h"
 #include "iw.h"
 
+#ifdef CONFIG_LIBNL_TINY
+#define nl_handle nl_sock
+#define nl_handle_alloc_cb nl_socket_alloc_cb
+#define nl_handle_destroy nl_socket_free
+#endif
+
 /* libnl 1.x compatibility code */
-#if !defined(CONFIG_LIBNL20) && !defined(CONFIG_LIBNL30)
+#if !defined(CONFIG_LIBNL20) && !defined(CONFIG_LIBNL30) && 
!defined(CONFIG_LIBNL_TINY)
 static inline struct nl_handle *nl_socket_alloc(void)
 {
return nl_handle_alloc();
@@ -40,7 +46,7 @@ static inline int nl_socket_set_buffer_size(struct nl_sock 
*sk,
 {
return nl_set_buffer_size(sk, rxbuf, txbuf);
 }
-#endif /* CONFIG_LIBNL20 && CONFIG_LIBNL30 */
+#endif /* CONFIG_LIBNL20 && CONFIG_LIBNL30 && CONFIG_LIBNL_TINY */
 
 int iw_debug = 0;
 
diff --git a/iw.h b/iw.h
index 263e8b1..93813be 100644
--- a/iw.h
+++ b/iw.h
@@ -14,7 +14,7 @@
 #define ETH_ALEN 6
 
 /* libnl 1.x compatibility code */
-#if !defined(CONFIG_LIBNL20) && !defined(CONFIG_LIBNL30)
+#if !defined(CONFIG_LIBNL20) && !defined(CONFIG_LIBNL30) && 
!defined(CONFIG_LIBNL_TINY)
 #  define nl_sock nl_handle
 #endif
 
-- 
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] ath10k: fix invalid NSS for 4x4 devices

2015-11-04 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
> and so get_nss_from_chainmask never be called. This issue is exposed
> by recent commit 166de3f1895d ("ath10k: remove supported chain mask").
> By default maximum supported chain mask is filled in cfg_tx_chainmask.
>
> Cc: sta...@vger.kernel.org
> Fixes: 5572a95b4b ("ath10k: apply chainmask settings to vdev on
> creation")
> Signed-off-by: Rajkumar Manoharan 

I'm planning to send this to 4.3-rc releases.

-- 
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: [PATCHv2] ath10k: consolidate if statements in ath10k_wmi_event_mgmt_rx

2015-11-04 Thread Kalle Valo
manikanta.pubbise...@gmail.com writes:

> From: Manikanta Pubbisetty 
>
> This patch replaces mutliple if conditional checks with a single if condition
> in WMI management rx handler. Found during code review.
>
> Signed-off-by: Manikanta Pubbisetty 

Applied, thanks.

-- 
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] ath10k: Add thermal throttling support for 10.4 firmware.

2015-11-04 Thread Kalle Valo
 writes:

> From: Tamizh chelvam 
>
> This patch enables thermal throttling support for 10.4 firmware.
>
> Signed-off-by: Tamizh chelvam 

Applied, thanks.

-- 
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] ath10k: debugfs file to enable Bluetooth coexistence feature

2015-11-04 Thread Kalle Valo
Kalle Valo  writes:

> From: Yanbo Li 
>
> As not all QCA98XX radios are not connected to Bluetooth modules, enabling the
> BT coex feature in firmware will have side effects if the radio's GPIO are
> connected with other (non-BT) HW modules. Add debugfs file to control the
> firmware BT coex logic and set the feature as disable by default to avoid that
> btcoex is accidentally enabled.
>
> To enable this feature, execute:
>
> echo 1 > /sys/kernel/debug/ieee80211/phyX/ath10k/btcoex
>
> To disable:
>
> echo 0 > /sys/kernel/debug/ieee80211/phyX/ath10k/btcoex
>
> The firmware support this feature since 10.2.4.54 on 2G-only board, dual band
> or 5G boards don't support this. The feature's name is WMI_SERVICE_COEX_GPIO
> and the btcoex file is not created if firmware doesn't support it.
>
> Signed-off-by: Yanbo Li 
> [kv...@qca.qualcomm.com: use btcoex filename and other smaller fixes]
> Signed-off-by: Kalle Valo 

Applied, thanks.

-- 
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 V2 0/3] Fix few WMI/HTT interfaces

2015-11-04 Thread Kalle Valo
Vasanthakumar Thiagarajan  writes:

> This patch set fixes mismatch in peer_assoc complete wmi command for
> version 10.4 and peer_id configuration for HTT version < 3.4.
>
> V2:
>   - Add cover letter
>   - Rename ath10k_mac_need_offchan_tx_work() to
> ath10k_mac_tx_frm_has_freq(). Add htt-op-version check
> to the helper and use it in ath10k_htt_tx() while configuring
> peerid.
>
> Vasanthakumar Thiagarajan (3):
>   ath10k: Fix peer assoc complete WMI command for 10.4
>   ath10k: Rename the helper which is used for off-channel tx
>   ath10k: Fix peerid configuration in htt tx desc for htt version < 3.4

These had a conflict but you didn't use ath.git as the baseline so I
can't easily fix them. Please try always to use clean ath.git master
branch as the baseline for your patches.

Applying: ath10k: Fix peer assoc complete WMI command for 10.4
fatal: sha1 information is lacking or useless 
(drivers/net/wireless/ath/ath10k/wmi.h).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 ath10k: Fix peer assoc complete WMI command for 10.4

-- 
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] iw: Added libnl-tiny support (regenerated)

2015-11-04 Thread Johannes Berg
On Wed, 2015-11-04 at 19:16 +0200, Dima Krasner wrote:
> johannes - here's a single, regenerated patch.
> 
Thanks, you should drop that extra data etc. (From 4f..., date, subject
in the message body) - but I could edit that.

much more important is that you sign off on the change.

Thanks,
johannes
--
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