diff options
author | Vasily Khoruzhick <anarsoul@gmail.com> | 2011-01-21 21:44:49 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-03 22:38:26 +0100 |
commit | 75abde4d193fe300a2c1d3ee7f632eb777aa48b2 (patch) | |
tree | d6c8b835de0e28d43094d7c15c3c625436c6b628 /drivers/net/wireless/libertas/cmd.c | |
parent | libertas_spi: Use workqueue in hw_host_to_card (diff) | |
download | linux-75abde4d193fe300a2c1d3ee7f632eb777aa48b2.tar.xz linux-75abde4d193fe300a2c1d3ee7f632eb777aa48b2.zip |
libertas: Prepare stuff for if_spi.c pm support
To support suspend/resume in if_spi we need two things:
- re-setup fw in lbs_resume(), because if_spi powercycles card;
- don't touch hwaddr on second lbs_update_hw_spec() call for same
reason;
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmd.c')
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 78c4da150a74..7e8a658b7670 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c @@ -145,9 +145,13 @@ int lbs_update_hw_spec(struct lbs_private *priv) if (priv->current_addr[0] == 0xff) memmove(priv->current_addr, cmd.permanentaddr, ETH_ALEN); - memcpy(priv->dev->dev_addr, priv->current_addr, ETH_ALEN); - if (priv->mesh_dev) - memcpy(priv->mesh_dev->dev_addr, priv->current_addr, ETH_ALEN); + if (!priv->copied_hwaddr) { + memcpy(priv->dev->dev_addr, priv->current_addr, ETH_ALEN); + if (priv->mesh_dev) + memcpy(priv->mesh_dev->dev_addr, + priv->current_addr, ETH_ALEN); + priv->copied_hwaddr = 1; + } out: lbs_deb_leave(LBS_DEB_CMD); |