Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jan 2012 17:39:03 +0000 (UTC)
From:      Bernhard Schmidt <bschmidt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r230620 - head/sys/dev/iwn
Message-ID:  <201201271739.q0RHd3Qb049871@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bschmidt
Date: Fri Jan 27 17:39:02 2012
New Revision: 230620
URL: http://svn.freebsd.org/changeset/base/230620

Log:
  On state changes from RUN to anything else the AGGR sessions are
  cleared/dropped leading to qid2tap[n] being NULL as there no longer
  is a tap. Now, if there have been lots of frames queued the firmware
  processes and returns those after the tap is gone.
  
  Tested by:	osa
  MFC after:	1 week

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==============================================================================
--- head/sys/dev/iwn/if_iwn.c	Fri Jan 27 17:32:50 2012	(r230619)
+++ head/sys/dev/iwn/if_iwn.c	Fri Jan 27 17:39:02 2012	(r230620)
@@ -2813,11 +2813,13 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, 
 		bitmap |= 1ULL << bit;
 	}
 	tap = sc->qid2tap[qid];
-	tid = WME_AC_TO_TID(tap->txa_ac);
-	wn = (void *)tap->txa_ni;
-	wn->agg[tid].bitmap = bitmap;
-	wn->agg[tid].startidx = start;
-	wn->agg[tid].nframes = nframes;
+	if (tap != NULL) {
+		tid = WME_AC_TO_TID(tap->txa_ac);
+		wn = (void *)tap->txa_ni;
+		wn->agg[tid].bitmap = bitmap;
+		wn->agg[tid].startidx = start;
+		wn->agg[tid].nframes = nframes;
+	}
 
 	seqno = le32toh(*(status + nframes)) & 0xfff;
 	for (lastidx = (seqno & 0xff); ring->read != lastidx;) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201271739.q0RHd3Qb049871>