diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-04-08 13:34:54 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-08 13:34:54 -0400 |
commit | 0f2df9eac70423838a1f8d410fd3899ddd88317b (patch) | |
tree | 0617f723320d83eca5cef9c964c001014e74213f /drivers/net/wireless/libertas | |
parent | 8c11e4ab09ffb975a89802dde0e9aa52a53b8aa5 (diff) | |
parent | 1144601118507f8b3b676a9a392584d216d3f2cc (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into merge
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/wireless/ath/ath5k/phy.c
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-tx.c
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r-- | drivers/net/wireless/libertas/cfg.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/dev.h | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c index 4396dccd12ac..82ebe1461a77 100644 --- a/drivers/net/wireless/libertas/cfg.c +++ b/drivers/net/wireless/libertas/cfg.c | |||
@@ -172,6 +172,8 @@ int lbs_cfg_register(struct lbs_private *priv) | |||
172 | if (ret < 0) | 172 | if (ret < 0) |
173 | lbs_pr_err("cannot register wiphy device\n"); | 173 | lbs_pr_err("cannot register wiphy device\n"); |
174 | 174 | ||
175 | priv->wiphy_registered = true; | ||
176 | |||
175 | ret = register_netdev(priv->dev); | 177 | ret = register_netdev(priv->dev); |
176 | if (ret) | 178 | if (ret) |
177 | lbs_pr_err("cannot register network device\n"); | 179 | lbs_pr_err("cannot register network device\n"); |
@@ -190,9 +192,11 @@ void lbs_cfg_free(struct lbs_private *priv) | |||
190 | if (!wdev) | 192 | if (!wdev) |
191 | return; | 193 | return; |
192 | 194 | ||
193 | if (wdev->wiphy) { | 195 | if (priv->wiphy_registered) |
194 | wiphy_unregister(wdev->wiphy); | 196 | wiphy_unregister(wdev->wiphy); |
197 | |||
198 | if (wdev->wiphy) | ||
195 | wiphy_free(wdev->wiphy); | 199 | wiphy_free(wdev->wiphy); |
196 | } | 200 | |
197 | kfree(wdev); | 201 | kfree(wdev); |
198 | } | 202 | } |
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h index 058d1720242e..a54880e4ad2b 100644 --- a/drivers/net/wireless/libertas/dev.h +++ b/drivers/net/wireless/libertas/dev.h | |||
@@ -36,6 +36,7 @@ struct lbs_private { | |||
36 | 36 | ||
37 | /* CFG80211 */ | 37 | /* CFG80211 */ |
38 | struct wireless_dev *wdev; | 38 | struct wireless_dev *wdev; |
39 | bool wiphy_registered; | ||
39 | 40 | ||
40 | /* Mesh */ | 41 | /* Mesh */ |
41 | struct net_device *mesh_dev; /* Virtual device */ | 42 | struct net_device *mesh_dev; /* Virtual device */ |