Merge pull request #4864 from kaspar030/fix_encx24j600_isr_arg
drivers: net: fix isr_arg for encx24j600 and ethos
This commit is contained in:
commit
65caa15d0b
@ -101,7 +101,7 @@ static inline int _set_promiscous(netdev2_t *netdev, int value)
|
|||||||
static inline void _isr(netdev2_t *netdev)
|
static inline void _isr(netdev2_t *netdev)
|
||||||
{
|
{
|
||||||
if (netdev->event_callback) {
|
if (netdev->event_callback) {
|
||||||
netdev->event_callback(netdev, NETDEV2_EVENT_RX_COMPLETE, netdev->isr_arg);
|
netdev->event_callback(netdev, NETDEV2_EVENT_RX_COMPLETE, NULL);
|
||||||
}
|
}
|
||||||
#if DEVELHELP
|
#if DEVELHELP
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -178,7 +178,7 @@ static void _netdev2_cc110x_rx_callback(void *arg)
|
|||||||
netdev2_t *netdev2 = (netdev2_t*) arg;
|
netdev2_t *netdev2 = (netdev2_t*) arg;
|
||||||
cc110x_t *cc110x = &((netdev2_cc110x_t*) arg)->cc110x;
|
cc110x_t *cc110x = &((netdev2_cc110x_t*) arg)->cc110x;
|
||||||
gpio_irq_disable(cc110x->params.gdo2);
|
gpio_irq_disable(cc110x->params.gdo2);
|
||||||
netdev2->event_callback(netdev2, NETDEV2_EVENT_RX_COMPLETE, netdev2->isr_arg);
|
netdev2->event_callback(netdev2, NETDEV2_EVENT_RX_COMPLETE, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _isr(netdev2_t *dev)
|
static void _isr(netdev2_t *dev)
|
||||||
|
|||||||
@ -215,7 +215,7 @@ static void mac_set(enc28j60_t *dev, uint8_t *mac)
|
|||||||
static void on_int(void *arg)
|
static void on_int(void *arg)
|
||||||
{
|
{
|
||||||
netdev2_t *netdev = (netdev2_t *)arg;
|
netdev2_t *netdev = (netdev2_t *)arg;
|
||||||
netdev->event_callback(arg, NETDEV2_EVENT_ISR, NULL);
|
netdev->event_callback(arg, NETDEV2_EVENT_ISR, netdev->isr_arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nd_send(netdev2_t *netdev, const struct iovec *data, int count)
|
static int nd_send(netdev2_t *netdev, const struct iovec *data, int count)
|
||||||
|
|||||||
@ -101,7 +101,7 @@ static void encx24j600_isr(void *arg)
|
|||||||
gpio_irq_disable(dev->int_pin);
|
gpio_irq_disable(dev->int_pin);
|
||||||
|
|
||||||
/* call netdev2 hook */
|
/* call netdev2 hook */
|
||||||
dev->netdev.event_callback((netdev2_t*) dev, NETDEV2_EVENT_ISR, NULL);
|
dev->netdev.event_callback((netdev2_t*) dev, NETDEV2_EVENT_ISR, dev->isr_arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _isr(netdev2_t *netdev)
|
static void _isr(netdev2_t *netdev)
|
||||||
|
|||||||
@ -110,7 +110,7 @@ static void _end_of_frame(ethos_t *dev)
|
|||||||
case ETHOS_FRAME_TYPE_DATA:
|
case ETHOS_FRAME_TYPE_DATA:
|
||||||
if (dev->framesize) {
|
if (dev->framesize) {
|
||||||
dev->last_framesize = dev->framesize;
|
dev->last_framesize = dev->framesize;
|
||||||
dev->netdev.event_callback((netdev2_t*) dev, NETDEV2_EVENT_ISR, NULL);
|
dev->netdev.event_callback((netdev2_t*) dev, NETDEV2_EVENT_ISR, dev->netdev.isr_arg);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ETHOS_FRAME_TYPE_HELLO:
|
case ETHOS_FRAME_TYPE_HELLO:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user