Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 2/2] ath10k: remove obsolete INIT STATUS definitions
From: Bartosz Markowski @ 2013-09-03 12:24 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Bartosz Markowski
In-Reply-To: <1378211043-20299-1-git-send-email-bartosz.markowski@tieto.com>

There's no functional changes. Just a small cleanup.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
 drivers/net/wireless/ath/ath10k/wmi.h |    8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index 08860c4..40fcf05 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -763,14 +763,6 @@ struct wmi_service_ready_event {
 	struct wlan_host_mem_req mem_reqs[1];
 } __packed;
 
-/*
- * status consists of  upper 16 bits fo int status and lower 16 bits of
- * module ID that retuned status
- */
-#define WLAN_INIT_STATUS_SUCCESS   0x0
-#define WLAN_GET_INIT_STATUS_REASON(status)    ((status) & 0xffff)
-#define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
-
 #define WMI_SERVICE_READY_TIMEOUT_HZ (5*HZ)
 #define WMI_UNIFIED_READY_TIMEOUT_HZ (5*HZ)
 
-- 
1.7.10


^ permalink raw reply related

* [PATCH 1/2] ath10k: set the UART baud rate to 19200
From: Bartosz Markowski @ 2013-09-03 12:24 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Bartosz Markowski

When configuring the host_interests over BMI, set the UART
baud rate to 19200. This is valid for QCA988X_2.0 devices.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 2dd39a8..2c1d2d7 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -435,6 +435,13 @@ static int ath10k_init_uart(struct ath10k *ar)
 		return ret;
 	}
 
+	/* Set the UART baud rate to 19200. */
+	ret = ath10k_bmi_write32(ar, hi_desired_baud_rate, 19200);
+	if (ret) {
+		ath10k_warn("could not set the baud rate (%d)\n", ret);
+		return ret;
+	}
+
 	ath10k_info("UART prints enabled\n");
 	return 0;
 }
-- 
1.7.10


^ permalink raw reply related

* Re: [PATCH 1/2] cw1200:  Don't perform SPI transfers in interrupt context
From: Solomon Peachy @ 2013-09-03 11:58 UTC (permalink / raw)
  To: linux-wireless
In-Reply-To: <1377649787-2817-1-git-send-email-pizza@shaftnet.org>

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

On Tue, Aug 27, 2013 at 08:29:46PM -0400, Solomon Peachy wrote:
> When we get an interrupt from the hardware, the first thing the driver does
> is tell the device to mask off the interrupt line.  Unfortunately this
> involves a SPI transaction in interrupt context.  Some (most?) SPI
> controllers perform the transfer asynchronously and try to sleep.
> This is bad, and triggers a BUG().

Did this patch series get dropped?  I saw that the followup series 
of minor cleanups were merged into wireless-next, but not these.

Since they didn't make it into 3.11, I intend to submit them to -stable, 
but I need to make sure they at least make it into -next.

Thanks,

 - Solomon
-- 
Solomon Peachy        		       pizza at shaftnet dot org
Delray Beach, FL                          ^^ (email/xmpp) ^^
Quidquid latine dictum sit, altum viditur.

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply

* Re: WFD Development setup issues
From: Arend van Spriel @ 2013-09-03 11:29 UTC (permalink / raw)
  To: HunTERminator Chief; +Cc: linux-wireless
In-Reply-To: <1378162958.1194.YahooMailBasic@web140906.mail.bf1.yahoo.com>

On 09/03/2013 01:02 AM, HunTERminator Chief wrote:
> I have attached the full output to this email.
>
> Can anyone tell me why this is happening?  Or otherwise, how to get the ./wpa_supplicant to run properly?

You are trying this with NetworkManager handling wireless interfaces as 
well?

> Thanks in advance
>
> -Brian



^ permalink raw reply

* [PATCH 3/3] ath10k: add htt_stats_enable debugfs file
From: Kalle Valo @ 2013-09-03  8:44 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless
In-Reply-To: <20130903084302.26199.3538.stgit@localhost6.localdomain6>

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/core.h   |    3 +
 drivers/net/wireless/ath/ath10k/debug.c  |  111 ++++++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath10k/htt.h    |    1 
 drivers/net/wireless/ath/ath10k/htt_tx.c |   42 +++++++++++
 4 files changed, 157 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 174c4b4..22b17d6 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -246,6 +246,9 @@ struct ath10k_debug {
 	u32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
 
 	struct completion event_stats_compl;
+
+	unsigned long htt_stats_mask;
+	struct delayed_work htt_stats_dwork;
 };
 
 enum ath10k_state {
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index 219d469..59615c7 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -21,6 +21,9 @@
 #include "core.h"
 #include "debug.h"
 
+/* ms */
+#define ATH10K_DEBUG_HTT_STATS_INTERVAL 1000
+
 static int ath10k_printk(const char *level, const char *fmt, ...)
 {
 	struct va_format vaf;
@@ -517,13 +520,115 @@ static const struct file_operations fops_chip_id = {
 	.llseek = default_llseek,
 };
 
+static int ath10k_debug_htt_stats_req(struct ath10k *ar)
+{
+	u64 cookie;
+	int ret;
+
+	lockdep_assert_held(&ar->conf_mutex);
+
+	if (ar->debug.htt_stats_mask == 0)
+		/* htt stats are disabled */
+		return 0;
+
+	if (ar->state != ATH10K_STATE_ON)
+		return 0;
+
+	cookie = get_jiffies_64();
+
+	ret = ath10k_htt_h2t_stats_req(&ar->htt, ar->debug.htt_stats_mask,
+				       cookie);
+	if (ret) {
+		ath10k_warn("failed to send htt stats request: %d\n", ret);
+		return ret;
+	}
+
+	queue_delayed_work(ar->workqueue, &ar->debug.htt_stats_dwork,
+			   msecs_to_jiffies(ATH10K_DEBUG_HTT_STATS_INTERVAL));
+
+	return 0;
+}
+
+static void ath10k_debug_htt_stats_dwork(struct work_struct *work)
+{
+	struct ath10k *ar = container_of(work, struct ath10k,
+					 debug.htt_stats_dwork.work);
+
+	mutex_lock(&ar->conf_mutex);
+
+	ath10k_debug_htt_stats_req(ar);
+
+	mutex_unlock(&ar->conf_mutex);
+}
+
+static ssize_t ath10k_read_htt_stats_mask(struct file *file,
+					    char __user *user_buf,
+					    size_t count, loff_t *ppos)
+{
+	struct ath10k *ar = file->private_data;
+	char buf[32];
+	unsigned int len;
+
+	len = scnprintf(buf, sizeof(buf), "%lu\n", ar->debug.htt_stats_mask);
+
+	return simple_read_from_buffer(user_buf, count, ppos, buf, len);
+}
+
+static ssize_t ath10k_write_htt_stats_mask(struct file *file,
+					     const char __user *user_buf,
+					     size_t count, loff_t *ppos)
+{
+	struct ath10k *ar = file->private_data;
+	unsigned long mask;
+	int ret;
+
+	ret = kstrtoul_from_user(user_buf, count, 0, &mask);
+	if (ret)
+		return ret;
+
+	/* max 8 bit masks (for now) */
+	if (mask > 0xff)
+		return -E2BIG;
+
+	mutex_lock(&ar->conf_mutex);
+
+	ar->debug.htt_stats_mask = mask;
+
+	ret = ath10k_debug_htt_stats_req(ar);
+	if (ret)
+		goto out;
+
+	ret = count;
+
+out:
+	mutex_unlock(&ar->conf_mutex);
+
+	return ret;
+}
+
+static const struct file_operations fops_htt_stats_mask = {
+	.read = ath10k_read_htt_stats_mask,
+	.write = ath10k_write_htt_stats_mask,
+	.open = simple_open,
+	.owner = THIS_MODULE,
+	.llseek = default_llseek,
+};
+
 int ath10k_debug_start(struct ath10k *ar)
 {
+	int ret;
+
+	ret = ath10k_debug_htt_stats_req(ar);
+	if (ret)
+		/* continue normally anyway, this isn't serious */
+		ath10k_warn("failed to start htt stats workqueue: %d\n", ret);
+
 	return 0;
 }
 
 void ath10k_debug_stop(struct ath10k *ar)
 {
+	cancel_delayed_work_sync(&ar->debug.htt_stats_dwork);
 }
 
 int ath10k_debug_create(struct ath10k *ar)
@@ -534,6 +639,9 @@ int ath10k_debug_create(struct ath10k *ar)
 	if (!ar->debug.debugfs_phy)
 		return -ENOMEM;
 
+	INIT_DELAYED_WORK(&ar->debug.htt_stats_dwork,
+			  ath10k_debug_htt_stats_dwork);
+
 	init_completion(&ar->debug.event_stats_compl);
 
 	debugfs_create_file("fw_stats", S_IRUSR, ar->debug.debugfs_phy, ar,
@@ -548,6 +656,9 @@ int ath10k_debug_create(struct ath10k *ar)
 	debugfs_create_file("chip_id", S_IRUSR, ar->debug.debugfs_phy,
 			    ar, &fops_chip_id);
 
+	debugfs_create_file("htt_stats_mask", S_IRUSR, ar->debug.debugfs_phy,
+			    ar, &fops_htt_stats_mask);
+
 	return 0;
 }
 
diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h
index 26c78a9..e090902 100644
--- a/drivers/net/wireless/ath/ath10k/htt.h
+++ b/drivers/net/wireless/ath/ath10k/htt.h
@@ -1327,6 +1327,7 @@ void ath10k_htt_rx_detach(struct ath10k_htt *htt);
 void ath10k_htt_htc_tx_complete(struct ath10k *ar, struct sk_buff *skb);
 void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb);
 int ath10k_htt_h2t_ver_req_msg(struct ath10k_htt *htt);
+int ath10k_htt_h2t_stats_req(struct ath10k_htt *htt, u8 mask, u64 cookie);
 int ath10k_htt_send_rx_ring_cfg_ll(struct ath10k_htt *htt);
 
 void __ath10k_htt_tx_dec_pending(struct ath10k_htt *htt);
diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
index d4fb387..b6b1420 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -203,6 +203,48 @@ int ath10k_htt_h2t_ver_req_msg(struct ath10k_htt *htt)
 	return 0;
 }
 
+int ath10k_htt_h2t_stats_req(struct ath10k_htt *htt, u8 mask, u64 cookie)
+{
+	struct htt_stats_req *req;
+	struct sk_buff *skb;
+	struct htt_cmd *cmd;
+	int len = 0, ret;
+
+	len += sizeof(cmd->hdr);
+	len += sizeof(cmd->stats_req);
+
+	skb = ath10k_htc_alloc_skb(len);
+	if (!skb)
+		return -ENOMEM;
+
+	skb_put(skb, len);
+	cmd = (struct htt_cmd *)skb->data;
+	cmd->hdr.msg_type = HTT_H2T_MSG_TYPE_STATS_REQ;
+
+	req = &cmd->stats_req;
+
+	memset(req, 0, sizeof(*req));
+
+	/* currently we support only max 8 bit masks so no need to worry
+	 * about endian support */
+	req->upload_types[0] = mask;
+	req->reset_types[0] = mask;
+	req->stat_type = HTT_STATS_REQ_CFG_STAT_TYPE_INVALID;
+	req->cookie_lsb = cpu_to_le32(cookie & 0xffffffff);
+	req->cookie_msb = cpu_to_le32((cookie & 0xffffffff00000000ULL) >> 32);
+
+	ATH10K_SKB_CB(skb)->htt.is_conf = true;
+
+	ret = ath10k_htc_send(&htt->ar->htc, htt->eid, skb);
+	if (ret) {
+		ath10k_warn("failed to send htt type stats request: %d", ret);
+		dev_kfree_skb_any(skb);
+		return ret;
+	}
+
+	return 0;
+}
+
 int ath10k_htt_send_rx_ring_cfg_ll(struct ath10k_htt *htt)
 {
 	struct sk_buff *skb;


^ permalink raw reply related

* [PATCH 2/3] ath10k: implement ath10k_debug_start/stop()
From: Kalle Valo @ 2013-09-03  8:44 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless
In-Reply-To: <20130903084302.26199.3538.stgit@localhost6.localdomain6>

Needed for the HTT stats implementation.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/core.c  |    6 ++++++
 drivers/net/wireless/ath/ath10k/debug.c |   10 ++++++++++
 drivers/net/wireless/ath/ath10k/debug.h |   11 +++++++++++
 3 files changed, 27 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 2dd39a8..4f2b0e7 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -630,6 +630,10 @@ int ath10k_core_start(struct ath10k *ar)
 	if (status)
 		goto err_disconnect_htc;
 
+	status = ath10k_debug_start(ar);
+	if (status)
+		goto err_disconnect_htc;
+
 	ar->free_vdev_map = (1 << TARGET_NUM_VDEVS) - 1;
 
 	return 0;
@@ -647,6 +651,7 @@ EXPORT_SYMBOL(ath10k_core_start);
 
 void ath10k_core_stop(struct ath10k *ar)
 {
+	ath10k_debug_stop(ar);
 	ath10k_htc_stop(&ar->htc);
 	ath10k_htt_detach(&ar->htt);
 	ath10k_wmi_detach(ar);
@@ -777,6 +782,7 @@ void ath10k_core_unregister(struct ath10k *ar)
 	 * Otherwise we will fail to submit commands to FW and mac80211 will be
 	 * unhappy about callback failures. */
 	ath10k_mac_unregister(ar);
+
 	ath10k_core_free_firmware_files(ar);
 }
 EXPORT_SYMBOL(ath10k_core_unregister);
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index 09f535a..219d469 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -517,6 +517,15 @@ static const struct file_operations fops_chip_id = {
 	.llseek = default_llseek,
 };
 
+int ath10k_debug_start(struct ath10k *ar)
+{
+	return 0;
+}
+
+void ath10k_debug_stop(struct ath10k *ar)
+{
+}
+
 int ath10k_debug_create(struct ath10k *ar)
 {
 	ar->debug.debugfs_phy = debugfs_create_dir("ath10k",
@@ -541,6 +550,7 @@ int ath10k_debug_create(struct ath10k *ar)
 
 	return 0;
 }
+
 #endif /* CONFIG_ATH10K_DEBUGFS */
 
 #ifdef CONFIG_ATH10K_DEBUG
diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h
index 168140c..9c442a8 100644
--- a/drivers/net/wireless/ath/ath10k/debug.h
+++ b/drivers/net/wireless/ath/ath10k/debug.h
@@ -42,6 +42,8 @@ extern __printf(1, 2) int ath10k_err(const char *fmt, ...);
 extern __printf(1, 2) int ath10k_warn(const char *fmt, ...);
 
 #ifdef CONFIG_ATH10K_DEBUGFS
+int ath10k_debug_start(struct ath10k *ar);
+void ath10k_debug_stop(struct ath10k *ar);
 int ath10k_debug_create(struct ath10k *ar);
 void ath10k_debug_read_service_map(struct ath10k *ar,
 				   void *service_map,
@@ -50,6 +52,15 @@ void ath10k_debug_read_target_stats(struct ath10k *ar,
 				    struct wmi_stats_event *ev);
 
 #else
+int ath10k_debug_start(struct ath10k *ar)
+{
+	return 0;
+}
+
+void ath10k_debug_stop(struct ath10k *ar)
+{
+}
+
 static inline int ath10k_debug_create(struct ath10k *ar)
 {
 	return 0;


^ permalink raw reply related

* [PATCH 1/3] ath10k: add trace event ath10k_htt_stats
From: Kalle Valo @ 2013-09-03  8:43 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless
In-Reply-To: <20130903084302.26199.3538.stgit@localhost6.localdomain6>

For analysing various data path statistics in user space.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/htt_rx.c |    5 ++++-
 drivers/net/wireless/ath/ath10k/trace.h  |   21 +++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index 9bb0ae89..af31d2f 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -20,6 +20,7 @@
 #include "htt.h"
 #include "txrx.h"
 #include "debug.h"
+#include "trace.h"
 
 #include <linux/log2.h>
 
@@ -1198,8 +1199,10 @@ void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb)
 	case HTT_T2H_MSG_TYPE_TEST:
 		/* FIX THIS */
 		break;
-	case HTT_T2H_MSG_TYPE_TX_INSPECT_IND:
 	case HTT_T2H_MSG_TYPE_STATS_CONF:
+		trace_ath10k_htt_stats(skb->data, skb->len);
+		break;
+	case HTT_T2H_MSG_TYPE_TX_INSPECT_IND:
 	case HTT_T2H_MSG_TYPE_RX_ADDBA:
 	case HTT_T2H_MSG_TYPE_RX_DELBA:
 	case HTT_T2H_MSG_TYPE_RX_FLUSH:
diff --git a/drivers/net/wireless/ath/ath10k/trace.h b/drivers/net/wireless/ath/ath10k/trace.h
index 85e806b..bf1ceb8 100644
--- a/drivers/net/wireless/ath/ath10k/trace.h
+++ b/drivers/net/wireless/ath/ath10k/trace.h
@@ -158,6 +158,27 @@ TRACE_EVENT(ath10k_wmi_event,
 	)
 );
 
+TRACE_EVENT(ath10k_htt_stats,
+	TP_PROTO(void *buf, size_t buf_len),
+
+	TP_ARGS(buf, buf_len),
+
+	TP_STRUCT__entry(
+		__field(size_t, buf_len)
+		__dynamic_array(u8, buf, buf_len)
+	),
+
+	TP_fast_assign(
+		__entry->buf_len = buf_len;
+		memcpy(__get_dynamic_array(buf), buf, buf_len);
+	),
+
+	TP_printk(
+		"len %zu",
+		__entry->buf_len
+	)
+);
+
 #endif /* _TRACE_H_ || TRACE_HEADER_MULTI_READ*/
 
 /* we don't want to use include/trace/events */


^ permalink raw reply related

* [PATCH 0/3] ath10k: HTT stats
From: Kalle Valo @ 2013-09-03  8:43 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless

Adds trace events and a debugfs interface to enable HTT stats
from firmware.

---

Kalle Valo (3):
      ath10k: add trace event ath10k_htt_stats
      ath10k: implement ath10k_debug_start/stop()
      ath10k: add htt_stats_enable debugfs file


 drivers/net/wireless/ath/ath10k/core.c   |    6 +
 drivers/net/wireless/ath/ath10k/core.h   |    3 +
 drivers/net/wireless/ath/ath10k/debug.c  |  121 ++++++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath10k/debug.h  |   11 +++
 drivers/net/wireless/ath/ath10k/htt.h    |    1 
 drivers/net/wireless/ath/ath10k/htt_rx.c |    5 +
 drivers/net/wireless/ath/ath10k/htt_tx.c |   42 ++++++++++
 drivers/net/wireless/ath/ath10k/trace.h  |   21 +++++
 8 files changed, 209 insertions(+), 1 deletion(-)


^ permalink raw reply

* Re: Pull request: ath 20130930
From: Kalle Valo @ 2013-09-03  8:27 UTC (permalink / raw)
  To: John W. Linville; +Cc: ath6kl-devel, linux-wireless, ath10k
In-Reply-To: <87wqmyz5i9.fsf@kamboji.qca.qualcomm.com>

Kalle Valo <kvalo@qca.qualcomm.com> writes:

> Hi John,
>
> here are latest ath10k changes, I hope it's still time to get these to
> 3.12. The changelog for the pull request:
>
> Bartosz dropped support for qca98xx hw1.0 hardware from ath10k, it's
> just too much to support it. Michal added support for the new firmware
> interface. Marek fixed WEP in AP and IBSS mode. Rest of the changes are
> minor fixes or cleanups.

Oops, the date in the subject is wrong. Of course it should be 20130903.

-- 
Kalle Valo

^ permalink raw reply

* [PATCH v4 2/2] ath10k: implement per-VDEV FW statistics
From: Bartosz Markowski @ 2013-09-03  8:21 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Bartosz Markowski
In-Reply-To: <1378196481-13983-1-git-send-email-bartosz.markowski@tieto.com>

The WMI_REQUEST_PEER_STAT command with latst (1.0.0.716) FW
can return per-VDEV statistics. Using debugfs we can fetch this info now.

This is a backward compatible change. In case of older FW the VDEV
statistics are simply not returned.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.h  |   27 ++++++++++
 drivers/net/wireless/ath/ath10k/debug.c |   70 ++++++++++++++++++++++---
 drivers/net/wireless/ath/ath10k/wmi.c   |    4 +-
 drivers/net/wireless/ath/ath10k/wmi.h   |   87 ++++++++++++++++++++++++++-----
 4 files changed, 167 insertions(+), 21 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 174c4b4..1a327a9 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -119,10 +119,32 @@ struct ath10k_wmi {
 	struct work_struct wmi_event_work;
 };
 
+struct ath10k_snr_info {
+	s32 beacon_snr;
+	s32 data_snr;
+};
+
+struct ath10k_vdev_stat {
+	u32 vdev_id;
+	struct ath10k_snr_info vdev_snr;
+	u32 tx_frames_count[MAX_AC];
+	u32 rx_frames_count;
+	u32 multiple_retry_cnt[MAX_AC];
+	u32 fail_count[MAX_AC];
+	u32 rts_fail_count;
+	u32 rts_success_count;
+	u32 rts_err_count;
+	u32 rx_discard_count;
+	u32 ack_fail_count;
+	u32 tx_rate_history[MAX_TX_RATE_VALUES];
+	u32 bcn_rssi_history[MAX_RSSI_VALUES];
+};
+
 struct ath10k_peer_stat {
 	u8 peer_macaddr[ETH_ALEN];
 	u32 peer_rssi;
 	u32 peer_tx_rate;
+	u32 peer_rx_rate;
 };
 
 struct ath10k_target_stats {
@@ -176,6 +198,8 @@ struct ath10k_target_stats {
 	s32 mpdu_errs;
 
 	/* VDEV STATS */
+	struct ath10k_vdev_stat vdev_stat[TARGET_NUM_VDEVS];
+	u8 vdevs;
 
 	/* PEER STATS */
 	u8 peers;
@@ -274,6 +298,9 @@ enum ath10k_fw_features {
 	/* wmi_mgmt_rx_hdr contains extra RSSI information */
 	ATH10K_FW_FEATURE_EXT_WMI_MGMT_RX = 0,
 
+	/* firmware support per-VEDV statistics */
+	ATH10K_FW_FEATURE_VDEV_STATS = 1,
+
 	/* keep last */
 	ATH10K_FW_FEATURE_COUNT,
 };
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index 09f535a..1582a97 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -228,25 +228,39 @@ void ath10k_debug_read_target_stats(struct ath10k *ar,
 		tmp += sizeof(struct wmi_pdev_stats);
 	}
 
-	/* 0 or max vdevs */
-	/* Currently firmware does not support VDEV stats */
 	if (num_vdev_stats) {
 		struct wmi_vdev_stats *vdev_stats;
+		struct ath10k_vdev_stat *s;
+
+		stats->vdevs = num_vdev_stats;
 
 		for (i = 0; i < num_vdev_stats; i++) {
 			vdev_stats = (struct wmi_vdev_stats *)tmp;
+			s = &stats->vdev_stat[i];
+
+			s->vdev_id = __le32_to_cpu(vdev_stats->vdev_id);
+			s->vdev_snr.beacon_snr =
+				__le32_to_cpu(vdev_stats->vdev_snr.beacon_snr);
+			s->vdev_snr.data_snr =
+				__le32_to_cpu(vdev_stats->vdev_snr.data_snr);
+
+			/* TODO:read remaining vdev stats */
+
 			tmp += sizeof(struct wmi_vdev_stats);
 		}
 	}
 
 	if (num_peer_stats) {
-		struct wmi_peer_stats *peer_stats;
 		struct ath10k_peer_stat *s;
+		struct wmi_peer_stats_common *peer_stats;
+		struct wmi_peer_stats_v1 *peer_v1;
+		struct wmi_peer_stats_v2 *peer_v2;
 
 		stats->peers = num_peer_stats;
 
 		for (i = 0; i < num_peer_stats; i++) {
-			peer_stats = (struct wmi_peer_stats *)tmp;
+			peer_stats = (struct wmi_peer_stats_common *)tmp;
+
 			s = &stats->peer_stat[i];
 
 			WMI_MAC_ADDR_TO_CHAR_ARRAY(&peer_stats->peer_macaddr,
@@ -255,7 +269,19 @@ void ath10k_debug_read_target_stats(struct ath10k *ar,
 			s->peer_tx_rate =
 				__le32_to_cpu(peer_stats->peer_tx_rate);
 
-			tmp += sizeof(struct wmi_peer_stats);
+			if (test_bit(ATH10K_FW_FEATURE_VDEV_STATS,
+				     ar->fw_features)) {
+				peer_v2 = (struct wmi_peer_stats_v2 *)tmp;
+				peer_stats = &peer_v2->common;
+				s->peer_rx_rate =
+				    __le32_to_cpu(peer_v2->peer_rx_rate);
+
+				tmp += sizeof(*peer_v2);
+			} else {
+				peer_v1 = (struct wmi_peer_stats_v1 *)tmp;
+				peer_stats = &peer_v1->common;
+				tmp += sizeof(*peer_v1);
+			}
 		}
 	}
 
@@ -269,7 +295,7 @@ static ssize_t ath10k_read_fw_stats(struct file *file, char __user *user_buf,
 	struct ath10k *ar = file->private_data;
 	struct ath10k_target_stats *fw_stats;
 	char *buf = NULL;
-	unsigned int len = 0, buf_len = 2500;
+	unsigned int len = 0, buf_len = 3000;
 	ssize_t ret_cnt = 0;
 	long left;
 	int i;
@@ -407,6 +433,27 @@ static ssize_t ath10k_read_fw_stats(struct file *file, char __user *user_buf,
 	len += scnprintf(buf + len, buf_len - len, "%30s %10d\n",
 			 "MPDU errors (FCS, MIC, ENC)", fw_stats->mpdu_errs);
 
+	if (fw_stats->vdevs) {
+		len += scnprintf(buf + len, buf_len - len, "\n");
+		len += scnprintf(buf + len, buf_len - len, "%30s\n",
+				 "ath10k VDEV stats");
+		len += scnprintf(buf + len, buf_len - len, "%30s\n\n",
+				 "=================");
+	}
+
+	for (i = 0; i < fw_stats->vdevs; i++) {
+		len += scnprintf(buf + len, buf_len - len, "%30s %10u\n",
+				 "VDEV ID", fw_stats->vdev_stat[i].vdev_id);
+		len += scnprintf(buf + len, buf_len - len, "%30s %10u\n",
+				 "Beacon SNR",
+				 fw_stats->vdev_stat[i].vdev_snr.beacon_snr);
+		len += scnprintf(buf + len, buf_len - len, "%30s %10u\n",
+				 "Data SNR",
+				 fw_stats->vdev_stat[i].vdev_snr.data_snr);
+		len += scnprintf(buf + len, buf_len - len, "\n");
+	}
+
+
 	len += scnprintf(buf + len, buf_len - len, "\n");
 	len += scnprintf(buf + len, buf_len - len, "%30s\n",
 			 "ath10k PEER stats");
@@ -417,11 +464,18 @@ static ssize_t ath10k_read_fw_stats(struct file *file, char __user *user_buf,
 		len += scnprintf(buf + len, buf_len - len, "%30s %pM\n",
 				 "Peer MAC address",
 				 fw_stats->peer_stat[i].peer_macaddr);
-		len += scnprintf(buf + len, buf_len - len, "%30s %u\n",
+		len += scnprintf(buf + len, buf_len - len, "%30s %10u\n",
 				 "Peer RSSI", fw_stats->peer_stat[i].peer_rssi);
-		len += scnprintf(buf + len, buf_len - len, "%30s %u\n",
+		len += scnprintf(buf + len, buf_len - len, "%30s %10u\n",
 				 "Peer TX rate",
 				 fw_stats->peer_stat[i].peer_tx_rate);
+
+		if (test_bit(ATH10K_FW_FEATURE_VDEV_STATS, ar->fw_features))
+			len += scnprintf(buf + len, buf_len - len,
+					 "%30s %10u\n",
+					 "Peer RX rate",
+					 fw_stats->peer_stat[i].peer_rx_rate);
+
 		len += scnprintf(buf + len, buf_len - len, "\n");
 	}
 	spin_unlock_bh(&ar->data_lock);
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 32fd5e7..3ebab3d 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -957,8 +957,10 @@ static void ath10k_wmi_service_ready_event_rx(struct ath10k *ar,
 	ar->phy_capability = __le32_to_cpu(ev->phy_capability);
 	ar->num_rf_chains = __le32_to_cpu(ev->num_rf_chains);
 
-	if (ar->fw_version_build > 636)
+	if (ar->fw_version_build > 636) {
 		set_bit(ATH10K_FW_FEATURE_EXT_WMI_MGMT_RX, ar->fw_features);
+		set_bit(ATH10K_FW_FEATURE_VDEV_STATS, ar->fw_features);
+	}
 
 	if (ar->num_rf_chains > WMI_MAX_SPATIAL_STREAM) {
 		ath10k_warn("hardware advertises support for more spatial streams than it should (%d > %d)\n",
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index 5b94707..2b429e4 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -60,6 +60,11 @@
  *
  */
 
+#define MAX_AC 4 /* Maximum value of access category */
+
+#define MAX_TX_RATE_VALUES      10 /* Max Tx rates */
+#define MAX_RSSI_VALUES         10 /* Max RSSI values */
+
 /* Control Path */
 struct wmi_cmd_hdr {
 	__le32 cmd_id;
@@ -1828,11 +1833,10 @@ enum wmi_stats_id {
 
 struct wmi_request_stats_cmd {
 	__le32 stats_id;
-
-	/*
-	 * Space to add parameters like
-	 * peer mac addr
-	 */
+	/* unique id identifying the VDEV, generated by the caller */
+	__le32 vdev_id;
+	/* peer MAC address */
+	struct wmi_mac_addr peer_macaddr;
 } __packed;
 
 /* Suspend option */
@@ -1881,7 +1885,6 @@ struct wmi_stats_event {
 
 /*
  * PDEV statistics
- * TODO: add all PDEV stats here
  */
 struct wmi_pdev_stats {
 	__le32 chan_nf;        /* Channel noise floor */
@@ -1894,24 +1897,84 @@ struct wmi_pdev_stats {
 	struct wal_dbg_stats wal; /* WAL dbg stats */
 } __packed;
 
-/*
- * VDEV statistics
- * TODO: add all VDEV stats here
- */
+struct wmi_snr_info {
+	__le32 beacon_snr;
+	__le32 data_snr;
+} __packed;
+
 struct wmi_vdev_stats {
+	/* unique id identifying the VDEV, generated by the caller */
 	__le32 vdev_id;
+	struct wmi_snr_info vdev_snr;
+	/*
+	 * Total number of packets(per AC) that were successfully transmitted
+	 * (with and without retries, including multi-cast, broadcast)
+	 */
+	__le32 tx_frm_cnt[MAX_AC];
+	/*
+	 * Total number of packets that were successfully received
+	 * (after appropriate filter rules including multi-cast, broadcast)
+	 */
+	__le32 rx_frm_cnt;
+	/*
+	 * The number of MSDU packets and MMPDU frames per AC that the 802.11
+	 * station successfully transmitted after more than one retransmission
+	 * attempt
+	 */
+	__le32 multiple_retry_cnt[MAX_AC];
+	/* Total number packets(per AC) failed to transmit */
+	__le32 fail_cnt[MAX_AC];
+	/*
+	 * Total number of RTS/CTS sequence failures for transmission of a
+	 * packet
+	 */
+	__le32 rts_fail_cnt;
+	/*
+	 * Total number of RTS/CTS sequence success for transmission of a
+	 * packet
+	 */
+	__le32 rts_succ_cnt;
+	/*
+	 * The receive error count.
+	 * HAL will provide the RxP FCS error global
+	 */
+	__le32 rx_err_cnt;
+	/*
+	 * The sum of the receive error count and dropped-receive-buffer
+	 * error count. (FCS error)
+	 */
+	__le32 rx_discard_cnt;
+	/*
+	 * Total number packets failed transmit because of no ACK
+	 * from the remote entity
+	 */
+	__le32 ack_fail_cnt;
+	/* History of last ten transmit rate, in units of 500 kbit/sec */
+	__le32 tx_rate_history[MAX_TX_RATE_VALUES];
+	/* History of last ten Beacon rssi of the connected Bss */
+	__le32 bcn_rssi_history[MAX_RSSI_VALUES];
 } __packed;
 
 /*
  * peer statistics.
- * TODO: add more stats
  */
-struct wmi_peer_stats {
+struct wmi_peer_stats_common {
 	struct wmi_mac_addr peer_macaddr;
 	__le32 peer_rssi;
 	__le32 peer_tx_rate;
 } __packed;
 
+struct wmi_peer_stats_v1 {
+	struct wmi_peer_stats_common common;
+} __packed;
+
+
+struct wmi_peer_stats_v2 {
+	struct wmi_peer_stats_common common;
+	__le32 peer_rx_rate;
+} __packed;
+
+
 struct wmi_vdev_create_cmd {
 	__le32 vdev_id;
 	__le32 vdev_type;
-- 
1.7.10


^ permalink raw reply related

* [PATCH v4 1/2] ath10k: update wal_dbg_tx_stats structure with missing parameter.
From: Bartosz Markowski @ 2013-09-03  8:21 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Bartosz Markowski
In-Reply-To: <1378196481-13983-1-git-send-email-bartosz.markowski@tieto.com>

The filed has been missing (missmatched with FW ABI)
since 1.0.0.629 firmware release.

It's very imporatant to keep these structs up to date with FW,
due to the arithmetic we use while read the fw_stats.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
 drivers/net/wireless/ath/ath10k/wmi.h |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index 08860c4..5b94707 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -1767,6 +1767,9 @@ struct wal_dbg_tx_stats {
 	/* wal pdev resets  */
 	__le32 pdev_resets;
 
+	/* frames dropped due to non-availability of stateless TIDs */
+	__le32 stateless_tid_alloc_failure;
+
 	__le32 phy_underrun;
 
 	/* MPDU is more than txop limit */
-- 
1.7.10


^ permalink raw reply related

* [PATCH v4 0/2] add per-VDEV FW statistics
From: Bartosz Markowski @ 2013-09-03  8:21 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Bartosz Markowski

FW 1.0.0.716 brings per-VDEV statistics. This patch-set implements
debugfs mechanism to fetch them. There's still few more fileds we
can read from the FW stats event, which are not covered here.
Let's bring them in the future.

Changes:

V2:
* introduce wmi_peer_stats_common struct
* fetch and print peer RX rates
* break up wmi_peer_stats_common update into separate patch

V3:
* rebase
* fix sparse endianness warnings

V4:
* rebase
* document the wal_dbg_tx_stats changes
* refactor wmi_peer_stats_common/v1/v2 handling

Bartosz Markowski (2):
  ath10k: update wal_dbg_tx_stats structure with missing parameter.
  ath10k: implement per-VDEV FW statistics

 drivers/net/wireless/ath/ath10k/core.h  |   27 ++++++++++
 drivers/net/wireless/ath/ath10k/debug.c |   70 +++++++++++++++++++++---
 drivers/net/wireless/ath/ath10k/wmi.c   |    4 +-
 drivers/net/wireless/ath/ath10k/wmi.h   |   90 ++++++++++++++++++++++++++-----
 4 files changed, 170 insertions(+), 21 deletions(-)

-- 
1.7.10


^ permalink raw reply

* Pull request: ath 20130930
From: Kalle Valo @ 2013-09-03  8:14 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, ath10k, ath6kl-devel

Hi John,

here are latest ath10k changes, I hope it's still time to get these to
3.12. The changelog for the pull request:

Bartosz dropped support for qca98xx hw1.0 hardware from ath10k, it's
just too much to support it. Michal added support for the new firmware
interface. Marek fixed WEP in AP and IBSS mode. Rest of the changes are
minor fixes or cleanups.

The following changes since commit 9d0e2f0772d394060bf3b17cd1f3a35574365103:

  ath6kl: Fix invalid pointer access on fuzz testing with AP mode (2013-08-07 10:58:59 +0300)

are available in the git repository at:

  git://github.com/kvalo/ath.git for-linville

for you to fetch changes up to 763b8cd31493f452094fd0eaeedb8cad37c756a2:

  ath10k: add chip_id file to debugfs (2013-09-03 09:59:53 +0300)

----------------------------------------------------------------
Bartosz Markowski (2):
      ath10k: Remove qca98xx hw1.0 support
      ath10k: update supported FW build version

Janusz Dziedzic (2):
      ath10k: setup peer UAPSD flag correctly
      ath10k: check allocation errors in CE

Kalle Valo (10):
      ath10k: remove un ar_pci->cacheline_sz field
      ath10k: pci: make host_ce_config_wlan[] more readable
      ath10k: make target_ce_config_wlan more readable
      ath10k: remove void pointer from struct ath10k_pci_compl
      ath10k: convert ath10k_pci_reg_read/write32() to take struct ath10k
      ath10k: clean up ath10k_ce_completed_send_next_nolock()
      ath10k: convert ath10k_pci_wake() to return
      ath10k: simplify ath10k_ce_init() wake up handling
      ath10k: check chip id from the soc register during probe
      ath10k: add chip_id file to debugfs

Marek Puzyniak (1):
      ath10k: fix WEP in AP and IBSS mode

Michal Kazior (15):
      ath10k: clean up monitor start code
      ath10k: use sizeof(*var) in kmalloc
      ath10k: clean up PCI completion states
      ath10k: print errcode when CE ring setup fails
      ath10k: fix HTT service setup
      ath10k: implement 802.3 SNAP rx decap type A-MSDU handling
      ath10k: plug possible memory leak in WMI
      ath10k: add support for firmware newer than 636
      ath10k: add support for HTT 3.0
      ath10k: use inline ce_state structure
      ath10k: remove ce_op_state
      ath10k: remove unused ce_attr parameters
      ath10k: rename hif_ce_pipe_info to ath10k_pci_pipe
      ath10k: rename ce_state to ath10k_ce_pipe
      ath10k: rename ce_ring_state to ath10k_ce_ring

Mohammed Shafi Shajakhan (1):
      ath10k: Fix mutex unlock balance

 drivers/net/wireless/ath/ath10k/ce.c     |  291 +++++++++++++-------------
 drivers/net/wireless/ath/ath10k/ce.h     |   74 +++----
 drivers/net/wireless/ath/ath10k/core.c   |   46 +++--
 drivers/net/wireless/ath/ath10k/core.h   |   13 +-
 drivers/net/wireless/ath/ath10k/debug.c  |   23 ++-
 drivers/net/wireless/ath/ath10k/htc.c    |    8 +-
 drivers/net/wireless/ath/ath10k/htt.c    |   19 +-
 drivers/net/wireless/ath/ath10k/htt.h    |    6 +-
 drivers/net/wireless/ath/ath10k/htt_rx.c |   12 +-
 drivers/net/wireless/ath/ath10k/htt_tx.c |   74 +++++--
 drivers/net/wireless/ath/ath10k/hw.h     |   19 +-
 drivers/net/wireless/ath/ath10k/mac.c    |   22 +-
 drivers/net/wireless/ath/ath10k/pci.c    |  325 ++++++++++++++++++++----------
 drivers/net/wireless/ath/ath10k/pci.h    |   73 +++----
 drivers/net/wireless/ath/ath10k/wmi.c    |   33 ++-
 drivers/net/wireless/ath/ath10k/wmi.h    |   16 +-
 16 files changed, 626 insertions(+), 428 deletions(-)

-- 
Kalle Valo

^ permalink raw reply

* Re: [PATCH v2 net-next 0/9] set addr_assign_type when inheriting a dev_addr
From: Bjørn Mork @ 2013-09-03  7:38 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, kaber, jiri, linville, linux-wireless, j, libertas-dev,
	gregkh, devel, forest, stephen, dan.carpenter
In-Reply-To: <20130831.225057.1874268263797742541.davem@davemloft.net>

David Miller <davem@davemloft.net> writes:

> From: Bjørn Mork <bjorn@mork.no>
> Date: Fri, 30 Aug 2013 18:08:43 +0200
>
>> Copying the dev_addr from a parent device is an operation
>> common to a number of drivers. The addr_assign_type should
>> be updated accordingly, either by reusing the value from
>> the source device or explicitly indicating that the address
>> is stolen by setting addr_assign_type to NET_ADDR_STOLEN.
>> 
>> This patch set adds a helper copying both the dev_addr and
>> the addr_assign_type, and use this helper in drivers which
>> don't currently set the addr_assign_type. Using NET_ADDR_STOLEN
>> might be more appropriate in some of these cases.  Please
>> let me know, and I'll update the patch accordingly.
>> 
>> Changes in v2:
>>  - assuming addr_len == ETH_ALEN to allow optimized memcpy
>>  - dropped the vt6656 patch due to addr_len being unset in that driver
>
> Looks good, series applied, thanks.

Thanks.  But it doesn't look like it ended up in net-next?  Or am I
missing something (again)?


Bjørn

^ permalink raw reply

* Re: [PATCH v3 2/2] ath10k: implement per-VDEV FW statistics
From: Kalle Valo @ 2013-09-03  7:13 UTC (permalink / raw)
  To: Bartosz Markowski; +Cc: ath10k, linux-wireless
In-Reply-To: <1377778061-22331-3-git-send-email-bartosz.markowski@tieto.com>

Bartosz Markowski <bartosz.markowski@tieto.com> writes:

> The WMI_REQUEST_PEER_STAT command with latst (1.0.0.716) FW
> can return per-VDEV statistics. Using debugfs we can fetch this info now.
>
> This is a backward compatible change. In case of older FW the VDEV
> statistics are simply not returned.
>
> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>

[...]

>  	if (num_peer_stats) {
> -		struct wmi_peer_stats *peer_stats;
>  		struct ath10k_peer_stat *s;
> +		struct wmi_peer_stats_1 *peer_stats_1;
> +		struct wmi_peer_stats_2 *peer_stats_2;
>  
>  		stats->peers = num_peer_stats;
>  
>  		for (i = 0; i < num_peer_stats; i++) {
> -			peer_stats = (struct wmi_peer_stats *)tmp;
> +			peer_stats_1 = (struct wmi_peer_stats_1 *)tmp;

You still have this evil cast here which assumes struct wmi_peer_stats_1
starts with the same content as _2. It's better to spell that out in the
code, for example like this:

if (test_bit(ATH10K_FW_FEATURE_VDEV_STATS, ar->fw_features)) {
             peer_v2 = (struct wmi_peer_stats_v2 *)tmp;
             peer_stats = &peer_v2->common;
             tmp += sizeof(*peer_v2);
} else {
             peer_v1 = (struct wmi_peer_stats_v1 *)tmp;
             peer_stats = &peer_v1->common;
             tmp += sizeof(*peer_v1);
}

> +struct wmi_peer_stats_1 {

struct wmi_peer_stats_v1

> +struct wmi_peer_stats_2 {

struct wmi_peer_stats_v2

-- 
Kalle Valo

^ permalink raw reply

* Re: [PATCH v3 1/2] ath10k: update wal_dbg_tx_stats structure with missing parameter.
From: Kalle Valo @ 2013-09-03  7:05 UTC (permalink / raw)
  To: Bartosz Markowski; +Cc: ath10k, linux-wireless
In-Reply-To: <1377778061-22331-2-git-send-email-bartosz.markowski@tieto.com>

Bartosz Markowski <bartosz.markowski@tieto.com> writes:

> It's very imporatant to keep these structs up to date with FW abi,
> due to the arithmetic we use while read the fw_stats.
>
> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
> ---
>  drivers/net/wireless/ath/ath10k/wmi.h |    3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
> index 08860c4..5b94707 100644
> --- a/drivers/net/wireless/ath/ath10k/wmi.h
> +++ b/drivers/net/wireless/ath/ath10k/wmi.h
> @@ -1767,6 +1767,9 @@ struct wal_dbg_tx_stats {
>  	/* wal pdev resets  */
>  	__le32 pdev_resets;
>  
> +	/* frames dropped due to non-availability of stateless TIDs */
> +	__le32 stateless_tid_alloc_failure;
> +
>  	__le32 phy_underrun;

I still wonder if this needs a feature bit. At least you should mention
in the commit log why it's not needed.

-- 
Kalle Valo

^ permalink raw reply

* Re: [PATCH v2 0/2] ath10k: detect hw1.0 boards
From: Kalle Valo @ 2013-09-03  7:00 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless
In-Reply-To: <20130901082007.1930.79088.stgit@localhost6.localdomain6>

Kalle Valo <kvalo@qca.qualcomm.com> writes:

> Here's a patchset which detects hw1.0 from the
> chip id register and fails the probe if found.
>
> v2:
>
> o use SOC_CHIP_ID_REV_MASK
>
> o move detection to core.c so that it's not just PCI
>   specific
>
> o add debugfs file for reading the chip id
>
> ---
>
> Kalle Valo (2):
>       ath10k: check chip id from the soc register during probe
>       ath10k: add chip_id file to debugfs

Both patches applied, but I fixed the commit log in patch 1 based on the
discussion.

-- 
Kalle Valo

^ permalink raw reply

* Re: [PATCH 2/4] initvals: Remove duplicate mapping for AR9485 arrays
From: Sujith Manoharan @ 2013-09-03  6:48 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: Luis R. Rodriguez, linux-wireless
In-Reply-To: <522580E2.2090501@openwrt.org>

Felix Fietkau wrote:
> Why did you make this change? At least the mac_postamble is still
> identical, and with the other arrays you can just let the initvals tool
> detect if mappings are duplicate or not.

AR9485 is still maintained and it makes it a bit easier to update the
initvals. The gain value arrays differ from AR9462/AR9300, so only
mac_postamble can be reused - which is a small array and space savings
is marginal.

If PC-OEM card support is compiled out, we can have a bigger gain.
AR9485 1.1, AR9462 2.0, AR9462 2.1, AR9565 1.0/1.0.1 (AR9565 1.1 to come)
are not needed for AP platforms.

Sujith

^ permalink raw reply

* Re: [PATCH v2 0/7] ath10k: pci cleanup
From: Kalle Valo @ 2013-09-03  6:50 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless
In-Reply-To: <20130901070020.14695.16694.stgit@localhost6.localdomain6>

Kalle Valo <kvalo@qca.qualcomm.com> writes:

> Small PCI related code cleanup. Depends on Michal's CE
> clean patchset.
>
> v2:
>
> o remove unnecessary cast in patch 3 (from Gabor)
>
> ---
>
> Kalle Valo (7):
>       ath10k: pci: make host_ce_config_wlan[] more readable
>       ath10k: make target_ce_config_wlan more readable
>       ath10k: remove void pointer from struct ath10k_pci_compl
>       ath10k: convert ath10k_pci_reg_read/write32() to take struct ath10k
>       ath10k: clean up ath10k_ce_completed_send_next_nolock()
>       ath10k: convert ath10k_pci_wake() to return
>       ath10k: simplify ath10k_ce_init() wake up handling

All seven applied.

-- 
Kalle Valo

^ permalink raw reply

* Re: [PATCH 2/4] initvals: Remove duplicate mapping for AR9485 arrays
From: Felix Fietkau @ 2013-09-03  6:25 UTC (permalink / raw)
  To: Sujith Manoharan; +Cc: Luis R. Rodriguez, linux-wireless
In-Reply-To: <1378184318-1169-2-git-send-email-sujith@msujith.org>

On 2013-09-03 6:58 AM, Sujith Manoharan wrote:
> From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
> 
> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Why did you make this change? At least the mac_postamble is still
identical, and with the other arrays you can just let the initvals tool
detect if mappings are duplicate or not.

- Felix

^ permalink raw reply

* Re: [PATCH] Add WLI-UC-G300HP's Product ID.
From: Kalle Valo @ 2013-09-03  6:15 UTC (permalink / raw)
  To: Masami Ichikawa
  Cc: IvDoorn, gwingerde, helmut.schaa, linville, linux-wireless, users,
	netdev, linux-kernel
In-Reply-To: <1377617843-28835-1-git-send-email-masami256@gmail.com>

Masami Ichikawa <masami256@gmail.com> writes:

> Support Bufallo WLI-UC-G300HP.
>
> Signed-off-by: Masami Ichikawa <masami256@gmail.com>

Please add "rt2x00: " prefix to the commit title.

-- 
Kalle Valo

^ permalink raw reply

* Re: [PATCH v2 13/16] wcn36xx: add wcn36xx.h
From: Kalle Valo @ 2013-09-03  5:48 UTC (permalink / raw)
  To: Joe Perches; +Cc: Eugene Krasnikov, linux-wireless, wcn36xx
In-Reply-To: <1378186879.2048.2.camel@joe-AO722>

Joe Perches <joe@perches.com> writes:

> On Tue, 2013-09-03 at 08:39 +0300, Kalle Valo wrote:
>> >> What does module mean in this context?
>> >
>> > KBUILD_MODNAME
>> 
>> Ok, so there's no way to have functionality like ATH6KL_DBG_BOOT which
>> prints information from various files during firmware boot. So
>> dynamic_debug is not really usable for my work flow.
>
> I'm confused by your response.
> Dynamic debug can work with external masks/levels.
> What functionality do you think you're missing?

I was just replying to your question why I think dynamic_debug is not
usable in wifi drivers.

-- 
Kalle Valo

^ permalink raw reply

* Re: [PATCH v2 13/16] wcn36xx: add wcn36xx.h
From: Joe Perches @ 2013-09-03  5:41 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Eugene Krasnikov, linux-wireless, wcn36xx
In-Reply-To: <8738pmv4zv.fsf@purkki.adurom.net>

On Tue, 2013-09-03 at 08:39 +0300, Kalle Valo wrote:
> >> What does module mean in this context?
> >
> > KBUILD_MODNAME
> 
> Ok, so there's no way to have functionality like ATH6KL_DBG_BOOT which
> prints information from various files during firmware boot. So
> dynamic_debug is not really usable for my work flow.

I'm confused by your response.
Dynamic debug can work with external masks/levels.
What functionality do you think you're missing?


^ permalink raw reply

* Re: [PATCH v2 13/16] wcn36xx: add wcn36xx.h
From: Kalle Valo @ 2013-09-03  5:39 UTC (permalink / raw)
  To: Joe Perches; +Cc: Eugene Krasnikov, linux-wireless, wcn36xx
In-Reply-To: <1378186024.2048.0.camel@joe-AO722>

Joe Perches <joe@perches.com> writes:

> On Tue, 2013-09-03 at 08:25 +0300, Kalle Valo wrote:
>> Joe Perches <joe@perches.com> writes:
>> 
>> > Most don't do that.
>> > Generally it's enabled/disabled by module.
>> >
>> >> And enabling log messages on the file level is sometimes too
>> >> much. So it would really need some sort of grouping feature with a
>> >> stable interface.
>> >
>> > Like by module?
>> 
>> What does module mean in this context?
>
> KBUILD_MODNAME

Ok, so there's no way to have functionality like ATH6KL_DBG_BOOT which
prints information from various files during firmware boot. So
dynamic_debug is not really usable for my work flow.

-- 
Kalle Valo

^ permalink raw reply

* Re: [PATCH v2 13/16] wcn36xx: add wcn36xx.h
From: Joe Perches @ 2013-09-03  5:27 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Eugene Krasnikov, linux-wireless, wcn36xx
In-Reply-To: <877geyv5ma.fsf@purkki.adurom.net>

On Tue, 2013-09-03 at 08:25 +0300, Kalle Valo wrote:
> Joe Perches <joe@perches.com> writes:
> 
> > Most don't do that.
> > Generally it's enabled/disabled by module.
> >
> >> And enabling log messages on the file level is sometimes too
> >> much. So it would really need some sort of grouping feature with a
> >> stable interface.
> >
> > Like by module?
> 
> What does module mean in this context?

KBUILD_MODNAME



^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox