diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2008-08-27 09:28:39 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2008-08-27 09:28:39 +0000 |
commit | b10b91a5b2a3c0ec7fb99ae48a404b60b6e32ebe (patch) | |
tree | 45bbeacde55a8f994ec79ad78b9698fcacfba8db /sys/dev | |
parent | b9718efd4fed18c215ace8a97dfb2fd920b8c26a (diff) |
the firmware is responsible for sending management frames, but
since we pass received management frames to net80211, net80211
may send replies (like deauth/disassoc), so we just call
IF_PURGE(&ic->ic_mgtq) in {ipw,iwi}_start just to be on the
safe side of things (so we don't leak mbufs).
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_ipw.c | 9 | ||||
-rw-r--r-- | sys/dev/pci/if_iwi.c | 9 |
2 files changed, 10 insertions, 8 deletions
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c index 2aa61f339e5..dec88cbf888 100644 --- a/sys/dev/pci/if_ipw.c +++ b/sys/dev/pci/if_ipw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ipw.c,v 1.74 2008/08/27 09:05:03 damien Exp $ */ +/* $OpenBSD: if_ipw.c,v 1.75 2008/08/27 09:28:38 damien Exp $ */ /*- * Copyright (c) 2004-2008 @@ -1301,10 +1301,11 @@ ipw_start(struct ifnet *ifp) struct ieee80211_node *ni; struct mbuf *m; - if (ic->ic_state != IEEE80211_S_RUN) - return; - for (;;) { + IF_PURGE(&ic->ic_mgtq); + + if (ic->ic_state != IEEE80211_S_RUN) + return; IFQ_POLL(&ifp->if_snd, m); if (m == NULL) break; diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c index 32cd3a77b38..09ff28a340d 100644 --- a/sys/dev/pci/if_iwi.c +++ b/sys/dev/pci/if_iwi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwi.c,v 1.88 2008/08/27 09:05:03 damien Exp $ */ +/* $OpenBSD: if_iwi.c,v 1.89 2008/08/27 09:28:38 damien Exp $ */ /*- * Copyright (c) 2004-2006 @@ -1416,10 +1416,11 @@ iwi_start(struct ifnet *ifp) struct mbuf *m0; struct ieee80211_node *ni; - if (ic->ic_state != IEEE80211_S_RUN) - return; - for (;;) { + IF_PURGE(&ic->ic_mgtq); + + if (ic->ic_state != IEEE80211_S_RUN) + return; IFQ_POLL(&ifp->if_snd, m0); if (m0 == NULL) break; |