esp32s3/wlan: check if the network device's IOB isn't null

Before adding the upper layer network device's IOB to the TX queue
of the wireless driver, check if it isn't null.
This commit is contained in:
Tiago Medicci Serrano 2023-08-04 17:12:37 -03:00 committed by Alan Carvalho de Assis
parent ec4149c61d
commit 6589887284
1 changed files with 5 additions and 1 deletions

View File

@ -269,7 +269,11 @@ static void wlan_ipv6multicast(struct wlan_priv_s *priv);
static inline void wlan_cache_txpkt_tail(struct wlan_priv_s *priv)
{
iob_tryadd_queue(priv->dev.d_iob, &priv->txb);
if (priv->dev.d_iob)
{
iob_tryadd_queue(priv->dev.d_iob, &priv->txb);
}
netdev_iob_clear(&priv->dev);
}