[PATCH v4] wlcore: spi: add wl18xx support

2016-06-26 Thread Reizer, Eyal
Add support for using with both wl12xx and wl18xx.

- all wilink family needs special init command for entering wspi mode.
  extra clock cycles should be sent after the spi init command while the
  cs pin is high.
- Use inverted chip select for sending a dummy 4 bytes command that
  completes the init stage.

Signed-off-by: Eyal Reizer 
---
v1->v2:update device tree bindings configuration
v2->v3:revert from manual gpio manipulation. use inverted chip select instead
for sending the extra init cycle which, achieves the same hardware purpose.
update device tree bindings docucmentation accordingly
v3->v4: Remove redundant data form binding documentation and fix chip select
number mismatch in wl1271 example

 .../bindings/net/wireless/ti,wlcore,spi.txt|  41 +--
 drivers/net/wireless/ti/wlcore/spi.c   | 124 +
 2 files changed, 137 insertions(+), 28 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt 
b/Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt
index 9180724..8f9ced0 100644
--- a/Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt
+++ b/Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt
@@ -1,19 +1,30 @@
-* Texas Instruments wl1271 wireless lan controller
+* Texas Instruments wl12xx/wl18xx wireless lan controller
 
-The wl1271 chip can be connected via SPI or via SDIO. This
+The wl12xx/wl18xx chips can be connected via SPI or via SDIO. This
 document describes the binding for the SPI connected chip.
 
 Required properties:
-- compatible :  Should be "ti,wl1271"
+- compatible :  Should be one of the following:
+* "ti,wl1271"
+* "ti,wl1273"
+* "ti,wl1281"
+* "ti,wl1283"
+* "ti,wl1801"
+* "ti,wl1805"
+* "ti,wl1807"
+* "ti,wl1831"
+* "ti,wl1835"
+* "ti,wl1837"
 - reg : Chip select address of device
 - spi-max-frequency :   Maximum SPI clocking speed of device in Hz
-- ref-clock-frequency : Reference clock frequency
 - interrupt-parent, interrupts :
 Should contain parameters for 1 interrupt line.
 Interrupt parameters: parent, line number, type.
-- vwlan-supply :Point the node of the regulator that powers/enable the 
wl1271 chip
+- vwlan-supply :Point the node of the regulator that powers/enable the
+wl12xx/wl18xx chip
 
 Optional properties:
+- ref-clock-frequency : Reference clock frequency (should be set for wl12xx)
 - clock-xtal :  boolean, clock is generated from XTAL
 
 - Please consult Documentation/devicetree/bindings/spi/spi-bus.txt
@@ -21,16 +32,28 @@ Optional properties:
 
 Examples:
 
+For wl12xx family:
 &spi1 {
-   wl1271@1 {
+   wlcore: wlcore@1 {
compatible = "ti,wl1271";
-
reg = <1>;
spi-max-frequency = <4800>;
-   clock-xtal;
-   ref-clock-frequency = <3840>;
interrupt-parent = <&gpio3>;
interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
vwlan-supply = <&vwlan_fixed>;
+   clock-xtal;
+   ref-clock-frequency = <3840>;
+   };
+};
+
+For wl18xx family:
+&spi0 {
+   wlcore: wlcore@0 {
+   compatible = "ti,wl1835";
+   reg = <0>;
+   spi-max-frequency = <4800>;
+   interrupt-parent = <&gpio0>;
+   interrupts = <27 IRQ_TYPE_EDGE_RISING>;
+   vwlan-supply = <&vwlan_fixed>;
};
 };
diff --git a/drivers/net/wireless/ti/wlcore/spi.c 
b/drivers/net/wireless/ti/wlcore/spi.c
index 020ac1a..bd1253d 100644
--- a/drivers/net/wireless/ti/wlcore/spi.c
+++ b/drivers/net/wireless/ti/wlcore/spi.c
@@ -70,16 +70,30 @@
 #define WSPI_MAX_CHUNK_SIZE4092
 
 /*
- * only support SPI for 12xx - this code should be reworked when 18xx
- * support is introduced
+ * wl18xx driver aggregation buffer size is (13 * PAGE_SIZE) compared to
+ * (4 * PAGE_SIZE) for wl12xx, so use the larger buffer needed for wl18xx
  */
-#define SPI_AGGR_BUFFER_SIZE (4 * PAGE_SIZE)
+#define SPI_AGGR_BUFFER_SIZE (13 * PAGE_SIZE)
 
 /* Maximum number of SPI write chunks */
 #define WSPI_MAX_NUM_OF_CHUNKS \
((SPI_AGGR_BUFFER_SIZE / WSPI_MAX_CHUNK_SIZE) + 1)
 
 
+struct wilink_familiy_data {
+   char name[8];
+};
+
+const struct wilink_familiy_data *wilink_data;
+
+static const struct wilink_familiy_data wl18xx_data = {
+   .name = "wl18xx",
+};
+
+static const struct wilink_familiy_data wl12xx_data = {
+   .name = "wl12xx",
+};
+
 struct wl12xx_spi_glue {
struct device *dev;
struct platform_device *core;
@@ -119,6 +133,7 @@ static void wl12xx_spi_init(struct device *child)
struct wl12xx_spi_glue *glue = dev_get_drvdata(child->parent);
struct spi_transfer t;
struct spi_message m;
+   struct spi_device *spi = to_spi_device(glue->dev);
u8 *cmd = kzalloc(

Job Vacancy!!! Escrow Officer Needed..‏

2016-06-26 Thread Angang Steel Co. ltd



--
Job title: Escrow Officer #216

An-gang Steel Company Limited
China Anshan Iron and Steel Co. Ltd.
www.ansteel.com.cn

It is my pleasure to announce to you the vacancy for the post of an 
Escrow Online Officer for An-gang Steel Company Limited China. if you 
are interested, please reply for more information's concerning the job 
position and how to apply.


Secretary.

Lucy Yang,
An-gang Steel Company Limited.
--
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/2] staging: wilc1000: fix error handling in wilc_debugfs_init()

2016-06-26 Thread Greg KH
On Sat, Jun 25, 2016 at 10:43:33PM +0100, Luis de Bethencourt wrote:
> On 25/06/16 22:36, Greg KH wrote:
> > On Thu, Jun 23, 2016 at 01:36:17PM +0100, Luis de Bethencourt wrote:
> >> The common format to check if a function returned an error pointer is to
> >> use PTR_ERR(). Instead of ERR_PTR() which is used to return said errors.
> >>
> >> Signed-off-by: Luis de Bethencourt 
> >> Reviewed-by: Julian Calaby 
> >> ---
> >>  drivers/staging/wilc1000/wilc_debugfs.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/staging/wilc1000/wilc_debugfs.c 
> >> b/drivers/staging/wilc1000/wilc_debugfs.c
> >> index fcbc95d..48797dc 100644
> >> --- a/drivers/staging/wilc1000/wilc_debugfs.c
> >> +++ b/drivers/staging/wilc1000/wilc_debugfs.c
> >> @@ -107,7 +107,7 @@ static int __init wilc_debugfs_init(void)
> >>struct wilc_debugfs_info_t *info;
> >>  
> >>wilc_dir = debugfs_create_dir("wilc_wifi", NULL);
> >> -  if (wilc_dir ==  ERR_PTR(-ENODEV)) {
> >> +  if (PTR_ERR(wilc_dir) == -ENODEV) {
> >>/* it's not error. the debugfs is just not being enabled. */
> >>printk("ERR, kernel has built without debugfs support\n");
> >>return 0;
> > 
> > No, the best way to do this is to just ignore the return value, you
> > don't care about it.  It can be passed back into any debugfs calls just
> > fine.
> > 
> > So don't check the value and all is good, debugfs was written in a way
> > to make it _easy_ to use, no need for fancy error checking at all with
> > it.
> > 
> > thanks,
> > 
> > greg k-h
> > 
> 
> Thanks for the review Greg.
> 
> Just to make sure. You are proposing I just drop the 3 if checks? [0]
> 
> If that's what you mean I will send a patch as soon as you confirm :)
> 
> Happy hacking,
> Luis
> 
> 
> 
> [0] Making the function look like this:
> static int __init wilc_debugfs_init(void)
> {
> int i;
> 
> struct dentry *debugfs_files;
> struct wilc_debugfs_info_t *info;
> 
> wilc_dir = debugfs_create_dir("wilc_wifi", NULL);
> for (i = 0; i < ARRAY_SIZE(debugfs_info); i++) {
> info = &debugfs_info[i];
> debugfs_files = debugfs_create_file(info->name,
> info->perm,
> wilc_dir,
> &info->data,
> &info->fops);

Why even assign anything to debugfs_files?
--
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: [RFC PATCH v2] MAINTAINERS: remove unreachable people that have left Atmel

2016-06-26 Thread Greg KH
On Sat, Jun 25, 2016 at 11:00:36PM +0100, Luis de Bethencourt wrote:
> When sending an email regarding a patch to wilc1000, you get the following
> automatic replies:
> "Sung_hoon Cho is no longer with Atmel Corporation."
> "Kang_hee Park is no longer with Atmel Corporation."
> "Dong_ho Shin is no longer with Atmel Corporation."
> "Bo_moon Kim is no longer with Atmel Corporation."
> "Min_su Kim is no longer with Atmel Corporation."
> "Jun_hyuk Lee is no longer with Atmel Corporation."
> 
> Removing these email addresses that don't reach the addressee anymore.
> 
> Signed-off-by: Luis de Bethencourt 
> ---
> 
> Hi,
> 
> Just got the same automatic reply from Glen Lee's address.
> 
> This is unfortunate since it means this driver has no maintainer listed.
> What do people suggest to do in this case?

Let's delete the whole entry please.

And, if no one steps up from Atmel, we might just have to delete the
driver as well :(

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] rtlwifi: Add missing newlines to RT_TRACE calls

2016-06-26 Thread Joe Perches
RT_TRACE does not add a newline to the end of a message and always
emits at KERN_DEBUG so these are susceptible to message interleaving
from other processes without the newline.

Signed-off-by: Joe Perches 
---
 drivers/net/wireless/realtek/rtlwifi/core.c|  2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c|  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c   |  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/rf.c|  2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c   |  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c |  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c|  2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c   |  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c|  2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/rf.c|  2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c   |  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c|  2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c|  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c   |  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8192ee/rf.c|  2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c   |  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c|  2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.c   |  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c|  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c   |  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c|  2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c   |  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/rf.c|  2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.c   |  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c|  2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c   |  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8723be/rf.c|  2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c   |  4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c|  6 +++---
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c|  6 +++---
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c   | 14 +++---
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/rf.c|  2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c   |  4 ++--
 33 files changed, 60 insertions(+), 60 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c 
b/drivers/net/wireless/realtek/rtlwifi/core.c
index 3a0faa8..41f77f8 100644
--- a/drivers/net/wireless/realtek/rtlwifi/core.c
+++ b/drivers/net/wireless/realtek/rtlwifi/core.c
@@ -526,7 +526,7 @@ static void _rtl_add_wowlan_patterns(struct ieee80211_hw 
*hw,
/* 3. calculate crc */
rtl_pattern.crc = _calculate_wol_pattern_crc(content, len);
RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE,
-"CRC_Remainder = 0x%x", rtl_pattern.crc);
+"CRC_Remainder = 0x%x\n", rtl_pattern.crc);
 
/* 4. write crc & mask_for_hw to hw */
rtlpriv->cfg->ops->add_wowlan_pattern(hw, &rtl_pattern, i);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c 
b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c
index e26a233..cfdf6d8 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c
@@ -1846,12 +1846,12 @@ static void _rtl88ee_read_adapter_info(struct 
ieee80211_hw *hw)
 
case EEPROM_93C46:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-"RTL819X Not boot from eeprom, check it !!");
+"RTL819X Not boot from eeprom, check it !!\n");
return;
 
default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-"boot from neither eeprom nor efuse, check it !!");
+"boot from neither eeprom nor efuse, check it !!\n");
return;
}
memcpy(hwinfo, &rtlefuse->efuse_map[EFUSE_INIT_MAP][0], HWSET_MAX_SIZE);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c 
b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
index 416a9ba..1d034a1 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
@@ -373,7 +373,7 @@ static bool _rtl88e_phy_bb8188e_config_parafile(struct 
ieee80211_hw *hw)
 
rtstatus = phy_config_bb_with_headerfile(hw, BASEBAND_CONFIG_PHY_REG);
if (!rtstatus) {
-   RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Write BB Reg Fail!!");
+   RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Write BB Reg Fail!!\n");
return false;
}
 
@@ -383,7 +383,7 @@ static bool _rtl88e_phy_bb8188e_co

Re: [PATCH RFC v3 3/3] ath9k: parse the device configuration from an OF node

2016-06-26 Thread Martin Blumenstingl
On Sat, Jun 25, 2016 at 9:26 PM, Christian Lamparter
 wrote:
> The problem with the owl-loader is/was that it sticks around
> when it has initialized all the cards. Unloading a module by
> itself is tough. One way out would be to add it to ath9k's pci.c.
> The question is: will such a feature have support from the ath9k
> folks?
owl-loader seems very small (<7KiB) and it only allocates a few bytes
dynamically. Even if you move this code to ath9k you will still have
the same problem: as long as ath9k is not unloaded this code will hang
around in memory.
But apart from this - moving it to the kernel might have some benefits
though as it could be shared between ath9k and ath5k (as some ath5k
seem to require a similar "fixup" as well).

> I've added lede-dev and Luis since this is relevant for them.
> Maybe between the sysloadfw.sh and owl-loader, there's another
> solution we overlooked so far? I know Luis has been digging
> around in the firmware_class and added the sysdata API. But
> from what I can tell, this would ?break? LEDE/OpenWRT's
> userspace helper, since the sysfs interface in
> /sys/class/firmware which is used by procd to upload the data
> is gone with sysdata or am I wrong?
good idea to keep lede-dev in the loop, as they will be affected (in
my opinion: positively) by this change.


Regards,
Martin
--
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] rtlwifi: Add missing newlines to RT_TRACE calls

2016-06-26 Thread Larry Finger

On 06/26/2016 02:34 PM, Joe Perches wrote:

RT_TRACE does not add a newline to the end of a message and always
emits at KERN_DEBUG so these are susceptible to message interleaving
from other processes without the newline.

Signed-off-by: Joe Perches 
---


This patch does not apply to the wireless-drivers-next repo. Which one did you 
use?

Larry

--
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] rtlwifi: Create _rtl_dbg_trace function to reduce RT_TRACE code size

2016-06-26 Thread Larry Finger

On 06/25/2016 05:46 PM, Joe Perches wrote:

This debugging macro can expand to a lot of code.
Make it a function to reduce code size.

(x86-64 defconfig w/ all rtlwifi drivers and allyesconfig)
$ size drivers/net/wireless/realtek/rtlwifi/built-in.o*
text   data bss dec hex filename
  900083 2004991907 1102489  10d299 
drivers/net/wireless/realtek/rtlwifi/built-in.o.defconfig.new
1113597  2004991907 1316003  1414a3 
drivers/net/wireless/realtek/rtlwifi/built-in.o.defconfig.old
1746879  4535038512 2208894  21b47e 
drivers/net/wireless/realtek/rtlwifi/built-in.o.new
2051965  5033118512 2563788  271ecc 
drivers/net/wireless/realtek/rtlwifi/built-in.o.old

Signed-off-by: Joe Perches 
---
  drivers/net/wireless/realtek/rtlwifi/debug.c | 25 +
  drivers/net/wireless/realtek/rtlwifi/debug.h | 17 +
  2 files changed, 34 insertions(+), 8 deletions(-)


This change is a good one.

Acked-by: Larry Finger 

Thanks,

Larry



diff --git a/drivers/net/wireless/realtek/rtlwifi/debug.c 
b/drivers/net/wireless/realtek/rtlwifi/debug.c
index fd25aba..33905bb 100644
--- a/drivers/net/wireless/realtek/rtlwifi/debug.c
+++ b/drivers/net/wireless/realtek/rtlwifi/debug.c
@@ -48,3 +48,28 @@ void rtl_dbgp_flag_init(struct ieee80211_hw *hw)
/*Init Debug flag enable condition */
  }
  EXPORT_SYMBOL_GPL(rtl_dbgp_flag_init);
+
+#ifdef CONFIG_RTLWIFI_DEBUG
+void _rtl_dbg_trace(struct rtl_priv *rtlpriv, int comp, int level,
+   const char *modname, const char *fmt, ...)
+{
+   if (unlikely((comp & rtlpriv->dbg.global_debugcomponents) &&
+(level <= rtlpriv->dbg.global_debuglevel))) {
+   struct va_format vaf;
+   va_list args;
+
+   va_start(args, fmt);
+
+   vaf.fmt = fmt;
+   vaf.va = &args;
+
+   printk(KERN_DEBUG "%s:%ps:<%lx-%x> %pV",
+  modname, __builtin_return_address(0),
+  in_interrupt(), in_atomic(),
+  &vaf);
+
+   va_end(args);
+   }
+}
+EXPORT_SYMBOL_GPL(_rtl_dbg_trace);
+#endif
diff --git a/drivers/net/wireless/realtek/rtlwifi/debug.h 
b/drivers/net/wireless/realtek/rtlwifi/debug.h
index fc794b3..6156a79 100644
--- a/drivers/net/wireless/realtek/rtlwifi/debug.h
+++ b/drivers/net/wireless/realtek/rtlwifi/debug.h
@@ -174,15 +174,16 @@ do {  
\
}   \
  } while (0)

+
+struct rtl_priv;
+
+__printf(5, 6)
+void _rtl_dbg_trace(struct rtl_priv *rtlpriv, int comp, int level,
+   const char *modname, const char *fmt, ...);
+
  #define RT_TRACE(rtlpriv, comp, level, fmt, ...)  \
-do {   \
-   if (unlikely(((comp) & rtlpriv->dbg.global_debugcomponents) &&   \
-((level) <= rtlpriv->dbg.global_debuglevel))) {  \
-   printk(KERN_DEBUG KBUILD_MODNAME ":%s():<%lx-%x> " fmt, \
-  __func__, in_interrupt(), in_atomic(),   \
-  ##__VA_ARGS__);  \
-   }   \
-} while (0)
+   _rtl_dbg_trace(rtlpriv, comp, level,\
+  KBUILD_MODNAME, fmt, ##__VA_ARGS__)

  #define RTPRINT(rtlpriv, dbgtype, dbgflag, fmt, ...)  \
  do {  \



--
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 RFC v3 1/3] Documentation: dt: net: add ath9k wireless device binding

2016-06-26 Thread Julian Calaby
Hi Martin,

On Fri, Jun 24, 2016 at 10:34 PM, Martin Blumenstingl
 wrote:
> Add documentation how devicetree can be used to configure ath9k based
> devices.
>
> Signed-off-by: Martin Blumenstingl 
> ---
> changes in v2 -> v3:
> - improved wording of the qca,disable-2ghz and qca,disable-5ghz properties
> - replaced qca,eeprom-name with qca,no-eeprom (the eeprom name is now
>   built automatically within ath9k). The naming was chosen to stay
>   consistent with other drivers (such as davicom-dm9000 and via-velocity)
> - added reference to the mac-address and local-mac-address properties
> - removed invalid device_type property from the example
>
>  .../devicetree/bindings/net/wireless/qca,ath9k.txt | 46 
> ++
>  1 file changed, 46 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
>
> diff --git a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt 
> b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
> new file mode 100644
> index 000..ff83fd4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
> @@ -0,0 +1,46 @@
> +* Qualcomm Atheros ath9k wireless devices
> +
> +This node provides properties for configuring the ath9k wireless device. The
> +node is expected to be specified as a child node of the PCI controller to
> +which the wireless chip is connected.
> +
> +Required properties:
> +- compatible: Should be "qca,ath9k"
> +
> +Optional properties:
> +- reg: Address and length of the register set for the device.
> +- qca,gpio-mask: The GPIO mask
> +- qca,gpio-val: The GPIO value
> +- qca,led-pin: The GPIO number to which the LED is connected
> +- qca,led-active-high: The LED is active when the GPIO is HIGH
> +- qca,clk-25mhz: Defines that at 25MHz clock is used
> +- qca,no-eeprom: Indicates that there is on physical EEPROM connected

Typo: ...Indicates that there is _no_ physical EEPROM...

Thanks,

-- 
Julian Calaby

Email: julian.cal...@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
--
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] rtlwifi: Add missing newlines to RT_TRACE calls

2016-06-26 Thread Joe Perches
On Sun, 2016-06-26 at 19:18 -0500, Larry Finger wrote:
> On 06/26/2016 02:34 PM, Joe Perches wrote:
> > 
> > RT_TRACE does not add a newline to the end of a message and always
> > emits at KERN_DEBUG so these are susceptible to message interleaving
> > from other processes without the newline.
> > 
> > Signed-off-by: Joe Perches 
> > ---
> This patch does not apply to the wireless-drivers-next repo. Which one
> did you use?

linux-next

--
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] rtlwifi: Add missing newlines to RT_TRACE calls

2016-06-26 Thread Joe Perches
On Sun, 2016-06-26 at 18:13 -0700, Joe Perches wrote:
> On Sun, 2016-06-26 at 19:18 -0500, Larry Finger wrote:
> > 
> > On 06/26/2016 02:34 PM, Joe Perches wrote:
> > > 
> > > 
> > > RT_TRACE does not add a newline to the end of a message and always
> > > emits at KERN_DEBUG so these are susceptible to message
> > > interleaving
> > > from other processes without the newline.
> > > 
> > > Signed-off-by: Joe Perches 
> > > ---
> > This patch does not apply to the wireless-drivers-next repo. Which
> > one
> > did you use?
> linux-next

btw: both patches seem to apply to wireless-drivers-next just fine.

$ git rev-parse HEAD
1bb57c8a5e33bcbec031ce0c629968922d5af89d
$ git am ../next/0001-rtlwifi-Create-_rtl_dbg_trace-function-to-reduce-RT_.patch
Applying: rtlwifi: Create _rtl_dbg_trace function to reduce RT_TRACE code size
$ git am ../next/0001-rtlwifi-Add-missing-newlines-to-RT_TRACE-calls.patch
Applying: rtlwifi: Add missing newlines to RT_TRACE calls
--
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] rtlwifi: Add missing newlines to RT_TRACE calls

2016-06-26 Thread Larry Finger

On 06/26/2016 08:26 PM, Joe Perches wrote:

On Sun, 2016-06-26 at 18:13 -0700, Joe Perches wrote:

On Sun, 2016-06-26 at 19:18 -0500, Larry Finger wrote:


On 06/26/2016 02:34 PM, Joe Perches wrote:



RT_TRACE does not add a newline to the end of a message and always
emits at KERN_DEBUG so these are susceptible to message
interleaving
from other processes without the newline.

Signed-off-by: Joe Perches 
---

This patch does not apply to the wireless-drivers-next repo. Which
one
did you use?

linux-next


btw: both patches seem to apply to wireless-drivers-next just fine.

$ git rev-parse HEAD
1bb57c8a5e33bcbec031ce0c629968922d5af89d
$ git am ../next/0001-rtlwifi-Create-_rtl_dbg_trace-function-to-reduce-RT_.patch
Applying: rtlwifi: Create _rtl_dbg_trace function to reduce RT_TRACE code size
$ git am ../next/0001-rtlwifi-Add-missing-newlines-to-RT_TRACE-calls.patch
Applying: rtlwifi: Add missing newlines to RT_TRACE calls


The conflict is with the set of 10 patches I sent out yesterday. As I have to 
update them anyway, I will apply yours first, then do mine. That should resolve 
the problem.


Larry




--
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] ath10k: implement NAPI support

2016-06-26 Thread Rajkumar Manoharan
Add NAPI support for rx and tx completion. NAPI poll is scheduled
from interrupt handler. The design is as below

 - on interrupt
 - schedule napi and mask interrupts
 - on poll
   - process all pipes (no actual Tx/Rx)
   - process Rx within budget
   - if quota exceeds budget reschedule napi poll by returning budget
   - process Tx completions and update budget if necessary
   - process Tx fetch indications (pull-push)
   - push any other pending Tx (if possible)
   - before resched or napi completion replenish htt rx ring buffer
   - if work done < budget, complete napi poll and unmask interrupts

This change also get rid of two tasklets (intr_tq and txrx_compl_task).

Measured peak throughput with NAPI on IPQ4019 platform in controlled
environment. No noticeable reduction in throughput is seen and also
observed improvements in CPU usage. Approx. 15% CPU usage got reduced
in UDP uplink case.

DL: AP DUT Tx
UL: AP DUT Rx

IPQ4019 (avg. cpu usage %)

TOT  +NAPI
  ===  =
TCP DL   644 Mbps (42%)645 Mbps (36%)
TCP UL   673 Mbps (30%)675 Mbps (26%)
UDP DL   682 Mbps (49%)680 Mbps (49%)
UDP UL   720 Mbps (28%)717 Mbps (11%)

Signed-off-by: Rajkumar Manoharan 
---
 drivers/net/wireless/ath/ath10k/ahb.c|   4 +-
 drivers/net/wireless/ath/ath10k/core.c   |   2 +
 drivers/net/wireless/ath/ath10k/core.h   |   8 ++
 drivers/net/wireless/ath/ath10k/htt.h|   2 +-
 drivers/net/wireless/ath/ath10k/htt_rx.c | 154 +++
 drivers/net/wireless/ath/ath10k/pci.c|  67 +-
 drivers/net/wireless/ath/ath10k/pci.h|   5 +-
 7 files changed, 149 insertions(+), 93 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/ahb.c 
b/drivers/net/wireless/ath/ath10k/ahb.c
index acec16b9cf49..9d4d5022be18 100644
--- a/drivers/net/wireless/ath/ath10k/ahb.c
+++ b/drivers/net/wireless/ath/ath10k/ahb.c
@@ -462,13 +462,11 @@ static void ath10k_ahb_halt_chip(struct ath10k *ar)
 static irqreturn_t ath10k_ahb_interrupt_handler(int irq, void *arg)
 {
struct ath10k *ar = arg;
-   struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
 
if (!ath10k_pci_irq_pending(ar))
return IRQ_NONE;
 
ath10k_pci_disable_and_clear_legacy_irq(ar);
-   tasklet_schedule(&ar_pci->intr_tq);
 
return IRQ_HANDLED;
 }
@@ -831,7 +829,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
goto err_resource_deinit;
}
 
-   ath10k_pci_init_irq_tasklets(ar);
+   ath10k_pci_init_napi(ar);
 
ret = ath10k_ahb_request_irq_legacy(ar);
if (ret)
diff --git a/drivers/net/wireless/ath/ath10k/core.c 
b/drivers/net/wireless/ath/ath10k/core.c
index dfb3db0ee5d1..2639e7e0836b 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -2223,6 +2223,8 @@ struct ath10k *ath10k_core_create(size_t priv_size, 
struct device *dev,
INIT_WORK(&ar->register_work, ath10k_core_register_work);
INIT_WORK(&ar->restart_work, ath10k_core_restart);
 
+   init_dummy_netdev(&ar->napi_dev);
+
ret = ath10k_debug_create(ar);
if (ret)
goto err_free_aux_wq;
diff --git a/drivers/net/wireless/ath/ath10k/core.h 
b/drivers/net/wireless/ath/ath10k/core.h
index 3da18c9dbd7a..10878926b629 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -65,6 +65,10 @@
 #define ATH10K_KEEPALIVE_MAX_IDLE 3895
 #define ATH10K_KEEPALIVE_MAX_UNRESPONSIVE 3900
 
+/* NAPI poll budget */
+#define ATH10K_NAPI_BUDGET  64
+#define ATH10K_NAPI_QUOTA_LIMIT 60
+
 struct ath10k;
 
 enum ath10k_bus {
@@ -926,6 +930,10 @@ struct ath10k {
struct ath10k_thermal thermal;
struct ath10k_wow wow;
 
+   /* NAPI */
+   struct net_device napi_dev;
+   struct napi_struct napi;
+
/* must be last */
u8 drv_priv[0] __aligned(sizeof(void *));
 };
diff --git a/drivers/net/wireless/ath/ath10k/htt.h 
b/drivers/net/wireless/ath/ath10k/htt.h
index 430a83e142aa..98c14247021b 100644
--- a/drivers/net/wireless/ath/ath10k/htt.h
+++ b/drivers/net/wireless/ath/ath10k/htt.h
@@ -1665,7 +1665,6 @@ struct ath10k_htt {
 
/* This is used to group tx/rx completions separately and process them
 * in batches to reduce cache stalls */
-   struct tasklet_struct txrx_compl_task;
struct sk_buff_head rx_compl_q;
struct sk_buff_head rx_in_ord_compl_q;
struct sk_buff_head tx_fetch_ind_q;
@@ -1798,5 +1797,6 @@ int ath10k_htt_tx(struct ath10k_htt *htt,
  struct sk_buff *msdu);
 void ath10k_htt_rx_pktlog_completion_handler(struct ath10k *ar,
 struct sk_buff *skb);
+int ath10k_htt_txrx_compl_task(struct ath10k *ar, int budget);
 
 #endif
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c 
b/drivers/net/wireless/ath/ath10k/htt_rx.c
index 80e6453