diff options
author | Zhu Yi <yi.zhu@intel.com> | 2009-10-15 14:50:28 +0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-30 15:50:24 -0400 |
commit | e6c5fc53d0f44a772398402ee8a1879818e42b4e (patch) | |
tree | 440f91d018016246c118d0165641e8332f648d65 /drivers/net/wireless/ipw2x00/libipw_module.c | |
parent | 63ca2d74ea4f9c7a7ac082c915609a7b224908e7 (diff) | |
download | blackbird-op-linux-e6c5fc53d0f44a772398402ee8a1879818e42b4e.tar.gz blackbird-op-linux-e6c5fc53d0f44a772398402ee8a1879818e42b4e.zip |
ipw2200: fix oops on missing firmware
For non-monitor interfaces, the syntax for alloc_ieee80211/free_80211
is wrong. Because alloc_ieee80211 only creates (wiphy_new) a wiphy, but
free_80211() does wiphy_unregister() also. This is only correct when
the later wiphy_register() is called successfully, which apparently
is not the case for your fw doesn't exist one.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ipw2x00/libipw_module.c')
-rw-r--r-- | drivers/net/wireless/ipw2x00/libipw_module.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/wireless/ipw2x00/libipw_module.c b/drivers/net/wireless/ipw2x00/libipw_module.c index a0e9f6aed7da..be5b809ec97a 100644 --- a/drivers/net/wireless/ipw2x00/libipw_module.c +++ b/drivers/net/wireless/ipw2x00/libipw_module.c @@ -235,16 +235,19 @@ void free_ieee80211(struct net_device *dev, int monitor) libipw_networks_free(ieee); /* free cfg80211 resources */ - if (!monitor) { - wiphy_unregister(ieee->wdev.wiphy); - kfree(ieee->a_band.channels); - kfree(ieee->bg_band.channels); + if (!monitor) wiphy_free(ieee->wdev.wiphy); - } free_netdev(dev); } +void unregister_ieee80211(struct libipw_device *ieee) +{ + wiphy_unregister(ieee->wdev.wiphy); + kfree(ieee->a_band.channels); + kfree(ieee->bg_band.channels); +} + #ifdef CONFIG_LIBIPW_DEBUG static int debug = 0; @@ -330,3 +333,4 @@ module_init(libipw_init); EXPORT_SYMBOL(alloc_ieee80211); EXPORT_SYMBOL(free_ieee80211); +EXPORT_SYMBOL(unregister_ieee80211); |