Skip to content
Snippets Groups Projects
Commit 3ad19596 authored by Kaspar Schleiser's avatar Kaspar Schleiser
Browse files

drivers: netdev2: rename isr_arg

parent d7b17684
No related branches found
No related tags found
No related merge requests found
......@@ -101,11 +101,14 @@ typedef void (*netdev2_event_cb_t)(netdev2_t *dev, netdev2_event_t event);
*
* Supposed to be extended by driver implementations.
* The extended structure should contain all variable driver state.
*
* Contains a field @p context which is not used by the drivers, but supposed to
* be used by upper layers to store reference information.
*/
struct netdev2 {
const struct netdev2_driver *driver; /**< ptr to that driver's interface. */
netdev2_event_cb_t event_callback; /**< callback for device events */
void *isr_arg; /**< argument to pass on isr event */
void* context; /**< ptr to network stack context */
#ifdef MODULE_NETSTATS_L2
netstats_t stats; /**< transceiver's statistics */
#endif
......
......@@ -48,7 +48,7 @@ static void _pass_on_packet(gnrc_pktsnip_t *pkt);
*/
static void _event_cb(netdev2_t *dev, netdev2_event_t event)
{
gnrc_netdev2_t *gnrc_netdev2 = (gnrc_netdev2_t*) dev->isr_arg;
gnrc_netdev2_t *gnrc_netdev2 = (gnrc_netdev2_t*) dev->context;
if (event == NETDEV2_EVENT_ISR) {
msg_t msg;
......@@ -122,7 +122,7 @@ static void *_gnrc_netdev2_thread(void *args)
/* register the event callback with the device driver */
dev->event_callback = _event_cb;
dev->isr_arg = (void*) gnrc_netdev2;
dev->context = (void*) gnrc_netdev2;
/* register the device to the network stack*/
gnrc_netif_add(thread_getpid());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment