the syntax for netif_napi_add is
netif_napi_add(struct net_device *dev, struct napi_struct *napi,int (*poll)(struct napi_struct *, int), int weight)
it is used for initializing the napi structure . the problem is when i am using the function as
netif_napi_add(wdev,rnapi,rrpoll(rnapi,20),16);
its giving me warning on time of compilation as
warning: passing argument 3 of ‘netif_napi_add’ makes pointer from integer without a cast
/usr/src/linux-2.6.34.10-0.6/include/linux/netdevice.h:1089:6: note: expected ‘int (*)(struct napi_struct *, int)’ but argument is of type ‘int’
how to write it correctly ??
regards
karan
In the call
you are calling
rrpoll. It should be passed as a pointer:The system will then call
rrpollfor you.