summaryrefslogtreecommitdiffstats
path: root/net/netconsole.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/netconsole.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/netconsole.c')
-rw-r--r--net/netconsole.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netconsole.c b/net/netconsole.c
index fda524e174..2ac3e64353 100644
--- a/net/netconsole.c
+++ b/net/netconsole.c
@@ -50,7 +50,7 @@ struct nc_priv {
static struct nc_priv *g_priv;
-static void nc_handler(char *pkt, unsigned len)
+static void nc_handler(void *ctx, char *pkt, unsigned len)
{
struct nc_priv *priv = g_priv;
unsigned char *packet = net_eth_to_udp_payload(pkt);
@@ -65,7 +65,7 @@ static int nc_init(void)
if (priv->con)
net_unregister(priv->con);
- priv->con = net_udp_new(priv->ip, priv->port, nc_handler);
+ priv->con = net_udp_new(priv->ip, priv->port, nc_handler, NULL);
if (IS_ERR(priv->con)) {
int ret = PTR_ERR(priv->con);
priv->con = NULL;