wil6210: prevent usage of incorrect TX hwtail
authorMaya Erez <qca_merez@qca.qualcomm.com>
Thu, 18 Aug 2016 13:52:15 +0000 (16:52 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 19 Aug 2016 10:11:23 +0000 (13:11 +0300)
commitdc90506f145875b9d88160802cc5fe06a7c79dda
tree8efea004c80f8747ecadf612bb93720b7d61dd59
parentb0c0e688e523eba14abf21ac246b7dd88f5574fa
wil6210: prevent usage of incorrect TX hwtail

txdata->enabled is used in order to determine if the TX vring
is valid. As the data transmit is handled in a different context,
in case txdata->enabled is set before vring->hwtail is updated,
an old or corrupted vring->hwtail can be used.
Protect setting of txdata->enabled and vring->hwtail to prevent a
case where TX vring start handling TX packets before setting
vring->hwtail.

Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/wil6210/txrx.c