Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172225
b: refs/heads/master
c: e60d744
h: refs/heads/master
i:
  172223: 812ea17
v: v3
  • Loading branch information
Alban Browaeys authored and John W. Linville committed Nov 28, 2009
1 parent e364f1c commit 4e0dd63
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ece1e3c61e59ba184150e5aff57bbc6355613e3e
refs/heads/master: e60d7443e00a72a2c056950cdaab79c7b077f3d4
12 changes: 11 additions & 1 deletion trunk/net/wireless/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ DEFINE_MUTEX(cfg80211_mutex);
/* for debugfs */
static struct dentry *ieee80211_debugfs_dir;

/* for the cleanup, scan and event works */
struct workqueue_struct *cfg80211_wq;

/* requires cfg80211_mutex to be held! */
struct cfg80211_registered_device *cfg80211_rdev_by_wiphy_idx(int wiphy_idx)
{
Expand Down Expand Up @@ -727,7 +730,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
break;
case NETDEV_DOWN:
dev_hold(dev);
schedule_work(&wdev->cleanup_work);
queue_work(cfg80211_wq, &wdev->cleanup_work);
break;
case NETDEV_UP:
/*
Expand Down Expand Up @@ -845,8 +848,14 @@ static int __init cfg80211_init(void)
if (err)
goto out_fail_reg;

cfg80211_wq = create_singlethread_workqueue("cfg80211");
if (!cfg80211_wq)
goto out_fail_wq;

return 0;

out_fail_wq:
regulatory_exit();
out_fail_reg:
debugfs_remove(ieee80211_debugfs_dir);
out_fail_nl80211:
Expand All @@ -868,5 +877,6 @@ static void cfg80211_exit(void)
wiphy_sysfs_exit();
regulatory_exit();
unregister_pernet_device(&cfg80211_pernet_ops);
destroy_workqueue(cfg80211_wq);
}
module_exit(cfg80211_exit);
2 changes: 2 additions & 0 deletions trunk/net/wireless/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ bool wiphy_idx_valid(int wiphy_idx)
return (wiphy_idx >= 0);
}


extern struct workqueue_struct *cfg80211_wq;
extern struct mutex cfg80211_mutex;
extern struct list_head cfg80211_rdev_list;
extern int cfg80211_rdev_list_generation;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/wireless/ibss.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp)
spin_lock_irqsave(&wdev->event_lock, flags);
list_add_tail(&ev->list, &wdev->event_list);
spin_unlock_irqrestore(&wdev->event_lock, flags);
schedule_work(&rdev->event_work);
queue_work(cfg80211_wq, &rdev->event_work);
}
EXPORT_SYMBOL(cfg80211_ibss_joined);

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/wireless/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted)
WARN_ON(request != wiphy_to_dev(request->wiphy)->scan_req);

request->aborted = aborted;
schedule_work(&wiphy_to_dev(request->wiphy)->scan_done_wk);
queue_work(cfg80211_wq, &wiphy_to_dev(request->wiphy)->scan_done_wk);
}
EXPORT_SYMBOL(cfg80211_scan_done);

Expand Down
6 changes: 3 additions & 3 deletions trunk/net/wireless/sme.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ void cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
spin_lock_irqsave(&wdev->event_lock, flags);
list_add_tail(&ev->list, &wdev->event_list);
spin_unlock_irqrestore(&wdev->event_lock, flags);
schedule_work(&rdev->event_work);
queue_work(cfg80211_wq, &rdev->event_work);
}
EXPORT_SYMBOL(cfg80211_connect_result);

Expand Down Expand Up @@ -583,7 +583,7 @@ void cfg80211_roamed(struct net_device *dev, const u8 *bssid,
spin_lock_irqsave(&wdev->event_lock, flags);
list_add_tail(&ev->list, &wdev->event_list);
spin_unlock_irqrestore(&wdev->event_lock, flags);
schedule_work(&rdev->event_work);
queue_work(cfg80211_wq, &rdev->event_work);
}
EXPORT_SYMBOL(cfg80211_roamed);

Expand Down Expand Up @@ -681,7 +681,7 @@ void cfg80211_disconnected(struct net_device *dev, u16 reason,
spin_lock_irqsave(&wdev->event_lock, flags);
list_add_tail(&ev->list, &wdev->event_list);
spin_unlock_irqrestore(&wdev->event_lock, flags);
schedule_work(&rdev->event_work);
queue_work(cfg80211_wq, &rdev->event_work);
}
EXPORT_SYMBOL(cfg80211_disconnected);

Expand Down

0 comments on commit 4e0dd63

Please sign in to comment.