Commit 640751ac authored by Maya Erez's avatar Maya Erez Committed by Kalle Valo
Browse files

wil6210: handle tx completions only if vring tx data is enabled



wil_vring_fini_tx is called in disconnect in order to free the
allocated vrings.
wil_vring_fini_tx is disabling the vring_tx_data before napi_synchronize
is called in order to avoid the tx handling of this vring, while
wil_vring_free is called only after napi finished the current handling
of the tx completed packets.
Due to that, in case of disconnect, wil6210_netdev_poll_tx can be called
when vring->va is not NULL but vring_tx_data[i]->enabled is already
disabled.

This patch checks vring_tx_data[i]->enabled in wil6210_netdev_poll_tx
to prevent handling of disabled vrings.

Signed-off-by: default avatarMaya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent c100c883
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2015 Qualcomm Atheros, Inc.
 * Copyright (c) 2012-2016 Qualcomm Atheros, Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
@@ -108,8 +108,9 @@ static int wil6210_netdev_poll_tx(struct napi_struct *napi, int budget)
	/* always process ALL Tx complete, regardless budget - it is fast */
	for (i = 0; i < WIL6210_MAX_TX_RINGS; i++) {
		struct vring *vring = &wil->vring_tx[i];
		struct vring_tx_data *txdata = &wil->vring_tx_data[i];

		if (!vring->va)
		if (!vring->va || !txdata->enabled)
			continue;

		tx_done += wil_tx_complete(wil, i);