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

Commit f891c873 authored by Maya Erez's avatar Maya Erez Committed by Lior David
Browse files

wil6210: fix invalid sta statistics update



Upon status ring handling, in case there are both unicast and
multicast (cid == max) status messages to handle, wrong sta statistics
might get updated.
Fix this by setting stats to NULL upon invalid cid
(e.g. == WIL6210_MAX_CID).

Change-Id: I47c6c185dead561180742608d9ac318e70ed7bd2
Signed-off-by: default avatarDedy Lansky <dlansky@codeaurora.org>
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
Signed-off-by: default avatarLior David <liord@codeaurora.org>
parent 75aab666
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1149,7 +1149,7 @@ int wil_tx_sring_handler(struct wil6210_priv *wil,
	/* Total number of completed descriptors in all descriptor rings */
	int desc_cnt = 0;
	int cid;
	struct wil_net_stats *stats = NULL;
	struct wil_net_stats *stats;
	struct wil_tx_enhanced_desc *_d;
	unsigned int ring_id;
	unsigned int num_descs;
@@ -1199,8 +1199,7 @@ int wil_tx_sring_handler(struct wil6210_priv *wil,
		ndev = vif_to_ndev(vif);

		cid = wil->ring2cid_tid[ring_id][0];
		if (cid < WIL6210_MAX_CID)
			stats = &wil->sta[cid].stats;
		stats = (cid < WIL6210_MAX_CID ? &wil->sta[cid].stats : NULL);

		wil_dbg_txrx(wil,
			     "tx_status: completed desc_ring (%d), num_descs (%d)\n",