Anuz wrote:
Quote:
>
The header is included in the very first line, which contains all the
definitions of the relevant structures. And all macros like
DRIVER_E1000 are all defined my Makefile itself.
Well, I'd re-verify that. Add an obvious error next to the definition of
'adapter_struct' macro and see whether the compiler catches it
#ifdef DRIVER_E1000
#define adapter_struct e1000_adapter
jasbdxjkasbcfjda /* just to make the compiler complain */
#endif
If it doesn't, then 'DRIVER_E1000' is _not_ defined.
Quote:
I suspect that when at this line:
struct adapter_struct *adapter = netdev_priv(netdev);
>
it becomes:
adapter = netdev->priv;/* this is a (void *) data type */
What "is a (void *) data type"? netdev->priv? If so, it doesn't really
matter, since 'adapter' is not a 'void*'.
Quote:
now when
struct napi_struct *napi = &adapter->rx_ring[0].napi;
this becomes
napi = &netdev->priv->rx_ring[0].napi; /* priv is (void *) data type
*/
No, things don't "become" like that in C. 'adapter' is not a macro, so
it doesn't just get substituted they way you seem to suggest.
--
Best regards,
Andrey Tarasevich