From: stsp Date: Mon, 12 Oct 2015 10:01:27 +0000 (+0000) Subject: Always initialise the index into iwm's tx queue array, fixing a X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8fc97bfcb7e7393c9d76f15539a6e6ec51c73924;p=openbsd Always initialise the index into iwm's tx queue array, fixing a potential crash. This must have somehow been working by magic. Fruther cleanup of QoS support in this driver is very much needed. ok mpi@ --- diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index d41b60d0e01..a6aa84dfca3 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.55 2015/10/11 10:22:28 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.56 2015/10/12 10:01:27 stsp Exp $ */ /* * Copyright (c) 2014 genua mbh @@ -5572,7 +5572,7 @@ iwm_start(struct ifnet *ifp) struct ieee80211_node *ni; struct ether_header *eh; struct mbuf *m; - int ac; + int ac = EDCA_AC_BE; /* XXX */ if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING) return; @@ -5588,7 +5588,6 @@ iwm_start(struct ifnet *ifp) IF_DEQUEUE(&ic->ic_mgtq, m); if (m) { ni = m->m_pkthdr.ph_cookie; - ac = 0; goto sendit; } if (ic->ic_state != IEEE80211_S_RUN) {