9
0
Fork 0

net: use net_alloc_packet to allocate packet

Was missing in net_init and net_new.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2012-04-14 18:02:21 +02:00 committed by Sascha Hauer
parent 1336fc9c43
commit 065feea9be
1 changed files with 2 additions and 2 deletions

View File

@ -378,7 +378,7 @@ static struct net_connection *net_new(IPaddr_t dest, rx_handler_f *handler,
return ERR_PTR(-ENETDOWN);
con = xzalloc(sizeof(*con));
con->packet = xmemalign(32, PKTSIZE);
con->packet = net_alloc_packet();
con->priv = ctx;
memset(con->packet, 0, PKTSIZE);
@ -673,7 +673,7 @@ static int net_init(void)
int i;
for (i = 0; i < PKTBUFSRX; i++)
NetRxPackets[i] = xmemalign(32, PKTSIZE);
NetRxPackets[i] = net_alloc_packet();
return 0;
}