forked from Minki/linux
staging: wfx: do not stop mac80211 queueing during tx_policy upload
When a new tx_policy has to be uploaded, it is necessary to avoid any race between the frame and the policy. So, the driver stops the tx queue during tx_policy upload. However, it is not necessary to stop mac80211 queuing. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200401110405.80282-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a6bdff3f62
commit
af9d2f79dc
@ -244,9 +244,7 @@ void wfx_tx_policy_upload_work(struct work_struct *work)
|
||||
container_of(work, struct wfx_vif, tx_policy_upload_work);
|
||||
|
||||
wfx_tx_policy_upload(wvif);
|
||||
|
||||
wfx_tx_unlock(wvif->wdev);
|
||||
wfx_tx_queues_unlock(wvif->wdev);
|
||||
}
|
||||
|
||||
void wfx_tx_policy_init(struct wfx_vif *wvif)
|
||||
@ -379,15 +377,9 @@ static u8 wfx_tx_get_rate_id(struct wfx_vif *wvif,
|
||||
dev_warn(wvif->wdev->dev, "unable to get a valid Tx policy");
|
||||
|
||||
if (tx_policy_renew) {
|
||||
/* FIXME: It's not so optimal to stop TX queues every now and
|
||||
* then. Better to reimplement task scheduling with a counter.
|
||||
*/
|
||||
wfx_tx_lock(wvif->wdev);
|
||||
wfx_tx_queues_lock(wvif->wdev);
|
||||
if (!schedule_work(&wvif->tx_policy_upload_work)) {
|
||||
wfx_tx_queues_unlock(wvif->wdev);
|
||||
if (!schedule_work(&wvif->tx_policy_upload_work))
|
||||
wfx_tx_unlock(wvif->wdev);
|
||||
}
|
||||
}
|
||||
return rate_id;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user