summaryrefslogtreecommitdiffstats
path: root/net/dhcp.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-04-10 19:09:21 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-04-12 09:54:56 +0200
commitc75ab7876339bbe9c3987bc426cf60ff9b2d03f0 (patch)
tree88d1083ad07c6f1f3fcd9666b93ff8d0006ca3a2 /net/dhcp.c
parentdcf5df122fe20daecbd7c2ba1640e9064d73fa4b (diff)
downloadbarebox-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/dhcp.c')
-rw-r--r--net/dhcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dhcp.c b/net/dhcp.c
index 0771964b91..d1781bc6b0 100644
--- a/net/dhcp.c
+++ b/net/dhcp.c
@@ -381,7 +381,7 @@ static void dhcp_send_request_packet(struct bootp *bp_offer)
/*
* Handle DHCP received packets.
*/
-static void dhcp_handler(char *packet, unsigned int len)
+static void dhcp_handler(void *ctx, char *packet, unsigned int len)
{
char *pkt = net_eth_to_udp_payload(packet);
struct udphdr *udp = net_eth_to_udphdr(packet);
@@ -439,7 +439,7 @@ static int do_dhcp(struct command *cmdtp, int argc, char *argv[])
{
int ret;
- dhcp_con = net_udp_new(0xffffffff, PORT_BOOTPS, dhcp_handler);
+ dhcp_con = net_udp_new(0xffffffff, PORT_BOOTPS, dhcp_handler, NULL);
if (IS_ERR(dhcp_con)) {
ret = PTR_ERR(dhcp_con);
goto out;