All of lore.kernel.org
 help / color / mirror / Atom feed
* [ath9k-devel] [PATCH 0/6] ath10k: cleanups
@ 2013-04-19  9:35 Michal Kazior
  2013-04-19  9:35 ` [ath9k-devel] [PATCH 1/6] ath10k: rename htt_struct Michal Kazior
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Michal Kazior @ 2013-04-19  9:35 UTC (permalink / raw)
  To: ath9k-devel

Michal Kazior (6):
  ath10k: rename htt_struct
  ath10k: fix code style
  ath10k: fix code style of handling errors
  ath10k: fix code style a little
  ath10k: cleanup tx/rx mode handling
  ath10k: cleanup hw init-related code

 drivers/net/wireless/ath/ath10k/core.h   |    2 +-
 drivers/net/wireless/ath/ath10k/htt.c    |   27 +++++++-------
 drivers/net/wireless/ath/ath10k/htt.h    |   36 +++++++-----------
 drivers/net/wireless/ath/ath10k/htt_rx.c |   30 +++++++--------
 drivers/net/wireless/ath/ath10k/htt_tx.c |   20 +++++-----
 drivers/net/wireless/ath/ath10k/hw.h     |   46 ++++++++++++++++-------
 drivers/net/wireless/ath/ath10k/mac.c    |   21 ++++-------
 drivers/net/wireless/ath/ath10k/txrx.c   |    8 ++--
 drivers/net/wireless/ath/ath10k/txrx.h   |    8 ++--
 drivers/net/wireless/ath/ath10k/wmi.c    |   60 +++++++++++++++---------------
 drivers/net/wireless/ath/ath10k/wmi.h    |    8 ++--
 11 files changed, 135 insertions(+), 131 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH 1/6] ath10k: rename htt_struct
  2013-04-19  9:35 [ath9k-devel] [PATCH 0/6] ath10k: cleanups Michal Kazior
@ 2013-04-19  9:35 ` Michal Kazior
  2013-04-19  9:35 ` [ath9k-devel] [PATCH 2/6] ath10k: fix code style Michal Kazior
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Michal Kazior @ 2013-04-19  9:35 UTC (permalink / raw)
  To: ath9k-devel

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.h   |    2 +-
 drivers/net/wireless/ath/ath10k/htt.c    |   16 ++++++++--------
 drivers/net/wireless/ath/ath10k/htt.h    |   28 ++++++++++++++--------------
 drivers/net/wireless/ath/ath10k/htt_rx.c |   30 +++++++++++++++---------------
 drivers/net/wireless/ath/ath10k/htt_tx.c |   18 +++++++++---------
 drivers/net/wireless/ath/ath10k/txrx.c   |    8 ++++----
 drivers/net/wireless/ath/ath10k/txrx.h   |    8 ++++----
 7 files changed, 55 insertions(+), 55 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index de82c80..76af1ae 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -300,7 +300,7 @@ struct ath10k {
 	struct ath10k_bmi bmi;
 
 	struct ath10k_htc *htc;
-	struct htt_struct *htt;
+	struct ath10k_htt *htt;
 
 	struct ath10k_hw_params {
 		u32 id;
diff --git a/drivers/net/wireless/ath/ath10k/htt.c b/drivers/net/wireless/ath/ath10k/htt.c
index e5480d1..b172321 100644
--- a/drivers/net/wireless/ath/ath10k/htt.c
+++ b/drivers/net/wireless/ath/ath10k/htt.c
@@ -23,17 +23,17 @@
 
 static void ath10k_htt_stop_queue(void *context)
 {
-	struct htt_struct *htt = context;
+	struct ath10k_htt *htt = context;
 	ieee80211_stop_queues(htt->ar->hw);
 }
 
 static void ath10k_htt_wake_queue(void *context)
 {
-	struct htt_struct *htt = context;
+	struct ath10k_htt *htt = context;
 	ieee80211_wake_queues(htt->ar->hw);
 }
 
-static int ath10k_htt_htc_attach(struct htt_struct *htt)
+static int ath10k_htt_htc_attach(struct ath10k_htt *htt)
 {
 	struct ath10k_htc_svc_conn_req conn_req;
 	struct ath10k_htc_svc_conn_resp conn_resp;
@@ -67,9 +67,9 @@ static int ath10k_htt_htc_attach(struct htt_struct *htt)
 	return 0;
 }
 
-struct htt_struct *ath10k_htt_attach(struct ath10k *ar, struct ath10k_htc *htc)
+struct ath10k_htt *ath10k_htt_attach(struct ath10k *ar, struct ath10k_htc *htc)
 {
-	struct htt_struct *htt;
+	struct ath10k_htt *htt;
 
 	htt = kzalloc(sizeof(*htt), GFP_KERNEL);
 	if (!htt)
@@ -117,7 +117,7 @@ fail1:
 
 #define HTT_TARGET_VERSION_TIMEOUT_HZ (3*HZ)
 
-static int ath10k_htt_verify_version(struct htt_struct *htt)
+static int ath10k_htt_verify_version(struct ath10k_htt *htt)
 {
 	ath10k_dbg(ATH10K_DBG_HTT,
 		   "htt target version %d.%d; host version %d.%d\n",
@@ -137,7 +137,7 @@ static int ath10k_htt_verify_version(struct htt_struct *htt)
 	return 0;
 }
 
-int ath10k_htt_attach_target(struct htt_struct *htt)
+int ath10k_htt_attach_target(struct ath10k_htt *htt)
 {
 	int status;
 
@@ -162,7 +162,7 @@ int ath10k_htt_attach_target(struct htt_struct *htt)
 
 }
 
-void ath10k_htt_detach(struct htt_struct *htt)
+void ath10k_htt_detach(struct ath10k_htt *htt)
 {
 	ath10k_htt_rx_detach(htt);
 	ath10k_htt_tx_detach(htt);
diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h
index c94f137..6415af0 100644
--- a/drivers/net/wireless/ath/ath10k/htt.h
+++ b/drivers/net/wireless/ath/ath10k/htt.h
@@ -1109,7 +1109,7 @@ struct htt_rx_info {
 	bool fcs_err;
 };
 
-struct htt_struct {
+struct ath10k_htt {
 	struct ath10k *ar;
 	struct ath10k_htc *htc;
 
@@ -1267,21 +1267,21 @@ struct htt_rx_desc {
 
 /* FIXME: add htt_tx_desc_init() */
 
-struct htt_struct *ath10k_htt_attach(struct ath10k *ar, struct ath10k_htc *htc);
-int ath10k_htt_attach_target(struct htt_struct *htt);
-void ath10k_htt_detach(struct htt_struct *htt);
+struct ath10k_htt *ath10k_htt_attach(struct ath10k *ar, struct ath10k_htc *htc);
+int ath10k_htt_attach_target(struct ath10k_htt *htt);
+void ath10k_htt_detach(struct ath10k_htt *htt);
 
-void ath10k_htt_tx_attach(struct htt_struct *htt);
-void ath10k_htt_tx_detach(struct htt_struct *htt);
-int ath10k_htt_rx_attach(struct htt_struct *htt);
-void ath10k_htt_rx_detach(struct htt_struct *htt);
+void ath10k_htt_tx_attach(struct ath10k_htt *htt);
+void ath10k_htt_tx_detach(struct ath10k_htt *htt);
+int ath10k_htt_rx_attach(struct ath10k_htt *htt);
+void ath10k_htt_rx_detach(struct ath10k_htt *htt);
 void ath10k_htt_htc_tx_complete(void *context, struct sk_buff *skb);
 void ath10k_htt_t2h_msg_handler(void *context, struct sk_buff *skb);
-int ath10k_htt_h2t_ver_req_msg(struct htt_struct *htt);
-int ath10k_htt_send_rx_ring_cfg_ll(struct htt_struct *htt);
+int ath10k_htt_h2t_ver_req_msg(struct ath10k_htt *htt);
+int ath10k_htt_send_rx_ring_cfg_ll(struct ath10k_htt *htt);
 
-int ath10k_htt_tx_alloc_msdu_id(struct htt_struct *htt);
-void ath10k_htt_tx_free_msdu_id(struct htt_struct *htt, u16 msdu_id);
-int ath10k_htt_mgmt_tx(struct htt_struct *htt, struct sk_buff *);
-int ath10k_htt_tx(struct htt_struct *htt, struct sk_buff *);
+int ath10k_htt_tx_alloc_msdu_id(struct ath10k_htt *htt);
+void ath10k_htt_tx_free_msdu_id(struct ath10k_htt *htt, u16 msdu_id);
+int ath10k_htt_mgmt_tx(struct ath10k_htt *htt, struct sk_buff *);
+int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *);
 #endif
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index 7c90a2c..3fa0c1a 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -39,7 +39,7 @@
 /* when under memory pressure rx ring refill may fail and needs a retry */
 #define HTT_RX_RING_REFILL_RETRY_MS 50
 
-static int ath10k_htt_rx_ring_size(struct htt_struct *htt)
+static int ath10k_htt_rx_ring_size(struct ath10k_htt *htt)
 {
 	int size;
 
@@ -80,7 +80,7 @@ static int ath10k_htt_rx_ring_size(struct htt_struct *htt)
 	return size;
 }
 
-static int ath10k_htt_rx_ring_fill_level(struct htt_struct *htt)
+static int ath10k_htt_rx_ring_fill_level(struct ath10k_htt *htt)
 {
 	int size;
 
@@ -101,7 +101,7 @@ static int ath10k_htt_rx_ring_fill_level(struct htt_struct *htt)
 	return size;
 }
 
-static void ath10k_htt_rx_ring_fill_n(struct htt_struct *htt, int num)
+static void ath10k_htt_rx_ring_fill_n(struct ath10k_htt *htt, int num)
 {
 	struct htt_rx_desc *rx_desc;
 	struct sk_buff *skb;
@@ -156,7 +156,7 @@ fail:
 	return;
 }
 
-static void ath10k_htt_rx_msdu_buff_replenish(struct htt_struct *htt)
+static void ath10k_htt_rx_msdu_buff_replenish(struct ath10k_htt *htt)
 {
 	int num_to_fill;
 
@@ -168,17 +168,17 @@ static void ath10k_htt_rx_msdu_buff_replenish(struct htt_struct *htt)
 
 static void ath10k_htt_rx_ring_refill_retry(unsigned long arg)
 {
-	struct htt_struct *htt = (struct htt_struct *)arg;
+	struct ath10k_htt *htt = (struct ath10k_htt *)arg;
 	ath10k_htt_rx_msdu_buff_replenish(htt);
 }
 
-static unsigned ath10k_htt_rx_ring_elems(struct htt_struct *htt)
+static unsigned ath10k_htt_rx_ring_elems(struct ath10k_htt *htt)
 {
 	return (__le32_to_cpu(*htt->rx_ring.alloc_idx.vaddr) -
 		htt->rx_ring.sw_rd_idx.msdu_payld) & htt->rx_ring.size_mask;
 }
 
-void ath10k_htt_rx_detach(struct htt_struct *htt)
+void ath10k_htt_rx_detach(struct ath10k_htt *htt)
 {
 	int sw_rd_idx = htt->rx_ring.sw_rd_idx.msdu_payld;
 
@@ -211,7 +211,7 @@ void ath10k_htt_rx_detach(struct htt_struct *htt)
 	kfree(htt->rx_ring.buf.netbufs_ring);
 }
 
-static inline struct sk_buff *ath10k_htt_rx_netbuf_pop(struct htt_struct *htt)
+static inline struct sk_buff *ath10k_htt_rx_netbuf_pop(struct ath10k_htt *htt)
 {
 	int idx;
 	struct sk_buff *msdu;
@@ -233,7 +233,7 @@ static inline struct sk_buff *ath10k_htt_rx_netbuf_pop(struct htt_struct *htt)
 	return msdu;
 }
 
-static int ath10k_htt_rx_amsdu_pop(struct htt_struct *htt,
+static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt,
 				   u8 **fw_desc, int *fw_desc_len,
 				   struct sk_buff **head_msdu,
 				   struct sk_buff **tail_msdu)
@@ -399,7 +399,7 @@ static int ath10k_htt_rx_amsdu_pop(struct htt_struct *htt,
 	return msdu_chaining;
 }
 
-int ath10k_htt_rx_attach(struct htt_struct *htt)
+int ath10k_htt_rx_attach(struct ath10k_htt *htt)
 {
 	dma_addr_t paddr;
 	void *vaddr;
@@ -552,7 +552,7 @@ static void ath10k_htt_rx_free_msdu_chain(struct sk_buff *skb)
 	}
 }
 
-static int ath10k_htt_rx_amsdu(struct htt_struct *htt,
+static int ath10k_htt_rx_amsdu(struct ath10k_htt *htt,
 			struct htt_rx_info *info)
 {
 	struct htt_rx_desc *rxd;
@@ -655,7 +655,7 @@ static int ath10k_htt_rx_amsdu(struct htt_struct *htt,
 	return 0;
 }
 
-static int ath10k_htt_rx_msdu(struct htt_struct *htt, struct htt_rx_info *info)
+static int ath10k_htt_rx_msdu(struct ath10k_htt *htt, struct htt_rx_info *info)
 {
 	struct sk_buff *skb = info->skb;
 	struct htt_rx_desc *rxd;
@@ -741,7 +741,7 @@ static bool ath10k_htt_rx_has_fcs_err(struct sk_buff *skb)
 	return false;
 }
 
-static void ath10k_htt_rx_handler(struct htt_struct *htt, struct htt_rx_indication *rx)
+static void ath10k_htt_rx_handler(struct ath10k_htt *htt, struct htt_rx_indication *rx)
 {
 	struct htt_rx_info info;
 	struct htt_rx_indication_mpdu_range *mpdu_ranges;
@@ -853,7 +853,7 @@ static void ath10k_htt_rx_handler(struct htt_struct *htt, struct htt_rx_indicati
 	ath10k_htt_rx_msdu_buff_replenish(htt);
 }
 
-static void ath10k_htt_rx_frag_handler(struct htt_struct *htt,
+static void ath10k_htt_rx_frag_handler(struct ath10k_htt *htt,
 				struct htt_rx_fragment_indication *frag)
 {
 	struct sk_buff *msdu_head, *msdu_tail;
@@ -955,7 +955,7 @@ end:
 
 void ath10k_htt_t2h_msg_handler(void *context, struct sk_buff *skb)
 {
-	struct htt_struct *htt = (struct htt_struct *)context;
+	struct ath10k_htt *htt = (struct ath10k_htt *)context;
 	struct htt_resp *resp = (struct htt_resp *)skb->data;
 
 	/* confirm alignment */
diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
index 5b3cad1..0ceaf02 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -21,7 +21,7 @@
 #include "txrx.h"
 #include "debug.h"
 
-int ath10k_htt_tx_alloc_msdu_id(struct htt_struct *htt)
+int ath10k_htt_tx_alloc_msdu_id(struct ath10k_htt *htt)
 {
 	int msdu_id;
 
@@ -36,7 +36,7 @@ int ath10k_htt_tx_alloc_msdu_id(struct htt_struct *htt)
 	return msdu_id;
 }
 
-void ath10k_htt_tx_free_msdu_id(struct htt_struct *htt, u16 msdu_id)
+void ath10k_htt_tx_free_msdu_id(struct ath10k_htt *htt, u16 msdu_id)
 {
 	lockdep_assert_held(&htt->tx_lock);
 
@@ -47,13 +47,13 @@ void ath10k_htt_tx_free_msdu_id(struct htt_struct *htt, u16 msdu_id)
 	__clear_bit(msdu_id, htt->used_msdu_ids);
 }
 
-void ath10k_htt_tx_attach(struct htt_struct *htt)
+void ath10k_htt_tx_attach(struct ath10k_htt *htt)
 {
 	spin_lock_init(&htt->tx_lock);
 	init_waitqueue_head(&htt->empty_tx_wq);
 }
 
-void ath10k_htt_tx_detach(struct htt_struct *htt)
+void ath10k_htt_tx_detach(struct ath10k_htt *htt)
 {
 	return;
 }
@@ -61,7 +61,7 @@ void ath10k_htt_tx_detach(struct htt_struct *htt)
 void ath10k_htt_htc_tx_complete(void *context, struct sk_buff *skb)
 {
 	struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(skb);
-	struct htt_struct *htt = (struct htt_struct *)context;
+	struct ath10k_htt *htt = (struct ath10k_htt *)context;
 
 	if (skb_cb->htt.is_conf) {
 		dev_kfree_skb_any(skb);
@@ -82,7 +82,7 @@ void ath10k_htt_htc_tx_complete(void *context, struct sk_buff *skb)
 	ath10k_txrx_tx_unref(htt, skb);
 }
 
-int ath10k_htt_h2t_ver_req_msg(struct htt_struct *htt)
+int ath10k_htt_h2t_ver_req_msg(struct ath10k_htt *htt)
 {
 	struct sk_buff *skb;
 	struct htt_cmd *cmd;
@@ -111,7 +111,7 @@ int ath10k_htt_h2t_ver_req_msg(struct htt_struct *htt)
 	return 0;
 }
 
-int ath10k_htt_send_rx_ring_cfg_ll(struct htt_struct *htt)
+int ath10k_htt_send_rx_ring_cfg_ll(struct ath10k_htt *htt)
 {
 	struct sk_buff *skb;
 	struct htt_cmd *cmd;
@@ -194,7 +194,7 @@ int ath10k_htt_send_rx_ring_cfg_ll(struct htt_struct *htt)
 	return 0;
 }
 
-int ath10k_htt_mgmt_tx(struct htt_struct *htt, struct sk_buff *msdu)
+int ath10k_htt_mgmt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
 {
 	struct device *dev = htt->ar->dev;
 	struct ath10k_skb_cb *skb_cb;
@@ -263,7 +263,7 @@ err:
 	return res;
 }
 
-int ath10k_htt_tx(struct htt_struct *htt, struct sk_buff *msdu)
+int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
 {
 	struct device *dev = htt->ar->dev;
 	struct htt_cmd *cmd;
diff --git a/drivers/net/wireless/ath/ath10k/txrx.c b/drivers/net/wireless/ath/ath10k/txrx.c
index 6a66dc2..8a16b63 100644
--- a/drivers/net/wireless/ath/ath10k/txrx.c
+++ b/drivers/net/wireless/ath/ath10k/txrx.c
@@ -44,7 +44,7 @@ out:
 	spin_unlock_bh(&ar->data_lock);
 }
 
-void ath10k_txrx_tx_unref(struct htt_struct *htt, struct sk_buff *txdesc)
+void ath10k_txrx_tx_unref(struct ath10k_htt *htt, struct sk_buff *txdesc)
 {
 	struct device *dev = htt->ar->dev;
 	struct ieee80211_tx_info *info;
@@ -99,7 +99,7 @@ exit:
 	dev_kfree_skb_any(txdesc);
 }
 
-void ath10k_txrx_tx_completed(struct htt_struct *htt,
+void ath10k_txrx_tx_completed(struct ath10k_htt *htt,
 			      const struct htt_tx_done *tx_done)
 {
 	struct sk_buff *txdesc;
@@ -351,7 +351,7 @@ int ath10k_wait_for_peer_deleted(struct ath10k *ar, int vdev_id, const u8 *addr)
 	return ath10k_wait_for_peer_common(ar, vdev_id, addr, false);
 }
 
-void ath10k_peer_map_event(struct htt_struct *htt,
+void ath10k_peer_map_event(struct ath10k_htt *htt,
 			   struct htt_peer_map_event *ev)
 {
 	struct ath10k *ar = htt->ar;
@@ -378,7 +378,7 @@ exit:
 	spin_unlock_bh(&ar->data_lock);
 }
 
-void ath10k_peer_unmap_event(struct htt_struct *htt,
+void ath10k_peer_unmap_event(struct ath10k_htt *htt,
 			     struct htt_peer_unmap_event *ev)
 {
 	struct ath10k *ar = htt->ar;
diff --git a/drivers/net/wireless/ath/ath10k/txrx.h b/drivers/net/wireless/ath/ath10k/txrx.h
index 05bf9d8..8d08c4f 100644
--- a/drivers/net/wireless/ath/ath10k/txrx.h
+++ b/drivers/net/wireless/ath/ath10k/txrx.h
@@ -19,8 +19,8 @@
 
 #include "htt.h"
 
-void ath10k_txrx_tx_unref(struct htt_struct *htt, struct sk_buff *txdesc);
-void ath10k_txrx_tx_completed(struct htt_struct *htt,
+void ath10k_txrx_tx_unref(struct ath10k_htt *htt, struct sk_buff *txdesc);
+void ath10k_txrx_tx_completed(struct ath10k_htt *htt,
 			      const struct htt_tx_done *tx_done);
 void ath10k_process_rx(struct ath10k *ar, struct htt_rx_info *info);
 
@@ -29,9 +29,9 @@ struct ath10k_peer *ath10k_peer_find(struct ath10k *ar, int vdev_id,
 int ath10k_wait_for_peer_created(struct ath10k *ar, int vdev_id, const u8 *addr);
 int ath10k_wait_for_peer_deleted(struct ath10k *ar, int vdev_id, const u8 *addr);
 
-void ath10k_peer_map_event(struct htt_struct *htt,
+void ath10k_peer_map_event(struct ath10k_htt *htt,
 			   struct htt_peer_map_event *ev);
-void ath10k_peer_unmap_event(struct htt_struct *htt,
+void ath10k_peer_unmap_event(struct ath10k_htt *htt,
 			     struct htt_peer_unmap_event *ev);
 
 #endif
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH 2/6] ath10k: fix code style
  2013-04-19  9:35 [ath9k-devel] [PATCH 0/6] ath10k: cleanups Michal Kazior
  2013-04-19  9:35 ` [ath9k-devel] [PATCH 1/6] ath10k: rename htt_struct Michal Kazior
@ 2013-04-19  9:35 ` Michal Kazior
  2013-04-19  9:35 ` [ath9k-devel] [PATCH 3/6] ath10k: fix code style of handling errors Michal Kazior
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Michal Kazior @ 2013-04-19  9:35 UTC (permalink / raw)
  To: ath9k-devel

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/htt.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt.c b/drivers/net/wireless/ath/ath10k/htt.c
index b172321..036e2b8 100644
--- a/drivers/net/wireless/ath/ath10k/htt.c
+++ b/drivers/net/wireless/ath/ath10k/htt.c
@@ -73,7 +73,7 @@ struct ath10k_htt *ath10k_htt_attach(struct ath10k *ar, struct ath10k_htc *htc)
 
 	htt = kzalloc(sizeof(*htt), GFP_KERNEL);
 	if (!htt)
-		goto fail1;
+		return NULL;
 
 	htt->ar = ar;
 	htt->htc = htc;
@@ -86,12 +86,12 @@ struct ath10k_htt *ath10k_htt_attach(struct ath10k *ar, struct ath10k_htc *htc)
 	 * message to the target.
 	 */
 	if (ath10k_htt_htc_attach(htt))
-		goto fail2;
+		goto err_htc_attach;
 
 	ath10k_htt_tx_attach(htt);
 
 	if (ath10k_htt_rx_attach(htt))
-		goto fail3;
+		goto err_rx_attach;
 
 	/*
 	 * Prefetch enough data to satisfy target
@@ -107,11 +107,10 @@ struct ath10k_htt *ath10k_htt_attach(struct ath10k *ar, struct ath10k_htc *htc)
 
 	return htt;
 
-fail3:
+err_rx_attach:
 	ath10k_htt_tx_detach(htt);
-fail2:
+err_htc_attach:
 	kfree(htt);
-fail1:
 	return NULL;
 }
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH 3/6] ath10k: fix code style of handling errors
  2013-04-19  9:35 [ath9k-devel] [PATCH 0/6] ath10k: cleanups Michal Kazior
  2013-04-19  9:35 ` [ath9k-devel] [PATCH 1/6] ath10k: rename htt_struct Michal Kazior
  2013-04-19  9:35 ` [ath9k-devel] [PATCH 2/6] ath10k: fix code style Michal Kazior
@ 2013-04-19  9:35 ` Michal Kazior
  2013-04-19  9:35 ` [ath9k-devel] [PATCH 4/6] ath10k: fix code style a little Michal Kazior
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Michal Kazior @ 2013-04-19  9:35 UTC (permalink / raw)
  To: ath9k-devel

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/mac.c |   17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 60855fb..8de8b3c 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -96,11 +96,9 @@ static int ath10k_install_key(struct ath10k_vif *arvif,
 
 	ret = wait_for_completion_timeout(&ar->install_key_done, 3*HZ);
 	if (ret == 0)
-		ret = -ETIMEDOUT;
-	if (ret > 0)
-		ret = 0;
+		return -ETIMEDOUT;
 
-	return ret;
+	return 0;
 }
 
 static int ath10k_install_peer_wep_keys(struct ath10k_vif *arvif,
@@ -359,12 +357,9 @@ static inline int ath10k_vdev_setup_sync(struct ath10k *ar)
 	ret = wait_for_completion_timeout(&ar->vdev_setup_done,
 					  ATH10K_VDEV_SETUP_TIMEOUT_HZ);
 	if (ret == 0)
-		ret = -ETIMEDOUT;
-
-	if (ret > 0)
-		ret = 0; /* success */
+		return -ETIMEDOUT;
 
-	return ret;
+	return 0;
 }
 
 static int ath10k_vdev_start(struct ath10k_vif *arvif)
@@ -1420,7 +1415,7 @@ static void ath10k_abort_scan(struct ath10k *ar)
 
 	ret = wait_for_completion_timeout(&ar->scan.completed, 3*HZ);
 	if (ret == 0)
-		ret = -ETIMEDOUT;
+		ath10k_warn("timed out while waiting for scan to stop\n");
 
 	spin_lock_bh(&ar->data_lock);
 	if (ar->scan.in_progress) {
@@ -1448,8 +1443,6 @@ static int ath10k_start_scan(struct ath10k *ar,
 
 	ret = wait_for_completion_timeout(&ar->scan.started, 1*HZ);
 	if (ret == 0)
-		ret = -ETIMEDOUT;
-	if (ret < 0)
 		return ret;
 
 	/* the scan can complete earlier, before we even
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH 4/6] ath10k: fix code style a little
  2013-04-19  9:35 [ath9k-devel] [PATCH 0/6] ath10k: cleanups Michal Kazior
                   ` (2 preceding siblings ...)
  2013-04-19  9:35 ` [ath9k-devel] [PATCH 3/6] ath10k: fix code style of handling errors Michal Kazior
@ 2013-04-19  9:35 ` Michal Kazior
  2013-04-19  9:35 ` [ath9k-devel] [PATCH 5/6] ath10k: cleanup tx/rx mode handling Michal Kazior
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Michal Kazior @ 2013-04-19  9:35 UTC (permalink / raw)
  To: ath9k-devel

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/mac.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 8de8b3c..6291935 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -186,12 +186,14 @@ static int ath10k_clear_vdev_key(struct ath10k_vif *arvif,
 		spin_lock_bh(&ar->data_lock);
 		i = 0;
 		list_for_each_entry(peer, &ar->peers, list) {
-			for (i = 0; i < ARRAY_SIZE(peer->keys); i++)
+			for (i = 0; i < ARRAY_SIZE(peer->keys); i++) {
 				if (peer->keys[i] == key) {
 					memcpy(addr, peer->addr, ETH_ALEN);
 					peer->keys[i] = NULL;
 					break;
 				}
+			}
+
 			if (i < ARRAY_SIZE(peer->keys))
 				break;
 		}
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH 5/6] ath10k: cleanup tx/rx mode handling
  2013-04-19  9:35 [ath9k-devel] [PATCH 0/6] ath10k: cleanups Michal Kazior
                   ` (3 preceding siblings ...)
  2013-04-19  9:35 ` [ath9k-devel] [PATCH 4/6] ath10k: fix code style a little Michal Kazior
@ 2013-04-19  9:35 ` Michal Kazior
  2013-04-19  9:35 ` [ath9k-devel] [PATCH 6/6] ath10k: cleanup hw init-related code Michal Kazior
  2013-04-22  9:35 ` [ath9k-devel] [PATCH 0/6] ath10k: cleanups Kalle Valo
  6 siblings, 0 replies; 19+ messages in thread
From: Michal Kazior @ 2013-04-19  9:35 UTC (permalink / raw)
  To: ath9k-devel

Up until now we were thinking we're using raw tx
but in fact we were using native wifi tx. The
htt_pkt_type was wrongly assumed to be a bitshift.

The ath10k_hw_txrx_mode is the correct definition
of both tx/rx mode.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/htt.h    |    8 --------
 drivers/net/wireless/ath/ath10k/htt_tx.c |    2 +-
 drivers/net/wireless/ath/ath10k/hw.h     |   16 ++++++++++++++--
 3 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h
index 6415af0..1b62064 100644
--- a/drivers/net/wireless/ath/ath10k/htt.h
+++ b/drivers/net/wireless/ath/ath10k/htt.h
@@ -59,14 +59,6 @@ struct htt_ver_req {
 	u8 pad[sizeof(u32) - sizeof(struct htt_cmd_hdr)];
 } __packed;
 
-enum htt_pkt_type {
-	HTT_PKT_TYPE_RAW         = 1 << 0,
-	HTT_PKT_TYPE_NATIVE_WIFI = 1 << 1,
-	HTT_PKT_TYPE_ETHERNET    = 1 << 2,
-
-	HTT_PKT_TYPE_COUNT  /* keep this last */
-};
-
 /*
  * HTT tx MSDU descriptor
  *
diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
index 0ceaf02..11737c3 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -351,7 +351,7 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
 	if (!ieee80211_has_protected(hdr->frame_control))
 		flags0 |= HTT_DATA_TX_DESC_FLAGS0_NO_ENCRYPT;
 	flags0 |= HTT_DATA_TX_DESC_FLAGS0_MAC_HDR_PRESENT;
-	flags0 |= SM(HTT_PKT_TYPE_RAW, HTT_DATA_TX_DESC_FLAGS0_PKT_TYPE);
+	flags0 |= SM(ATH10K_HW_TXRX_NATIVE_WIFI, HTT_DATA_TX_DESC_FLAGS0_PKT_TYPE);
 
 	flags1  = 0;
 	flags1 |= SM((u16)vdev_id, HTT_DATA_TX_DESC_FLAGS1_VDEV_ID);
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index ed5157b..17c1418 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -42,6 +42,19 @@
 #define AR9888_HW_2_0_BOARD_DATA_FILE	"fakeBoardData_AR9888v2.bin"
 #define AR9888_HW_2_0_PATCH_LOAD_ADDR	0x1234
 
+/* Known pecularities:
+ *  - current FW doesn't support raw rx mode (last tested v599)
+ *  - current FW dumps upon raw tx mode (last tested v599)
+ *  - raw appears in nwifi decap, raw and nwifi appear in ethernet decap
+ *  - raw have FCS, nwifi doesn't
+ *  - ethernet frames have 802.11 header decapped and parts (base hdr, cipher
+ *    param, llc/snap) are aligned to 4byte boundaries each */
+enum ath10k_hw_txrx_mode {
+	ATH10K_HW_TXRX_RAW = 0,
+	ATH10K_HW_TXRX_NATIVE_WIFI = 1,
+	ATH10K_HW_TXRX_ETHERNET = 2,
+};
+
 #define TARGET_NUM_VDEV				16
 #define TARGET_NUM_PEER_AST			2
 #define TARGET_WDS_ENTRIES			32
@@ -56,8 +69,7 @@
 #define TARGET_RX_CHAIN_MASK			0x7
 #define TARGET_RX_TIMEOUT_LO_PRI		100
 #define TARGET_RX_TIMEOUT_HI_PRI		40
-#define TARGET_RX_DECAP_MODE			(0x2)
-#define TARGET_RX_DECAP_MODE_NWIFI		(0x1)
+#define TARGET_RX_DECAP_MODE			ATH10K_HW_TXRX_ETHERNET
 #define TARGET_SCAN_MAX_REQS			0x4
 #define TARGET_BMISS_OFFLOAD_MAX_VDEV		0x3
 #define TARGET_ROAM_OFFLOAD_MAX_VDEV		0x3
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH 6/6] ath10k: cleanup hw init-related code
  2013-04-19  9:35 [ath9k-devel] [PATCH 0/6] ath10k: cleanups Michal Kazior
                   ` (4 preceding siblings ...)
  2013-04-19  9:35 ` [ath9k-devel] [PATCH 5/6] ath10k: cleanup tx/rx mode handling Michal Kazior
@ 2013-04-19  9:35 ` Michal Kazior
  2013-04-22  9:35 ` [ath9k-devel] [PATCH 0/6] ath10k: cleanups Kalle Valo
  6 siblings, 0 replies; 19+ messages in thread
From: Michal Kazior @ 2013-04-19  9:35 UTC (permalink / raw)
  To: ath9k-devel

We can't simply remove the macros from hw.h since
we depend on some of the values through the code.

Hopefully this commit makes it easier to
understand the code anyway.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/hw.h  |   30 ++++++++++-------
 drivers/net/wireless/ath/ath10k/wmi.c |   60 ++++++++++++++++-----------------
 drivers/net/wireless/ath/ath10k/wmi.h |    8 +++--
 3 files changed, 52 insertions(+), 46 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index 17c1418..f96faba 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -55,32 +55,38 @@ enum ath10k_hw_txrx_mode {
 	ATH10K_HW_TXRX_ETHERNET = 2,
 };
 
-#define TARGET_NUM_VDEV				16
+enum ath10k_mcast2ucast_mode {
+	ATH10K_MCAST2UCAST_DISABLED = 0,
+	ATH10K_MCAST2UCAST_ENABLED = 1,
+};
+
+#define TARGET_NUM_VDEVS			16
 #define TARGET_NUM_PEER_AST			2
-#define TARGET_WDS_ENTRIES			32
+#define TARGET_NUM_WDS_ENTRIES			32
 #define TARGET_DMA_BURST_SIZE			0
 #define TARGET_MAC_AGGR_DELIM			0
 #define TARGET_AST_SKID_LIMIT			16
 #define TARGET_NUM_PEERS			16
 #define TARGET_NUM_OFFLOAD_PEERS		0
 #define TARGET_NUM_PEER_KEYS			2
-#define TARGET_NUM_TIDS	(2 * (TARGET_NUM_PEERS + TARGET_NUM_VDEV))
-#define TARGET_TX_CHAIN_MASK			0x7
-#define TARGET_RX_CHAIN_MASK			0x7
+#define TARGET_NUM_TIDS				(2 * ((TARGET_NUM_PEERS) + (TARGET_NUM_VDEVS)))
+#define TARGET_TX_CHAIN_MASK			(BIT(0) | BIT(1) | BIT(2))
+#define TARGET_RX_CHAIN_MASK			(BIT(0) | BIT(1) | BIT(2))
 #define TARGET_RX_TIMEOUT_LO_PRI		100
 #define TARGET_RX_TIMEOUT_HI_PRI		40
 #define TARGET_RX_DECAP_MODE			ATH10K_HW_TXRX_ETHERNET
-#define TARGET_SCAN_MAX_REQS			0x4
-#define TARGET_BMISS_OFFLOAD_MAX_VDEV		0x3
-#define TARGET_ROAM_OFFLOAD_MAX_VDEV		0x3
-#define TARGET_ROAM_OFFLOAD_MAX_PROFILES	0x8
-#define TARGET_GTK_OFFLOAD_MAX_VDEV		0x3
+#define TARGET_SCAN_MAX_PENDING_REQS		4
+#define TARGET_BMISS_OFFLOAD_MAX_VDEV		3
+#define TARGET_ROAM_OFFLOAD_MAX_VDEV		3
+#define TARGET_ROAM_OFFLOAD_MAX_AP_PROFILES	8
+#define TARGET_GTK_OFFLOAD_MAX_VDEV		3
 #define TARGET_NUM_MCAST_GROUPS			0
 #define TARGET_NUM_MCAST_TABLE_ELEMS		0
-#define TARGET_MCAST2UCAST_MODE			0 /* disabled */
-#define TARGET_TX_DBG_LOG_SIZE			1024 /* bytes */
+#define TARGET_MCAST2UCAST_MODE			ATH10K_MCAST2UCAST_DISABLED
+#define TARGET_TX_DBG_LOG_SIZE			1024
 #define TARGET_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 0
 #define TARGET_VOW_CONFIG			0
 #define TARGET_NUM_MSDU_DESC			(1024 + 400)
+#define TARGET_MAX_FRAG_ENTRIES			0
 
 #endif /* _HW_H_ */
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index e0f8635..4635164 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -1247,37 +1247,35 @@ int ath10k_wmi_cmd_init(struct ath10k *ar)
 	struct wmi_init_cmd *cmd;
 	struct sk_buff *buf;
 	struct wmi_resource_config config = {
-		__cpu_to_le32(TARGET_NUM_VDEV),
-		/* reserve an additional peer for each VDEV */
-		__cpu_to_le32(TARGET_NUM_PEERS + TARGET_NUM_VDEV),
-		__cpu_to_le32(TARGET_NUM_OFFLOAD_PEERS),
-		__cpu_to_le32(TARGET_NUM_PEER_KEYS),
-		__cpu_to_le32(TARGET_NUM_TIDS),
-		__cpu_to_le32(TARGET_AST_SKID_LIMIT),
-		__cpu_to_le32(TARGET_TX_CHAIN_MASK),
-		__cpu_to_le32(TARGET_RX_CHAIN_MASK),
-		{
-			__cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI),
-			__cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI),
-			__cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI),
-			__cpu_to_le32(TARGET_RX_TIMEOUT_HI_PRI)
-		},
-		__cpu_to_le32(TARGET_RX_DECAP_MODE),
-		__cpu_to_le32(TARGET_SCAN_MAX_REQS),
-		__cpu_to_le32(TARGET_BMISS_OFFLOAD_MAX_VDEV),
-		__cpu_to_le32(TARGET_ROAM_OFFLOAD_MAX_VDEV),
-		__cpu_to_le32(TARGET_ROAM_OFFLOAD_MAX_PROFILES),
-		__cpu_to_le32(TARGET_NUM_MCAST_GROUPS),
-		__cpu_to_le32(TARGET_NUM_MCAST_TABLE_ELEMS),
-		__cpu_to_le32(TARGET_MCAST2UCAST_MODE),
-		__cpu_to_le32(TARGET_TX_DBG_LOG_SIZE),
-		__cpu_to_le32(TARGET_WDS_ENTRIES),
-		__cpu_to_le32(TARGET_DMA_BURST_SIZE),
-		__cpu_to_le32(TARGET_MAC_AGGR_DELIM),
-		__cpu_to_le32(TARGET_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK),
-		__cpu_to_le32(TARGET_VOW_CONFIG),
-		__cpu_to_le32(TARGET_GTK_OFFLOAD_MAX_VDEV),
-		__cpu_to_le32(TARGET_NUM_MSDU_DESC)
+		.num_vdevs = __cpu_to_le32(TARGET_NUM_VDEVS),
+		.num_peers = __cpu_to_le32(TARGET_NUM_PEERS + TARGET_NUM_VDEVS),
+		.num_offload_peers = __cpu_to_le32(TARGET_NUM_OFFLOAD_PEERS),
+		.num_peer_keys = __cpu_to_le32(TARGET_NUM_PEER_KEYS),
+		.num_tids = __cpu_to_le32(TARGET_NUM_TIDS),
+		.ast_skid_limit = __cpu_to_le32(TARGET_AST_SKID_LIMIT),
+		.tx_chain_mask = __cpu_to_le32(TARGET_TX_CHAIN_MASK),
+		.rx_chain_mask = __cpu_to_le32(TARGET_RX_CHAIN_MASK),
+		.rx_timeout_pri_vo = __cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI),
+		.rx_timeout_pri_vi = __cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI),
+		.rx_timeout_pri_be = __cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI),
+		.rx_timeout_pri_bk = __cpu_to_le32(TARGET_RX_TIMEOUT_HI_PRI),
+		.rx_decap_mode = __cpu_to_le32(TARGET_RX_DECAP_MODE),
+		.scan_max_pending_reqs = __cpu_to_le32(TARGET_SCAN_MAX_PENDING_REQS),
+		.bmiss_offload_max_vdev = __cpu_to_le32(TARGET_BMISS_OFFLOAD_MAX_VDEV),
+		.roam_offload_max_vdev = __cpu_to_le32(TARGET_ROAM_OFFLOAD_MAX_VDEV),
+		.roam_offload_max_ap_profiles = __cpu_to_le32(TARGET_ROAM_OFFLOAD_MAX_AP_PROFILES),
+		.num_mcast_groups = __cpu_to_le32(TARGET_NUM_MCAST_GROUPS),
+		.num_mcast_table_elems = __cpu_to_le32(TARGET_NUM_MCAST_TABLE_ELEMS),
+		.mcast2ucast_mode = __cpu_to_le32(TARGET_MCAST2UCAST_MODE),
+		.tx_dbg_log_size = __cpu_to_le32(TARGET_TX_DBG_LOG_SIZE),
+		.num_wds_entries = __cpu_to_le32(TARGET_NUM_WDS_ENTRIES),
+		.dma_burst_size = __cpu_to_le32(TARGET_DMA_BURST_SIZE),
+		.mac_aggr_delim = __cpu_to_le32(TARGET_MAC_AGGR_DELIM),
+		.rx_skip_defrag_timeout_dup_detection_check = __cpu_to_le32(TARGET_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK),
+		.vow_config = __cpu_to_le32(TARGET_VOW_CONFIG),
+		.gtk_offload_max_vdev = __cpu_to_le32(TARGET_GTK_OFFLOAD_MAX_VDEV),
+		.num_msdu_desc = __cpu_to_le32(TARGET_NUM_MSDU_DESC),
+		.max_frag_entries = __cpu_to_le32(TARGET_MAX_FRAG_ENTRIES),
 	};
 
 	buf = ath10k_wmi_alloc_skb(sizeof(*cmd));
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index 2dbc3f2..e914a49 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -822,7 +822,10 @@ struct wmi_resource_config {
 	 *   This parameter specifies the timeout in milliseconds for each
 	 *   class.
 	 */
-	__le32 rx_timeout_pri[4];
+	__le32 rx_timeout_pri_vi;
+	__le32 rx_timeout_pri_vo;
+	__le32 rx_timeout_pri_be;
+	__le32 rx_timeout_pri_bk;
 
 	/*
 	 * what mode the rx should decap packets to
@@ -834,7 +837,7 @@ struct wmi_resource_config {
 	__le32 rx_decap_mode;
 
 	/* what is the maximum scan requests than can be queued */
-	__le32 scan_max_pending_req;
+	__le32 scan_max_pending_reqs;
 
 	/* maximum VDEV that could use BMISS offload */
 	__le32 bmiss_offload_max_vdev;
@@ -890,7 +893,6 @@ struct wmi_resource_config {
 	 */
 	__le32 mcast2ucast_mode;
 
-
 	/*
 	 * how much memory to allocate for a tx PPDU dbg log
 	 *
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH 0/6] ath10k: cleanups
  2013-04-19  9:35 [ath9k-devel] [PATCH 0/6] ath10k: cleanups Michal Kazior
                   ` (5 preceding siblings ...)
  2013-04-19  9:35 ` [ath9k-devel] [PATCH 6/6] ath10k: cleanup hw init-related code Michal Kazior
@ 2013-04-22  9:35 ` Kalle Valo
  2013-04-23  8:02   ` [ath9k-devel] [PATCH v2 " Michal Kazior
  6 siblings, 1 reply; 19+ messages in thread
From: Kalle Valo @ 2013-04-22  9:35 UTC (permalink / raw)
  To: ath9k-devel

Michal Kazior <michal.kazior@tieto.com> writes:

> Michal Kazior (6):
>   ath10k: rename htt_struct
>   ath10k: fix code style
>   ath10k: fix code style of handling errors
>   ath10k: fix code style a little
>   ath10k: cleanup tx/rx mode handling
>   ath10k: cleanup hw init-related code

Sorry, but there are just too many conflicts for me to fix and three
merge didn't work as the patches didn't have valid commit ids. Can you
rebase, please?

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH v2 0/6] ath10k: cleanups
  2013-04-22  9:35 ` [ath9k-devel] [PATCH 0/6] ath10k: cleanups Kalle Valo
@ 2013-04-23  8:02   ` Michal Kazior
  2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 1/6] ath10k: rename htt_struct Michal Kazior
                       ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Michal Kazior @ 2013-04-23  8:02 UTC (permalink / raw)
  To: ath9k-devel

Rebased on the tip of master branch.

Michal Kazior (6):
  ath10k: rename htt_struct
  ath10k: fix code style
  ath10k: fix code style of handling errors
  ath10k: fix code style a little
  ath10k: cleanup tx/rx mode handling
  ath10k: cleanup hw init-related code

 drivers/net/wireless/ath/ath10k/core.h   |    2 +-
 drivers/net/wireless/ath/ath10k/htt.c    |   27 +++++++-------
 drivers/net/wireless/ath/ath10k/htt.h    |   36 +++++++-----------
 drivers/net/wireless/ath/ath10k/htt_rx.c |   30 +++++++--------
 drivers/net/wireless/ath/ath10k/htt_tx.c |   20 +++++-----
 drivers/net/wireless/ath/ath10k/hw.h     |   46 ++++++++++++++++-------
 drivers/net/wireless/ath/ath10k/mac.c    |   21 ++++-------
 drivers/net/wireless/ath/ath10k/txrx.c   |    8 ++--
 drivers/net/wireless/ath/ath10k/txrx.h   |    8 ++--
 drivers/net/wireless/ath/ath10k/wmi.c    |   60 +++++++++++++++---------------
 drivers/net/wireless/ath/ath10k/wmi.h    |    8 ++--
 11 files changed, 135 insertions(+), 131 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH v2 1/6] ath10k: rename htt_struct
  2013-04-23  8:02   ` [ath9k-devel] [PATCH v2 " Michal Kazior
@ 2013-04-23  8:02     ` Michal Kazior
  2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 2/6] ath10k: fix code style Michal Kazior
                       ` (5 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Michal Kazior @ 2013-04-23  8:02 UTC (permalink / raw)
  To: ath9k-devel

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.h   |    2 +-
 drivers/net/wireless/ath/ath10k/htt.c    |   16 ++++++++--------
 drivers/net/wireless/ath/ath10k/htt.h    |   28 ++++++++++++++--------------
 drivers/net/wireless/ath/ath10k/htt_rx.c |   30 +++++++++++++++---------------
 drivers/net/wireless/ath/ath10k/htt_tx.c |   18 +++++++++---------
 drivers/net/wireless/ath/ath10k/txrx.c   |    8 ++++----
 drivers/net/wireless/ath/ath10k/txrx.h   |    8 ++++----
 7 files changed, 55 insertions(+), 55 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 42d9e72..dbe3f840 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -297,7 +297,7 @@ struct ath10k {
 	struct ath10k_bmi bmi;
 
 	struct ath10k_htc *htc;
-	struct htt_struct *htt;
+	struct ath10k_htt *htt;
 
 	struct ath10k_hw_params {
 		u32 id;
diff --git a/drivers/net/wireless/ath/ath10k/htt.c b/drivers/net/wireless/ath/ath10k/htt.c
index e5480d1..b172321 100644
--- a/drivers/net/wireless/ath/ath10k/htt.c
+++ b/drivers/net/wireless/ath/ath10k/htt.c
@@ -23,17 +23,17 @@
 
 static void ath10k_htt_stop_queue(void *context)
 {
-	struct htt_struct *htt = context;
+	struct ath10k_htt *htt = context;
 	ieee80211_stop_queues(htt->ar->hw);
 }
 
 static void ath10k_htt_wake_queue(void *context)
 {
-	struct htt_struct *htt = context;
+	struct ath10k_htt *htt = context;
 	ieee80211_wake_queues(htt->ar->hw);
 }
 
-static int ath10k_htt_htc_attach(struct htt_struct *htt)
+static int ath10k_htt_htc_attach(struct ath10k_htt *htt)
 {
 	struct ath10k_htc_svc_conn_req conn_req;
 	struct ath10k_htc_svc_conn_resp conn_resp;
@@ -67,9 +67,9 @@ static int ath10k_htt_htc_attach(struct htt_struct *htt)
 	return 0;
 }
 
-struct htt_struct *ath10k_htt_attach(struct ath10k *ar, struct ath10k_htc *htc)
+struct ath10k_htt *ath10k_htt_attach(struct ath10k *ar, struct ath10k_htc *htc)
 {
-	struct htt_struct *htt;
+	struct ath10k_htt *htt;
 
 	htt = kzalloc(sizeof(*htt), GFP_KERNEL);
 	if (!htt)
@@ -117,7 +117,7 @@ fail1:
 
 #define HTT_TARGET_VERSION_TIMEOUT_HZ (3*HZ)
 
-static int ath10k_htt_verify_version(struct htt_struct *htt)
+static int ath10k_htt_verify_version(struct ath10k_htt *htt)
 {
 	ath10k_dbg(ATH10K_DBG_HTT,
 		   "htt target version %d.%d; host version %d.%d\n",
@@ -137,7 +137,7 @@ static int ath10k_htt_verify_version(struct htt_struct *htt)
 	return 0;
 }
 
-int ath10k_htt_attach_target(struct htt_struct *htt)
+int ath10k_htt_attach_target(struct ath10k_htt *htt)
 {
 	int status;
 
@@ -162,7 +162,7 @@ int ath10k_htt_attach_target(struct htt_struct *htt)
 
 }
 
-void ath10k_htt_detach(struct htt_struct *htt)
+void ath10k_htt_detach(struct ath10k_htt *htt)
 {
 	ath10k_htt_rx_detach(htt);
 	ath10k_htt_tx_detach(htt);
diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h
index c94f137..6415af0 100644
--- a/drivers/net/wireless/ath/ath10k/htt.h
+++ b/drivers/net/wireless/ath/ath10k/htt.h
@@ -1109,7 +1109,7 @@ struct htt_rx_info {
 	bool fcs_err;
 };
 
-struct htt_struct {
+struct ath10k_htt {
 	struct ath10k *ar;
 	struct ath10k_htc *htc;
 
@@ -1267,21 +1267,21 @@ struct htt_rx_desc {
 
 /* FIXME: add htt_tx_desc_init() */
 
-struct htt_struct *ath10k_htt_attach(struct ath10k *ar, struct ath10k_htc *htc);
-int ath10k_htt_attach_target(struct htt_struct *htt);
-void ath10k_htt_detach(struct htt_struct *htt);
+struct ath10k_htt *ath10k_htt_attach(struct ath10k *ar, struct ath10k_htc *htc);
+int ath10k_htt_attach_target(struct ath10k_htt *htt);
+void ath10k_htt_detach(struct ath10k_htt *htt);
 
-void ath10k_htt_tx_attach(struct htt_struct *htt);
-void ath10k_htt_tx_detach(struct htt_struct *htt);
-int ath10k_htt_rx_attach(struct htt_struct *htt);
-void ath10k_htt_rx_detach(struct htt_struct *htt);
+void ath10k_htt_tx_attach(struct ath10k_htt *htt);
+void ath10k_htt_tx_detach(struct ath10k_htt *htt);
+int ath10k_htt_rx_attach(struct ath10k_htt *htt);
+void ath10k_htt_rx_detach(struct ath10k_htt *htt);
 void ath10k_htt_htc_tx_complete(void *context, struct sk_buff *skb);
 void ath10k_htt_t2h_msg_handler(void *context, struct sk_buff *skb);
-int ath10k_htt_h2t_ver_req_msg(struct htt_struct *htt);
-int ath10k_htt_send_rx_ring_cfg_ll(struct htt_struct *htt);
+int ath10k_htt_h2t_ver_req_msg(struct ath10k_htt *htt);
+int ath10k_htt_send_rx_ring_cfg_ll(struct ath10k_htt *htt);
 
-int ath10k_htt_tx_alloc_msdu_id(struct htt_struct *htt);
-void ath10k_htt_tx_free_msdu_id(struct htt_struct *htt, u16 msdu_id);
-int ath10k_htt_mgmt_tx(struct htt_struct *htt, struct sk_buff *);
-int ath10k_htt_tx(struct htt_struct *htt, struct sk_buff *);
+int ath10k_htt_tx_alloc_msdu_id(struct ath10k_htt *htt);
+void ath10k_htt_tx_free_msdu_id(struct ath10k_htt *htt, u16 msdu_id);
+int ath10k_htt_mgmt_tx(struct ath10k_htt *htt, struct sk_buff *);
+int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *);
 #endif
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index 7c90a2c..3fa0c1a 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -39,7 +39,7 @@
 /* when under memory pressure rx ring refill may fail and needs a retry */
 #define HTT_RX_RING_REFILL_RETRY_MS 50
 
-static int ath10k_htt_rx_ring_size(struct htt_struct *htt)
+static int ath10k_htt_rx_ring_size(struct ath10k_htt *htt)
 {
 	int size;
 
@@ -80,7 +80,7 @@ static int ath10k_htt_rx_ring_size(struct htt_struct *htt)
 	return size;
 }
 
-static int ath10k_htt_rx_ring_fill_level(struct htt_struct *htt)
+static int ath10k_htt_rx_ring_fill_level(struct ath10k_htt *htt)
 {
 	int size;
 
@@ -101,7 +101,7 @@ static int ath10k_htt_rx_ring_fill_level(struct htt_struct *htt)
 	return size;
 }
 
-static void ath10k_htt_rx_ring_fill_n(struct htt_struct *htt, int num)
+static void ath10k_htt_rx_ring_fill_n(struct ath10k_htt *htt, int num)
 {
 	struct htt_rx_desc *rx_desc;
 	struct sk_buff *skb;
@@ -156,7 +156,7 @@ fail:
 	return;
 }
 
-static void ath10k_htt_rx_msdu_buff_replenish(struct htt_struct *htt)
+static void ath10k_htt_rx_msdu_buff_replenish(struct ath10k_htt *htt)
 {
 	int num_to_fill;
 
@@ -168,17 +168,17 @@ static void ath10k_htt_rx_msdu_buff_replenish(struct htt_struct *htt)
 
 static void ath10k_htt_rx_ring_refill_retry(unsigned long arg)
 {
-	struct htt_struct *htt = (struct htt_struct *)arg;
+	struct ath10k_htt *htt = (struct ath10k_htt *)arg;
 	ath10k_htt_rx_msdu_buff_replenish(htt);
 }
 
-static unsigned ath10k_htt_rx_ring_elems(struct htt_struct *htt)
+static unsigned ath10k_htt_rx_ring_elems(struct ath10k_htt *htt)
 {
 	return (__le32_to_cpu(*htt->rx_ring.alloc_idx.vaddr) -
 		htt->rx_ring.sw_rd_idx.msdu_payld) & htt->rx_ring.size_mask;
 }
 
-void ath10k_htt_rx_detach(struct htt_struct *htt)
+void ath10k_htt_rx_detach(struct ath10k_htt *htt)
 {
 	int sw_rd_idx = htt->rx_ring.sw_rd_idx.msdu_payld;
 
@@ -211,7 +211,7 @@ void ath10k_htt_rx_detach(struct htt_struct *htt)
 	kfree(htt->rx_ring.buf.netbufs_ring);
 }
 
-static inline struct sk_buff *ath10k_htt_rx_netbuf_pop(struct htt_struct *htt)
+static inline struct sk_buff *ath10k_htt_rx_netbuf_pop(struct ath10k_htt *htt)
 {
 	int idx;
 	struct sk_buff *msdu;
@@ -233,7 +233,7 @@ static inline struct sk_buff *ath10k_htt_rx_netbuf_pop(struct htt_struct *htt)
 	return msdu;
 }
 
-static int ath10k_htt_rx_amsdu_pop(struct htt_struct *htt,
+static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt,
 				   u8 **fw_desc, int *fw_desc_len,
 				   struct sk_buff **head_msdu,
 				   struct sk_buff **tail_msdu)
@@ -399,7 +399,7 @@ static int ath10k_htt_rx_amsdu_pop(struct htt_struct *htt,
 	return msdu_chaining;
 }
 
-int ath10k_htt_rx_attach(struct htt_struct *htt)
+int ath10k_htt_rx_attach(struct ath10k_htt *htt)
 {
 	dma_addr_t paddr;
 	void *vaddr;
@@ -552,7 +552,7 @@ static void ath10k_htt_rx_free_msdu_chain(struct sk_buff *skb)
 	}
 }
 
-static int ath10k_htt_rx_amsdu(struct htt_struct *htt,
+static int ath10k_htt_rx_amsdu(struct ath10k_htt *htt,
 			struct htt_rx_info *info)
 {
 	struct htt_rx_desc *rxd;
@@ -655,7 +655,7 @@ static int ath10k_htt_rx_amsdu(struct htt_struct *htt,
 	return 0;
 }
 
-static int ath10k_htt_rx_msdu(struct htt_struct *htt, struct htt_rx_info *info)
+static int ath10k_htt_rx_msdu(struct ath10k_htt *htt, struct htt_rx_info *info)
 {
 	struct sk_buff *skb = info->skb;
 	struct htt_rx_desc *rxd;
@@ -741,7 +741,7 @@ static bool ath10k_htt_rx_has_fcs_err(struct sk_buff *skb)
 	return false;
 }
 
-static void ath10k_htt_rx_handler(struct htt_struct *htt, struct htt_rx_indication *rx)
+static void ath10k_htt_rx_handler(struct ath10k_htt *htt, struct htt_rx_indication *rx)
 {
 	struct htt_rx_info info;
 	struct htt_rx_indication_mpdu_range *mpdu_ranges;
@@ -853,7 +853,7 @@ static void ath10k_htt_rx_handler(struct htt_struct *htt, struct htt_rx_indicati
 	ath10k_htt_rx_msdu_buff_replenish(htt);
 }
 
-static void ath10k_htt_rx_frag_handler(struct htt_struct *htt,
+static void ath10k_htt_rx_frag_handler(struct ath10k_htt *htt,
 				struct htt_rx_fragment_indication *frag)
 {
 	struct sk_buff *msdu_head, *msdu_tail;
@@ -955,7 +955,7 @@ end:
 
 void ath10k_htt_t2h_msg_handler(void *context, struct sk_buff *skb)
 {
-	struct htt_struct *htt = (struct htt_struct *)context;
+	struct ath10k_htt *htt = (struct ath10k_htt *)context;
 	struct htt_resp *resp = (struct htt_resp *)skb->data;
 
 	/* confirm alignment */
diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
index 5b3cad1..0ceaf02 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -21,7 +21,7 @@
 #include "txrx.h"
 #include "debug.h"
 
-int ath10k_htt_tx_alloc_msdu_id(struct htt_struct *htt)
+int ath10k_htt_tx_alloc_msdu_id(struct ath10k_htt *htt)
 {
 	int msdu_id;
 
@@ -36,7 +36,7 @@ int ath10k_htt_tx_alloc_msdu_id(struct htt_struct *htt)
 	return msdu_id;
 }
 
-void ath10k_htt_tx_free_msdu_id(struct htt_struct *htt, u16 msdu_id)
+void ath10k_htt_tx_free_msdu_id(struct ath10k_htt *htt, u16 msdu_id)
 {
 	lockdep_assert_held(&htt->tx_lock);
 
@@ -47,13 +47,13 @@ void ath10k_htt_tx_free_msdu_id(struct htt_struct *htt, u16 msdu_id)
 	__clear_bit(msdu_id, htt->used_msdu_ids);
 }
 
-void ath10k_htt_tx_attach(struct htt_struct *htt)
+void ath10k_htt_tx_attach(struct ath10k_htt *htt)
 {
 	spin_lock_init(&htt->tx_lock);
 	init_waitqueue_head(&htt->empty_tx_wq);
 }
 
-void ath10k_htt_tx_detach(struct htt_struct *htt)
+void ath10k_htt_tx_detach(struct ath10k_htt *htt)
 {
 	return;
 }
@@ -61,7 +61,7 @@ void ath10k_htt_tx_detach(struct htt_struct *htt)
 void ath10k_htt_htc_tx_complete(void *context, struct sk_buff *skb)
 {
 	struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(skb);
-	struct htt_struct *htt = (struct htt_struct *)context;
+	struct ath10k_htt *htt = (struct ath10k_htt *)context;
 
 	if (skb_cb->htt.is_conf) {
 		dev_kfree_skb_any(skb);
@@ -82,7 +82,7 @@ void ath10k_htt_htc_tx_complete(void *context, struct sk_buff *skb)
 	ath10k_txrx_tx_unref(htt, skb);
 }
 
-int ath10k_htt_h2t_ver_req_msg(struct htt_struct *htt)
+int ath10k_htt_h2t_ver_req_msg(struct ath10k_htt *htt)
 {
 	struct sk_buff *skb;
 	struct htt_cmd *cmd;
@@ -111,7 +111,7 @@ int ath10k_htt_h2t_ver_req_msg(struct htt_struct *htt)
 	return 0;
 }
 
-int ath10k_htt_send_rx_ring_cfg_ll(struct htt_struct *htt)
+int ath10k_htt_send_rx_ring_cfg_ll(struct ath10k_htt *htt)
 {
 	struct sk_buff *skb;
 	struct htt_cmd *cmd;
@@ -194,7 +194,7 @@ int ath10k_htt_send_rx_ring_cfg_ll(struct htt_struct *htt)
 	return 0;
 }
 
-int ath10k_htt_mgmt_tx(struct htt_struct *htt, struct sk_buff *msdu)
+int ath10k_htt_mgmt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
 {
 	struct device *dev = htt->ar->dev;
 	struct ath10k_skb_cb *skb_cb;
@@ -263,7 +263,7 @@ err:
 	return res;
 }
 
-int ath10k_htt_tx(struct htt_struct *htt, struct sk_buff *msdu)
+int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
 {
 	struct device *dev = htt->ar->dev;
 	struct htt_cmd *cmd;
diff --git a/drivers/net/wireless/ath/ath10k/txrx.c b/drivers/net/wireless/ath/ath10k/txrx.c
index 6a66dc2..8a16b63 100644
--- a/drivers/net/wireless/ath/ath10k/txrx.c
+++ b/drivers/net/wireless/ath/ath10k/txrx.c
@@ -44,7 +44,7 @@ out:
 	spin_unlock_bh(&ar->data_lock);
 }
 
-void ath10k_txrx_tx_unref(struct htt_struct *htt, struct sk_buff *txdesc)
+void ath10k_txrx_tx_unref(struct ath10k_htt *htt, struct sk_buff *txdesc)
 {
 	struct device *dev = htt->ar->dev;
 	struct ieee80211_tx_info *info;
@@ -99,7 +99,7 @@ exit:
 	dev_kfree_skb_any(txdesc);
 }
 
-void ath10k_txrx_tx_completed(struct htt_struct *htt,
+void ath10k_txrx_tx_completed(struct ath10k_htt *htt,
 			      const struct htt_tx_done *tx_done)
 {
 	struct sk_buff *txdesc;
@@ -351,7 +351,7 @@ int ath10k_wait_for_peer_deleted(struct ath10k *ar, int vdev_id, const u8 *addr)
 	return ath10k_wait_for_peer_common(ar, vdev_id, addr, false);
 }
 
-void ath10k_peer_map_event(struct htt_struct *htt,
+void ath10k_peer_map_event(struct ath10k_htt *htt,
 			   struct htt_peer_map_event *ev)
 {
 	struct ath10k *ar = htt->ar;
@@ -378,7 +378,7 @@ exit:
 	spin_unlock_bh(&ar->data_lock);
 }
 
-void ath10k_peer_unmap_event(struct htt_struct *htt,
+void ath10k_peer_unmap_event(struct ath10k_htt *htt,
 			     struct htt_peer_unmap_event *ev)
 {
 	struct ath10k *ar = htt->ar;
diff --git a/drivers/net/wireless/ath/ath10k/txrx.h b/drivers/net/wireless/ath/ath10k/txrx.h
index 05bf9d8..8d08c4f 100644
--- a/drivers/net/wireless/ath/ath10k/txrx.h
+++ b/drivers/net/wireless/ath/ath10k/txrx.h
@@ -19,8 +19,8 @@
 
 #include "htt.h"
 
-void ath10k_txrx_tx_unref(struct htt_struct *htt, struct sk_buff *txdesc);
-void ath10k_txrx_tx_completed(struct htt_struct *htt,
+void ath10k_txrx_tx_unref(struct ath10k_htt *htt, struct sk_buff *txdesc);
+void ath10k_txrx_tx_completed(struct ath10k_htt *htt,
 			      const struct htt_tx_done *tx_done);
 void ath10k_process_rx(struct ath10k *ar, struct htt_rx_info *info);
 
@@ -29,9 +29,9 @@ struct ath10k_peer *ath10k_peer_find(struct ath10k *ar, int vdev_id,
 int ath10k_wait_for_peer_created(struct ath10k *ar, int vdev_id, const u8 *addr);
 int ath10k_wait_for_peer_deleted(struct ath10k *ar, int vdev_id, const u8 *addr);
 
-void ath10k_peer_map_event(struct htt_struct *htt,
+void ath10k_peer_map_event(struct ath10k_htt *htt,
 			   struct htt_peer_map_event *ev);
-void ath10k_peer_unmap_event(struct htt_struct *htt,
+void ath10k_peer_unmap_event(struct ath10k_htt *htt,
 			     struct htt_peer_unmap_event *ev);
 
 #endif
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH v2 2/6] ath10k: fix code style
  2013-04-23  8:02   ` [ath9k-devel] [PATCH v2 " Michal Kazior
  2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 1/6] ath10k: rename htt_struct Michal Kazior
@ 2013-04-23  8:02     ` Michal Kazior
  2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 3/6] ath10k: fix code style of handling errors Michal Kazior
                       ` (4 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Michal Kazior @ 2013-04-23  8:02 UTC (permalink / raw)
  To: ath9k-devel

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/htt.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt.c b/drivers/net/wireless/ath/ath10k/htt.c
index b172321..036e2b8 100644
--- a/drivers/net/wireless/ath/ath10k/htt.c
+++ b/drivers/net/wireless/ath/ath10k/htt.c
@@ -73,7 +73,7 @@ struct ath10k_htt *ath10k_htt_attach(struct ath10k *ar, struct ath10k_htc *htc)
 
 	htt = kzalloc(sizeof(*htt), GFP_KERNEL);
 	if (!htt)
-		goto fail1;
+		return NULL;
 
 	htt->ar = ar;
 	htt->htc = htc;
@@ -86,12 +86,12 @@ struct ath10k_htt *ath10k_htt_attach(struct ath10k *ar, struct ath10k_htc *htc)
 	 * message to the target.
 	 */
 	if (ath10k_htt_htc_attach(htt))
-		goto fail2;
+		goto err_htc_attach;
 
 	ath10k_htt_tx_attach(htt);
 
 	if (ath10k_htt_rx_attach(htt))
-		goto fail3;
+		goto err_rx_attach;
 
 	/*
 	 * Prefetch enough data to satisfy target
@@ -107,11 +107,10 @@ struct ath10k_htt *ath10k_htt_attach(struct ath10k *ar, struct ath10k_htc *htc)
 
 	return htt;
 
-fail3:
+err_rx_attach:
 	ath10k_htt_tx_detach(htt);
-fail2:
+err_htc_attach:
 	kfree(htt);
-fail1:
 	return NULL;
 }
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH v2 3/6] ath10k: fix code style of handling errors
  2013-04-23  8:02   ` [ath9k-devel] [PATCH v2 " Michal Kazior
  2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 1/6] ath10k: rename htt_struct Michal Kazior
  2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 2/6] ath10k: fix code style Michal Kazior
@ 2013-04-23  8:02     ` Michal Kazior
  2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 4/6] ath10k: fix code style a little Michal Kazior
                       ` (3 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Michal Kazior @ 2013-04-23  8:02 UTC (permalink / raw)
  To: ath9k-devel

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/mac.c |   17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 60855fb..8de8b3c 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -96,11 +96,9 @@ static int ath10k_install_key(struct ath10k_vif *arvif,
 
 	ret = wait_for_completion_timeout(&ar->install_key_done, 3*HZ);
 	if (ret == 0)
-		ret = -ETIMEDOUT;
-	if (ret > 0)
-		ret = 0;
+		return -ETIMEDOUT;
 
-	return ret;
+	return 0;
 }
 
 static int ath10k_install_peer_wep_keys(struct ath10k_vif *arvif,
@@ -359,12 +357,9 @@ static inline int ath10k_vdev_setup_sync(struct ath10k *ar)
 	ret = wait_for_completion_timeout(&ar->vdev_setup_done,
 					  ATH10K_VDEV_SETUP_TIMEOUT_HZ);
 	if (ret == 0)
-		ret = -ETIMEDOUT;
-
-	if (ret > 0)
-		ret = 0; /* success */
+		return -ETIMEDOUT;
 
-	return ret;
+	return 0;
 }
 
 static int ath10k_vdev_start(struct ath10k_vif *arvif)
@@ -1420,7 +1415,7 @@ static void ath10k_abort_scan(struct ath10k *ar)
 
 	ret = wait_for_completion_timeout(&ar->scan.completed, 3*HZ);
 	if (ret == 0)
-		ret = -ETIMEDOUT;
+		ath10k_warn("timed out while waiting for scan to stop\n");
 
 	spin_lock_bh(&ar->data_lock);
 	if (ar->scan.in_progress) {
@@ -1448,8 +1443,6 @@ static int ath10k_start_scan(struct ath10k *ar,
 
 	ret = wait_for_completion_timeout(&ar->scan.started, 1*HZ);
 	if (ret == 0)
-		ret = -ETIMEDOUT;
-	if (ret < 0)
 		return ret;
 
 	/* the scan can complete earlier, before we even
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH v2 4/6] ath10k: fix code style a little
  2013-04-23  8:02   ` [ath9k-devel] [PATCH v2 " Michal Kazior
                       ` (2 preceding siblings ...)
  2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 3/6] ath10k: fix code style of handling errors Michal Kazior
@ 2013-04-23  8:02     ` Michal Kazior
  2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 5/6] ath10k: cleanup tx/rx mode handling Michal Kazior
                       ` (2 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Michal Kazior @ 2013-04-23  8:02 UTC (permalink / raw)
  To: ath9k-devel

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/mac.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 8de8b3c..6291935 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -186,12 +186,14 @@ static int ath10k_clear_vdev_key(struct ath10k_vif *arvif,
 		spin_lock_bh(&ar->data_lock);
 		i = 0;
 		list_for_each_entry(peer, &ar->peers, list) {
-			for (i = 0; i < ARRAY_SIZE(peer->keys); i++)
+			for (i = 0; i < ARRAY_SIZE(peer->keys); i++) {
 				if (peer->keys[i] == key) {
 					memcpy(addr, peer->addr, ETH_ALEN);
 					peer->keys[i] = NULL;
 					break;
 				}
+			}
+
 			if (i < ARRAY_SIZE(peer->keys))
 				break;
 		}
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH v2 5/6] ath10k: cleanup tx/rx mode handling
  2013-04-23  8:02   ` [ath9k-devel] [PATCH v2 " Michal Kazior
                       ` (3 preceding siblings ...)
  2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 4/6] ath10k: fix code style a little Michal Kazior
@ 2013-04-23  8:02     ` Michal Kazior
  2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 6/6] ath10k: cleanup hw init-related code Michal Kazior
  2013-04-24 10:35     ` [ath9k-devel] [PATCH v2 0/6] ath10k: cleanups Kalle Valo
  6 siblings, 0 replies; 19+ messages in thread
From: Michal Kazior @ 2013-04-23  8:02 UTC (permalink / raw)
  To: ath9k-devel

Up until now we were thinking we're using raw tx
but in fact we were using native wifi tx. The
htt_pkt_type was wrongly assumed to be a bitshift.

The ath10k_hw_txrx_mode is the correct definition
of both tx/rx mode.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/htt.h    |    8 --------
 drivers/net/wireless/ath/ath10k/htt_tx.c |    2 +-
 drivers/net/wireless/ath/ath10k/hw.h     |   16 ++++++++++++++--
 3 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h
index 6415af0..1b62064 100644
--- a/drivers/net/wireless/ath/ath10k/htt.h
+++ b/drivers/net/wireless/ath/ath10k/htt.h
@@ -59,14 +59,6 @@ struct htt_ver_req {
 	u8 pad[sizeof(u32) - sizeof(struct htt_cmd_hdr)];
 } __packed;
 
-enum htt_pkt_type {
-	HTT_PKT_TYPE_RAW         = 1 << 0,
-	HTT_PKT_TYPE_NATIVE_WIFI = 1 << 1,
-	HTT_PKT_TYPE_ETHERNET    = 1 << 2,
-
-	HTT_PKT_TYPE_COUNT  /* keep this last */
-};
-
 /*
  * HTT tx MSDU descriptor
  *
diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
index 0ceaf02..11737c3 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -351,7 +351,7 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
 	if (!ieee80211_has_protected(hdr->frame_control))
 		flags0 |= HTT_DATA_TX_DESC_FLAGS0_NO_ENCRYPT;
 	flags0 |= HTT_DATA_TX_DESC_FLAGS0_MAC_HDR_PRESENT;
-	flags0 |= SM(HTT_PKT_TYPE_RAW, HTT_DATA_TX_DESC_FLAGS0_PKT_TYPE);
+	flags0 |= SM(ATH10K_HW_TXRX_NATIVE_WIFI, HTT_DATA_TX_DESC_FLAGS0_PKT_TYPE);
 
 	flags1  = 0;
 	flags1 |= SM((u16)vdev_id, HTT_DATA_TX_DESC_FLAGS1_VDEV_ID);
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index 82465a8..01ef0f3 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -42,6 +42,19 @@
 #define AR9888_HW_2_0_BOARD_DATA_FILE	"board.bin"
 #define AR9888_HW_2_0_PATCH_LOAD_ADDR	0x1234
 
+/* Known pecularities:
+ *  - current FW doesn't support raw rx mode (last tested v599)
+ *  - current FW dumps upon raw tx mode (last tested v599)
+ *  - raw appears in nwifi decap, raw and nwifi appear in ethernet decap
+ *  - raw have FCS, nwifi doesn't
+ *  - ethernet frames have 802.11 header decapped and parts (base hdr, cipher
+ *    param, llc/snap) are aligned to 4byte boundaries each */
+enum ath10k_hw_txrx_mode {
+	ATH10K_HW_TXRX_RAW = 0,
+	ATH10K_HW_TXRX_NATIVE_WIFI = 1,
+	ATH10K_HW_TXRX_ETHERNET = 2,
+};
+
 #define TARGET_NUM_VDEV				8
 #define TARGET_NUM_PEER_AST			2
 #define TARGET_WDS_ENTRIES			32
@@ -56,8 +69,7 @@
 #define TARGET_RX_CHAIN_MASK			0x7
 #define TARGET_RX_TIMEOUT_LO_PRI		100
 #define TARGET_RX_TIMEOUT_HI_PRI		40
-#define TARGET_RX_DECAP_MODE			(0x2)
-#define TARGET_RX_DECAP_MODE_NWIFI		(0x1)
+#define TARGET_RX_DECAP_MODE			ATH10K_HW_TXRX_ETHERNET
 #define TARGET_SCAN_MAX_REQS			0x4
 #define TARGET_BMISS_OFFLOAD_MAX_VDEV		0x3
 #define TARGET_ROAM_OFFLOAD_MAX_VDEV		0x3
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH v2 6/6] ath10k: cleanup hw init-related code
  2013-04-23  8:02   ` [ath9k-devel] [PATCH v2 " Michal Kazior
                       ` (4 preceding siblings ...)
  2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 5/6] ath10k: cleanup tx/rx mode handling Michal Kazior
@ 2013-04-23  8:02     ` Michal Kazior
  2013-04-24 10:35     ` [ath9k-devel] [PATCH v2 0/6] ath10k: cleanups Kalle Valo
  6 siblings, 0 replies; 19+ messages in thread
From: Michal Kazior @ 2013-04-23  8:02 UTC (permalink / raw)
  To: ath9k-devel

We can't simply remove the macros from hw.h since
we depend on some of the values through the code.

Hopefully this commit makes it easier to
understand the code anyway.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/hw.h  |   30 ++++++++++-------
 drivers/net/wireless/ath/ath10k/wmi.c |   60 ++++++++++++++++-----------------
 drivers/net/wireless/ath/ath10k/wmi.h |    8 +++--
 3 files changed, 52 insertions(+), 46 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index 01ef0f3..758ef3a0a 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -55,32 +55,38 @@ enum ath10k_hw_txrx_mode {
 	ATH10K_HW_TXRX_ETHERNET = 2,
 };
 
-#define TARGET_NUM_VDEV				8
+enum ath10k_mcast2ucast_mode {
+	ATH10K_MCAST2UCAST_DISABLED = 0,
+	ATH10K_MCAST2UCAST_ENABLED = 1,
+};
+
+#define TARGET_NUM_VDEVS			8
 #define TARGET_NUM_PEER_AST			2
-#define TARGET_WDS_ENTRIES			32
+#define TARGET_NUM_WDS_ENTRIES			32
 #define TARGET_DMA_BURST_SIZE			0
 #define TARGET_MAC_AGGR_DELIM			0
 #define TARGET_AST_SKID_LIMIT			16
 #define TARGET_NUM_PEERS			16
 #define TARGET_NUM_OFFLOAD_PEERS		0
 #define TARGET_NUM_PEER_KEYS			2
-#define TARGET_NUM_TIDS	(2 * (TARGET_NUM_PEERS + TARGET_NUM_VDEV))
-#define TARGET_TX_CHAIN_MASK			0x7
-#define TARGET_RX_CHAIN_MASK			0x7
+#define TARGET_NUM_TIDS				(2 * ((TARGET_NUM_PEERS) + (TARGET_NUM_VDEVS)))
+#define TARGET_TX_CHAIN_MASK			(BIT(0) | BIT(1) | BIT(2))
+#define TARGET_RX_CHAIN_MASK			(BIT(0) | BIT(1) | BIT(2))
 #define TARGET_RX_TIMEOUT_LO_PRI		100
 #define TARGET_RX_TIMEOUT_HI_PRI		40
 #define TARGET_RX_DECAP_MODE			ATH10K_HW_TXRX_ETHERNET
-#define TARGET_SCAN_MAX_REQS			0x4
-#define TARGET_BMISS_OFFLOAD_MAX_VDEV		0x3
-#define TARGET_ROAM_OFFLOAD_MAX_VDEV		0x3
-#define TARGET_ROAM_OFFLOAD_MAX_PROFILES	0x8
-#define TARGET_GTK_OFFLOAD_MAX_VDEV		0x3
+#define TARGET_SCAN_MAX_PENDING_REQS		4
+#define TARGET_BMISS_OFFLOAD_MAX_VDEV		3
+#define TARGET_ROAM_OFFLOAD_MAX_VDEV		3
+#define TARGET_ROAM_OFFLOAD_MAX_AP_PROFILES	8
+#define TARGET_GTK_OFFLOAD_MAX_VDEV		3
 #define TARGET_NUM_MCAST_GROUPS			0
 #define TARGET_NUM_MCAST_TABLE_ELEMS		0
-#define TARGET_MCAST2UCAST_MODE			0 /* disabled */
-#define TARGET_TX_DBG_LOG_SIZE			1024 /* bytes */
+#define TARGET_MCAST2UCAST_MODE			ATH10K_MCAST2UCAST_DISABLED
+#define TARGET_TX_DBG_LOG_SIZE			1024
 #define TARGET_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 0
 #define TARGET_VOW_CONFIG			0
 #define TARGET_NUM_MSDU_DESC			(1024 + 400)
+#define TARGET_MAX_FRAG_ENTRIES			0
 
 #endif /* _HW_H_ */
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 3de4bb2..b6048c1 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -1232,37 +1232,35 @@ int ath10k_wmi_cmd_init(struct ath10k *ar)
 	struct wmi_init_cmd *cmd;
 	struct sk_buff *buf;
 	struct wmi_resource_config config = {
-		__cpu_to_le32(TARGET_NUM_VDEV),
-		/* reserve an additional peer for each VDEV */
-		__cpu_to_le32(TARGET_NUM_PEERS + TARGET_NUM_VDEV),
-		__cpu_to_le32(TARGET_NUM_OFFLOAD_PEERS),
-		__cpu_to_le32(TARGET_NUM_PEER_KEYS),
-		__cpu_to_le32(TARGET_NUM_TIDS),
-		__cpu_to_le32(TARGET_AST_SKID_LIMIT),
-		__cpu_to_le32(TARGET_TX_CHAIN_MASK),
-		__cpu_to_le32(TARGET_RX_CHAIN_MASK),
-		{
-			__cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI),
-			__cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI),
-			__cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI),
-			__cpu_to_le32(TARGET_RX_TIMEOUT_HI_PRI)
-		},
-		__cpu_to_le32(TARGET_RX_DECAP_MODE),
-		__cpu_to_le32(TARGET_SCAN_MAX_REQS),
-		__cpu_to_le32(TARGET_BMISS_OFFLOAD_MAX_VDEV),
-		__cpu_to_le32(TARGET_ROAM_OFFLOAD_MAX_VDEV),
-		__cpu_to_le32(TARGET_ROAM_OFFLOAD_MAX_PROFILES),
-		__cpu_to_le32(TARGET_NUM_MCAST_GROUPS),
-		__cpu_to_le32(TARGET_NUM_MCAST_TABLE_ELEMS),
-		__cpu_to_le32(TARGET_MCAST2UCAST_MODE),
-		__cpu_to_le32(TARGET_TX_DBG_LOG_SIZE),
-		__cpu_to_le32(TARGET_WDS_ENTRIES),
-		__cpu_to_le32(TARGET_DMA_BURST_SIZE),
-		__cpu_to_le32(TARGET_MAC_AGGR_DELIM),
-		__cpu_to_le32(TARGET_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK),
-		__cpu_to_le32(TARGET_VOW_CONFIG),
-		__cpu_to_le32(TARGET_GTK_OFFLOAD_MAX_VDEV),
-		__cpu_to_le32(TARGET_NUM_MSDU_DESC)
+		.num_vdevs = __cpu_to_le32(TARGET_NUM_VDEVS),
+		.num_peers = __cpu_to_le32(TARGET_NUM_PEERS + TARGET_NUM_VDEVS),
+		.num_offload_peers = __cpu_to_le32(TARGET_NUM_OFFLOAD_PEERS),
+		.num_peer_keys = __cpu_to_le32(TARGET_NUM_PEER_KEYS),
+		.num_tids = __cpu_to_le32(TARGET_NUM_TIDS),
+		.ast_skid_limit = __cpu_to_le32(TARGET_AST_SKID_LIMIT),
+		.tx_chain_mask = __cpu_to_le32(TARGET_TX_CHAIN_MASK),
+		.rx_chain_mask = __cpu_to_le32(TARGET_RX_CHAIN_MASK),
+		.rx_timeout_pri_vo = __cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI),
+		.rx_timeout_pri_vi = __cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI),
+		.rx_timeout_pri_be = __cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI),
+		.rx_timeout_pri_bk = __cpu_to_le32(TARGET_RX_TIMEOUT_HI_PRI),
+		.rx_decap_mode = __cpu_to_le32(TARGET_RX_DECAP_MODE),
+		.scan_max_pending_reqs = __cpu_to_le32(TARGET_SCAN_MAX_PENDING_REQS),
+		.bmiss_offload_max_vdev = __cpu_to_le32(TARGET_BMISS_OFFLOAD_MAX_VDEV),
+		.roam_offload_max_vdev = __cpu_to_le32(TARGET_ROAM_OFFLOAD_MAX_VDEV),
+		.roam_offload_max_ap_profiles = __cpu_to_le32(TARGET_ROAM_OFFLOAD_MAX_AP_PROFILES),
+		.num_mcast_groups = __cpu_to_le32(TARGET_NUM_MCAST_GROUPS),
+		.num_mcast_table_elems = __cpu_to_le32(TARGET_NUM_MCAST_TABLE_ELEMS),
+		.mcast2ucast_mode = __cpu_to_le32(TARGET_MCAST2UCAST_MODE),
+		.tx_dbg_log_size = __cpu_to_le32(TARGET_TX_DBG_LOG_SIZE),
+		.num_wds_entries = __cpu_to_le32(TARGET_NUM_WDS_ENTRIES),
+		.dma_burst_size = __cpu_to_le32(TARGET_DMA_BURST_SIZE),
+		.mac_aggr_delim = __cpu_to_le32(TARGET_MAC_AGGR_DELIM),
+		.rx_skip_defrag_timeout_dup_detection_check = __cpu_to_le32(TARGET_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK),
+		.vow_config = __cpu_to_le32(TARGET_VOW_CONFIG),
+		.gtk_offload_max_vdev = __cpu_to_le32(TARGET_GTK_OFFLOAD_MAX_VDEV),
+		.num_msdu_desc = __cpu_to_le32(TARGET_NUM_MSDU_DESC),
+		.max_frag_entries = __cpu_to_le32(TARGET_MAX_FRAG_ENTRIES),
 	};
 
 	buf = ath10k_wmi_alloc_skb(sizeof(*cmd));
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index 2bb8f0a..50f94a3 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -798,7 +798,10 @@ struct wmi_resource_config {
 	 *   This parameter specifies the timeout in milliseconds for each
 	 *   class.
 	 */
-	__le32 rx_timeout_pri[4];
+	__le32 rx_timeout_pri_vi;
+	__le32 rx_timeout_pri_vo;
+	__le32 rx_timeout_pri_be;
+	__le32 rx_timeout_pri_bk;
 
 	/*
 	 * what mode the rx should decap packets to
@@ -810,7 +813,7 @@ struct wmi_resource_config {
 	__le32 rx_decap_mode;
 
 	/* what is the maximum scan requests than can be queued */
-	__le32 scan_max_pending_req;
+	__le32 scan_max_pending_reqs;
 
 	/* maximum VDEV that could use BMISS offload */
 	__le32 bmiss_offload_max_vdev;
@@ -866,7 +869,6 @@ struct wmi_resource_config {
 	 */
 	__le32 mcast2ucast_mode;
 
-
 	/*
 	 * how much memory to allocate for a tx PPDU dbg log
 	 *
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH v2 0/6] ath10k: cleanups
  2013-04-23  8:02   ` [ath9k-devel] [PATCH v2 " Michal Kazior
                       ` (5 preceding siblings ...)
  2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 6/6] ath10k: cleanup hw init-related code Michal Kazior
@ 2013-04-24 10:35     ` Kalle Valo
  2013-04-24 10:56       ` Michal Kazior
  2013-04-24 11:00       ` Kalle Valo
  6 siblings, 2 replies; 19+ messages in thread
From: Kalle Valo @ 2013-04-24 10:35 UTC (permalink / raw)
  To: ath9k-devel

Michal Kazior <michal.kazior@tieto.com> writes:

> Rebased on the tip of master branch.
>
> Michal Kazior (6):
>   ath10k: rename htt_struct
>   ath10k: fix code style
>   ath10k: fix code style of handling errors
>   ath10k: fix code style a little
>   ath10k: cleanup tx/rx mode handling
>   ath10k: cleanup hw init-related code

Thanks, applied. Patch 6 had conflicts, please check.

BTW, 3-way merge didn't work:

Applying: ath10k: cleanup hw init-related code
fatal: sha1 information is lacking or useless
(drivers/net/wireless/ath/ath10k/hw.h).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0006 ath10k: cleanup hw init-related code

Are you sure you don't have any custom patches as parent of the patchset
you are submitting? Or do you submit patches somehow differently?

The thing is that I really would like the patches have proper sha1
information. It makes my life so much easier.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH v2 0/6] ath10k: cleanups
  2013-04-24 10:35     ` [ath9k-devel] [PATCH v2 0/6] ath10k: cleanups Kalle Valo
@ 2013-04-24 10:56       ` Michal Kazior
  2013-04-24 11:08         ` Kalle Valo
  2013-04-24 11:00       ` Kalle Valo
  1 sibling, 1 reply; 19+ messages in thread
From: Michal Kazior @ 2013-04-24 10:56 UTC (permalink / raw)
  To: ath9k-devel

On 24/04/13 12:35, Kalle Valo wrote:
> Michal Kazior <michal.kazior@tieto.com> writes:
>
>> Rebased on the tip of master branch.
>>
>> Michal Kazior (6):
>>    ath10k: rename htt_struct
>>    ath10k: fix code style
>>    ath10k: fix code style of handling errors
>>    ath10k: fix code style a little
>>    ath10k: cleanup tx/rx mode handling
>>    ath10k: cleanup hw init-related code
>
> Thanks, applied. Patch 6 had conflicts, please check.

Patch 6 is incomplete. I'll send a follow up patch to fix it.


> BTW, 3-way merge didn't work:
>
> Applying: ath10k: cleanup hw init-related code
> fatal: sha1 information is lacking or useless
> (drivers/net/wireless/ath/ath10k/hw.h).
> Repository lacks necessary blobs to fall back on 3-way merge.
> Cannot fall back to three-way merge.
> Patch failed at 0006 ath10k: cleanup hw init-related code
>
> Are you sure you don't have any custom patches as parent of the patchset
> you are submitting? Or do you submit patches somehow differently?

I try to send patchsets rebased upon github master branch. Some 
patchsets have subtle dependencies between each other and I didn't 
rebase those (since there would be conflicts anyways). I'll rebase 
everything from now on.


-- Pozdrawiam / Best regards, Michal Kazior.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH v2 0/6] ath10k: cleanups
  2013-04-24 10:35     ` [ath9k-devel] [PATCH v2 0/6] ath10k: cleanups Kalle Valo
  2013-04-24 10:56       ` Michal Kazior
@ 2013-04-24 11:00       ` Kalle Valo
  1 sibling, 0 replies; 19+ messages in thread
From: Kalle Valo @ 2013-04-24 11:00 UTC (permalink / raw)
  To: ath9k-devel

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

> Michal Kazior <michal.kazior@tieto.com> writes:
>
>> Rebased on the tip of master branch.
>>
>> Michal Kazior (6):
>>   ath10k: rename htt_struct
>>   ath10k: fix code style
>>   ath10k: fix code style of handling errors
>>   ath10k: fix code style a little
>>   ath10k: cleanup tx/rx mode handling
>>   ath10k: cleanup hw init-related code
>
> Thanks, applied. Patch 6 had conflicts, please check.

Doh, I missed few hunks. I pushed 'ath10k: fix conflict error' now to
fix that. Please double check that everything is ok.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [ath9k-devel] [PATCH v2 0/6] ath10k: cleanups
  2013-04-24 10:56       ` Michal Kazior
@ 2013-04-24 11:08         ` Kalle Valo
  0 siblings, 0 replies; 19+ messages in thread
From: Kalle Valo @ 2013-04-24 11:08 UTC (permalink / raw)
  To: ath9k-devel

Michal Kazior <michal.kazior@tieto.com> writes:

> On 24/04/13 12:35, Kalle Valo wrote:
>> Michal Kazior <michal.kazior@tieto.com> writes:
>>
>>> Rebased on the tip of master branch.
>>>
>>> Michal Kazior (6):
>>>    ath10k: rename htt_struct
>>>    ath10k: fix code style
>>>    ath10k: fix code style of handling errors
>>>    ath10k: fix code style a little
>>>    ath10k: cleanup tx/rx mode handling
>>>    ath10k: cleanup hw init-related code
>>
>> Thanks, applied. Patch 6 had conflicts, please check.
>
> Patch 6 is incomplete. I'll send a follow up patch to fix it.

Our emails crossed. I already pushed a patch to fix my error. Sorry
about that.

>> BTW, 3-way merge didn't work:
>>
>> Applying: ath10k: cleanup hw init-related code
>> fatal: sha1 information is lacking or useless
>> (drivers/net/wireless/ath/ath10k/hw.h).
>> Repository lacks necessary blobs to fall back on 3-way merge.
>> Cannot fall back to three-way merge.
>> Patch failed at 0006 ath10k: cleanup hw init-related code
>>
>> Are you sure you don't have any custom patches as parent of the patchset
>> you are submitting? Or do you submit patches somehow differently?
>
> I try to send patchsets rebased upon github master branch. Some
> patchsets have subtle dependencies between each other and I didn't
> rebase those (since there would be conflicts anyways). I'll rebase
> everything from now on.

Yeah, even if you know patches conflict it's still a lot easier for me
to handle the conflicts with 3-way merge than have useless sha1
informwation. 3-way merge is so good.

Of course in some cases depending on uncommitted patches is justified,
but even when it would be better to plan beforehand. For example, we
could freeze the tree, or something like that, just to avoid conflicts.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2013-04-24 11:08 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-19  9:35 [ath9k-devel] [PATCH 0/6] ath10k: cleanups Michal Kazior
2013-04-19  9:35 ` [ath9k-devel] [PATCH 1/6] ath10k: rename htt_struct Michal Kazior
2013-04-19  9:35 ` [ath9k-devel] [PATCH 2/6] ath10k: fix code style Michal Kazior
2013-04-19  9:35 ` [ath9k-devel] [PATCH 3/6] ath10k: fix code style of handling errors Michal Kazior
2013-04-19  9:35 ` [ath9k-devel] [PATCH 4/6] ath10k: fix code style a little Michal Kazior
2013-04-19  9:35 ` [ath9k-devel] [PATCH 5/6] ath10k: cleanup tx/rx mode handling Michal Kazior
2013-04-19  9:35 ` [ath9k-devel] [PATCH 6/6] ath10k: cleanup hw init-related code Michal Kazior
2013-04-22  9:35 ` [ath9k-devel] [PATCH 0/6] ath10k: cleanups Kalle Valo
2013-04-23  8:02   ` [ath9k-devel] [PATCH v2 " Michal Kazior
2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 1/6] ath10k: rename htt_struct Michal Kazior
2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 2/6] ath10k: fix code style Michal Kazior
2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 3/6] ath10k: fix code style of handling errors Michal Kazior
2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 4/6] ath10k: fix code style a little Michal Kazior
2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 5/6] ath10k: cleanup tx/rx mode handling Michal Kazior
2013-04-23  8:02     ` [ath9k-devel] [PATCH v2 6/6] ath10k: cleanup hw init-related code Michal Kazior
2013-04-24 10:35     ` [ath9k-devel] [PATCH v2 0/6] ath10k: cleanups Kalle Valo
2013-04-24 10:56       ` Michal Kazior
2013-04-24 11:08         ` Kalle Valo
2013-04-24 11:00       ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.