libertas: Fine grained configuration of wake-on-lan.
Based on a patch from Shailendra Govardhan <shailen@marvell.com>. This patch allows implementation of more specific wake-on-lan rules than those of ethtool. Please note that only firmware 5.110.22.p20 and above supports this feature. This patch only implements the driver/firmware interface, not the userspace/driver interface. Signed-off-by: Anna Neal <anna@cozybit.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
50da3ead62
commit
582c1b538f
@@ -159,7 +159,8 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria)
|
||||
int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria,
|
||||
struct wol_config *p_wol_config)
|
||||
{
|
||||
struct cmd_ds_host_sleep cmd_config;
|
||||
int ret;
|
||||
@@ -169,10 +170,21 @@ int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria)
|
||||
cmd_config.gpio = priv->wol_gpio;
|
||||
cmd_config.gap = priv->wol_gap;
|
||||
|
||||
if (p_wol_config != NULL)
|
||||
memcpy((uint8_t *)&cmd_config.wol_conf, (uint8_t *)p_wol_config,
|
||||
sizeof(struct wol_config));
|
||||
else
|
||||
cmd_config.wol_conf.action = CMD_ACT_ACTION_NONE;
|
||||
|
||||
ret = lbs_cmd_with_response(priv, CMD_802_11_HOST_SLEEP_CFG, &cmd_config);
|
||||
if (!ret) {
|
||||
lbs_deb_cmd("Set WOL criteria to %x\n", criteria);
|
||||
priv->wol_criteria = criteria;
|
||||
if (criteria) {
|
||||
lbs_deb_cmd("Set WOL criteria to %x\n", criteria);
|
||||
priv->wol_criteria = criteria;
|
||||
} else
|
||||
memcpy((uint8_t *) p_wol_config,
|
||||
(uint8_t *)&cmd_config.wol_conf,
|
||||
sizeof(struct wol_config));
|
||||
} else {
|
||||
lbs_pr_info("HOST_SLEEP_CFG failed %d\n", ret);
|
||||
}
|
||||
|
Reference in New Issue
Block a user