net: eth: Add start and stop L2 functions

If the driver has created start() and stop() functions, then those
are called when ethernet L2 is enabled or disabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2018-08-09 16:08:27 +03:00
commit 31f89b0303
2 changed files with 17 additions and 0 deletions

View file

@ -185,6 +185,12 @@ struct ethernet_api {
struct net_stats_eth *(*get_stats)(struct device *dev);
#endif
/** Start the device */
int (*start)(struct device *dev);
/** Stop the device */
int (*stop)(struct device *dev);
/** Get the device capabilities */
enum ethernet_hw_caps (*get_capabilities)(struct device *dev);