Quick Start - Loopback Program - Wiznet W5300 Porting Manual

Linux driver porting guide
Hide thumbs Also See for W5300:
Table of Contents

Advertisement

In the past Linux kernel uses the previous routine as below
/* Initialization Function of W5300 driver */
static int wiz_init(void)
{
...
/* Setting napi. Enabling to process max 16 packets at a time. */
dev->poll = wiz_rx_poll;
dev->weight = 16;
...
Also the wiz_rx_poll() function use in NAPI is changed as follows. The type of wiz_rx_poll
function which we use now is as follows.
static int wiz_rx_poll(struct napi_struct *napi, int budget);
The privious version of poll function type in the Linux kernel is as follows.
static int wiz_rx_poll(struct net_device *dev, int *budget);
4. Quick start – Loopback program
In the hybrid mode of W5300, we can use H/W TCP/IP stack of WIZnet supporting same
performance of conventional network chip simultaneously. In the hybrid mode, the channel 0
conducts as MAC_RAW mode. It is possible to originally use S/W network stack in the Linux
kernel. If we use H/W TCP/IP stack of W5300, just change the socket family at the
application.
Add PF_WIZNET to 'include/linux/socket.h' file of Linux kernel as follows.
...
#define AF_RXRPC
#define AF_WIZNET 34
#define AF_MAX
...
#define PF_RXRPC
#define PF_WIZNET AF_WIZNET
#define PF_MAX
Copyright © WIZnet All Rights Reserved
33
/* RxRPC sockets
35
/* For now.. */
AF_RXRPC
AF_MAX
W5300 Linux Driver Porting Guide | 13 page
*/

Advertisement

Table of Contents
loading

Table of Contents