]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/net/netconsole.c
net: Refactor to protect access to the NetState variable
[karo-tx-uboot.git] / drivers / net / netconsole.c
index ba02fd762ae77e4253077aba4665f8291ee96f5d..28bb955de49aa5beafb17c717c588f780326e6e8 100644 (file)
@@ -44,19 +44,19 @@ static void nc_wait_arp_handler(uchar *pkt, unsigned dest,
                                 IPaddr_t sip, unsigned src,
                                 unsigned len)
 {
-       NetState = NETLOOP_SUCCESS; /* got arp reply - quit net loop */
+       net_set_state(NETLOOP_SUCCESS); /* got arp reply - quit net loop */
 }
 
 static void nc_handler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
                        unsigned len)
 {
        if (input_size)
-               NetState = NETLOOP_SUCCESS; /* got input - quit net loop */
+               net_set_state(NETLOOP_SUCCESS); /* got input - quit net loop */
 }
 
 static void nc_timeout(void)
 {
-       NetState = NETLOOP_SUCCESS;
+       net_set_state(NETLOOP_SUCCESS);
 }
 
 void NcStart(void)