summaryrefslogtreecommitdiff
path: root/package/madwifi/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-07-31 22:41:31 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-07-31 22:41:31 +0000
commit60f834421c7adc512609da74e42a07d9568e5859 (patch)
tree033d942f8569ce05c0468c42bc79a39590912847 /package/madwifi/patches
parentd298a4a411dd928acdc5a2471ea64d64c3c69aad (diff)
downloadmtk-20170518-60f834421c7adc512609da74e42a07d9568e5859.zip
mtk-20170518-60f834421c7adc512609da74e42a07d9568e5859.tar.gz
mtk-20170518-60f834421c7adc512609da74e42a07d9568e5859.tar.bz2
madwifi: fix race condition triggered by active split wds sta interfaces during vap delete
SVN-Revision: 12052
Diffstat (limited to 'package/madwifi/patches')
-rw-r--r--package/madwifi/patches/371-wds_sta_separation.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/package/madwifi/patches/371-wds_sta_separation.patch b/package/madwifi/patches/371-wds_sta_separation.patch
index 9126fec..e01b150 100644
--- a/package/madwifi/patches/371-wds_sta_separation.patch
+++ b/package/madwifi/patches/371-wds_sta_separation.patch
@@ -150,6 +150,37 @@
#ifdef ATH_REVERSE_ENGINEERING
/*
+@@ -5890,6 +5905,8 @@
+ ieee80211_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+ {
+ struct ieee80211vap *vap = dev->priv;
++ struct ieee80211com *ic = vap->iv_ic;
++ struct ieee80211_node *ni;
+
+ switch (cmd) {
+ case SIOCG80211STATS:
+@@ -5898,8 +5915,20 @@
+ case SIOC80211IFDESTROY:
+ if (!capable(CAP_NET_ADMIN))
+ return -EPERM;
++ /* drop all node subifs */
++ TAILQ_FOREACH(ni, &ic->ic_sta.nt_node, ni_list) {
++ struct ieee80211vap *avp = ni->ni_subif;
++
++ if (ni->ni_vap != vap)
++ continue;
++ if (!avp)
++ continue;
++ ni->ni_subif = NULL;
++ ieee80211_stop(avp->iv_dev);
++ ic->ic_vap_delete(avp);
++ }
+ ieee80211_stop(vap->iv_dev); /* force state before cleanup */
+- vap->iv_ic->ic_vap_delete(vap);
++ ic->ic_vap_delete(vap);
+ return 0;
+ case IEEE80211_IOCTL_GETKEY:
+ return ieee80211_ioctl_getkey(dev, (struct iwreq *) ifr);
--- a/net80211/ieee80211_node.c
+++ b/net80211/ieee80211_node.c
@@ -47,6 +47,7 @@