Historically LinuxKPI defined struct net_device to be struct ifnet.
With more networking code growing dependency on struct net_device
this shortcut is no longer feasible.
However changing the current driver/ofed code to use ifnet everywhere
is also not an immediate solution despite the code usually already
being of mixed-usage of net_device and ifnet and highly dependent on
strutc ifnet fields and semantics and just being called net_device still.
In order to keep accomodating the current codebase and allowing drivers
to slowly migrate away from it (or renaming some compat functions)
hide the current "net_device is ifnet" implementation under
_NET_DEVICE_IS_IFNET and define that in the files currently relying
This will allow us to build up more struct net_device compat code in
parallel to the working drivers/ofed implementation.
Sponsored-by: The FreeBSD Foundation
MFC-after: 2 weeks