summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2012-05-23 07:59:14 +0000
committerJoe Hershberger <joe.hershberger@ni.com>2012-05-23 17:46:21 -0500
commit22f6e99d5b0c54758646334c1153737a5585bd57 (patch)
treee70b3679ff62e93345fc0f7e3960d37582cea612 /drivers
parentadf5d93e441eb3eacd8c0430d6064b35d47ad2a5 (diff)
downloadu-boot-22f6e99d5b0c54758646334c1153737a5585bd57.tar.gz
net: Refactor to protect access to the NetState variable
Changes to NetState now go through an accessor function called net_set_state() Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/netconsole.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index ba02fd762a..28bb955de4 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -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)