net: Enable PM settings on network devices
By changing the various *NET_DEVICE* macros. It is up to the device drivers to either set a proper PM function or, if not supported or PM disabled, to use device_pm_control_nop relevantly. All existing macro calls are updated. Since no PM support was added so far, device_pm_control_nop is used as the default everywhere. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
ebe20f99c7
commit
4ae72db135
67 changed files with 197 additions and 143 deletions
|
@ -100,7 +100,7 @@ static struct dummy_api loopback_api = {
|
|||
};
|
||||
|
||||
NET_DEVICE_INIT(loopback, "lo",
|
||||
loopback_dev_init, NULL, NULL,
|
||||
loopback_dev_init, device_pm_control_nop, NULL, NULL,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
|
||||
&loopback_api, DUMMY_L2,
|
||||
NET_L2_GET_CTX_TYPE(DUMMY_L2), 536);
|
||||
|
|
|
@ -721,6 +721,6 @@ static const struct ppp_api ppp_if_api = {
|
|||
};
|
||||
|
||||
NET_DEVICE_INIT(ppp, CONFIG_NET_PPP_DRV_NAME, ppp_driver_init,
|
||||
&ppp_driver_context_data, NULL,
|
||||
device_pm_control_nop, &ppp_driver_context_data, NULL,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &ppp_if_api,
|
||||
PPP_L2, NET_L2_GET_CTX_TYPE(PPP_L2), PPP_MTU);
|
||||
|
|
|
@ -455,9 +455,11 @@ static const struct ethernet_api slip_if_api = {
|
|||
#define _SLIP_L2_CTX_TYPE NET_L2_GET_CTX_TYPE(ETHERNET_L2)
|
||||
#define _SLIP_MTU 1500
|
||||
|
||||
ETH_NET_DEVICE_INIT(slip, CONFIG_SLIP_DRV_NAME, slip_init, &slip_context_data,
|
||||
NULL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &slip_if_api,
|
||||
_SLIP_MTU);
|
||||
ETH_NET_DEVICE_INIT(slip, CONFIG_SLIP_DRV_NAME,
|
||||
slip_init, device_pm_control_nop,
|
||||
&slip_context_data, NULL,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
|
||||
&slip_if_api, _SLIP_MTU);
|
||||
#else
|
||||
|
||||
static const struct dummy_api slip_if_api = {
|
||||
|
@ -470,7 +472,7 @@ static const struct dummy_api slip_if_api = {
|
|||
#define _SLIP_L2_CTX_TYPE NET_L2_GET_CTX_TYPE(DUMMY_L2)
|
||||
#define _SLIP_MTU 576
|
||||
|
||||
NET_DEVICE_INIT(slip, CONFIG_SLIP_DRV_NAME, slip_init, &slip_context_data,
|
||||
NULL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &slip_if_api,
|
||||
_SLIP_L2_LAYER, _SLIP_L2_CTX_TYPE, _SLIP_MTU);
|
||||
NET_DEVICE_INIT(slip, CONFIG_SLIP_DRV_NAME, slip_init, device_pm_control_nop,
|
||||
&slip_context_data, NULL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
|
||||
&slip_if_api, _SLIP_L2_LAYER, _SLIP_L2_CTX_TYPE, _SLIP_MTU);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue