Re: [PATCH 3/3] ath10k: implement mesh support

2015-09-09 Thread Kalle Valo
Bob Copeland  writes:

> Add support for mesh to ath10k.  We simply use an AP virtual interface
> in the firmware in order to enable beaconing without TSF adoption, and
> use the raw (802.11) transmit mode.
>
> Due to firmware limitations, the firmware must operate in raw
> (non-native 802.11) mode.  As this is configured at firmware init time,
> a new "rawmode" modparam is added, and mesh interfaces are available
> only if rawmode=true.  The firmware must advertise support for rawmode
> (tested successfully with firmware 10.2.4.70-2).
>
> When loaded with rawmode=1, ath10k can operate an open mesh STA via
> something like the following:
>
> ip link set wlan0 down
> iw dev wlan0 set type mp
> ip link set wlan0 up
> iw dev wlan0 set freq 5745 80 5775
> iw dev wlan0 mesh join mesh-vht
>
> Signed-off-by: Bob Copeland 

I did a quick smoke test and saw the splat below. It's this warning from
cfg80211:

/*
 * Don't advertise an unsupported type
 * in a combination.
 */
if (WARN_ON((wiphy->interface_modes & types) != types))
return -EINVAL;

I didn't immeaditely figure out what's causing this, the interface types
looked correct to me. Unfortunately I don't have time to investigate
more at the moment, but will look later.

[  152.113232] ath10k_pci :02:00.0: qca988x hw2.0 (0x4100016c, 0x043202ff) 
fw 10.2.4.70.6 api 3 htt-ver 2.1 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 
hwcrypto 1 features no-p2p
[  152.113448] ath10k_pci :02:00.0: debug 1 debugfs 1 tracing 1 dfs 1 
testmode 1
[  152.226213] ath: EEPROM regdomain: 0x0
[  152.226296] ath: EEPROM indicates default country code should be used
[  152.226365] ath: doing EEPROM country->regdmn map search
[  152.226434] ath: country maps to regdmn code: 0x3a
[  152.226504] ath: Country alpha2 being used: US
[  152.226573] ath: Regpair used: 0x3a
[  152.226677] [ cut here ]
[  152.226785] WARNING: CPU: 0 PID: 1141 at net/wireless/core.c:530 
wiphy_register+0x680/0x780 [cfg80211]()
[  152.226864] Modules linked in: ath10k_pci ath10k_core ath mac80211 cfg80211 
[last unloaded: cfg80211]
[  152.227882] CPU: 0 PID: 1141 Comm: kworker/u16:5 Not tainted 4.2.0-wl-ath+ 
#1044
[  152.227972] Hardware name: Hewlett-Packard HP ProBook 6540b/1722, BIOS 68CDD 
Ver. F.04 01/27/2010
[  152.228068] Workqueue: ath10k_wq ath10k_core_register_work [ath10k_core]
[  152.228372]    f1c19d08 c18c0e4e  f1c19d38 c10578ce 
c1b0f660
[  152.229343]   0475 fb37017a 0212 fb317130 fb317130 0088 
efe48320
[  152.230500]  0008 f1c19d48 c1057932 0009  f1c19dac fb317130 
f1c10008
[  152.231541] Call Trace:
[  152.231634]  [] dump_stack+0x48/0x60
[  152.231824]  [] warn_slowpath_common+0x8e/0xd0
[  152.232014]  [] ? wiphy_register+0x680/0x780 [cfg80211]
[  152.232232]  [] ? wiphy_register+0x680/0x780 [cfg80211]
[  152.232448]  [] warn_slowpath_null+0x22/0x30
[  152.232561]  [] wiphy_register+0x680/0x780 [cfg80211]
[  152.232657]  [] ? __kmalloc+0x216/0x370
[  152.232749]  [] ? mark_held_locks+0x59/0x80
[  152.232898]  [] ? ieee80211_register_hw+0x1f0/0x970 [mac80211]
[  152.233468]  [] ? ieee80211_register_hw+0x1f0/0x970 [mac80211]
[  152.233576]  [] ? ath10k_hw_scan+0x210/0x210 [ath10k_core]
[  152.233679]  [] ? ath10k_start_scan+0x140/0x140 [ath10k_core]
[  152.233794]  [] ieee80211_register_hw+0x361/0x970 [mac80211]
[  152.233889]  [] ? trace_hardirqs_on_thunk+0xc/0x10
[  152.233983]  [] ? restore_all+0xf/0xf
[  152.234084]  [] ath10k_mac_register+0x7c3/0x920 [ath10k_core]
[  152.234196]  [] ? __lock_is_held+0x3c/0x50
[  152.236050]  [] ath10k_core_register_work+0x5d1/0x6d0 [ath10k_core]
[  152.236136]  [] process_one_work+0x1d0/0x6c0
[  152.236204]  [] ? process_one_work+0x122/0x6c0
[  152.236270]  [] worker_thread+0xea/0x3d0
[  152.236335]  [] ? trace_hardirqs_on+0xb/0x10
[  152.236399]  [] ? process_scheduled_works+0x30/0x30
[  152.236466]  [] kthread+0xa5/0xc0
[  152.236531]  [] ? _raw_spin_unlock_irq+0x27/0x40
[  152.236596]  [] ret_from_kernel_thread+0x21/0x30
[  152.236664]  [] ? __init_kthread_worker+0x60/0x60
[  152.236731] ---[ end trace ce831788c6a79cf8 ]---
[  152.236813] ath10k_pci :02:00.0: failed to register ieee80211: -22
[  152.236889] ath10k_pci :02:00.0: could not register to mac80211 (-22)


-- 
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 2/4] staging: wilc1000: delete wilc_memory.c and wilc_memory.h

2015-09-09 Thread Tony Cho
From: Glen Lee 

The macro WILC_MALLOC is not used in the driver anymore, so just
delete files.

Signed-off-by: Glen Lee 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/Makefile |  2 +-
 drivers/staging/wilc1000/wilc_memory.c| 16 
 drivers/staging/wilc1000/wilc_memory.h| 66 ---
 drivers/staging/wilc1000/wilc_msgqueue.h  |  1 -
 drivers/staging/wilc1000/wilc_oswrapper.h |  4 --
 5 files changed, 1 insertion(+), 88 deletions(-)
 delete mode 100644 drivers/staging/wilc1000/wilc_memory.c
 delete mode 100644 drivers/staging/wilc1000/wilc_memory.h

diff --git a/drivers/staging/wilc1000/Makefile 
b/drivers/staging/wilc1000/Makefile
index 8336a89..bdeffea 100644
--- a/drivers/staging/wilc1000/Makefile
+++ b/drivers/staging/wilc1000/Makefile
@@ -21,7 +21,7 @@ ccflags-$(CONFIG_WILC1000_DYNAMICALLY_ALLOCATE_MEMROY) += 
-DWILC_NORMAL_ALLOC
 
 
 wilc1000-objs := wilc_wfi_cfgoperations.o linux_wlan.o linux_mon.o \
-   wilc_memory.o wilc_msgqueue.o \
+   wilc_msgqueue.o \
coreconfigurator.o host_interface.o \
wilc_sdio.o wilc_spi.o wilc_wlan_cfg.o wilc_debugfs.o
 
diff --git a/drivers/staging/wilc1000/wilc_memory.c 
b/drivers/staging/wilc1000/wilc_memory.c
deleted file mode 100644
index e90a957..000
--- a/drivers/staging/wilc1000/wilc_memory.c
+++ /dev/null
@@ -1,16 +0,0 @@
-
-#include "wilc_memory.h"
-
-/*!
- *  @authorsyounan
- *  @date  18 Aug 2010
- *  @version   1.0
- */
-void *WILC_MemoryAlloc(u32 u32Size, tstrWILC_MemoryAttrs *strAttrs,
-  char *pcFileName, u32 u32LineNo)
-{
-   if (u32Size > 0)
-   return kmalloc(u32Size, GFP_ATOMIC);
-   else
-   return NULL;
-}
diff --git a/drivers/staging/wilc1000/wilc_memory.h 
b/drivers/staging/wilc1000/wilc_memory.h
deleted file mode 100644
index f19cec1..000
--- a/drivers/staging/wilc1000/wilc_memory.h
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef __WILC_MEMORY_H__
-#define __WILC_MEMORY_H__
-
-/*!
- *  @file  wilc_memory.h
- *  @brief Memory OS wrapper functionality
- *  @authorsyounan
- *  @sawilc_oswrapper.h top level OS wrapper file
- *  @date  16 Aug 2010
- *  @version   1.0
- */
-
-#include 
-#include 
-
-/*!
- *  @struct tstrWILC_MemoryAttrs
- *  @brief Memory API options
- *  @authorsyounan
- *  @date  16 Aug 2010
- *  @version   1.0
- */
-typedef struct {
-} tstrWILC_MemoryAttrs;
-
-/*!
- *  @brief Allocates a given size of bytes
- *  @param[in] u32Size size of memory in bytes to be allocated
- *  @param[in] strAttrs Optional attributes, NULL for default
- *  if not NULL, pAllocationPool should point to the pool to use 
for
- *  this allocation. if NULL memory will be allocated directly from
- *  the system
- *  @param[in] pcFileName file name of the calling code for debugging
- *  @param[in] u32LineNo line number of the calling code for debugging
- *  @returnThe new allocated block, NULL if allocation fails
- *  @note  It is recommended to use of of the wrapper macros instead of
- *  calling this function directly
- *  @sasttrWILC_MemoryAttrs
- *  @saWILC_MALLOC
- *  @saWILC_MALLOC_EX
- *  @authorsyounan
- *  @date  16 Aug 2010
- *  @version   1.0
- */
-void *WILC_MemoryAlloc(u32 u32Size, tstrWILC_MemoryAttrs *strAttrs,
-  char *pcFileName, u32 u32LineNo);
-
-/*!
- * @brief  standrad malloc wrapper with custom attributes
- */
-   #define WILC_MALLOC_EX(__size__, __attrs__) \
-   (WILC_MemoryAlloc( \
-(__size__), __attrs__, NULL, 0))
-
-
-/*!
- * @brief  standrad malloc wrapper with default attributes
- */
-#define WILC_MALLOC(__size__) \
-   WILC_MALLOC_EX(__size__, NULL)
-
-
-
-
-
-#endif
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h 
b/drivers/staging/wilc1000/wilc_msgqueue.h
index fc65dfe..fb26463 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -12,7 +12,6 @@
 
 #include "wilc_platform.h"
 #include "wilc_errorsupport.h"
-#include "wilc_memory.h"
 
 /*!
  *  @brief Creates a new Message queue
diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h 
b/drivers/staging/wilc1000/wilc_oswrapper.h
index cb48325..68f6efe 100644
--- a/drivers/staging/wilc1000/wilc_oswrapper.h
+++ b/drivers/staging/wilc1000/wilc_oswrapper.h
@@ -19,10 +19,6 @@
 /* Error reporting and handling support */
 #include "wilc_errorsupport.h"
 
-/* Memory support */
-#include "wilc_memory.h"
-
-
 /* Message Queue */
 #include "wilc_msgqueue.h"
 
-- 
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 

[PATCH 4/4] staging: wilc1000: remove unused PLAT_RK3026_TCHIP

2015-09-09 Thread Tony Cho
From: Leo Kim 

This patch removes the preprocessor definition, PLAT_RK3026_TCHIP which
is not used anymore.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/wilc_wlan.c | 24 
 1 file changed, 24 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c 
b/drivers/staging/wilc1000/wilc_wlan.c
index 4c54ea7..39716ba 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -19,9 +19,6 @@
 extern wilc_hif_func_t hif_sdio;
 extern wilc_hif_func_t hif_spi;
 extern wilc_cfg_func_t mac_cfg;
-#if defined(PLAT_RK3026_TCHIP)
-extern u8 g_wilc_initialized; /* AMR : 0422 RK3026 Crash issue */
-#endif
 extern void WILC_WFI_mgmt_rx(uint8_t *buff, uint32_t size);
 uint32_t wilc_get_chipid(uint8_t update);
 u16 Set_machw_change_vir_if(bool bValue);
@@ -1943,11 +1940,7 @@ uint32_t init_chip(void)
uint32_t chipid;
uint32_t reg, ret = 0;
 
-#if defined(PLAT_RK3026_TCHIP)
-   acquire_bus(ACQUIRE_AND_WAKEUP); /* AMR : 0422 RK3026 Crash issue */
-#else
acquire_bus(ACQUIRE_ONLY);
-#endif
 
chipid = wilc_get_chipid(true);
 
@@ -2077,13 +2070,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t 
*oup)
/***
 *  host interface init
 **/
-#if defined(PLAT_RK3026_TCHIP) /* AMR : 0422 RK3026 Crash issue */
-   if (!g_wilc_initialized) {
-   custom_lock_bus(g_mac_open);
-   custom_wakeup(g_mac_open);
-   }
-#endif
-
if ((inp->io_func.io_type & 0x1) == HIF_SDIO) {
if (!hif_sdio.hif_init(inp, wilc_debug)) {
/* EIO  5 */
@@ -2176,11 +2162,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t 
*oup)
Init_TCP_tracking();
 #endif
 
-#if defined(PLAT_RK3026_TCHIP) /* AMR : 0422 RK3026 Crash issue */
-   if (!g_wilc_initialized)
-   custom_unlock_bus(g_mac_open);
-#endif
-
return 1;
 
 _fail_:
@@ -2192,11 +2173,6 @@ _fail_:
kfree(g_wlan.tx_buffer);
g_wlan.tx_buffer = NULL;
 
-#if defined(PLAT_RK3026_TCHIP) /* AMR : 0422 RK3026 Crash issue */
-   if (!g_wilc_initialized)
-   custom_unlock_bus(g_mac_open);
-#endif
-
return ret;
 
 }
-- 
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 3/4] staging: wilc1000: delete wilc_oswrapper.h and wilc_platform.h

2015-09-09 Thread Tony Cho
From: Glen Lee 

wilc1000 driver runs on Linux. No need to have oswrapper or platform
dependent files.
Before delete two header files, move two structures in wilc_platform.h to
wilc_msgqueue.h where it is used. Include linux header files where is needs
since wilc_platform is deleted.
Finally, remove wilc_oswrapper.h and wilc_platform.h.

Signed-off-by: Glen Lee 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/coreconfigurator.c |  1 +
 drivers/staging/wilc1000/host_interface.c   |  3 ++
 drivers/staging/wilc1000/host_interface.h   |  1 +
 drivers/staging/wilc1000/wilc_msgqueue.c|  1 +
 drivers/staging/wilc1000/wilc_msgqueue.h| 16 +-
 drivers/staging/wilc1000/wilc_oswrapper.h   | 25 ---
 drivers/staging/wilc1000/wilc_platform.h| 48 -
 drivers/staging/wilc1000/wilc_wlan.h|  3 --
 drivers/staging/wilc1000/wilc_wlan_if.h |  5 ++-
 9 files changed, 23 insertions(+), 80 deletions(-)
 delete mode 100644 drivers/staging/wilc1000/wilc_oswrapper.h
 delete mode 100644 drivers/staging/wilc1000/wilc_platform.h

diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
b/drivers/staging/wilc1000/coreconfigurator.c
index 1889195..58e6108 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -13,6 +13,7 @@
 /* File Includes */
 /*/
 #include "coreconfigurator.h"
+#include 
 /*/
 /* Constants */
 /*/
diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 59a1a9d..e1fccb3 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1,5 +1,8 @@
 #include "host_interface.h"
 #include "coreconfigurator.h"
+#include "wilc_msgqueue.h"
+#include 
+#include 
 
 extern s32 TransportInit(void);
 extern s32 TransportDeInit(void);
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index a107377..96bc9a5 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -11,6 +11,7 @@
 #define HOST_INT_H
 
 #include "coreconfigurator.h"
+#include 
 /*/
 /* Macros  
 */
 /*/
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c 
b/drivers/staging/wilc1000/wilc_msgqueue.c
index 0a49cbe..59e1a0d 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -1,6 +1,7 @@
 
 #include "wilc_msgqueue.h"
 #include 
+#include 
 
 /*!
  *  @authorsyounan
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h 
b/drivers/staging/wilc1000/wilc_msgqueue.h
index fb26463..5e73211 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -10,9 +10,23 @@
  *  @version   1.0
  */
 
-#include "wilc_platform.h"
+#include 
 #include "wilc_errorsupport.h"
 
+typedef struct __Message_struct {
+   void *pvBuffer;
+   u32 u32Length;
+   struct __Message_struct *pstrNext;
+} Message;
+
+typedef struct __MessageQueue_struct {
+   struct semaphore hSem;
+   spinlock_t strCriticalSection;
+   bool bExiting;
+   u32 u32ReceiversCount;
+   Message *pstrMessageList;
+} WILC_MsgQueueHandle;
+
 /*!
  *  @brief Creates a new Message queue
  *  @details   Creates a new Message queue, if the feature
diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h 
b/drivers/staging/wilc1000/wilc_oswrapper.h
deleted file mode 100644
index 68f6efe..000
--- a/drivers/staging/wilc1000/wilc_oswrapper.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef __WILC_OSWRAPPER_H__
-#define __WILC_OSWRAPPER_H__
-
-/*!
- *  @file  wilc_oswrapper.h
- *  @brief Top level OS Wrapper, include this file and it will include all
- *  other files as necessary
- *  @authorsyounan
- *  @date  10 Aug 2010
- *  @version   1.0
- */
-
-/* OS Wrapper interface version */
-#define WILC_OSW_INTERFACE_VER 2
-
-/* Os Configuration File */
-#include "wilc_platform.h"
-
-/* Error reporting and handling support */
-#include "wilc_errorsupport.h"
-
-/* Message Queue */
-#include "wilc_msgqueue.h"
-
-#endif
diff --git a/drivers/staging/wilc1000/wilc_platform.h 
b/drivers/staging/wilc1000/wilc_platform.h
deleted file mode 100644
index 1e56973..000
--- 

[PATCH] ath10k: add ATH10K_FW_FEATURE_RAW_MODE_SUPPORT to ath10k_core_fw_feature_str[]

2015-09-09 Thread Kalle Valo
This was missed in the original commit adding the flag and ath10k only printed 
"bit10":

ath10k_pci :02:00.0: qca988x hw2.0 (0x4100016c, 0x043202ff) fw 
10.2.4.70.6-2 api 3
htt-ver 2.1 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1 features 
no-p2p,bit10

Also add a build test to avoid this happening again.

Fixes: ccec9038c721 ("ath10k: enable raw encap mode and software crypto engine")
Signed-off-by: Kalle Valo 
---
 drivers/net/wireless/ath/ath10k/core.c |5 +
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/core.c 
b/drivers/net/wireless/ath/ath10k/core.c
index b87b98617073..9e3d89d06445 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -142,12 +142,17 @@ static const char *const ath10k_core_fw_feature_str[] = {
[ATH10K_FW_FEATURE_IGNORE_OTP_RESULT] = "ignore-otp",
[ATH10K_FW_FEATURE_NO_NWIFI_DECAP_4ADDR_PADDING] = "no-4addr-pad",
[ATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INIT] = "skip-clock-init",
+   [ATH10K_FW_FEATURE_RAW_MODE_SUPPORT] = "raw-mode",
 };
 
 static unsigned int ath10k_core_get_fw_feature_str(char *buf,
   size_t buf_len,
   enum ath10k_fw_features feat)
 {
+   /* make sure that ath10k_core_fw_feature_str[] gets updated */
+   BUILD_BUG_ON(ARRAY_SIZE(ath10k_core_fw_feature_str) !=
+ATH10K_FW_FEATURE_COUNT);
+
if (feat >= ARRAY_SIZE(ath10k_core_fw_feature_str) ||
WARN_ON(!ath10k_core_fw_feature_str[feat])) {
return scnprintf(buf, buf_len, "bit%d", feat);

--
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/5] staging: wilc1000: wilc_msgqueue.c: use kmalloc with GFP_ATOMIC

2015-09-09 Thread Sudip Mukherjee
On Tue, Sep 08, 2015 at 12:36:38AM +0900, Chaehyun Lim wrote:
> This patch use kmalloc with GFP_ATOMIC instead of WILC_MALLOC.
> It is inside the spin lock region.
> 
> Signed-off-by: Chaehyun Lim 
> ---
Its not related to your patch, but while seeing your patch I thought of
checking how WILC_NULLCHECK is working. Well, WILC_NULLCHECK is simple,
its just checking for NULL and calling WILC_ERRORREPORT.
WILC_ERRORREPORT is also simple, it is printing the error and then
goto ERRORHANDLER;
Ok, so now there are total 3 ERRORHANDLER label, one in
wilc_errorsupport.h, there this label is the part of WILC_CATCH macro,
and 2 more ERRORHANDLER in coreconfigurator.c. So it jumps to which
ERRORHANDLER ???

regards
sudip
--
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] staging: wilc1000: remove kmalloc wrapper

2015-09-09 Thread Tony Cho
From: Glen Lee 

Call kmalloc directly. No need to wrap kmalloc.
Only one function, wilc_mq_send which use WILC_MALLOC, can be running in
interrupt context or process context. In this case, We call in_interrupt to
decide the flag, GFP_ATOMIC or GFP_KERNEL, for kmalloc properly. Additionally,
there is one kmalloc which flag is always GFP_ATOMIC. This also changed
together.
Others are not holding a spin lock or in interrupt context. So use GFP_KERNEL
flag for kmalloc.

Signed-off-by: Glen Lee 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 110 +++---
 drivers/staging/wilc1000/linux_wlan.c |   2 +-
 drivers/staging/wilc1000/wilc_msgqueue.c  |  10 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c |  38 
 4 files changed, 83 insertions(+), 77 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 8033205..59a1a9d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -841,7 +841,7 @@ s32 Handle_get_IPAddress(tstrWILC_WFIDrv *drvHandler, u8 
*pu8IPAddr, u8 idx)
/*prepare configuration packet*/
strWID.u16WIDid = (u16)WID_IP_ADDRESS;
strWID.enuWIDtype = WID_STR;
-   strWID.ps8WidVal = WILC_MALLOC(IP_ALEN);
+   strWID.ps8WidVal = kmalloc(IP_ALEN, GFP_KERNEL);
strWID.s32ValueSize = IP_ALEN;
 
s32Error = SendConfigPkt(GET_CFG, , 1, true,
@@ -891,7 +891,7 @@ static s32 Handle_SetMacAddress(tstrWILC_WFIDrv 
*drvHandler, tstrHostIfSetMacAdd
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
-   u8 *mac_buf = WILC_MALLOC(ETH_ALEN);
+   u8 *mac_buf = kmalloc(ETH_ALEN, GFP_KERNEL);
 
if (mac_buf == NULL) {
PRINT_ER("No buffer to send mac address\n");
@@ -1339,7 +1339,7 @@ static s32 Handle_Scan(tstrWILC_WFIDrv *drvHandler, 
tstrHostIFscanAttr *pstrHost
 
for (i = 0; i < pstrHostIFscanAttr->strHiddenNetwork.u8ssidnum; i++)
valuesize += 
((pstrHostIFscanAttr->strHiddenNetwork.pstrHiddenNetworkInfo[i].u8ssidlen) + 1);
-   pu8HdnNtwrksWidVal = WILC_MALLOC(valuesize + 1);
+   pu8HdnNtwrksWidVal = kmalloc(valuesize + 1, GFP_KERNEL);
strWIDList[u32WidsCount].ps8WidVal = pu8HdnNtwrksWidVal;
if (strWIDList[u32WidsCount].ps8WidVal != NULL) {
pu8Buffer = strWIDList[u32WidsCount].ps8WidVal;
@@ -1616,13 +1616,13 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, 
tstrHostIFconnectAttr *ps
PRINT_INFO(HOSTINF_DBG, "Saving connection parameters in global 
structure\n");
 
if (pstrHostIFconnectAttr->pu8bssid != NULL) {
-   pstrWFIDrv->strWILC_UsrConnReq.pu8bssid = 
WILC_MALLOC(6);
+   pstrWFIDrv->strWILC_UsrConnReq.pu8bssid = kmalloc(6, 
GFP_KERNEL);
memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8bssid, 
pstrHostIFconnectAttr->pu8bssid, 6);
}
 
pstrWFIDrv->strWILC_UsrConnReq.ssidLen = 
pstrHostIFconnectAttr->ssidLen;
if (pstrHostIFconnectAttr->pu8ssid != NULL) {
-   pstrWFIDrv->strWILC_UsrConnReq.pu8ssid = 
WILC_MALLOC(pstrHostIFconnectAttr->ssidLen + 1);
+   pstrWFIDrv->strWILC_UsrConnReq.pu8ssid = 
kmalloc(pstrHostIFconnectAttr->ssidLen + 1, GFP_KERNEL);
memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8ssid, 
pstrHostIFconnectAttr->pu8ssid,
pstrHostIFconnectAttr->ssidLen);

pstrWFIDrv->strWILC_UsrConnReq.pu8ssid[pstrHostIFconnectAttr->ssidLen] = '\0';
@@ -1630,7 +1630,7 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, 
tstrHostIFconnectAttr *ps
 
pstrWFIDrv->strWILC_UsrConnReq.ConnReqIEsLen = 
pstrHostIFconnectAttr->IEsLen;
if (pstrHostIFconnectAttr->pu8IEs != NULL) {
-   pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs = 
WILC_MALLOC(pstrHostIFconnectAttr->IEsLen);
+   pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs = 
kmalloc(pstrHostIFconnectAttr->IEsLen, GFP_KERNEL);
memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs, 
pstrHostIFconnectAttr->pu8IEs,
pstrHostIFconnectAttr->IEsLen);
}
@@ -1724,13 +1724,13 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, 
tstrHostIFconnectAttr *ps
#endif /*WILC_PARSE_SCAN_IN_HOST*/
 
if (pstrHostIFconnectAttr->pu8bssid != NULL) {
-   pstrWFIDrv->strWILC_UsrConnReq.pu8bssid = WILC_MALLOC(6);
+   pstrWFIDrv->strWILC_UsrConnReq.pu8bssid = kmalloc(6, 
GFP_KERNEL);
memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8bssid, 
pstrHostIFconnectAttr->pu8bssid, 6);
}
 
  

Re: [PATCH 3/3] ath10k: implement mesh support

2015-09-09 Thread Kalle Valo
Kalle Valo  writes:

> Bob Copeland  writes:
>
>> Add support for mesh to ath10k.  We simply use an AP virtual interface
>> in the firmware in order to enable beaconing without TSF adoption, and
>> use the raw (802.11) transmit mode.
>>
>> Due to firmware limitations, the firmware must operate in raw
>> (non-native 802.11) mode.  As this is configured at firmware init time,
>> a new "rawmode" modparam is added, and mesh interfaces are available
>> only if rawmode=true.  The firmware must advertise support for rawmode
>> (tested successfully with firmware 10.2.4.70-2).
>>
>> When loaded with rawmode=1, ath10k can operate an open mesh STA via
>> something like the following:
>>
>> ip link set wlan0 down
>> iw dev wlan0 set type mp
>> ip link set wlan0 up
>> iw dev wlan0 set freq 5745 80 5775
>> iw dev wlan0 mesh join mesh-vht
>>
>> Signed-off-by: Bob Copeland 
>
> I did a quick smoke test and saw the splat below. It's this warning from
> cfg80211:
>
>   /*
>* Don't advertise an unsupported type
>* in a combination.
>*/
>   if (WARN_ON((wiphy->interface_modes & types) != types))
>   return -EINVAL;

Forgot to mention that this was with 10.2.4.70.6-2 (which has the raw
feature bit set, will push it soon) but rawmode modparam not set. And I
had applied your patches on top of ath.git master branch (commit
d89281c7d6bb9).

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


[PATCHv2] mac80211: Copy tx'ed beacons to monitor mode

2015-09-09 Thread Helmut Schaa
When debugging wireless powersave issues on the AP side it's quite helpful
to see our own beacons that are transmitted by the hardware/driver. However,
this is not that easy since beacons don't pass through the regular TX queues.

Preferably drivers would call ieee80211_tx_status also for tx'ed beacons
but that's not always possible. Hence, just send a copy of each beacon
generated by ieee80211_beacon_get_tim to monitor devices when they are
getting fetched by the driver.

Also add a HW flag IEEE80211_HW_BEACON_TX_STATUS that can be used by
drivers to indicate that they report TX status for beacons.

Signed-off-by: Helmut Schaa 
---

Changes since RFC:
* don't send beacons to cooked monitors
* avoid assignment within if condition
* Introduce IEEE80211_HW_BEACON_TX_STATUS

Changes since v1:
* Invert logic to get shorter lines (<80 chars)

 include/net/mac80211.h |  4 
 net/mac80211/debugfs.c |  1 +
 net/mac80211/tx.c  | 16 
 3 files changed, 21 insertions(+)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index e3314e5..b136ac5 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1892,6 +1892,9 @@ struct ieee80211_txq {
  * @IEEE80211_HW_TDLS_WIDER_BW: The device/driver supports wider bandwidth
  * than then BSS bandwidth for a TDLS link on the base channel.
  *
+ * @IEEE80211_HW_BEACON_TX_STATUS: The device/driver provides TX status
+ * for sent beacons.
+ *
  * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
  */
 enum ieee80211_hw_flags {
@@ -1925,6 +1928,7 @@ enum ieee80211_hw_flags {
IEEE80211_HW_SUPPORTS_CLONED_SKBS,
IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS,
IEEE80211_HW_TDLS_WIDER_BW,
+   IEEE80211_HW_BEACON_TX_STATUS,
 
/* keep last, obviously */
NUM_IEEE80211_HW_FLAGS
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index ced6bf3..d55f5ba 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -123,6 +123,7 @@ static const char *hw_flag_names[NUM_IEEE80211_HW_FLAGS + 
1] = {
FLAG(SUPPORTS_CLONED_SKBS),
FLAG(SINGLE_SCAN_ON_ALL_BANDS),
FLAG(TDLS_WIDER_BW),
+   FLAG(BEACON_TX_STATUS),
 
/* keep last for the build bug below */
(void *)0x1
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 84e0e8c..e482f3e 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3512,6 +3512,9 @@ struct sk_buff *ieee80211_beacon_get_tim(struct 
ieee80211_hw *hw,
 {
struct ieee80211_mutable_offsets offs = {};
struct sk_buff *bcn = __ieee80211_beacon_get(hw, vif, , false);
+   struct sk_buff *copy;
+   struct ieee80211_supported_band *sband;
+   int shift;
 
if (tim_offset)
*tim_offset = offs.tim_offset;
@@ -3519,6 +3522,19 @@ struct sk_buff *ieee80211_beacon_get_tim(struct 
ieee80211_hw *hw,
if (tim_length)
*tim_length = offs.tim_length;
 
+   if (ieee80211_hw_check(hw, BEACON_TX_STATUS) ||
+   !hw_to_local(hw)->monitors)
+   return bcn;
+
+   /* send a copy to monitor interfaces */
+   copy = skb_copy(bcn, GFP_ATOMIC);
+   if (!copy)
+   return bcn;
+
+   shift = ieee80211_vif_get_shift(vif);
+   sband = hw->wiphy->bands[ieee80211_get_sdata_band(vif_to_sdata(vif))];
+   ieee80211_tx_monitor(hw_to_local(hw), copy, sband, 1, shift, false);
+
return bcn;
 }
 EXPORT_SYMBOL(ieee80211_beacon_get_tim);
-- 
1.8.4.5

--
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 DMA alloc failure for target requested memory chunks

2015-09-09 Thread Kalle Valo
Vasanthakumar Thiagarajan  writes:

> During long hours of stress testing like AP interface up/down along
> with continuous ping flood from a station doing connect/disconnect,
> it is observed that the system is not able to allocate DMA consistent
> memory of size > 512KB chunks as requested by firmware in WMI_SERVICE_EVENTID.
> With the system memory getting fragmented during the run based on the
> size of the memory requested, the failure to return physically continguous
> memory of high order can happen. Once the system gets to this situation,
> bringing up the wifi interface will fail and a system reboot may be needed
> to make it work again. This problem is obseved with QCA99X0.
>
> To fix this issue, allocate the DMA memory requested by firmware during
> device probe time and keep it during the life time of the device. WMI service
> ready event handler is changed to allocate the memory chunks if it is
> not already allocated or if the memory allocated for the previous ready
> event is not same as the current requested ones. After this patch the
> memory usage when wifi is inactive will be inceased by few 100KB to
> 3MB based on the target type.
>
> Failure happens with the following stack trace
>
> [29557.488773] kworker/u4:1: page allocation failure: order:8, mode:0xd0
> [29557.494297] CPU: 0 PID: 8402 Comm: kworker/u4:1 Not tainted 3.14.43 #7
> [29557.500793] Workqueue: ath10k_aux_wq ath10k_wmi_event_service_ready_work 
> [ath10k_core]
> [29557.508602] [] (unwind_backtrace) from [] 
> (show_stack+0x10/0x14)
> [29557.516580] [] (show_stack) from [] 
> (dump_stack+0x88/0xcc)
> [29557.523612] [] (dump_stack) from [] 
> (warn_alloc_failed+0xdc/0x108)
> [29557.531515] [] (warn_alloc_failed) from [] 
> (__alloc_pages_nodemask+0x4f0/0x654)
> [29557.540485] [] (__alloc_pages_nodemask) from [] 
> (__dma_alloc_buffer.isra.20+0x2c/0x104)
> [29557.550260] [] (__dma_alloc_buffer.isra.20) from [] 
> (__alloc_remap_buffer.isra.23+0x14/0xb8)
> [29557.560413] [] (__alloc_remap_buffer.isra.23) from [] 
> (__dma_alloc+0x224/0x2b8)
> [29557.569490] [] (__dma_alloc) from [] 
> (arm_dma_alloc+0x84/0x90)
> [29557.577010] [] (arm_dma_alloc) from [] 
> (ath10k_wmi_event_service_ready_work+0x2f8/0x420 [ath10k_core])
> [29557.588055] [] (ath10k_wmi_event_service_ready_work 
> [ath10k_core]) from [] (process_one_work+0x20c/0x328)
> [29557.599305] [] (process_one_work) from [] 
> (worker_thread+0x228/0x360)
> [29557.607470] [] (worker_thread) from [] 
> (kthread+0xd8/0xec)
> [29557.614750] [] (kthread) from [] 
> (ret_from_fork+0x14/0x3c)
> [29557.712751] Normal: 696*4kB (UEMR) 512*8kB (UEMR) 367*16kB (UEMR) 404*32kB 
> (UEMR) 455*64kB (UEMR) 424*128kB (UEMR) 379*256kB (UMR) 327*512kB (UMR) 
> 1*1024kB (R) 0*2048kB 0*4096kB = 374544kB
>
> Signed-off-by: Vasanthakumar Thiagarajan 

Thanks, applied.

-- 
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 2/2] ath10k: fix mu-mimo rx status reporting

2015-09-09 Thread Kalle Valo
Michal Kazior  writes:

> MU-MIMO Rx involves different interpretation of
> the VHT-SIG-A compared to SU-MIMO.
>
> The incorrect interpretation led ath10k to report
> VHT MCS values greater than 9 which subsequently
> prompted mac80211 to drop such frames. This
> effectively broke Rx with MU-MIMO in many cases
> and manifested with a kernel warning in the log
> which looked like this:
>
>   [   14.552520] WARNING: CPU: 2 PID: 0 at net/mac80211/rx.c:3578 
> ieee80211_rx+0x26c/0x940 [mac80211]()
>   [   14.552522] Rate marked as a VHT rate but data is invalid: MCS: 10, NSS: 
> 2
>   ... call trace follows ...
>
> Signed-off-by: Michal Kazior 

Thanks, patch 2 applied.

-- 
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: Drop probe responses when too many are queued

2015-09-09 Thread Kalle Valo
Vivek Natarajan  writes:

> In a noisy environment, when multiple interfaces are created,
> the management tx descriptors are fully occupied by the probe
> responses from all the interfaces. This prevents a new station
> from a successful association.
>
> Fix this by limiting the probe responses when the specified
> threshold limit is reached.
>
> Signed-off-by: Vivek Natarajan 

Thanks, applied.

-- 
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 3/3] ath10k: implement mesh support

2015-09-09 Thread Bob Copeland
On Wed, Sep 09, 2015 at 10:57:30AM +0300, Kalle Valo wrote:
> I did a quick smoke test and saw the splat below. It's this warning from
> cfg80211:
> 
>   /*
>* Don't advertise an unsupported type
>* in a combination.
>*/
>   if (WARN_ON((wiphy->interface_modes & types) != types))
>   return -EINVAL;
> 
> I didn't immeaditely figure out what's causing this, the interface types
> looked correct to me. Unfortunately I don't have time to investigate
> more at the moment, but will look later.

Doh!  Yeah this warning is exactly why I marked it supported even if you
couldn't use it due to missing rawmode support.   Obviously I missed one
of the cases, I'll take a look.

-- 
Bob Copeland %% http://bobcopeland.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 1/2] ath10k: fix beamformee VHT STS capability

2015-09-09 Thread Kalle Valo
Bartosz Markowski  writes:

> The VHT STS CAP shall be reported by firmware to host, like in case of
> QCA99x0. For QCA6174 hw family this isn't set for some reason.
> So for this particular chips, let's assume it has the ability to
> support VHT NDP in up to 4 STSs (which is true by the way).
>
> Change the published beamformee STS cap accordingly to 3 or to what
> the firmware reports.
>
> Assumption so far, it suppose to be the num_rf_chains-1, was
> completely wrong.
>
> Signed-off-by: Bartosz Markowski 

Thanks, both patches applied.

-- 
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/1] rtl8xxxu (mac80211) driver for rtl8188[cr]u/rtl8192cu/rtl8723au

2015-09-09 Thread Bruno Randolf
On 09/08/2015 10:01 PM, Jes Sorensen wrote:
> I do not fully agree on this. In my testing I found rtl8192cu rather
> unstable, to the point of not being usable. It would lock up for me
> after a short while. I have seen this happen with mulitple different
> adapters. I suspect this is the reason why drivers/staging/rtl8192u is
> still sitting in the kernel tree.

I second this. Problems with rtc8192cu have been mentioned on this list
before: http://www.spinics.net/lists/linux-wireless/msg138538.html
I recently saw similar problems in STA mode as well.

> My take is that the majority of users mostly care about station support
> and for them rtl8xxxu will be much preferred to rtl8192cu.

Right. Users who need AP or IBSS mode can usually be expected to be able
to change kernel configurations or blacklist modules.

Also we hope that rtl8xxxu will be extended in the future to support
IBSS and AP mode as well! :)

bruno

--
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] ath: use PRI value given by spec for fixed PRI

2015-09-09 Thread Kalle Valo
Peter Oh  writes:

> PRI value is used as divider when DFS detector analyzes candidate
> radar pulses.
> If PRI deviation is big from its origin PRI, DFS detector could miss
> valid radar reports since HW often misses detecting radar pulses and
> causes long interval value of pulses.
>
> For instance from practical results, if runtime PRI is calculated as
> 1431 for fixed PRI value of 1428 and delta timestamp logs 15719,
> the modular remainder will be 1409 and the delta between the remainder
> and runtime PRI is 22 that is bigger than PRI tolerance which is 16.
> As a result this radar report will be ignored even though it's valid.
>
> By using spec defined PRI for fixed PRI, we can correct this error.
>
> Signed-off-by: Peter Oh 

A changelog would be good to have. What changed in v2?

-- 
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: invalid mcs reported in rx descriptor

2015-09-09 Thread Kalle Valo
 writes:

> From: Manikanta Pubbisetty 
>
> Sometimes hardware reports invalid mcs index in rx descriptor
> when operating in VHT80 mode and all packets with invalid mcs
> will be eventually dropped in mac80211. This issue is observerd during
> testing on QCA99X0 chipsets.
>
> This patch adds a warn message for dumping the rx desc info which helps
> in analysing the issue when invalid mcs is received.
>
> Signed-off-by: Manikanta Pubbisetty 

Thanks, applied. I just changed the commit title a bit:

commit 6ccea107eba46fbc7de40e944bf17145c2809666
Author: Manikanta Pubbisetty 
Date:   Wed Sep 2 17:05:27 2015 +0300

ath10k: print invalid mcs reported in rx descriptor

-- 
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] ath9k: Add support for OCB mode

2015-09-09 Thread Jan Kaisrlik
The patch adds support for "outside the context of a BSS"(OCB) mode
to ath9k driver and extends debugfs files by OCB ralated information.

This patch was tested on AR9380-AL1A cards.

Signed-off-by: Jan Kaisrlik 
Cc: Michal Sojka 
---
 drivers/net/wireless/ath/ath9k/ani.c  |  1 +
 drivers/net/wireless/ath/ath9k/ath9k.h|  1 +
 drivers/net/wireless/ath/ath9k/debug.c|  4 ++--
 drivers/net/wireless/ath/ath9k/htc_drv_init.c |  3 ++-
 drivers/net/wireless/ath/ath9k/hw.c   |  1 +
 drivers/net/wireless/ath/ath9k/init.c |  3 ++-
 drivers/net/wireless/ath/ath9k/main.c | 11 +--
 drivers/net/wireless/ath/ath9k/recv.c |  2 +-
 drivers/net/wireless/ath/debug.c  |  2 ++
 9 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ani.c 
b/drivers/net/wireless/ath/ath9k/ani.c
index 25e45e4..0ec2c0b 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -342,6 +342,7 @@ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning)
 
if (is_scanning ||
(ah->opmode != NL80211_IFTYPE_STATION &&
+ah->opmode != NL80211_IFTYPE_OCB &&
 ah->opmode != NL80211_IFTYPE_ADHOC)) {
/*
 * If we're scanning or in AP mode, the defaults (ini)
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h 
b/drivers/net/wireless/ath/ath9k/ath9k.h
index c85c479..b42f4a9 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -635,6 +635,7 @@ struct ath9k_vif_iter_data {
int nstations; /* number of station vifs */
int nwds;  /* number of WDS vifs */
int nadhocs;   /* number of adhoc vifs */
+   int nocbs; /* number of OCB vifs */
struct ieee80211_vif *primary_sta;
 };
 
diff --git a/drivers/net/wireless/ath/ath9k/debug.c 
b/drivers/net/wireless/ath/ath9k/debug.c
index da32c8f..6de64cf 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -741,8 +741,8 @@ static int read_file_misc(struct seq_file *file, void *data)
   i++, (int)(ctx->assigned), iter_data.naps,
   iter_data.nstations,
   iter_data.nmeshes, iter_data.nwds);
-   seq_printf(file, " ADHOC: %i TOTAL: %hi BEACON-VIF: %hi\n",
-  iter_data.nadhocs, sc->cur_chan->nvifs,
+   seq_printf(file, " ADHOC: %i OCB: %i TOTAL: %hi BEACON-VIF: 
%hi\n",
+  iter_data.nadhocs, iter_data.nocbs, 
sc->cur_chan->nvifs,
   sc->nbcnvifs);
}
 
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c 
b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 1e84882..5e53040 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -736,7 +736,8 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
BIT(NL80211_IFTYPE_AP) |
BIT(NL80211_IFTYPE_P2P_GO) |
BIT(NL80211_IFTYPE_P2P_CLIENT) |
-   BIT(NL80211_IFTYPE_MESH_POINT);
+   BIT(NL80211_IFTYPE_MESH_POINT) |
+   BIT(NL80211_IFTYPE_OCB);
 
hw->wiphy->iface_combinations = _comb;
hw->wiphy->n_iface_combinations = 1;
diff --git a/drivers/net/wireless/ath/ath9k/hw.c 
b/drivers/net/wireless/ath/ath9k/hw.c
index 1dd0339..2144362 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1234,6 +1234,7 @@ static void ath9k_hw_set_operating_mode(struct ath_hw 
*ah, int opmode)
 
ENABLE_REG_RMW_BUFFER(ah);
switch (opmode) {
+   case NL80211_IFTYPE_OCB:
case NL80211_IFTYPE_ADHOC:
if (!AR_SREV_9340_13(ah)) {
set |= AR_STA_ID1_ADHOC;
diff --git a/drivers/net/wireless/ath/ath9k/init.c 
b/drivers/net/wireless/ath/ath9k/init.c
index 57f95f2..5d532c7 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -855,7 +855,8 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct 
ieee80211_hw *hw)
BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC) |
BIT(NL80211_IFTYPE_MESH_POINT) |
-   BIT(NL80211_IFTYPE_WDS);
+   BIT(NL80211_IFTYPE_WDS) |
+   BIT(NL80211_IFTYPE_OCB);
 
if (ath9k_is_chanctx_enabled())
hw->wiphy->interface_modes |=
diff --git a/drivers/net/wireless/ath/ath9k/main.c 
b/drivers/net/wireless/ath/ath9k/main.c
index c27143b..f121ec0 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -938,6 +938,9 @@ static void ath9k_vif_iter(struct ath9k_vif_iter_data 
*iter_data,
if 

Re: iwlwifi: FW error in SYNC CMD MAC_CONTEXT_CMD

2015-09-09 Thread Andreas Reis

Hi,

> seems that your system is trying to connect to two different APs 
forth and back


Yes, this is a major network with multiple APs for each of its SSIDs 
always available. Unlike my single AP home network, unsurprisingly.


> whether you have more than wpa_supplicant instance running

I disabled wicd, invoked wpa_supplicant manually and checked with pidof, 
there isn't. I also checked for changes with wpa_supplicant 2.3 vs git, 
none.


> was this working before you upgraded to iwlwifi-next 5bff6536f742

That's the weird part, IIRC it and the 16er firmware actually were 
working fine *with* it (I had 4.2-RCs running with available 
iwlwifi-next commits for weeks), which is why I was inclined to blame 
net.git until I found out that it currently doesn't work with the 
vanilla Arch 4.2-3 kernel either. Honestly no idea why.


But I'll check with iwlwifi-next-for-kalle-2015-08-23 tomorrow.

> directions in our debugging wiki page

Two remarks on that page:
iwlfwdump.sh should probably get a note about chmod +x
trace-cmd is not part of standard kernel packages and thus should get a 
note that it may need to be installed separately


Since I wasn't aware of the latter, I'll only be able to post a trace in 
a bugzilla report tomorrow–


– if that isn't bugged as well: "echo 1 > 
/sys/kernel/debug/iwlwifi/\:02\:00.0/iwlmvm/fw_dbg_collect" 
currently yields a "file exists", cat'ing it an invalid argument error, 
"echo 1 >>" ostensibly works but shows in dmesg as (1), see "excerpts" 
attachment.


(2) shows an example of what wpa_supplicant currently prints. This 
continues ad inf, and at some non-predictable point the driver bug(s?) 
and/or FW reset appear in dmesg. (3) shows two more variants I got with 
net.git (now at 7845989) and Arch's 4.2-3 kernel.


dmesg is also spammed with "r8169 :03:00.1 enp3s0f1: 
rtl_counters_cond == 1 (loop: 1000, delay: 10).", but that's prob an 
unrelated bug which has been there (but far) less frequent since early 4.2.


As for net.git kernel config, "grep IWLWIFI":
CONFIG_IWLWIFI=m
CONFIG_IWLWIFI_LEDS=y
CONFIG_IWLWIFI_OPMODE_MODULAR=y
CONFIG_IWLWIFI_BCAST_FILTERING=y
CONFIG_IWLWIFI_UAPSD=y
CONFIG_IWLWIFI_DEBUG=y
CONFIG_IWLWIFI_DEBUGFS=y
# CONFIG_IWLWIFI_DEBUG_EXPERIMENTAL_UCODE is not set
CONFIG_IWLWIFI_DEVICE_TRACING=y

-- Andreas

On 08.09.2015 08:31, Luca Coelho wrote:

Adding our new list to CC.


On Tue, 2015-09-08 at 08:37 +0300, Luca Coelho wrote:

Hi Anreas,

On Mon, 2015-09-07 at 15:40 +0200, Andreas Reis wrote:

Updated to
net.git: 46cdc9b (ie. with mac80211 2015-09-04)
+ iwlwifi-next.git commits up to 5bff653
iwlwifi firmware: 16.215201.0

now connecting to my WPA-802.1X with a Intel 7260 fails, see dmesg.

  From the wifi's wpa_supplicant file (actually wicd somehow
accumulated
different ones for this SSID, but the following should be it):
  proto=RSN
  key_mgmt=WPA-EAP
  pairwise=CCMP
  eap=PEAP
  phase2="auth=MSCHAPv2"

Meanwhile my WPA2-PSK at home still works.


According to the dmesg you attached, it seems that we're bouncing
between two APs:

[  214.644607] wlp2s0: authenticate with 9c:1c:12:c1:26:82
...
[  214.798595] wlp2s0: deauthenticated from 9c:1c:12:c1:26:82
(Reason: 3=DEAUTH_LEAVING)
...
[  218.001901] wlp2s0: authenticate with 18:64:72:26:de:22
...
[  218.054498] wlp2s0: deauthenticated from 18:64:72:26:de:22
(Reason: 3=DEAUTH_LEAVING)

It seems that your system is trying to connect to two different APs
forth and back.  After each association succeeds, the userspace seems
to trigger a deauth (DEAUTH_LEAVING) and goes to the other AP
again...

This sometimes indicates that two instances of wpa_supplicant are
competing with each other.  Can you check whether you have more than
one wpa_supplicant instance running?

In any case, there seems to be a driver bug at some point, because we
get a firmware SYSASSERT.  To debug that, could you follow the
directions in our debugging wiki page [1] and create a bug in
bugzilla?
Please provide trace-cmd logs (as explained in the wiki) so we can
try
to figure out what is going on.

One final question, was this working before you upgraded to iwlwifi
-next 5bff6536f742?

Thanks for reporting!

[1]
https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/debugging

--
Cheers,
Luca.
--
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


(1)

[ 1128.593291] WARNING: CPU: 2 PID: 316 at 
drivers/net/wireless/iwlwifi/pcie/trans.c:1549 
iwl_trans_pcie_grab_nic_access+0xfb/0x110 [iwlwifi]()
[ 1128.593293] Timeout waiting for hardware access (CSR_GP_CNTRL 0x080403d8)
[ 1128.593295] Modules linked in: f2fs uas usb_storage iwlmvm iwlwifi nfsd nfs 
auth_rpcgss oid_registry nfs_acl lockd grace sunrpc ip_tables x_tables
[ 1128.593310] CPU: 2 PID: 316 Comm: kworker/2:2 Tainted: GW I 
4.2.0-1-ck #1
[ 1128.593312] Hardware name: Notebook   

Re: [PATCH 1/1] New driver: rtl8723au (mac80211)

2015-09-09 Thread Jes Sorensen
Larry Finger  writes:
> On 09/07/2015 01:43 PM, Jes Sorensen wrote:
>> Kalle Valo  writes:
>>> Hi,
>>>
>>> replying to an old thread first.
>>>
>>> Jes Sorensen  writes:
>>>
 Kalle Valo  writes:
> jes.soren...@redhat.com writes:
>
>>   MAINTAINERS  |8 +
>>   drivers/net/wireless/Kconfig |   19 +
>>   drivers/net/wireless/Makefile|2 +
>>   drivers/net/wireless/rtl8xxxu.c | 4500
>> ++
>>   drivers/net/wireless/rtl8xxxu.h  |  497 
>>   drivers/net/wireless/rtl8xxxu_regs.h |  941 +++
>
> I think someone else already mentioned, but it would be better that has
> it's own directory. Or should this actually be under rtlwifi
> directory?

 I didn't see the need here - it's just 3 files, as long as it doesn't
 have a huge hierachy of files, a new directory doesn't add much
 value. If it becomes an issue later, we can move it into a
 subdirectory.
>>>
>>> It's easier that the driver has it's on directory as everything
>>> (makefile, kconfig etc) is cleanly separated. And actually I would like
>>> to create a new vendor directory for realtek and have this in
>>> drivers/net/wireless/realtek/rtl8xxxu/. And later we could move rtlwifi
>>> under realtek directory as well.
>>
>> If you want to create drivers/net/wireless/realtek, that is fine with
>> me, but maybe you can go ahead and create that first and move the
>> existing drivers in there?
>
> I will submit a patch to do that.

Awesome, once I see that go in, I'll move rtl8xxxu into that directory.

Cheers,
Jes
--
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] ath9k: Add support for OCB mode

2015-09-09 Thread Felix Fietkau
On 2015-09-09 14:55, Jan Kaisrlik wrote:
> The patch adds support for "outside the context of a BSS"(OCB) mode
> to ath9k driver and extends debugfs files by OCB ralated information.
> 
> This patch was tested on AR9380-AL1A cards.
> 
> Signed-off-by: Jan Kaisrlik 
> Cc: Michal Sojka 
> ---
>  drivers/net/wireless/ath/ath9k/ani.c  |  1 +
>  drivers/net/wireless/ath/ath9k/ath9k.h|  1 +
>  drivers/net/wireless/ath/ath9k/debug.c|  4 ++--
>  drivers/net/wireless/ath/ath9k/htc_drv_init.c |  3 ++-
>  drivers/net/wireless/ath/ath9k/hw.c   |  1 +
>  drivers/net/wireless/ath/ath9k/init.c |  3 ++-
>  drivers/net/wireless/ath/ath9k/main.c | 11 +--
>  drivers/net/wireless/ath/ath9k/recv.c |  2 +-
>  drivers/net/wireless/ath/debug.c  |  2 ++
>  9 files changed, 21 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/ani.c 
> b/drivers/net/wireless/ath/ath9k/ani.c
> index 25e45e4..0ec2c0b 100644
> --- a/drivers/net/wireless/ath/ath9k/ani.c
> +++ b/drivers/net/wireless/ath/ath9k/ani.c
> @@ -342,6 +342,7 @@ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning)
>  
>   if (is_scanning ||
>   (ah->opmode != NL80211_IFTYPE_STATION &&
> +  ah->opmode != NL80211_IFTYPE_OCB &&
>ah->opmode != NL80211_IFTYPE_ADHOC)) {
>   /*
>* If we're scanning or in AP mode, the defaults (ini)
I don't think OCB should be treated like STA/Ad-Hoc for ANI purposes.
In fact, I think most places inside ath9k_hw should treat OCB the same
as AP - maybe even by leaving ah->opmode at NL80211_IFTYPE_AP for OCB.

> diff --git a/drivers/net/wireless/ath/ath9k/hw.c 
> b/drivers/net/wireless/ath/ath9k/hw.c
> index 1dd0339..2144362 100644
> --- a/drivers/net/wireless/ath/ath9k/hw.c
> +++ b/drivers/net/wireless/ath/ath9k/hw.c
> @@ -1234,6 +1234,7 @@ static void ath9k_hw_set_operating_mode(struct ath_hw 
> *ah, int opmode)
>  
>   ENABLE_REG_RMW_BUFFER(ah);
>   switch (opmode) {
> + case NL80211_IFTYPE_OCB:
>   case NL80211_IFTYPE_ADHOC:
>   if (!AR_SREV_9340_13(ah)) {
>   set |= AR_STA_ID1_ADHOC;
Why treat OCB like Ad-hoc for STA_ID1?

> diff --git a/drivers/net/wireless/ath/ath9k/main.c 
> b/drivers/net/wireless/ath/ath9k/main.c
> index c27143b..f121ec0 100644
> --- a/drivers/net/wireless/ath/ath9k/main.c
> +++ b/drivers/net/wireless/ath/ath9k/main.c

> @@ -1122,7 +1127,8 @@ void ath9k_calculate_summary_state(struct ath_softc *sc,
>   ath9k_hw_setopmode(ah);
>  
>   ctx->switch_after_beacon = false;
> - if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0)
> + if ((iter_data.nstations + iter_data.nadhocs +
> +  iter_data.nmeshes + iter_data.nocbs) > 0)
>   ah->imask |= ATH9K_INT_TSFOOR;
>   else {
>   ah->imask &= ~ATH9K_INT_TSFOOR;
Enabling the TSFOOR interrupt for OCB seems completely wrong to me. If I
understand this mode correctly, there are no beacons, hence no TSF
synchronization.

- Felix
--
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] staging: wilc1000: delete wilc_oswrapper.h and wilc_platform.h

2015-09-09 Thread Tony Cho

Hi Greg,

I want to make sure one thing before moving further. Are you saying the 
errorsupport.h file as the os wrapper remaining in the oswrapper.h file?
If not, can you let me know what you point out as remaining os wrapper in the 
oswrapper.h file?
If yes, I have been already replacing all of error values defined in the 
errorsupport.h file so that I send you the next patch when done.

Thanks,
Tony.

On 2015년 09월 10일 03:19, Greg KH wrote:

On Wed, Sep 09, 2015 at 04:08:12PM +0900, Tony Cho wrote:

From: Glen Lee 

wilc1000 driver runs on Linux. No need to have oswrapper or platform
dependent files.
Before delete two header files, move two structures in wilc_platform.h to
wilc_msgqueue.h where it is used. Include linux header files where is needs
since wilc_platform is deleted.
Finally, remove wilc_oswrapper.h and wilc_platform.h.

That's a lot of different things to be doing all in one patch.  Please
break this up into individual patches.

And you can't just delete the oswrapper.h file, you still have things in
it, don't move it for no reason, get rid of those wrapper functions
properly first, making the file empty, and then you can delete it.
Moving them to a different .h file just hides the fact that this work
still needs to be done.

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/4] staging: wilc1000: remove kmalloc wrapper

2015-09-09 Thread Tony Cho



On 2015년 09월 10일 03:17, Greg KH wrote:

On Wed, Sep 09, 2015 at 04:08:10PM +0900, Tony Cho wrote:

From: Glen Lee 

Call kmalloc directly. No need to wrap kmalloc.
Only one function, wilc_mq_send which use WILC_MALLOC, can be running in
interrupt context or process context. In this case, We call in_interrupt to
decide the flag, GFP_ATOMIC or GFP_KERNEL, for kmalloc properly. Additionally,
there is one kmalloc which flag is always GFP_ATOMIC. This also changed
together.
Others are not holding a spin lock or in interrupt context. So use GFP_KERNEL
flag for kmalloc.

Signed-off-by: Glen Lee 
Signed-off-by: Tony Cho 
---
  drivers/staging/wilc1000/host_interface.c | 110 +++---
  drivers/staging/wilc1000/linux_wlan.c |   2 +-
  drivers/staging/wilc1000/wilc_msgqueue.c  |  10 +-
  drivers/staging/wilc1000/wilc_wfi_cfgoperations.c |  38 
  4 files changed, 83 insertions(+), 77 deletions(-)

This no longer applies to my staging-testing branch, can you rebase it
and resend it and the other patches in this series?

thanks,

greg k-h


I will resend this patch with Kconfig with BROKEN removed.

Thanks,
Tony.


--
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] staging: wilc1000: delete wilc_oswrapper.h and wilc_platform.h

2015-09-09 Thread Greg KH
On Thu, Sep 10, 2015 at 11:08:25AM +0900, Tony Cho wrote:
> Hi Greg,
> 
> I want to make sure one thing before moving further. Are you saying
> the errorsupport.h file as the os wrapper remaining in the oswrapper.h
> file?  If not, can you let me know what you point out as remaining os
> wrapper in the oswrapper.h file?

I don't remember at this point in time, sorry, that was a few hundred
patches I reviewed ago, and 5 hours of meetings after that...

> If yes, I have been already replacing all of error values defined in
> the errorsupport.h file so that I send you the next patch when done.

That would be good to have.

I think my point was that you can't just move things from a .h file to
another .h file, clean up the os wrappers by removing them entirely,
like I did with the other wrapper functions for delays and other things.

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] staging: wilc1000: remove BROKEN status

2015-09-09 Thread Tony Cho
This patch removes BROKEN status from the Kconfig.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/wilc1000/Kconfig b/drivers/staging/wilc1000/Kconfig
index 51bbf46..59ccecc 100644
--- a/drivers/staging/wilc1000/Kconfig
+++ b/drivers/staging/wilc1000/Kconfig
@@ -1,6 +1,5 @@
 config WILC1000
tristate "WILC1000 support (WiFi only)"
-   depends on BROKEN
depends on !S390
depends on CFG80211 && WEXT_CORE && INET
depends on MMC || SPI
-- 
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 1/2] staging: wilc1000: remove kmalloc wrapper

2015-09-09 Thread Tony Cho
From: Glen Lee 

This patch calls kmalloc() directly. No need to wrap kmalloc().
All is not holding a spin lock or in interrupt context. So use GFP_KERNEL
flag for kmalloc.

Signed-off-by: Glen Lee 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 110 +++---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c |  38 
 2 files changed, 74 insertions(+), 74 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 8033205..59a1a9d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -841,7 +841,7 @@ s32 Handle_get_IPAddress(tstrWILC_WFIDrv *drvHandler, u8 
*pu8IPAddr, u8 idx)
/*prepare configuration packet*/
strWID.u16WIDid = (u16)WID_IP_ADDRESS;
strWID.enuWIDtype = WID_STR;
-   strWID.ps8WidVal = WILC_MALLOC(IP_ALEN);
+   strWID.ps8WidVal = kmalloc(IP_ALEN, GFP_KERNEL);
strWID.s32ValueSize = IP_ALEN;
 
s32Error = SendConfigPkt(GET_CFG, , 1, true,
@@ -891,7 +891,7 @@ static s32 Handle_SetMacAddress(tstrWILC_WFIDrv 
*drvHandler, tstrHostIfSetMacAdd
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
-   u8 *mac_buf = WILC_MALLOC(ETH_ALEN);
+   u8 *mac_buf = kmalloc(ETH_ALEN, GFP_KERNEL);
 
if (mac_buf == NULL) {
PRINT_ER("No buffer to send mac address\n");
@@ -1339,7 +1339,7 @@ static s32 Handle_Scan(tstrWILC_WFIDrv *drvHandler, 
tstrHostIFscanAttr *pstrHost
 
for (i = 0; i < pstrHostIFscanAttr->strHiddenNetwork.u8ssidnum; i++)
valuesize += 
((pstrHostIFscanAttr->strHiddenNetwork.pstrHiddenNetworkInfo[i].u8ssidlen) + 1);
-   pu8HdnNtwrksWidVal = WILC_MALLOC(valuesize + 1);
+   pu8HdnNtwrksWidVal = kmalloc(valuesize + 1, GFP_KERNEL);
strWIDList[u32WidsCount].ps8WidVal = pu8HdnNtwrksWidVal;
if (strWIDList[u32WidsCount].ps8WidVal != NULL) {
pu8Buffer = strWIDList[u32WidsCount].ps8WidVal;
@@ -1616,13 +1616,13 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, 
tstrHostIFconnectAttr *ps
PRINT_INFO(HOSTINF_DBG, "Saving connection parameters in global 
structure\n");
 
if (pstrHostIFconnectAttr->pu8bssid != NULL) {
-   pstrWFIDrv->strWILC_UsrConnReq.pu8bssid = 
WILC_MALLOC(6);
+   pstrWFIDrv->strWILC_UsrConnReq.pu8bssid = kmalloc(6, 
GFP_KERNEL);
memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8bssid, 
pstrHostIFconnectAttr->pu8bssid, 6);
}
 
pstrWFIDrv->strWILC_UsrConnReq.ssidLen = 
pstrHostIFconnectAttr->ssidLen;
if (pstrHostIFconnectAttr->pu8ssid != NULL) {
-   pstrWFIDrv->strWILC_UsrConnReq.pu8ssid = 
WILC_MALLOC(pstrHostIFconnectAttr->ssidLen + 1);
+   pstrWFIDrv->strWILC_UsrConnReq.pu8ssid = 
kmalloc(pstrHostIFconnectAttr->ssidLen + 1, GFP_KERNEL);
memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8ssid, 
pstrHostIFconnectAttr->pu8ssid,
pstrHostIFconnectAttr->ssidLen);

pstrWFIDrv->strWILC_UsrConnReq.pu8ssid[pstrHostIFconnectAttr->ssidLen] = '\0';
@@ -1630,7 +1630,7 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, 
tstrHostIFconnectAttr *ps
 
pstrWFIDrv->strWILC_UsrConnReq.ConnReqIEsLen = 
pstrHostIFconnectAttr->IEsLen;
if (pstrHostIFconnectAttr->pu8IEs != NULL) {
-   pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs = 
WILC_MALLOC(pstrHostIFconnectAttr->IEsLen);
+   pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs = 
kmalloc(pstrHostIFconnectAttr->IEsLen, GFP_KERNEL);
memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs, 
pstrHostIFconnectAttr->pu8IEs,
pstrHostIFconnectAttr->IEsLen);
}
@@ -1724,13 +1724,13 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, 
tstrHostIFconnectAttr *ps
#endif /*WILC_PARSE_SCAN_IN_HOST*/
 
if (pstrHostIFconnectAttr->pu8bssid != NULL) {
-   pstrWFIDrv->strWILC_UsrConnReq.pu8bssid = WILC_MALLOC(6);
+   pstrWFIDrv->strWILC_UsrConnReq.pu8bssid = kmalloc(6, 
GFP_KERNEL);
memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8bssid, 
pstrHostIFconnectAttr->pu8bssid, 6);
}
 
pstrWFIDrv->strWILC_UsrConnReq.ssidLen = pstrHostIFconnectAttr->ssidLen;
if (pstrHostIFconnectAttr->pu8ssid != NULL) {
-   pstrWFIDrv->strWILC_UsrConnReq.pu8ssid = 
WILC_MALLOC(pstrHostIFconnectAttr->ssidLen + 1);
+   pstrWFIDrv->strWILC_UsrConnReq.pu8ssid = 
kmalloc(pstrHostIFconnectAttr->ssidLen + 1, GFP_KERNEL);
memcpy(pstrWFIDrv->strWILC_UsrConnReq.pu8ssid, 

[PATCH v2 2/2] staging: wilc1000: delete wilc_memory.c and wilc_memory.h

2015-09-09 Thread Tony Cho
From: Glen Lee 

The macro WILC_MALLOC is not used in the driver anymore, so just
delete files.

Signed-off-by: Glen Lee 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/Makefile |  2 +-
 drivers/staging/wilc1000/wilc_memory.c| 16 
 drivers/staging/wilc1000/wilc_memory.h| 66 ---
 drivers/staging/wilc1000/wilc_msgqueue.h  |  1 -
 drivers/staging/wilc1000/wilc_oswrapper.h |  4 --
 5 files changed, 1 insertion(+), 88 deletions(-)
 delete mode 100644 drivers/staging/wilc1000/wilc_memory.c
 delete mode 100644 drivers/staging/wilc1000/wilc_memory.h

diff --git a/drivers/staging/wilc1000/Makefile 
b/drivers/staging/wilc1000/Makefile
index 8336a89..bdeffea 100644
--- a/drivers/staging/wilc1000/Makefile
+++ b/drivers/staging/wilc1000/Makefile
@@ -21,7 +21,7 @@ ccflags-$(CONFIG_WILC1000_DYNAMICALLY_ALLOCATE_MEMROY) += 
-DWILC_NORMAL_ALLOC
 
 
 wilc1000-objs := wilc_wfi_cfgoperations.o linux_wlan.o linux_mon.o \
-   wilc_memory.o wilc_msgqueue.o \
+   wilc_msgqueue.o \
coreconfigurator.o host_interface.o \
wilc_sdio.o wilc_spi.o wilc_wlan_cfg.o wilc_debugfs.o
 
diff --git a/drivers/staging/wilc1000/wilc_memory.c 
b/drivers/staging/wilc1000/wilc_memory.c
deleted file mode 100644
index e90a957..000
--- a/drivers/staging/wilc1000/wilc_memory.c
+++ /dev/null
@@ -1,16 +0,0 @@
-
-#include "wilc_memory.h"
-
-/*!
- *  @authorsyounan
- *  @date  18 Aug 2010
- *  @version   1.0
- */
-void *WILC_MemoryAlloc(u32 u32Size, tstrWILC_MemoryAttrs *strAttrs,
-  char *pcFileName, u32 u32LineNo)
-{
-   if (u32Size > 0)
-   return kmalloc(u32Size, GFP_ATOMIC);
-   else
-   return NULL;
-}
diff --git a/drivers/staging/wilc1000/wilc_memory.h 
b/drivers/staging/wilc1000/wilc_memory.h
deleted file mode 100644
index f19cec1..000
--- a/drivers/staging/wilc1000/wilc_memory.h
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef __WILC_MEMORY_H__
-#define __WILC_MEMORY_H__
-
-/*!
- *  @file  wilc_memory.h
- *  @brief Memory OS wrapper functionality
- *  @authorsyounan
- *  @sawilc_oswrapper.h top level OS wrapper file
- *  @date  16 Aug 2010
- *  @version   1.0
- */
-
-#include 
-#include 
-
-/*!
- *  @struct tstrWILC_MemoryAttrs
- *  @brief Memory API options
- *  @authorsyounan
- *  @date  16 Aug 2010
- *  @version   1.0
- */
-typedef struct {
-} tstrWILC_MemoryAttrs;
-
-/*!
- *  @brief Allocates a given size of bytes
- *  @param[in] u32Size size of memory in bytes to be allocated
- *  @param[in] strAttrs Optional attributes, NULL for default
- *  if not NULL, pAllocationPool should point to the pool to use 
for
- *  this allocation. if NULL memory will be allocated directly from
- *  the system
- *  @param[in] pcFileName file name of the calling code for debugging
- *  @param[in] u32LineNo line number of the calling code for debugging
- *  @returnThe new allocated block, NULL if allocation fails
- *  @note  It is recommended to use of of the wrapper macros instead of
- *  calling this function directly
- *  @sasttrWILC_MemoryAttrs
- *  @saWILC_MALLOC
- *  @saWILC_MALLOC_EX
- *  @authorsyounan
- *  @date  16 Aug 2010
- *  @version   1.0
- */
-void *WILC_MemoryAlloc(u32 u32Size, tstrWILC_MemoryAttrs *strAttrs,
-  char *pcFileName, u32 u32LineNo);
-
-/*!
- * @brief  standrad malloc wrapper with custom attributes
- */
-   #define WILC_MALLOC_EX(__size__, __attrs__) \
-   (WILC_MemoryAlloc( \
-(__size__), __attrs__, NULL, 0))
-
-
-/*!
- * @brief  standrad malloc wrapper with default attributes
- */
-#define WILC_MALLOC(__size__) \
-   WILC_MALLOC_EX(__size__, NULL)
-
-
-
-
-
-#endif
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h 
b/drivers/staging/wilc1000/wilc_msgqueue.h
index fc65dfe..fb26463 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -12,7 +12,6 @@
 
 #include "wilc_platform.h"
 #include "wilc_errorsupport.h"
-#include "wilc_memory.h"
 
 /*!
  *  @brief Creates a new Message queue
diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h 
b/drivers/staging/wilc1000/wilc_oswrapper.h
index cb48325..68f6efe 100644
--- a/drivers/staging/wilc1000/wilc_oswrapper.h
+++ b/drivers/staging/wilc1000/wilc_oswrapper.h
@@ -19,10 +19,6 @@
 /* Error reporting and handling support */
 #include "wilc_errorsupport.h"
 
-/* Memory support */
-#include "wilc_memory.h"
-
-
 /* Message Queue */
 #include "wilc_msgqueue.h"
 
-- 
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 

Re: [PATCH 3/3] ath10k: implement mesh support

2015-09-09 Thread Kalle Valo
Bob Copeland  writes:

> On Wed, Sep 09, 2015 at 12:10:38PM +0300, Kalle Valo wrote:
>> > I did a quick smoke test and saw the splat below. It's this warning from
>> > cfg80211:
>> >
>> >/*
>> > * Don't advertise an unsupported type
>> > * in a combination.
>> > */
>> >if (WARN_ON((wiphy->interface_modes & types) != types))
>> >return -EINVAL;
>
> OK, this happens when mesh is configured out (we mask off the mesh
> interface_modes internally but not the types).  Sent an updated version
> with appropriate ifdefs added.

Indeed, when I enabled CONFIG_MAC80211_MESH I didn't see the WARN_ON()
anymore. (I haven't tested your latest version yet, will do it soon)

-- 
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] ath: fix incorrect PPB on JAPAN chirp radar

2015-09-09 Thread Peter Oh
The number of pulses per burst on Japan chirp radar is
between 1 and 3. The previous value, 20, is representing
number of bursts, but since current DFS detector is using
pulse detection other than bursts, use the pulse number
for correct radar detection.
Also using the highest number helps to avoid false detection.

Signed-off-by: Peter Oh 
---
 drivers/net/wireless/ath/dfs_pattern_detector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/dfs_pattern_detector.c 
b/drivers/net/wireless/ath/dfs_pattern_detector.c
index 656ce42..5aa053a 100644
--- a/drivers/net/wireless/ath/dfs_pattern_detector.c
+++ b/drivers/net/wireless/ath/dfs_pattern_detector.c
@@ -121,7 +121,7 @@ static const struct radar_detector_specs 
jp_radar_ref_types[] = {
JP_PATTERN(4, 0, 5, 150, 230, 1, 23, 50, false),
JP_PATTERN(5, 6, 10, 200, 500, 1, 16, 50, false),
JP_PATTERN(6, 11, 20, 200, 500, 1, 12, 50, false),
-   JP_PATTERN(7, 50, 100, 1000, 2000, 1, 20, 50, false),
+   JP_PATTERN(7, 50, 100, 1000, 2000, 1, 3, 50, false),
JP_PATTERN(5, 0, 1, 333, 333, 1, 9, 50, false),
 };
 
-- 
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] net/mac80211/rate.c: fix wrong sizeof()

2015-09-09 Thread Sergei Trofimovich
From: Sergei Trofimovich 

Noticed by gcc-5.2.0:

net/mac80211/rate.c: In function 'rate_control_cap_mask':
net/mac80211/rate.c:719:25: warning: 'sizeof' on array function parameter 
'mcs_mask' will return size of 'u8 * {aka unsigned char *}' 
[-Wsizeof-array-argument]
   for (i = 0; i < sizeof(mcs_mask); i++)
 ^

CC: Lorenzo Bianconi 
CC: Johannes Berg 
CC: "David S. Miller" 
CC: linux-wireless@vger.kernel.org
CC: net...@vger.kernel.org
CC: linux-ker...@vger.kernel.org
Signed-off-by: Sergei Trofimovich 
---
 net/mac80211/rate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 9857693..9ce8883 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -716,7 +716,7 @@ static bool rate_control_cap_mask(struct 
ieee80211_sub_if_data *sdata,
 
/* Filter out rates that the STA does not support */
*mask &= sta->supp_rates[sband->band];
-   for (i = 0; i < sizeof(mcs_mask); i++)
+   for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++)
mcs_mask[i] &= sta->ht_cap.mcs.rx_mask[i];
 
sta_vht_cap = sta->vht_cap.vht_mcs.rx_mcs_map;
-- 
2.5.0

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


[PATCH v3 3/3] ath10k: implement mesh support

2015-09-09 Thread Bob Copeland
Add support for mesh to ath10k.  We simply use an AP virtual interface
in the firmware in order to enable beaconing without TSF adoption, and
use the raw (802.11) transmit mode.

Due to firmware limitations, the firmware must operate in raw
(non-native 802.11) mode.  As this is configured at firmware init time,
a new "rawmode" modparam is added, and mesh interfaces are available
only if rawmode=true.  The firmware must advertise support for rawmode;
tested successfully with firmware 10.2.4.70-2.

When the module is loaded with (newly implemented) modparam rawmode=1, it
will enable operating an open mesh STA via something like the following:

ip link set wlan0 down
iw dev wlan0 set type mp
ip link set wlan0 up
iw dev wlan0 set freq 5745 80 5775
iw dev wlan0 mesh join mesh-vht

Signed-off-by: Bob Copeland 
---
v3:
 * fix cfg80211 interface combinations warning when
   CONFIG_MAC80211_MESH=n or when using 10.4 FW (Kalle Valo)
v2:
 * added raw mode feature flag check
 * usage and firmware notes in commit log

 drivers/net/wireless/ath/ath10k/core.c | 12 
 drivers/net/wireless/ath/ath10k/mac.c  | 36 +-
 2 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c 
b/drivers/net/wireless/ath/ath10k/core.c
index 6e5033b..09a74a8 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -34,16 +34,19 @@ unsigned int ath10k_debug_mask;
 static unsigned int ath10k_cryptmode_param;
 static bool uart_print;
 static bool skip_otp;
+static bool rawmode;
 
 module_param_named(debug_mask, ath10k_debug_mask, uint, 0644);
 module_param_named(cryptmode, ath10k_cryptmode_param, uint, 0644);
 module_param(uart_print, bool, 0644);
 module_param(skip_otp, bool, 0644);
+module_param(rawmode, bool, 0644);
 
 MODULE_PARM_DESC(debug_mask, "Debugging mask");
 MODULE_PARM_DESC(uart_print, "Uart target debugging");
 MODULE_PARM_DESC(skip_otp, "Skip otp failure for calibration in testmode");
 MODULE_PARM_DESC(cryptmode, "Crypto mode: 0-hardware, 1-software");
+MODULE_PARM_DESC(rawmode, "Use raw 802.11 frame datapath");
 
 static const struct ath10k_hw_params ath10k_hw_params_list[] = {
{
@@ -1122,6 +1125,15 @@ static int ath10k_core_init_firmware_features(struct 
ath10k *ar)
ar->htt.max_num_amsdu = ATH10K_HTT_MAX_NUM_AMSDU_DEFAULT;
ar->htt.max_num_ampdu = ATH10K_HTT_MAX_NUM_AMPDU_DEFAULT;
 
+   if (rawmode) {
+   if (!test_bit(ATH10K_FW_FEATURE_RAW_MODE_SUPPORT,
+ ar->fw_features)) {
+   ath10k_err(ar, "rawmode = 1 requires support from 
firmware");
+   return -EINVAL;
+   }
+   set_bit(ATH10K_FLAG_RAW_MODE, >dev_flags);
+   }
+
if (test_bit(ATH10K_FLAG_RAW_MODE, >dev_flags)) {
ar->wmi.rx_decap_mode = ATH10K_HW_TXRX_RAW;
 
diff --git a/drivers/net/wireless/ath/ath10k/mac.c 
b/drivers/net/wireless/ath/ath10k/mac.c
index 80efcc8..1cda4f9 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4211,6 +4211,14 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
case NL80211_IFTYPE_ADHOC:
arvif->vdev_type = WMI_VDEV_TYPE_IBSS;
break;
+   case NL80211_IFTYPE_MESH_POINT:
+   if (!test_bit(ATH10K_FLAG_RAW_MODE, >dev_flags)) {
+   ret = -EINVAL;
+   ath10k_warn(ar, "must load driver with rawmode=1 to add 
mesh interfaces\n");
+   goto err;
+   }
+   arvif->vdev_type = WMI_VDEV_TYPE_AP;
+   break;
case NL80211_IFTYPE_AP:
arvif->vdev_type = WMI_VDEV_TYPE_AP;
 
@@ -4251,6 +4259,7 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
 * become corrupted, e.g. have garbled IEs or out-of-date TIM bitmap.
 */
if (vif->type == NL80211_IFTYPE_ADHOC ||
+   vif->type == NL80211_IFTYPE_MESH_POINT ||
vif->type == NL80211_IFTYPE_AP) {
arvif->beacon_buf = dma_zalloc_coherent(ar->dev,
IEEE80211_MAX_FRAME_LEN,
@@ -4590,6 +4599,13 @@ static void ath10k_bss_info_changed(struct ieee80211_hw 
*hw,
if (ret)
ath10k_warn(ar, "failed to update beacon template: 
%d\n",
ret);
+
+   if (ieee80211_vif_is_mesh(vif)) {
+   /* mesh doesn't use SSID but firmware needs it */
+   strncpy(arvif->u.ap.ssid, "mesh",
+   sizeof(arvif->u.ap.ssid));
+   arvif->u.ap.ssid_len = 4;
+   }
}
 
if (changed & BSS_CHANGED_AP_PROBE_RESP) {
@@ -5329,6 +5345,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
} else 

[PATCH v3 1/3] ath10k: enable monitor when OTHER_BSS requested

2015-09-09 Thread Bob Copeland
By default, ath10k restricts received frames to those matching BSSID.
When other BSS frames are requested (e.g. in mesh mode), add an internal
monitor device so those frames are not filtered.

Signed-off-by: Bob Copeland 
---
 drivers/net/wireless/ath/ath10k/mac.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c 
b/drivers/net/wireless/ath/ath10k/mac.c
index 989d2a1..80efcc8 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -1070,6 +1070,7 @@ static bool ath10k_mac_monitor_vdev_is_needed(struct 
ath10k *ar)
return false;
 
return ar->monitor ||
+  ar->filter_flags & FIF_OTHER_BSS ||
   test_bit(ATH10K_CAC_RUNNING, >dev_flags);
 }
 
-- 
2.1.4

--
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: check for encryption before adding MIC_LEN

2015-09-09 Thread Bob Copeland
In the case of raw mode without nohwcrypt parameter, we
should still make sure the frame is protected before
adding MIC_LEN to avoid skb_under_panic errors.

Signed-off-by: Bob Copeland 
---
 drivers/net/wireless/ath/ath10k/htt_tx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c 
b/drivers/net/wireless/ath/ath10k/htt_tx.c
index ea53c21..eb5ba9b 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -564,7 +564,8 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff 
*msdu)
 ieee80211_has_protected(hdr->frame_control)) {
skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
} else if (!skb_cb->htt.nohwcrypt &&
-  skb_cb->txmode == ATH10K_HW_TXRX_RAW) {
+  skb_cb->txmode == ATH10K_HW_TXRX_RAW &&
+  ieee80211_has_protected(hdr->frame_control)) {
skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
}
 
-- 
2.1.4

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


Ath10K issue

2015-09-09 Thread Cedric VONCKEN
I'm using compat-wireless 2015-03-09 from openwrt.

At the power up, these equipments worked in AP mode and several sta can 
do an association.
Randomly it is not possible to make association to several AP.

If I look the log file I see cyclically these error messages.
Wed Sep  9 10:29:49 2015 kern.warn kernel: [17654.116104] ath10k_warn: 186 
callbacks suppressed
Wed Sep  9 10:29:49 2015 kern.warn kernel: [17654.133185] ath10k_pci 
0001:02:00.0: SWBA overrun on vdev 3, skipped old beacon
Wed Sep  9 10:29:49 2015 kern.warn kernel: [17654.153058] ath10k_pci 
0001:02:00.0: SWBA overrun on vdev 0, skipped old beacon
Wed Sep  9 10:29:49 2015 kern.warn kernel: [17654.157255] ath10k_pci 
0001:02:00.0: reached WMI management transmit queue limit
Wed Sep  9 10:29:49 2015 kern.warn kernel: [17654.157260] ath10k_pci 
0001:02:00.0: failed to transmit packet, dropping: -16
Wed Sep  9 10:29:49 2015 kern.warn kernel: [17654.212297] ath10k_pci 
0001:02:00.0: SWBA overrun on vdev 2, skipped old beacon
Wed Sep  9 10:29:49 2015 kern.warn kernel: [17654.232087] ath10k_pci 
0001:02:00.0: SWBA overrun on vdev 3, skipped old beacon
Wed Sep  9 10:29:49 2015 kern.warn kernel: [17654.252874] ath10k_pci 
0001:02:00.0: SWBA overrun on vdev 0, skipped old beacon
Wed Sep  9 10:29:49 2015 kern.warn kernel: [17654.286774] ath10k_pci 
0001:02:00.0: SWBA overrun on vdev 2, skipped old beacon
Wed Sep  9 10:29:49 2015 kern.warn kernel: [17654.320914] ath10k_pci 
0001:02:00.0: SWBA overrun on vdev 3, skipped old beacon
Wed Sep  9 10:29:49 2015 kern.warn kernel: [17654.355043] ath10k_pci 
0001:02:00.0: SWBA overrun on vdev 0, skipped old beacon
Wed Sep  9 10:29:54 2015 kern.warn kernel: [17659.167694] ath10k_warn: 193 
callbacks suppressed
Wed Sep  9 10:29:54 2015 kern.warn kernel: [17659.184778] ath10k_pci 
0001:02:00.0: SWBA overrun on vdev 0, skipped old beacon
Wed Sep  9 10:29:54 2015 kern.warn kernel: [17659.204514] ath10k_pci 
0001:02:00.0: SWBA overrun on vdev 2, skipped old beacon
Wed Sep  9 10:29:54 2015 kern.warn kernel: [17659.225098] ath10k_pci 
0001:02:00.0: reached WMI management transmit queue limit
Wed Sep  9 10:29:54 2015 kern.warn kernel: [17659.235968] ath10k_pci 
0001:02:00.0: SWBA overrun on vdev 3, skipped old beacon
Wed Sep  9 10:29:54 2015 kern.warn kernel: [17659.264524] ath10k_pci 
0001:02:00.0: failed to transmit packet, dropping: -16
Wed Sep  9 10:29:54 2015 kern.warn kernel: [17659.270094] ath10k_pci 
0001:02:00.0: SWBA overrun on vdev 0, skipped old beacon
Wed Sep  9 10:29:54 2015 kern.warn kernel: [17659.303945] ath10k_pci 
0001:02:00.0: failed to transmit management frame via WMI: -11
Wed Sep  9 10:29:54 2015 kern.warn kernel: [17659.304408] ath10k_pci 
0001:02:00.0: reached WMI management transmit queue limit
Wed Sep  9 10:29:54 2015 kern.warn kernel: [17659.304414] ath10k_pci 
0001:02:00.0: failed to transmit packet, dropping: -16
Wed Sep  9 10:29:54 2015 kern.warn kernel: [17659.363876] ath10k_pci 
0001:02:00.0: SWBA overrun on vdev 2, skipped old beacon
Wed Sep  9 10:29:59 2015 kern.warn kernel: [17664.219316] ath10k_warn: 208 
callbacks suppressed

To reestablish my access point I need to restart the Wifi (wifi up in 
openwrt).

Have you any idea of this issue?

Regards.

Cédric Voncken.
--
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/3] ath10k: implement mesh support

2015-09-09 Thread Bob Copeland
On Wed, Sep 09, 2015 at 12:10:38PM +0300, Kalle Valo wrote:
> > I did a quick smoke test and saw the splat below. It's this warning from
> > cfg80211:
> >
> > /*
> >  * Don't advertise an unsupported type
> >  * in a combination.
> >  */
> > if (WARN_ON((wiphy->interface_modes & types) != types))
> > return -EINVAL;

OK, this happens when mesh is configured out (we mask off the mesh
interface_modes internally but not the types).  Sent an updated version
with appropriate ifdefs added.

-- 
Bob Copeland %% http://bobcopeland.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


[PATCH v2] ath: use PRI value given by spec for fixed PRI

2015-09-09 Thread Peter Oh
PRI value is used as divider when DFS detector analyzes candidate
radar pulses.
If PRI deviation is big from its origin PRI, DFS detector could miss
valid radar reports since HW often misses detecting radar pulses and
causes long interval value of pulses.

For instance from practical results, if runtime PRI is calculated as
1431 for fixed PRI value of 1428 and delta timestamp logs 15719,
the modular remainder will be 1409 and the delta between the remainder
and runtime PRI is 22 that is bigger than PRI tolerance which is 16.
As a result this radar report will be ignored even though it's valid.

By using spec defined PRI for fixed PRI, we can correct this error.

Signed-off-by: Peter Oh 
---
v2:
 * replaced numeral 16 with PRI_TOLERANCE macro
---
 drivers/net/wireless/ath/dfs_pattern_detector.c | 6 --
 drivers/net/wireless/ath/dfs_pattern_detector.h | 5 +
 drivers/net/wireless/ath/dfs_pri_detector.c | 6 +-
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/dfs_pattern_detector.c 
b/drivers/net/wireless/ath/dfs_pattern_detector.c
index 656ce42..0cc89fd 100644
--- a/drivers/net/wireless/ath/dfs_pattern_detector.c
+++ b/drivers/net/wireless/ath/dfs_pattern_detector.c
@@ -21,12 +21,6 @@
 #include "dfs_pri_detector.h"
 #include "ath.h"
 
-/*
- * tolerated deviation of radar time stamp in usecs on both sides
- * TODO: this might need to be HW-dependent
- */
-#define PRI_TOLERANCE  16
-
 /**
  * struct radar_types - contains array of patterns defined for one DFS domain
  * @domain: DFS regulatory domain
diff --git a/drivers/net/wireless/ath/dfs_pattern_detector.h 
b/drivers/net/wireless/ath/dfs_pattern_detector.h
index 25a43d6..92be353 100644
--- a/drivers/net/wireless/ath/dfs_pattern_detector.h
+++ b/drivers/net/wireless/ath/dfs_pattern_detector.h
@@ -21,6 +21,11 @@
 #include 
 #include 
 
+/* tolerated deviation of radar time stamp in usecs on both sides
+ * TODO: this might need to be HW-dependent
+ */
+#define PRI_TOLERANCE  16
+
 /**
  * struct ath_dfs_pool_stats - DFS Statistics for global pools
  */
diff --git a/drivers/net/wireless/ath/dfs_pri_detector.c 
b/drivers/net/wireless/ath/dfs_pri_detector.c
index cc5c592..05b0464 100644
--- a/drivers/net/wireless/ath/dfs_pri_detector.c
+++ b/drivers/net/wireless/ath/dfs_pri_detector.c
@@ -25,6 +25,9 @@ struct ath_dfs_pool_stats global_dfs_pool_stats = {};
 
 #define DFS_POOL_STAT_INC(c) (global_dfs_pool_stats.c++)
 #define DFS_POOL_STAT_DEC(c) (global_dfs_pool_stats.c--)
+#define GET_PRI_TO_USE(MIN, MAX, RUNTIME) \
+   (MIN + PRI_TOLERANCE == MAX - PRI_TOLERANCE ? \
+   MIN + PRI_TOLERANCE : RUNTIME)
 
 /**
  * struct pulse_elem - elements in pulse queue
@@ -243,7 +246,8 @@ static bool pseq_handler_create_sequences(struct 
pri_detector *pde,
ps.count_falses = 0;
ps.first_ts = p->ts;
ps.last_ts = ts;
-   ps.pri = ts - p->ts;
+   ps.pri = GET_PRI_TO_USE(pde->rs->pri_min,
+   pde->rs->pri_max, ts - p->ts);
ps.dur = ps.pri * (pde->rs->ppb - 1)
+ 2 * pde->rs->max_pri_tolerance;
 
-- 
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:

2015-09-09 Thread Oleg Kostyuchenko
Hi Arend,
I am still experiencing the issue Sebastien initially described (no wlan0 
device,
"SDIO drive strength" warnings etc) on a Thinkpad Tablet 10 for the latest
kernel release, 4.2. Doesn't the 4.2 kernel include the required fix?

Thanks,
Oleg


--
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/4] staging: wilc1000: remove kmalloc wrapper

2015-09-09 Thread Greg KH
On Wed, Sep 09, 2015 at 04:08:10PM +0900, Tony Cho wrote:
> From: Glen Lee 
> 
> Call kmalloc directly. No need to wrap kmalloc.
> Only one function, wilc_mq_send which use WILC_MALLOC, can be running in
> interrupt context or process context. In this case, We call in_interrupt to
> decide the flag, GFP_ATOMIC or GFP_KERNEL, for kmalloc properly. Additionally,
> there is one kmalloc which flag is always GFP_ATOMIC. This also changed
> together.
> Others are not holding a spin lock or in interrupt context. So use GFP_KERNEL
> flag for kmalloc.
> 
> Signed-off-by: Glen Lee 
> Signed-off-by: Tony Cho 
> ---
>  drivers/staging/wilc1000/host_interface.c | 110 
> +++---
>  drivers/staging/wilc1000/linux_wlan.c |   2 +-
>  drivers/staging/wilc1000/wilc_msgqueue.c  |  10 +-
>  drivers/staging/wilc1000/wilc_wfi_cfgoperations.c |  38 
>  4 files changed, 83 insertions(+), 77 deletions(-)

This no longer applies to my staging-testing branch, can you rebase it
and resend it and the other patches in this series?

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: define undefined operation mode

2015-09-09 Thread Greg KH
On Tue, Sep 08, 2015 at 05:07:59PM +0900, Tony Cho wrote:
> From: Johnny Kim 
> 
> This patch adds new define, IDLE_MODE to change comparison statement which
> is wrong due to typecasting to null.
> 
> Signed-off-by: Johnny Kim 
> Signed-off-by: Tony Cho 
> ---
>  drivers/staging/wilc1000/host_interface.c | 2 +-
>  drivers/staging/wilc1000/host_interface.h | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)

With this series I don't see any more build warnings, can you send a
patch to now enable the driver (i.e. remove the BROKEN Kconfig
dependancy?)

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 3/4] staging: wilc1000: delete wilc_oswrapper.h and wilc_platform.h

2015-09-09 Thread Greg KH
On Wed, Sep 09, 2015 at 04:08:12PM +0900, Tony Cho wrote:
> From: Glen Lee 
> 
> wilc1000 driver runs on Linux. No need to have oswrapper or platform
> dependent files.
> Before delete two header files, move two structures in wilc_platform.h to
> wilc_msgqueue.h where it is used. Include linux header files where is needs
> since wilc_platform is deleted.
> Finally, remove wilc_oswrapper.h and wilc_platform.h.

That's a lot of different things to be doing all in one patch.  Please
break this up into individual patches.

And you can't just delete the oswrapper.h file, you still have things in
it, don't move it for no reason, get rid of those wrapper functions
properly first, making the file empty, and then you can delete it.
Moving them to a different .h file just hides the fact that this work
still needs to be done.

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