From 8fc97bfcb7e7393c9d76f15539a6e6ec51c73924 Mon Sep 17 00:00:00 2001 From: stsp Date: Mon, 12 Oct 2015 10:01:27 +0000 Subject: [PATCH] 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@ --- sys/dev/pci/if_iwm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) { -- 2.20.1