wl1251: Add support for idle mode
[pandora-wifi.git] / patches / 17-netdev-queue.patch
1 This patch addresses changes made by usage of new symbols
2 like unregister_netdevice_queue() which are not possible to backport
3 due to their reliance on internal symbols on net/core/dev.c
4
5 The patch that introduced this on mac80211 was:
6
7     mac80211: Speedup ieee80211_remove_interfaces()
8     
9     Speedup ieee80211_remove_interfaces() by factorizing synchronize_rcu() calls
10     
11     Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
12     Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
13     Signed-off-by: John W. Linville <linville@tuxdriver.com>
14
15 --- a/net/mac80211/iface.c
16 +++ b/net/mac80211/iface.c
17 @@ -954,6 +954,7 @@ void ieee80211_if_remove(struct ieee8021
18   * Remove all interfaces, may only be called at hardware unregistration
19   * time because it doesn't do RCU-safe list removals.
20   */
21 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
22  void ieee80211_remove_interfaces(struct ieee80211_local *local)
23  {
24         struct ieee80211_sub_if_data *sdata, *tmp;
25 @@ -970,6 +971,22 @@ void ieee80211_remove_interfaces(struct 
26         mutex_unlock(&local->iflist_mtx);
27         unregister_netdevice_many(&unreg_list);
28  }
29 +#else
30 +void ieee80211_remove_interfaces(struct ieee80211_local *local)
31 +{
32 +       struct ieee80211_sub_if_data *sdata, *tmp;
33 +
34 +       ASSERT_RTNL();
35 +
36 +       list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) {
37 +               mutex_lock(&local->iflist_mtx);
38 +               list_del(&sdata->list);
39 +               mutex_unlock(&local->iflist_mtx);
40 +
41 +               unregister_netdevice(sdata->dev);
42 +       }
43 +}
44 +#endif
45  
46  static u32 ieee80211_idle_off(struct ieee80211_local *local,
47                               const char *reason)