diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-04-10 19:09:21 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-04-12 09:54:56 +0200 |
commit | c75ab7876339bbe9c3987bc426cf60ff9b2d03f0 (patch) | |
tree | 88d1083ad07c6f1f3fcd9666b93ff8d0006ca3a2 /net/ping.c | |
parent | dcf5df122fe20daecbd7c2ba1640e9064d73fa4b (diff) | |
download | barebox-c75ab7876339bbe9c3987bc426cf60ff9b2d03f0.tar.gz barebox-c75ab7876339bbe9c3987bc426cf60ff9b2d03f0.tar.xz |
net: add a context to the packet handler
This is not yet used, but with this the different network
commands can get rid of their global data.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net/ping.c')
-rw-r--r-- | net/ping.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ping.c b/net/ping.c index d414784e23..8aad7af793 100644 --- a/net/ping.c +++ b/net/ping.c @@ -40,7 +40,7 @@ static int ping_send(void) return net_icmp_send(ping_con, 9); } -static void ping_handler(char *pkt, unsigned len) +static void ping_handler(void *ctx, char *pkt, unsigned len) { IPaddr_t tmp; struct iphdr *ip = net_eth_to_iphdr(pkt); @@ -66,7 +66,7 @@ static int do_ping(struct command *cmdtp, int argc, char *argv[]) return 1; } - ping_con = net_icmp_new(net_ping_ip, ping_handler); + ping_con = net_icmp_new(net_ping_ip, ping_handler, NULL); if (IS_ERR(ping_con)) { ret = PTR_ERR(ping_con); goto out; |