Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jun 2011 03:33:46 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r222707 - head/sys/dev/ath
Message-ID:  <201106050333.p553XkCB038338@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sun Jun  5 03:33:46 2011
New Revision: 222707
URL: http://svn.freebsd.org/changeset/base/222707

Log:
  Add a missing call to sync the DMAed buffer before the radar event data is extracted.

Modified:
  head/sys/dev/ath/if_ath.c

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c	Sun Jun  5 02:44:04 2011	(r222706)
+++ head/sys/dev/ath/if_ath.c	Sun Jun  5 03:33:46 2011	(r222707)
@@ -3473,7 +3473,15 @@ ath_rx_proc(void *arg, int npending)
 			if (rs->rs_status & HAL_RXERR_PHY) {
 				sc->sc_stats.ast_rx_phyerr++;
 				/* Process DFS radar events */
-				ath_dfs_process_phy_err(sc, mtod(m, char *), tsf, rs);
+				if ((rs->rs_phyerr == HAL_PHYERR_RADAR) ||
+				    (rs->rs_phyerr == HAL_PHYERR_FALSE_RADAR_EXT)) {
+					/* Since we're touching the frame data, sync it */
+					bus_dmamap_sync(sc->sc_dmat,
+					    bf->bf_dmamap,
+					    BUS_DMASYNC_POSTREAD);
+					/* Now pass it to the radar processing code */
+					ath_dfs_process_phy_err(sc, mtod(m, char *), tsf, rs);
+				}
 
 				/* Be suitably paranoid about receiving phy errors out of the stats array bounds */
 				if (rs->rs_phyerr < 64)



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