]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6eac271bea120e2d99cfbca3103bab66c54d0b70
tree8efea004c80f8747ecadf612bb93720b7d61dd59
parent521230e986d4a32efa2cc1834a40bd002eb1e049
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