48 lines
1.5 KiB
Diff
48 lines
1.5 KiB
Diff
This patch addresses changes made by usage of new symbols
|
|
like unregister_netdevice_queue() which are not possible to backport
|
|
due to their reliance on internal symbols on net/core/dev.c
|
|
|
|
The patch that introduced this on mac80211 was:
|
|
|
|
mac80211: Speedup ieee80211_remove_interfaces()
|
|
|
|
Speedup ieee80211_remove_interfaces() by factorizing synchronize_rcu() calls
|
|
|
|
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
|
|
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
|
|
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
--- a/net/mac80211/iface.c
|
|
+++ b/net/mac80211/iface.c
|
|
@@ -1247,6 +1247,7 @@ void ieee80211_if_remove(struct ieee8021
|
|
* Remove all interfaces, may only be called at hardware unregistration
|
|
* time because it doesn't do RCU-safe list removals.
|
|
*/
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
|
|
void ieee80211_remove_interfaces(struct ieee80211_local *local)
|
|
{
|
|
struct ieee80211_sub_if_data *sdata, *tmp;
|
|
@@ -1267,6 +1268,22 @@ void ieee80211_remove_interfaces(struct
|
|
unregister_netdevice_many(&unreg_list);
|
|
list_del(&unreg_list);
|
|
}
|
|
+#else
|
|
+void ieee80211_remove_interfaces(struct ieee80211_local *local)
|
|
+{
|
|
+ struct ieee80211_sub_if_data *sdata, *tmp;
|
|
+
|
|
+ ASSERT_RTNL();
|
|
+
|
|
+ list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) {
|
|
+ mutex_lock(&local->iflist_mtx);
|
|
+ list_del(&sdata->list);
|
|
+ mutex_unlock(&local->iflist_mtx);
|
|
+
|
|
+ unregister_netdevice(sdata->dev);
|
|
+ }
|
|
+}
|
|
+#endif
|
|
|
|
static u32 ieee80211_idle_off(struct ieee80211_local *local,
|
|
const char *reason)
|