Re: [PATCH v3 2/2] wl18xx: add basic device-tree support

2015-03-08 Thread Arnd Bergmann
On Sunday 08 March 2015 13:13:13 Eliad Peller wrote:
 
  I've looked up the what boards actually use this data and found that
  all of them already support booting from DT: some omap2 boards using
  arch/arm/mach-omap2/pdata-quirks.c to provide the data, and the
  davinci 850evm. Can you make sure you add the correct data to all
  of these dts files as part of your series and remove the
  wl12xx_platform_data references?
 
 AFAICT, these board files add wl12xx platform data, while the new DT
 support is only for wl18xx.
 

How can you tell the difference? What I see is that omap3pandora
(and nothing else) calls wl1251_set_platform_data(), while 
da850-evm and all omap3/omap4 boards use wl12xx_set_platform_data().

The latter seems to refer to all wl12xx and wl18xx variants except
for wl1251, based on my (very limited) understanding of that code.

Arnd
--
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 v4 2/2] wl18xx: add basic device-tree support

2015-03-08 Thread Eliad Peller
When running with device-tree, we no longer have a board file
that can set up the platform data for wlcore.
Allow this data to be passed from DT.

For now, parse only the irq used. Other (optional) properties
can be added later on.

Signed-off-by: Ido Yariv i...@wizery.com
Signed-off-by: Eliad Peller el...@wizery.com
---
v4: use specific models, look for DT first (Arnd)

 drivers/net/wireless/ti/wlcore/sdio.c | 80 ---
 1 file changed, 74 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ti/wlcore/sdio.c 
b/drivers/net/wireless/ti/wlcore/sdio.c
index d3dd7bf..ee556ac 100644
--- a/drivers/net/wireless/ti/wlcore/sdio.c
+++ b/drivers/net/wireless/ti/wlcore/sdio.c
@@ -34,6 +34,8 @@
 #include linux/wl12xx.h
 #include linux/pm_runtime.h
 #include linux/printk.h
+#include linux/of.h
+#include linux/of_irq.h
 
 #include wlcore.h
 #include wl12xx_80211.h
@@ -214,6 +216,69 @@ static struct wl1271_if_operations sdio_ops = {
.set_block_size = wl1271_sdio_set_block_size,
 };
 
+#ifdef CONFIG_OF
+static const struct of_device_id wlcore_sdio_of_match_table[] = {
+   { .compatible = ti,wl1801 },
+   { .compatible = ti,wl1805 },
+   { .compatible = ti,wl1807 },
+   { .compatible = ti,wl1831 },
+   { .compatible = ti,wl1835 },
+   { .compatible = ti,wl1837 },
+   { }
+};
+
+static struct wl12xx_platform_data *wlcore_probe_of(struct device *dev)
+{
+   struct device_node *np = dev-of_node;
+   struct wl12xx_platform_data *pdata;
+
+   if (!np || !of_match_node(wlcore_sdio_of_match_table, np))
+   return NULL;
+
+   pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
+   if (!pdata)
+   return NULL;
+
+   pdata-irq = irq_of_parse_and_map(np, 0);
+   if (!pdata-irq) {
+   dev_err(dev, No irq in platform data\n);
+   kfree(pdata);
+   return NULL;
+   }
+
+   return pdata;
+}
+#else
+static struct wl12xx_platform_data *wlcore_probe_of(struct device *dev)
+{
+   return NULL;
+}
+#endif
+
+static struct wl12xx_platform_data *
+wlcore_get_platform_data(struct device *dev)
+{
+   struct wl12xx_platform_data *pdata;
+
+   /* first, look for DT data */
+   pdata = wlcore_probe_of(dev);
+   if (pdata)
+   return pdata;
+
+   /* if not found - fallback to static platform data */
+   pdata = wl12xx_get_platform_data();
+   if (!IS_ERR(pdata))
+   return kmemdup(pdata, sizeof(*pdata), GFP_KERNEL);
+
+   dev_err(dev, No platform data set\n);
+   return NULL;
+}
+
+static void wlcore_del_platform_data(struct wl12xx_platform_data *pdata)
+{
+   kfree(pdata);
+}
+
 static int wl1271_probe(struct sdio_func *func,
  const struct sdio_device_id *id)
 {
@@ -245,12 +310,9 @@ static int wl1271_probe(struct sdio_func *func,
/* Use block mode for transferring over one block size of data */
func-card-quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE;
 
-   pdev_data.pdata = wl12xx_get_platform_data();
-   if (IS_ERR(pdev_data.pdata)) {
-   ret = PTR_ERR(pdev_data.pdata);
-   dev_err(glue-dev, missing wlan platform data: %d\n, ret);
+   pdev_data.pdata = wlcore_get_platform_data(func-dev);
+   if (!pdev_data.pdata)
goto out_free_glue;
-   }
 
/* if sdio can keep power while host is suspended, enable wow */
mmcflags = sdio_get_host_pm_caps(func);
@@ -279,7 +341,7 @@ static int wl1271_probe(struct sdio_func *func,
if (!glue-core) {
dev_err(glue-dev, can't allocate platform_device);
ret = -ENOMEM;
-   goto out_free_glue;
+   goto out_free_pdata;
}
 
glue-core-dev.parent = func-dev;
@@ -313,6 +375,9 @@ static int wl1271_probe(struct sdio_func *func,
 out_dev_put:
platform_device_put(glue-core);
 
+out_free_pdata:
+   wlcore_del_platform_data(pdev_data.pdata);
+
 out_free_glue:
kfree(glue);
 
@@ -323,11 +388,14 @@ out:
 static void wl1271_remove(struct sdio_func *func)
 {
struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func);
+   struct wlcore_platdev_data *pdev_data = glue-core-dev.platform_data;
+   struct wl12xx_platform_data *pdata = pdev_data-pdata;
 
/* Undo decrement done above in wl1271_probe */
pm_runtime_get_noresume(func-dev);
 
platform_device_unregister(glue-core);
+   wlcore_del_platform_data(pdata);
kfree(glue);
 }
 
-- 
1.8.5.2.229.g4448466.dirty

--
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 v4 1/2] dt: bindings: add wl18xx wireless device

2015-03-08 Thread Eliad Peller
Add device tree binding documentation for TI's wl18xx
wlan chip.

Signed-off-by: Eliad Peller el...@wizery.com
---
v4: use specific wl18xx model numbers (Arnd)

 .../devicetree/bindings/net/wireless/ti,wl18xx.txt | 39 ++
 1 file changed, 39 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wl18xx.txt

diff --git a/Documentation/devicetree/bindings/net/wireless/ti,wl18xx.txt 
b/Documentation/devicetree/bindings/net/wireless/ti,wl18xx.txt
new file mode 100644
index 000..9dcf535
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/wireless/ti,wl18xx.txt
@@ -0,0 +1,39 @@
+TI Wilink8 (wl18xx) SDIO devices
+
+This node provides properties for controlling the wilink8 wireless device. The
+node is expected to be specified as a child node to the SDIO controller that
+connects the device to the system.
+
+Required properties:
+ - compatible : Should be ti,wl18xx.
+ - compatible: should be one of the following:
+* ti,wl1801
+* ti,wl1805
+* ti,wl1807
+* ti,wl1831
+* ti,wl1835
+* ti,wl1837
+ - interrupts : specifies attributes for the out-of-band interrupt.
+
+Optional properties:
+ - interrupt-parent : the phandle for the interrupt controller to which the
+   device interrupts are connected.
+
+Example:
+
+mmc3 {
+   status = okay;
+   vmmc-supply = wlan_en_reg;
+   bus-width = 4;
+   cap-power-off-card;
+   keep-power-in-suspend;
+
+   #address-cells = 1;
+   #size-cells = 0;
+   wlcore: wlcore@2 {
+   compatible = ti,wl1835;
+   reg = 2;
+   interrupt-parent = gpio0;
+   interrupts = 19 IRQ_TYPE_NONE;
+   };
+};
-- 
1.8.5.2.229.g4448466.dirty

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


[PATCH 0/3] wil6210 patches

2015-03-08 Thread Vladimir Kondratiev
Take care of AP bridging;
and fix NAPI behavior

Vladimir Kondratiev (3):
  wil6210: NAPI completion refactor
  wil6210: re-submit Rx frames to the wireless media if appropriate
  wil6210: support AP isolation

 drivers/net/wireless/ath/wil6210/cfg80211.c | 16 +++
 drivers/net/wireless/ath/wil6210/debugfs.c  |  1 +
 drivers/net/wireless/ath/wil6210/main.c |  1 +
 drivers/net/wireless/ath/wil6210/netdev.c   |  4 +-
 drivers/net/wireless/ath/wil6210/txrx.c | 72 +++--
 drivers/net/wireless/ath/wil6210/wil6210.h  |  1 +
 6 files changed, 79 insertions(+), 16 deletions(-)

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


pull request: new firmware for Intel wireless Intel 3160 / 7260 / 7265 / 7265D devices

2015-03-08 Thread Grumbach, Emmanuel
Hi,

This is a pull request for new firmwares for the Intel wireless devices
mentioned in the subject.

I replace -10.ucode with new ones (that includes bug fixes).

Please pull.


The following changes since commit 1e67c28c65137dd1647e597ebef45d8a0c9168f9:

  ath9k_htc: update versions in WHENCE (2015-03-06 11:35:57 -0500)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware.git 
master

for you to fetch changes up to d81bc142d7068073699ce6ffbfbdf268baa9f200:

  iwlwifi: update -10.ucode for 3160 / 7260 / 7265 / 7265D (2015-03-08 15:55:20 
+0200)


Emmanuel Grumbach (1):
  iwlwifi: update -10.ucode for 3160 / 7260 / 7265 / 7265D

 WHENCE |   8 
 iwlwifi-3160-10.ucode  | Bin 610008 - 609892 bytes
 iwlwifi-7260-10.ucode  | Bin 672368 - 672352 bytes
 iwlwifi-7265-10.ucode  | Bin 736860 - 736844 bytes
 iwlwifi-7265D-10.ucode | Bin 740452 - 740436 bytes
 5 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/WHENCE b/WHENCE
index d07ddba..9230517 100644
--- a/WHENCE
+++ b/WHENCE
@@ -825,7 +825,7 @@ File: iwlwifi-7260-9.ucode
 Version: 25.228.9.0
 
 File: iwlwifi-7260-10.ucode
-Version: 23.14.10.0
+Version: 23.15.10.0
 
 File: iwlwifi-7260-12.ucode
 Version: 25.15.12.0
@@ -840,7 +840,7 @@ File: iwlwifi-3160-9.ucode
 Version: 25.228.9.0
 
 File: iwlwifi-3160-10.ucode
-Version: 23.14.10.0
+Version: 23.15.10.0
 
 File: iwlwifi-3160-12.ucode
 Version: 25.15.12.0
@@ -852,13 +852,13 @@ File: iwlwifi-7265-9.ucode
 Version: 25.228.9.0
 
 File: iwlwifi-7265-10.ucode
-Version: 23.14.10.0
+Version: 23.15.10.0
 
 File: iwlwifi-7265-12.ucode
 Version: 25.15.12.0
 
 File: iwlwifi-7265D-10.ucode
-Version: 23.14.10.0
+Version: 23.15.10.0
 
 File: iwlwifi-7265D-12.ucode
 Version: 25.15.12.0
diff --git a/iwlwifi-3160-10.ucode b/iwlwifi-3160-10.ucode
index 8029b17..843d4d4 100644
Binary files a/iwlwifi-3160-10.ucode and b/iwlwifi-3160-10.ucode differ
diff --git a/iwlwifi-7260-10.ucode b/iwlwifi-7260-10.ucode
index 917378a..1a828d7 100644
Binary files a/iwlwifi-7260-10.ucode and b/iwlwifi-7260-10.ucode differ
diff --git a/iwlwifi-7265-10.ucode b/iwlwifi-7265-10.ucode
index d1b0504..a58d323 100644
Binary files a/iwlwifi-7265-10.ucode and b/iwlwifi-7265-10.ucode differ
diff --git a/iwlwifi-7265D-10.ucode b/iwlwifi-7265D-10.ucode
index 79dcb31..2f6ce2c 100644
Binary files a/iwlwifi-7265D-10.ucode and b/iwlwifi-7265D-10.ucode differ
The following changes since commit 1e67c28c65137dd1647e597ebef45d8a0c9168f9:

  ath9k_htc: update versions in WHENCE (2015-03-06 11:35:57 -0500)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware.git 
master

for you to fetch changes up to d81bc142d7068073699ce6ffbfbdf268baa9f200:

  iwlwifi: update -10.ucode for 3160 / 7260 / 7265 / 7265D (2015-03-08 15:55:20 
+0200)


Emmanuel Grumbach (1):
  iwlwifi: update -10.ucode for 3160 / 7260 / 7265 / 7265D

 WHENCE |   8 
 iwlwifi-3160-10.ucode  | Bin 610008 - 609892 bytes
 iwlwifi-7260-10.ucode  | Bin 672368 - 672352 bytes
 iwlwifi-7265-10.ucode  | Bin 736860 - 736844 bytes
 iwlwifi-7265D-10.ucode | Bin 740452 - 740436 bytes
 5 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/WHENCE b/WHENCE
index d07ddba..9230517 100644
--- a/WHENCE
+++ b/WHENCE
@@ -825,7 +825,7 @@ File: iwlwifi-7260-9.ucode
 Version: 25.228.9.0
 
 File: iwlwifi-7260-10.ucode
-Version: 23.14.10.0
+Version: 23.15.10.0
 
 File: iwlwifi-7260-12.ucode
 Version: 25.15.12.0
@@ -840,7 +840,7 @@ File: iwlwifi-3160-9.ucode
 Version: 25.228.9.0
 
 File: iwlwifi-3160-10.ucode
-Version: 23.14.10.0
+Version: 23.15.10.0
 
 File: iwlwifi-3160-12.ucode
 Version: 25.15.12.0
@@ -852,13 +852,13 @@ File: iwlwifi-7265-9.ucode
 Version: 25.228.9.0
 
 File: iwlwifi-7265-10.ucode
-Version: 23.14.10.0
+Version: 23.15.10.0
 
 File: iwlwifi-7265-12.ucode
 Version: 25.15.12.0
 
 File: iwlwifi-7265D-10.ucode
-Version: 23.14.10.0
+Version: 23.15.10.0
 
 File: iwlwifi-7265D-12.ucode
 Version: 25.15.12.0
diff --git a/iwlwifi-3160-10.ucode b/iwlwifi-3160-10.ucode
index 8029b17..843d4d4 100644
Binary files a/iwlwifi-3160-10.ucode and b/iwlwifi-3160-10.ucode differ
diff --git a/iwlwifi-7260-10.ucode b/iwlwifi-7260-10.ucode
index 917378a..1a828d7 100644
Binary files a/iwlwifi-7260-10.ucode and b/iwlwifi-7260-10.ucode differ
diff --git a/iwlwifi-7265-10.ucode b/iwlwifi-7265-10.ucode
index d1b0504..a58d323 100644
Binary files a/iwlwifi-7265-10.ucode and b/iwlwifi-7265-10.ucode differ
diff --git a/iwlwifi-7265D-10.ucode b/iwlwifi-7265D-10.ucode
index 79dcb31..2f6ce2c 100644
Binary files a/iwlwifi-7265D-10.ucode and b/iwlwifi-7265D-10.ucode differ



signature.asc
Description: This is a digitally signed message part


Re: [PATCH v3 1/2] dt: bindings: add wl18xx wireless device

2015-03-08 Thread Eliad Peller
On Fri, Feb 27, 2015 at 10:14 AM, Arnd Bergmann a...@arndb.de wrote:
 On Thursday 19 February 2015 18:13:20 Eliad Peller wrote:
 +Required properties:
 + - compatible : Should be ti,wl18xx.

 Do not use wildcards in the compatible string, use specific model numbers.

ok. i'll change it to ti,wl1835 and ti,wl1837

thanks,
Eliad.
--
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/3] wil6210: NAPI completion refactor

2015-03-08 Thread Vladimir Kondratiev
It is expected that driver completes NAPI when less than
full budget is consumed.

Fulfill this requirement.

Signed-off-by: Vladimir Kondratiev qca_vkond...@qca.qualcomm.com
---
 drivers/net/wireless/ath/wil6210/netdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/wil6210/netdev.c 
b/drivers/net/wireless/ath/wil6210/netdev.c
index ace30c1..f2f7ea2 100644
--- a/drivers/net/wireless/ath/wil6210/netdev.c
+++ b/drivers/net/wireless/ath/wil6210/netdev.c
@@ -82,7 +82,7 @@ static int wil6210_netdev_poll_rx(struct napi_struct *napi, 
int budget)
wil_rx_handle(wil, quota);
done = budget - quota;
 
-   if (done = 1) { /* burst ends - only one packet processed */
+   if (done  budget) {
napi_complete(napi);
wil6210_unmask_irq_rx(wil);
wil_dbg_txrx(wil, NAPI RX complete\n);
@@ -110,7 +110,7 @@ static int wil6210_netdev_poll_tx(struct napi_struct *napi, 
int budget)
tx_done += wil_tx_complete(wil, i);
}
 
-   if (tx_done = 1) { /* burst ends - only one packet processed */
+   if (tx_done  budget) {
napi_complete(napi);
wil6210_unmask_irq_tx(wil);
wil_dbg_txrx(wil, NAPI TX complete\n);
-- 
2.1.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 2/3] wil6210: re-submit Rx frames to the wireless media if appropriate

2015-03-08 Thread Vladimir Kondratiev
This is for AP only. If Rx data frame targeted to one of associated clients,
transmit it back to the wireless media and don't deliver to the host.
For the multicast frames, deliver to both host and wireless media.

Signed-off-by: Vladimir Kondratiev qca_vkond...@qca.qualcomm.com
---
 drivers/net/wireless/ath/wil6210/txrx.c | 72 ++---
 1 file changed, 58 insertions(+), 14 deletions(-)

diff --git a/drivers/net/wireless/ath/wil6210/txrx.c 
b/drivers/net/wireless/ath/wil6210/txrx.c
index 7f2f560..08d3cac 100644
--- a/drivers/net/wireless/ath/wil6210/txrx.c
+++ b/drivers/net/wireless/ath/wil6210/txrx.c
@@ -492,17 +492,71 @@ static int wil_rx_refill(struct wil6210_priv *wil, int 
count)
  */
 void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev)
 {
-   gro_result_t rc;
+   gro_result_t rc = GRO_NORMAL;
struct wil6210_priv *wil = ndev_to_wil(ndev);
+   struct wireless_dev *wdev = wil_to_wdev(wil);
unsigned int len = skb-len;
struct vring_rx_desc *d = wil_skb_rxdesc(skb);
int cid = wil_rxdesc_cid(d);
+   struct ethhdr *eth = (void *)skb-data;
+   /* here looking for DA, not A1, thus Rxdesc's 'mcast' indication
+* is not suitable, need to look at data
+*/
+   int mcast = is_multicast_ether_addr(eth-h_dest);
struct wil_net_stats *stats = wil-sta[cid].stats;
+   struct sk_buff *xmit_skb = NULL;
+   static const char * const gro_res_str[] = {
+   [GRO_MERGED]= GRO_MERGED,
+   [GRO_MERGED_FREE]   = GRO_MERGED_FREE,
+   [GRO_HELD]  = GRO_HELD,
+   [GRO_NORMAL]= GRO_NORMAL,
+   [GRO_DROP]  = GRO_DROP,
+   };
 
skb_orphan(skb);
 
-   rc = napi_gro_receive(wil-napi_rx, skb);
+   if (wdev-iftype == NL80211_IFTYPE_AP) {
+   if (mcast) {
+   /* send multicast frames both to higher layers in
+* local net stack and back to the wireless medium
+*/
+   xmit_skb = skb_copy(skb, GFP_ATOMIC);
+   } else {
+   int xmit_cid = wil_find_cid(wil, eth-h_dest);
+
+   if (xmit_cid = 0) {
+   /* The destination station is associated to
+* this AP (in this VLAN), so send the frame
+* directly to it and do not pass it to local
+* net stack.
+*/
+   xmit_skb = skb;
+   skb = NULL;
+   }
+   }
+   }
+   if (xmit_skb) {
+   /* Send to wireless media and increase priority by 256 to
+* keep the received priority instead of reclassifying
+* the frame (see cfg80211_classify8021d).
+*/
+   xmit_skb-dev = ndev;
+   xmit_skb-priority += 256;
+   xmit_skb-protocol = htons(ETH_P_802_3);
+   skb_reset_network_header(xmit_skb);
+   skb_reset_mac_header(xmit_skb);
+   wil_dbg_txrx(wil, Rx - Tx %d bytes\n, len);
+   dev_queue_xmit(xmit_skb);
+   }
+
+   if (skb) { /* deliver to local stack */
 
+   skb-protocol = eth_type_trans(skb, ndev);
+   rc = napi_gro_receive(wil-napi_rx, skb);
+   wil_dbg_txrx(wil, Rx complete %d bytes = %s\n,
+len, gro_res_str[rc]);
+   }
+   /* statistics. rc set to GRO_NORMAL for AP bridging */
if (unlikely(rc == GRO_DROP)) {
ndev-stats.rx_dropped++;
stats-rx_dropped++;
@@ -512,17 +566,8 @@ void wil_netif_rx_any(struct sk_buff *skb, struct 
net_device *ndev)
stats-rx_packets++;
ndev-stats.rx_bytes += len;
stats-rx_bytes += len;
-   }
-   {
-   static const char * const gro_res_str[] = {
-   [GRO_MERGED]= GRO_MERGED,
-   [GRO_MERGED_FREE]   = GRO_MERGED_FREE,
-   [GRO_HELD]  = GRO_HELD,
-   [GRO_NORMAL]= GRO_NORMAL,
-   [GRO_DROP]  = GRO_DROP,
-   };
-   wil_dbg_txrx(wil, Rx complete %d bytes = %s\n,
-len, gro_res_str[rc]);
+   if (mcast)
+   ndev-stats.multicast++;
}
 }
 
@@ -553,7 +598,6 @@ void wil_rx_handle(struct wil6210_priv *wil, int *quota)
skb-protocol = htons(ETH_P_802_2);
wil_netif_rx_any(skb, ndev);
} else {
-   skb-protocol = eth_type_trans(skb, ndev);
wil_rx_reorder(wil, skb);
}

[PATCH 3/3] wil6210: support AP isolation

2015-03-08 Thread Vladimir Kondratiev
For the AP, configuration may say not to bridge traffic between
wireless clients. This is conveyed from user space (ex: hostapd has
ap_isolate parameter) with NL80211_CMD_SET_BSS, to the driver's
cfg80211 ops method change_bss

Add support for this setting.

Signed-off-by: Vladimir Kondratiev qca_vkond...@qca.qualcomm.com
---
 drivers/net/wireless/ath/wil6210/cfg80211.c | 16 
 drivers/net/wireless/ath/wil6210/debugfs.c  |  1 +
 drivers/net/wireless/ath/wil6210/main.c |  1 +
 drivers/net/wireless/ath/wil6210/txrx.c |  2 +-
 drivers/net/wireless/ath/wil6210/wil6210.h  |  1 +
 5 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c 
b/drivers/net/wireless/ath/wil6210/cfg80211.c
index 4bd708c..5db6a6d 100644
--- a/drivers/net/wireless/ath/wil6210/cfg80211.c
+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -917,6 +917,21 @@ static int wil_cfg80211_probe_client(struct wiphy *wiphy,
return 0;
 }
 
+static int wil_cfg80211_change_bss(struct wiphy *wiphy,
+  struct net_device *dev,
+  struct bss_parameters *params)
+{
+   struct wil6210_priv *wil = wiphy_to_wil(wiphy);
+
+   if (params-ap_isolate = 0) {
+   wil_dbg_misc(wil, %s(ap_isolate %d = %d)\n, __func__,
+wil-ap_isolate, params-ap_isolate);
+   wil-ap_isolate = params-ap_isolate;
+   }
+
+   return 0;
+}
+
 static struct cfg80211_ops wil_cfg80211_ops = {
.scan = wil_cfg80211_scan,
.connect = wil_cfg80211_connect,
@@ -937,6 +952,7 @@ static struct cfg80211_ops wil_cfg80211_ops = {
.stop_ap = wil_cfg80211_stop_ap,
.del_station = wil_cfg80211_del_station,
.probe_client = wil_cfg80211_probe_client,
+   .change_bss = wil_cfg80211_change_bss,
 };
 
 static void wil_wiphy_init(struct wiphy *wiphy)
diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c 
b/drivers/net/wireless/ath/wil6210/debugfs.c
index 3830cc2..a42cb89 100644
--- a/drivers/net/wireless/ath/wil6210/debugfs.c
+++ b/drivers/net/wireless/ath/wil6210/debugfs.c
@@ -1405,6 +1405,7 @@ static const struct dbg_off dbg_wil_off[] = {
WIL_FIELD(fw_version,   S_IRUGO,doff_u32),
WIL_FIELD(hw_version,   S_IRUGO,doff_x32),
WIL_FIELD(recovery_count, S_IRUGO,  doff_u32),
+   WIL_FIELD(ap_isolate,   S_IRUGO,doff_u32),
{},
 };
 
diff --git a/drivers/net/wireless/ath/wil6210/main.c 
b/drivers/net/wireless/ath/wil6210/main.c
index db74e81..afff8d3 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -714,6 +714,7 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw)
 
/* init after reset */
wil-pending_connect_cid = -1;
+   wil-ap_isolate = 0;
reinit_completion(wil-wmi_ready);
reinit_completion(wil-wmi_call);
 
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c 
b/drivers/net/wireless/ath/wil6210/txrx.c
index 08d3cac..689081c 100644
--- a/drivers/net/wireless/ath/wil6210/txrx.c
+++ b/drivers/net/wireless/ath/wil6210/txrx.c
@@ -515,7 +515,7 @@ void wil_netif_rx_any(struct sk_buff *skb, struct 
net_device *ndev)
 
skb_orphan(skb);
 
-   if (wdev-iftype == NL80211_IFTYPE_AP) {
+   if (wdev-iftype == NL80211_IFTYPE_AP  !wil-ap_isolate) {
if (mcast) {
/* send multicast frames both to higher layers in
 * local net stack and back to the wireless medium
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h 
b/drivers/net/wireless/ath/wil6210/wil6210.h
index b6e65c3..c1a71ab 100644
--- a/drivers/net/wireless/ath/wil6210/wil6210.h
+++ b/drivers/net/wireless/ath/wil6210/wil6210.h
@@ -542,6 +542,7 @@ struct wil6210_priv {
u32 monitor_flags;
u32 privacy; /* secure connection? */
int sinfo_gen;
+   u32 ap_isolate; /* no intra-BSS communication */
/* interrupt moderation */
u32 tx_max_burst_duration;
u32 tx_interframe_timeout;
-- 
2.1.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


Re: [PATCH] rt2x00: use rt2x00queue_flush_queues() instead of implementing the same action

2015-03-08 Thread Stanislaw Gruszka
On Sat, Mar 07, 2015 at 08:45:50PM +02iee80211_ops00, Giedrius Statkevičius 
wrote:
 Use rt2x00queue_flush_queues() in rt2x00mac_flush() instead of
 reimplementing the same actions the second time. Also, now it flushes
 the rx queue aswell which it didn't before and that makes it completely
 do what it's supposed to do according to struct iee80211_ops: flush()
 must flush all queues.

NACK, RX queue should not be flushed, mac80211 flush is about TX queues
only.

Stanislaw
--
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] wlcore: add basic device-tree support

2015-03-08 Thread Eliad Peller
hi Luca,

On Fri, Feb 27, 2015 at 9:31 AM, Luca Coelho l...@coelho.fi wrote:
 Hi,

 On Sun, 2015-02-15 at 13:09 +0200, Eliad Peller wrote:
 When running with device-tree, we no longer have a board file
 that can set up the platform data for wlcore.
 Allow this data to be passed from DT.

 For now, parse only the irq used. Other (optional) properties
 can be added later on.

 Signed-off-by: Ido Yariv i...@wizery.com
 Signed-off-by: Eliad Peller el...@wizery.com
 ---

 I don't really care much, but why not just finalize the work I did a
 couple of years ago?

 http://mid.gmane.org/1375189476-21557-1-git-send-email-coe...@ti.com
 http://mid.gmane.org/1375215668-29171-1-git-send-email-coe...@ti.com

 IIRC there were just some minor comments there, but I never really got
 to it because I left TI.

I just wanted a small patch to add DT support for wl18xx.
as there were some issues remaining wrt the correct way to specify the
clock data, i preferred taking the simpler route (for now), and only
add the wl18xx part, which doesn't require the clocks definitions.

i guess the patches will still be useful (and used) when wl12xx DT
support will be added.

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


Re: [PATCH v3 2/2] wl18xx: add basic device-tree support

2015-03-08 Thread Eliad Peller
On Fri, Feb 27, 2015 at 10:26 AM, Arnd Bergmann a...@arndb.de wrote:
 On Thursday 19 February 2015 18:13:21 Eliad Peller wrote:
 +
 +static struct wl12xx_platform_data *wlcore_probe_of(struct device *dev)
 +{
 +   struct device_node *np = dev-of_node;
 +   struct wl12xx_platform_data *pdata;
 +
 +   if (!np || !of_match_node(wlcore_sdio_of_match_table, np)) {
 +   dev_err(dev, No platform data set\n);
 +   return NULL;
 +   }
 +
 +   pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
 +   if (!pdata)
 +   return NULL;
 +
 +   pdata-irq = irq_of_parse_and_map(np, 0);
 +   if (!pdata-irq) {
 +   dev_err(dev, No irq in platform data\n);
 +   kfree(pdata);
 +   return NULL;
 +   }
 +
 +   return pdata;
 +}
 +#else
 +static struct wl12xx_platform_data *wlcore_probe_of(struct device *dev)
 +{
 +   return NULL;
 +}
 +#endif
 +
 +static struct wl12xx_platform_data *
 +wlcore_get_platform_data(struct device *dev)
 +{
 +   struct wl12xx_platform_data *pdata;
 +
 +   pdata = wl12xx_get_platform_data();
 +   if (!IS_ERR(pdata))
 +   return kmemdup(pdata, sizeof(*pdata), GFP_KERNEL);
 +
 +   return wlcore_probe_of(dev);
 +}

 I think the probe_of needs to come first here, otherwise you cannot
 override the pdata quirk with actual DT data.

makes sense. i'll change it.

 I've looked up the what boards actually use this data and found that
 all of them already support booting from DT: some omap2 boards using
 arch/arm/mach-omap2/pdata-quirks.c to provide the data, and the
 davinci 850evm. Can you make sure you add the correct data to all
 of these dts files as part of your series and remove the
 wl12xx_platform_data references?

AFAICT, these board files add wl12xx platform data, while the new DT
support is only for wl18xx.

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


[PATCH] mac80211: initialize rate control earlier for tdls station

2015-03-08 Thread Arik Nemtsov
From: Marek Puzyniak marek.puzyn...@tieto.com

Currently when TDLS station in driver goes from authorized
to associated state it can not use rate control parameters
because rate control is not initialized yet. Some drivers
require parameters already initialized by rate control when
entering associated state. It can be done by initializing
rate control after station transition to associated state
but before notifying driver about that.

Signed-off-by: Marek Puzyniak marek.puzyn...@tieto.com
Signed-off-by: Arik Nemtsov arikx.nemt...@intel.com
---
 net/mac80211/cfg.c | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 94889de..0e43e6e 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -977,6 +977,14 @@ static int sta_apply_auth_flags(struct ieee80211_local 
*local,
if (mask  BIT(NL80211_STA_FLAG_ASSOCIATED) 
set  BIT(NL80211_STA_FLAG_ASSOCIATED) 
!test_sta_flag(sta, WLAN_STA_ASSOC)) {
+   /*
+* When peer becomes authorized, init rate control as
+* well. Some drivers require rate control initialized
+* before drv_sta_state() is called.
+*/
+   if (test_sta_flag(sta, WLAN_STA_TDLS_PEER))
+   rate_control_rate_init(sta);
+
ret = sta_info_move_state(sta, IEEE80211_STA_ASSOC);
if (ret)
return ret;
@@ -1378,11 +1386,6 @@ static int ieee80211_change_station(struct wiphy *wiphy,
if (err)
goto out_err;
 
-   /* When peer becomes authorized, init rate control as well */
-   if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) 
-   test_sta_flag(sta, WLAN_STA_AUTHORIZED))
-   rate_control_rate_init(sta);
-
mutex_unlock(local-sta_mtx);
 
if ((sdata-vif.type == NL80211_IFTYPE_AP ||
-- 
2.1.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