From: David S. Miller Date: Fri, 24 Jul 2009 02:03:51 +0000 (-0700) Subject: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=74d154189d597b91da4322996dbf4f5c3d1544ab;p=linux-beck.git Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/iwmc3200wifi/netdev.c net/wireless/scan.c --- 74d154189d597b91da4322996dbf4f5c3d1544ab diff --cc drivers/net/wireless/iwmc3200wifi/netdev.c index e94e96955b99,aea5ccf24ccf..092d28ae56a0 --- a/drivers/net/wireless/iwmc3200wifi/netdev.c +++ b/drivers/net/wireless/iwmc3200wifi/netdev.c @@@ -156,10 -151,8 +156,10 @@@ void iwm_if_free(struct iwm_priv *iwm return; free_netdev(iwm_to_ndev(iwm)); - iwm_wdev_free(iwm); iwm_priv_deinit(iwm); + kfree(iwm->umac_profile); + iwm->umac_profile = NULL; + iwm_wdev_free(iwm); } int iwm_if_add(struct iwm_priv *iwm) diff --cc net/wireless/nl80211.c index 2a04beba4369,634496b3ed77..4478760b7dc3 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@@ -1035,9 -1022,10 +1035,10 @@@ static int nl80211_get_key(struct sk_bu nla_put_failure: err = -ENOBUFS; + free_msg: nlmsg_free(msg); out: - cfg80211_put_dev(drv); + cfg80211_unlock_rdev(rdev); dev_put(dev); unlock_rtnl: rtnl_unlock(); diff --cc net/wireless/scan.c index 4f552c3f29a3,9271118e1fc4..decc59fe0ee8 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@@ -48,10 -35,8 +48,8 @@@ void __cfg80211_scan_done(struct work_s else nl80211_send_scan_done(wiphy_to_dev(request->wiphy), dev); - wiphy_to_dev(request->wiphy)->scan_req = NULL; - #ifdef CONFIG_WIRELESS_EXT - if (!aborted) { + if (!request->aborted) { memset(&wrqu, 0, sizeof(wrqu)); wireless_send_event(dev, SIOCGIWSCAN, &wrqu, NULL); @@@ -61,24 -46,9 +59,25 @@@ dev_put(dev); out: + cfg80211_unlock_rdev(rdev); + wiphy_to_dev(request->wiphy)->scan_req = NULL; kfree(request); } + +void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted) +{ + struct net_device *dev = dev_get_by_index(&init_net, request->ifidx); + if (WARN_ON(!dev)) { + kfree(request); + return; + } + + WARN_ON(request != wiphy_to_dev(request->wiphy)->scan_req); + + request->aborted = aborted; + schedule_work(&wiphy_to_dev(request->wiphy)->scan_done_wk); + dev_put(dev); +} EXPORT_SYMBOL(cfg80211_scan_done); static void bss_release(struct kref *ref)