mac80211: fix kernel crash on netdev unregister on newer 3.14 kernels

Based on patch by Mark Milburn

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43224
This commit is contained in:
Felix Fietkau 2014-11-09 02:25:49 +00:00
parent 93b3924128
commit 9809b02dec

View file

@ -1,11 +1,13 @@
--- a/net/mac80211/iface.c --- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c +++ b/net/mac80211/iface.c
@@ -1859,6 +1859,11 @@ void ieee80211_remove_interfaces(struct @@ -1859,6 +1859,13 @@ void ieee80211_remove_interfaces(struct
} }
mutex_unlock(&local->iflist_mtx); mutex_unlock(&local->iflist_mtx);
unregister_netdevice_many(&unreg_list); unregister_netdevice_many(&unreg_list);
+#if (!(LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,45) && \ +#if (!(LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,45) && \
+ LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)) && \ + LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)) && \
+ !(LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,9) && \
+ LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)) && \
+ (LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0))) + (LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)))
+ list_del(&unreg_list); + list_del(&unreg_list);
+#endif +#endif