stm32/stm32f7 CANv1: protect TX buffer during CAN error frame generation

Follow up to eb240e0 (PR #8060)
This commit is contained in:
raiden00pl 2023-01-10 12:35:40 +01:00 committed by Xiang Xiao
parent 904624d73b
commit 88dd705d27
2 changed files with 6 additions and 0 deletions

View File

@ -1666,6 +1666,8 @@ static void stm32can_sceinterrupt_work(void *arg)
memcpy(frame->data, data, CAN_ERR_DLC);
net_lock();
/* Copy the buffer pointer to priv->dev.. Set amount of data
* in priv->dev.d_len
*/
@ -1687,6 +1689,7 @@ static void stm32can_sceinterrupt_work(void *arg)
*/
priv->dev.d_buf = (uint8_t *)priv->txdesc;
net_unlock();
}
/* Re-enable CAN SCE interrupts */

View File

@ -1690,6 +1690,8 @@ static void stm32can_sceinterrupt_work(void *arg)
memcpy(frame->data, data, CAN_ERR_DLC);
net_lock();
/* Copy the buffer pointer to priv->dev.. Set amount of data
* in priv->dev.d_len
*/
@ -1711,6 +1713,7 @@ static void stm32can_sceinterrupt_work(void *arg)
*/
priv->dev.d_buf = (uint8_t *)priv->txdesc;
net_unlock();
}
/* Re-enable CAN SCE interrupts */