Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f56975ee authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "wil6210: increase the frequency of status ring hw tail update"

parents d3d6e9be d69f27c7
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -16,6 +16,10 @@
#include "trace.h"
#include "ipa.h"

/* Max number of entries (packets to complete) to update the hwtail of tx
 * status ring. Should be power of 2
 */
#define WIL_EDMA_TX_SRING_UPDATE_HW_TAIL 128
#define WIL_EDMA_MAX_DATA_OFFSET (2)
/* RX buffer size must be aligned to 4 bytes */
#define WIL_EDMA_RX_BUF_LEN_DEFAULT (2048)
@@ -1203,7 +1207,7 @@ int wil_tx_sring_handler(struct wil6210_priv *wil,
	struct wil_net_stats *stats;
	struct wil_tx_enhanced_desc *_d;
	unsigned int ring_id;
	unsigned int num_descs;
	unsigned int num_descs, num_statuses = 0;
	int i;
	u8 dr_bit; /* Descriptor Ready bit */
	struct wil_ring_tx_status msg;
@@ -1322,6 +1326,11 @@ int wil_tx_sring_handler(struct wil6210_priv *wil,
		}

again:
		num_statuses++;
		if (num_statuses % WIL_EDMA_TX_SRING_UPDATE_HW_TAIL == 0)
			/* update HW tail to allow HW to push new statuses */
			wil_w(wil, sring->hwtail, sring->swhead);

		wil_sring_advance_swhead(sring);

		wil_get_next_tx_status_msg(sring, &dr_bit, &msg);
@@ -1331,6 +1340,7 @@ int wil_tx_sring_handler(struct wil6210_priv *wil,
	if (desc_cnt)
		wil_update_net_queues(wil, vif, NULL, false);

	if (num_statuses % WIL_EDMA_TX_SRING_UPDATE_HW_TAIL != 0)
		/* Update the HW tail ptr (RD ptr) */
		wil_w(wil, sring->hwtail, (sring->swhead - 1) % sring->size);

+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
#define WIL_SRING_SIZE_ORDER_MAX	(WIL_RING_SIZE_ORDER_MAX)
/* RX sring order should be bigger than RX ring order */
#define WIL_RX_SRING_SIZE_ORDER_DEFAULT	(12)
#define WIL_TX_SRING_SIZE_ORDER_DEFAULT	(12)
#define WIL_TX_SRING_SIZE_ORDER_DEFAULT	(14)
#define WIL_RX_BUFF_ARR_SIZE_DEFAULT (2600)

#define WIL_RX_DESC_RING_ID 0