All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] ath11k: removed duplicated functionality
@ 2019-06-24 17:08 Muna Sinada
  2019-06-24 17:08 ` [PATCH 2/5] ath11k: changed parameter from u8 * to struct sk_buff * Muna Sinada
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Muna Sinada @ 2019-06-24 17:08 UTC (permalink / raw)
  To: ath11k; +Cc: Muna Sinada

Removed duplicated functionality in ath11k_hal_desc_reo_parse_err() and
replaced with function call to ath11k_hal_rx_reo_entl_paddr_get().

Signed-off-by: Muna Sinada <msinada@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/hal_rx.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.c b/drivers/net/wireless/ath/ath11k/hal_rx.c
index 76b93f6c33cd..2d2d5cd5ea5f 100644
--- a/drivers/net/wireless/ath/ath11k/hal_rx.c
+++ b/drivers/net/wireless/ath/ath11k/hal_rx.c
@@ -351,12 +351,7 @@ int ath11k_hal_desc_reo_parse_err(struct ath11k_base *ab, u32 *rx_desc,
 		return -EINVAL;
 	}
 
-	*paddr = (((u64)FIELD_GET(BUFFER_ADDR_INFO1_ADDR,
-				  desc->buf_addr_info.info1)) << 32) |
-		FIELD_GET(BUFFER_ADDR_INFO0_ADDR,
-			  desc->buf_addr_info.info0);
-	*desc_bank = FIELD_GET(BUFFER_ADDR_INFO1_SW_COOKIE,
-			       desc->buf_addr_info.info1);
+	ath11k_hal_rx_reo_ent_paddr_get(ab, rx_desc, paddr, desc_bank);
 
 	return 0;
 }
-- 
2.7.4


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

* [PATCH 2/5] ath11k: changed parameter from u8 * to struct sk_buff *
  2019-06-24 17:08 [PATCH 1/5] ath11k: removed duplicated functionality Muna Sinada
@ 2019-06-24 17:08 ` Muna Sinada
  2019-06-24 17:08 ` [PATCH 3/5] ath11k: comments added to explain purpose Muna Sinada
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Muna Sinada @ 2019-06-24 17:08 UTC (permalink / raw)
  To: ath11k; +Cc: Muna Sinada

Changed ath11k_hal_rx_parse_mon_status() to take sk_buff pointer instead of
opaque u8 pointer. Removed variables that became unused.

Signed-off-by: Muna Sinada <msinada@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/dp_rx.c  | 10 ++--------
 drivers/net/wireless/ath/ath11k/hal_rx.c |  6 +++---
 drivers/net/wireless/ath/ath11k/hal_rx.h |  2 +-
 3 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index 41f6d4115e06..02195f506e7a 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -2406,8 +2406,7 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id,
 			trace_ath11k_htt_rxdesc(ar, skb->data, DP_RX_BUFFER_SIZE);
 		}
 
-		hal_status = ath11k_hal_rx_parse_mon_status(ab, &ppdu_info,
-							    (u8 *)skb->data);
+		hal_status = ath11k_hal_rx_parse_mon_status(ab, &ppdu_info, skb);
 
 		if (ppdu_info.peer_id == HAL_INVALID_PEERID ||
 		    hal_status != HAL_RX_MON_STATUS_PPDU_DONE) {
@@ -3843,8 +3842,6 @@ static inline void ath11k_dp_rx_mon_status_process_tlv(struct ath11k *ar,
 	struct ath11k_mon_data *pmon = (struct ath11k_mon_data *)&dp->mon_data;
 	struct hal_rx_mon_ppdu_info *ppdu_info;
 	struct sk_buff *status_skb;
-	u8 *rx_tlv;
-	u8 *rx_tlv_start;
 	u32 tlv_status = HAL_TLV_STATUS_BUF_DONE;
 	struct ath11k_pdev_mon_stats *rx_mon_stats;
 
@@ -3857,11 +3854,8 @@ static inline void ath11k_dp_rx_mon_status_process_tlv(struct ath11k *ar,
 	while (!skb_queue_empty(&pmon->rx_status_q)) {
 		status_skb = skb_dequeue(&pmon->rx_status_q);
 
-		rx_tlv = status_skb->data;
-		rx_tlv_start = rx_tlv;
-
 		tlv_status = ath11k_hal_rx_parse_mon_status(ar->ab, ppdu_info,
-							    rx_tlv);
+							    status_skb);
 		if (tlv_status == HAL_TLV_STATUS_PPDU_DONE) {
 			rx_mon_stats->status_ppdu_done++;
 			pmon->mon_ppdu_status = DP_PPDU_STATUS_DONE;
diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.c b/drivers/net/wireless/ath/ath11k/hal_rx.c
index 2d2d5cd5ea5f..3f59b8a75c2a 100644
--- a/drivers/net/wireless/ath/ath11k/hal_rx.c
+++ b/drivers/net/wireless/ath/ath11k/hal_rx.c
@@ -1156,13 +1156,13 @@ ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab,
 enum hal_rx_mon_status
 ath11k_hal_rx_parse_mon_status(struct ath11k_base *ab,
 			       struct hal_rx_mon_ppdu_info *ppdu_info,
-			       u8 *data)
+			       struct sk_buff *skb)
 {
 	struct hal_tlv_hdr *tlv;
 	enum hal_rx_mon_status hal_status = HAL_RX_MON_STATUS_BUF_DONE;
 	u16 tlv_tag;
 	u16 tlv_len;
-	u8 *ptr = data;
+	u8 *ptr = skb->data;
 
 	do {
 		tlv = (struct hal_tlv_hdr *)ptr;
@@ -1183,7 +1183,7 @@ ath11k_hal_rx_parse_mon_status(struct ath11k_base *ab,
 		ptr += tlv_len;
 		ptr = PTR_ALIGN(ptr, HAL_TLV_ALIGN);
 
-		if ((ptr - data) >= DP_RX_BUFFER_SIZE)
+		if ((ptr - skb->data) >= DP_RX_BUFFER_SIZE)
 			break;
 	} while (hal_status == HAL_RX_MON_STATUS_PPDU_NOT_DONE);
 
diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.h b/drivers/net/wireless/ath/ath11k/hal_rx.h
index bd6b8d2e9d5e..2c9b19194149 100644
--- a/drivers/net/wireless/ath/ath11k/hal_rx.h
+++ b/drivers/net/wireless/ath/ath11k/hal_rx.h
@@ -336,7 +336,7 @@ void ath11k_hal_rx_reo_ent_buf_paddr_get(void *rx_desc,
 enum hal_rx_mon_status
 ath11k_hal_rx_parse_mon_status(struct ath11k_base *ab,
 			       struct hal_rx_mon_ppdu_info *ppdu_info,
-			       u8 *data);
+			       struct sk_buff *skb);
 #define REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_0 0xDDBEEF
 #define REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_1 0xADBEEF
 #define REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_2 0xBDBEEF
-- 
2.7.4


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

* [PATCH 3/5] ath11k: comments added to explain purpose
  2019-06-24 17:08 [PATCH 1/5] ath11k: removed duplicated functionality Muna Sinada
  2019-06-24 17:08 ` [PATCH 2/5] ath11k: changed parameter from u8 * to struct sk_buff * Muna Sinada
@ 2019-06-24 17:08 ` Muna Sinada
  2019-06-24 17:09 ` [PATCH 4/5] ath11k: added RMB to return_buffer_manager description Muna Sinada
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Muna Sinada @ 2019-06-24 17:08 UTC (permalink / raw)
  To: ath11k; +Cc: Muna Sinada

Added comments for ath11k_hal_tx_desc_sync() and
ath11k_hal_tx_status_desc_sync() to explain their purpose.

Signed-off-by: Muna Sinada <msinada@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/hal_tx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/ath11k/hal_tx.c b/drivers/net/wireless/ath/ath11k/hal_tx.c
index 3c04ebe23c22..2b1789a260d2 100644
--- a/drivers/net/wireless/ath/ath11k/hal_tx.c
+++ b/drivers/net/wireless/ath/ath11k/hal_tx.c
@@ -73,12 +73,14 @@ void ath11k_hal_tx_cmd_desc_setup(struct ath11k_base *ab, void *cmd,
 				    ti->bss_ast_hash);
 }
 
+/* Commit the descriptor to hardware */
 void ath11k_hal_tx_desc_sync(void *tx_desc_cached, void *hw_desc)
 {
 	memcpy(hw_desc + sizeof(struct hal_tlv_hdr), tx_desc_cached,
 	       sizeof(struct hal_tcl_data_cmd));
 }
 
+/* Get the descriptor status from hardware */
 void ath11k_hal_tx_status_desc_sync(void *hw_desc, void *local_desc)
 {
 	memcpy(local_desc, hw_desc, HAL_TX_STATUS_DESC_LEN);
-- 
2.7.4


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

* [PATCH 4/5] ath11k: added RMB to return_buffer_manager description
  2019-06-24 17:08 [PATCH 1/5] ath11k: removed duplicated functionality Muna Sinada
  2019-06-24 17:08 ` [PATCH 2/5] ath11k: changed parameter from u8 * to struct sk_buff * Muna Sinada
  2019-06-24 17:08 ` [PATCH 3/5] ath11k: comments added to explain purpose Muna Sinada
@ 2019-06-24 17:09 ` Muna Sinada
  2019-06-24 17:09 ` [PATCH 5/5] ath11k: add hal dbg mask and utilized for hal stats Muna Sinada
  2019-06-25  2:36 ` [PATCH 1/5] ath11k: removed duplicated functionality Kalle Valo
  4 siblings, 0 replies; 6+ messages in thread
From: Muna Sinada @ 2019-06-24 17:09 UTC (permalink / raw)
  To: ath11k; +Cc: Muna Sinada

Added "(RBM)" to return_buffer_manager description to clarify what it
stands for when utilized.

Signed-off-by: Muna Sinada <msinada@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/hal_desc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/hal_desc.h b/drivers/net/wireless/ath/ath11k/hal_desc.h
index 32b8ccbd06f0..62741bf792c6 100644
--- a/drivers/net/wireless/ath/ath11k/hal_desc.h
+++ b/drivers/net/wireless/ath/ath11k/hal_desc.h
@@ -26,7 +26,7 @@ struct ath11k_buffer_addr {
  *		Address (upper 8 bits) of the msdu buffer or msdu extension
  *		descriptor or Link descriptor
  *
- * return_buffer_manager
+ * return_buffer_manager (RBM)
  *		Consumer: WBM
  *		Producer: SW/FW
  *		Indicates to which buffer manager the buffer or MSDU_EXTENSION
-- 
2.7.4


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

* [PATCH 5/5] ath11k: add hal dbg mask and utilized for hal stats
  2019-06-24 17:08 [PATCH 1/5] ath11k: removed duplicated functionality Muna Sinada
                   ` (2 preceding siblings ...)
  2019-06-24 17:09 ` [PATCH 4/5] ath11k: added RMB to return_buffer_manager description Muna Sinada
@ 2019-06-24 17:09 ` Muna Sinada
  2019-06-25  2:36 ` [PATCH 1/5] ath11k: removed duplicated functionality Kalle Valo
  4 siblings, 0 replies; 6+ messages in thread
From: Muna Sinada @ 2019-06-24 17:09 UTC (permalink / raw)
  To: ath11k; +Cc: Muna Sinada

Added HAL debug mask. Replaced use of ath11k_info() in
ath11k_hal_reo_status_queue_stats() with ath11k_dbg(), which utilizes new
HAL debug mask.

Signed-off-by: Muna Sinada <msinada@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/debug.h  |  1 +
 drivers/net/wireless/ath/ath11k/hal_rx.c | 24 ++++++++++++------------
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/debug.h b/drivers/net/wireless/ath/ath11k/debug.h
index 13973d972169..4cfabed9d235 100644
--- a/drivers/net/wireless/ath/ath11k/debug.h
+++ b/drivers/net/wireless/ath/ath11k/debug.h
@@ -21,6 +21,7 @@ enum ath11k_debug_mask {
 	ATH11K_DBG_MGMT		= 0x00000100,
 	ATH11K_DBG_REG		= 0x00000200,
 	ATH11K_DBG_TESTMODE	= 0x00000400,
+	ATH11k_DBG_HAL		= 0x00000800,
 	ATH11K_DBG_ANY		= 0xffffffff,
 };
 
diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.c b/drivers/net/wireless/ath/ath11k/hal_rx.c
index 3f59b8a75c2a..fde25a186a20 100644
--- a/drivers/net/wireless/ath/ath11k/hal_rx.c
+++ b/drivers/net/wireless/ath/ath11k/hal_rx.c
@@ -482,30 +482,30 @@ void ath11k_hal_reo_status_queue_stats(struct ath11k_base *ab, u32 *reo_desc,
 				FIELD_GET(HAL_REO_STATUS_HDR_INFO0_EXEC_STATUS,
 					  desc->hdr.info0);
 
-	ath11k_info(ab, "Queue stats status:\n");
-	ath11k_info(ab, "header: cmd_num %d status %d\n",
+	ath11k_dbg(ab, ATH11k_DBG_HAL, "Queue stats status:\n");
+	ath11k_dbg(ab, ATH11k_DBG_HAL, "header: cmd_num %d status %d\n",
 		    status->uniform_hdr.cmd_num,
 		    status->uniform_hdr.cmd_status);
-	ath11k_info(ab, "ssn %ld cur_idx %ld\n",
+	ath11k_dbg(ab, ATH11k_DBG_HAL, "ssn %ld cur_idx %ld\n",
 		    FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO0_SSN,
 			      desc->info0),
 		    FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO0_CUR_IDX,
 			      desc->info0));
-	ath11k_info(ab, "pn = [%08x, %08x, %08x, %08x]\n",
+	ath11k_dbg(ab, ATH11k_DBG_HAL, "pn = [%08x, %08x, %08x, %08x]\n",
 		    desc->pn[0], desc->pn[1], desc->pn[2], desc->pn[3]);
-	ath11k_info(ab, "last_rx: enqueue_tstamp %08x dequeue_tstamp %08x\n",
+	ath11k_dbg(ab, ATH11k_DBG_HAL, "last_rx: enqueue_tstamp %08x dequeue_tstamp %08x\n",
 		    desc->last_rx_enqueue_timestamp,
 		    desc->last_rx_dequeue_timestamp);
-	ath11k_info(ab, "rx_bitmap [%08x %08x %08x %08x %08x %08x %08x %08x]\n",
+	ath11k_dbg(ab, ATH11k_DBG_HAL, "rx_bitmap [%08x %08x %08x %08x %08x %08x %08x %08x]\n",
 		    desc->rx_bitmap[0], desc->rx_bitmap[1], desc->rx_bitmap[2],
 		    desc->rx_bitmap[3], desc->rx_bitmap[4], desc->rx_bitmap[5],
 		    desc->rx_bitmap[6], desc->rx_bitmap[7]);
-	ath11k_info(ab, "count: cur_mpdu %ld cur_msdu %ld\n",
+	ath11k_dbg(ab, ATH11k_DBG_HAL, "count: cur_mpdu %ld cur_msdu %ld\n",
 		    FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO1_MPDU_COUNT,
 			      desc->info1),
 		    FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO1_MSDU_COUNT,
 			      desc->info1));
-	ath11k_info(ab, "fwd_timeout %ld fwd_bar %ld dup_count %ld\n",
+	ath11k_dbg(ab, ATH11k_DBG_HAL, "fwd_timeout %ld fwd_bar %ld dup_count %ld\n",
 		    FIELD_GET(
 			    HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_TIMEOUT_COUNT,
 			    desc->info2),
@@ -514,22 +514,22 @@ void ath11k_hal_reo_status_queue_stats(struct ath11k_base *ab, u32 *reo_desc,
 		    FIELD_GET(
 			   HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_DUPLICATE_COUNT,
 			   desc->info2));
-	ath11k_info(ab, "frames_in_order %ld bar_rcvd %ld\n",
+	ath11k_dbg(ab, ATH11k_DBG_HAL, "frames_in_order %ld bar_rcvd %ld\n",
 		    FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO3_FIO_COUNT,
 			      desc->info3),
 		    FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO3_BAR_RCVD_CNT,
 			      desc->info3));
-	ath11k_info(ab, "num_mpdus %d num_msdus %d total_bytes %d\n",
+	ath11k_dbg(ab, ATH11k_DBG_HAL, "num_mpdus %d num_msdus %d total_bytes %d\n",
 		    desc->num_mpdu_frames, desc->num_msdu_frames,
 		    desc->total_bytes);
-	ath11k_info(ab, "late_rcvd %ld win_jump_2k %ld hole_cnt %ld\n",
+	ath11k_dbg(ab, ATH11k_DBG_HAL, "late_rcvd %ld win_jump_2k %ld hole_cnt %ld\n",
 		    FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_LATE_RX_MPDU,
 			      desc->info4),
 		    FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_WINDOW_JMP2K,
 			      desc->info4),
 		    FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_HOLE_COUNT,
 			      desc->info4));
-	ath11k_info(ab, "looping count %ld\n",
+	ath11k_dbg(ab, ATH11k_DBG_HAL, "looping count %ld\n",
 		    FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO5_LOOPING_CNT,
 			      desc->info5));
 }
-- 
2.7.4


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

* Re: [PATCH 1/5] ath11k: removed duplicated functionality
  2019-06-24 17:08 [PATCH 1/5] ath11k: removed duplicated functionality Muna Sinada
                   ` (3 preceding siblings ...)
  2019-06-24 17:09 ` [PATCH 5/5] ath11k: add hal dbg mask and utilized for hal stats Muna Sinada
@ 2019-06-25  2:36 ` Kalle Valo
  4 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2019-06-25  2:36 UTC (permalink / raw)
  To: Muna Sinada; +Cc: ath11k

Muna Sinada <msinada@codeaurora.org> wrote:

> Removed duplicated functionality in ath11k_hal_desc_reo_parse_err() and
> replaced with function call to ath11k_hal_rx_reo_entl_paddr_get().
> 
> Signed-off-by: Muna Sinada <msinada@codeaurora.org>

Does not apply and sha1 information is incorrect. Remember to use
ath11k-bringup branch as baseline AND no extra patches applied.

Applying: ath11k: removed duplicated functionality
Applying: ath11k: changed parameter from u8 * to struct sk_buff *
fatal: sha1 information is lacking or useless (drivers/net/wireless/ath/ath11k/dp_rx.c).
error: could not build fake ancestor
Patch failed at 0002 ath11k: changed parameter from u8 * to struct sk_buff *

5 patches set to Changes Requested.

11013825 [1/5] ath11k: removed duplicated functionality
11013827 [2/5] ath11k: changed parameter from u8 * to struct sk_buff *
11013829 [3/5] ath11k: comments added to explain purpose
11013831 [4/5] ath11k: added RMB to return_buffer_manager description
11013833 [5/5] ath11k: add hal dbg mask and utilized for hal stats

-- 
https://patchwork.kernel.org/patch/11013825/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

end of thread, other threads:[~2019-06-25  2:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 17:08 [PATCH 1/5] ath11k: removed duplicated functionality Muna Sinada
2019-06-24 17:08 ` [PATCH 2/5] ath11k: changed parameter from u8 * to struct sk_buff * Muna Sinada
2019-06-24 17:08 ` [PATCH 3/5] ath11k: comments added to explain purpose Muna Sinada
2019-06-24 17:09 ` [PATCH 4/5] ath11k: added RMB to return_buffer_manager description Muna Sinada
2019-06-24 17:09 ` [PATCH 5/5] ath11k: add hal dbg mask and utilized for hal stats Muna Sinada
2019-06-25  2:36 ` [PATCH 1/5] ath11k: removed duplicated functionality 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.