net/arp and net/icmpv6: don't call d_txavail directly since it may point to NULL
This commit is contained in:
parent
f036e2a32a
commit
26ae4176f0
@ -342,16 +342,9 @@ int arp_send(in_addr_t ipaddr)
|
|||||||
state.snd_cb->priv = (FAR void *)&state;
|
state.snd_cb->priv = (FAR void *)&state;
|
||||||
state.snd_cb->event = arp_send_eventhandler;
|
state.snd_cb->event = arp_send_eventhandler;
|
||||||
|
|
||||||
/* Notify the device driver that new TX data is available.
|
/* Notify the device driver that new TX data is available. */
|
||||||
* NOTES: This is in essence what netdev_ipv4_txnotify() does, which
|
|
||||||
* is not possible to call since it expects a in_addr_t as
|
|
||||||
* its single argument to lookup the network interface.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (dev->d_txavail)
|
netdev_txnotify_dev(dev);
|
||||||
{
|
|
||||||
dev->d_txavail(dev);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Wait for the send to complete or an error to occur.
|
/* Wait for the send to complete or an error to occur.
|
||||||
* net_lockedwait will also terminate if a signal is received.
|
* net_lockedwait will also terminate if a signal is received.
|
||||||
|
@ -243,7 +243,7 @@ static int icmpv6_send_message(FAR struct net_driver_s *dev, bool advertise)
|
|||||||
|
|
||||||
/* Notify the device driver that new TX data is available. */
|
/* Notify the device driver that new TX data is available. */
|
||||||
|
|
||||||
dev->d_txavail(dev);
|
netdev_txnotify_dev(dev);
|
||||||
|
|
||||||
/* Wait for the send to complete or an error to occur
|
/* Wait for the send to complete or an error to occur
|
||||||
* net_lockedwait will also terminate if a signal is received.
|
* net_lockedwait will also terminate if a signal is received.
|
||||||
|
@ -349,7 +349,7 @@ int icmpv6_neighbor(const net_ipv6addr_t ipaddr)
|
|||||||
|
|
||||||
/* Notify the device driver that new TX data is available. */
|
/* Notify the device driver that new TX data is available. */
|
||||||
|
|
||||||
dev->d_txavail(dev);
|
netdev_txnotify_dev(dev);
|
||||||
|
|
||||||
/* Wait for the send to complete or an error to occur.
|
/* Wait for the send to complete or an error to occur.
|
||||||
* net_lockedwait will also terminate if a signal is received.
|
* net_lockedwait will also terminate if a signal is received.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user