Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Mar 2017 09:10:02 +0000 (UTC)
From:      Andriy Voskoboinyk <avos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r315981 - head/sys/dev/iwn
Message-ID:  <201703260910.v2Q9A26Z081833@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avos
Date: Sun Mar 26 09:10:01 2017
New Revision: 315981
URL: https://svnweb.freebsd.org/changeset/base/315981

Log:
  iwn: omit unneeded bus_dmamap_sync() calls when compiled without
  'options IWN_DEBUG'

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

Modified: head/sys/dev/iwn/if_iwn.c
==============================================================================
--- head/sys/dev/iwn/if_iwn.c	Sun Mar 26 08:54:08 2017	(r315980)
+++ head/sys/dev/iwn/if_iwn.c	Sun Mar 26 09:10:01 2017	(r315981)
@@ -3944,6 +3944,7 @@ iwn_notif_intr(struct iwn_softc *sc)
 			sc->errptr = le32toh(uc->errptr);
 			break;
 		}
+#ifdef IWN_DEBUG
 		case IWN_STATE_CHANGED:
 		{
 			/*
@@ -3953,27 +3954,26 @@ iwn_notif_intr(struct iwn_softc *sc)
 			 */
 			bus_dmamap_sync(sc->rxq.data_dmat, data->map,
 			    BUS_DMASYNC_POSTREAD);
-#ifdef	IWN_DEBUG
+
 			uint32_t *status = (uint32_t *)(desc + 1);
 			DPRINTF(sc, IWN_DEBUG_INTR | IWN_DEBUG_STATE,
 			    "state changed to %x\n",
 			    le32toh(*status));
-#endif
 			break;
 		}
 		case IWN_START_SCAN:
 		{
 			bus_dmamap_sync(sc->rxq.data_dmat, data->map,
 			    BUS_DMASYNC_POSTREAD);
-#ifdef	IWN_DEBUG
+
 			struct iwn_start_scan *scan =
 			    (struct iwn_start_scan *)(desc + 1);
 			DPRINTF(sc, IWN_DEBUG_ANY,
 			    "%s: scanning channel %d status %x\n",
 			    __func__, scan->chan, le32toh(scan->status));
-#endif
 			break;
 		}
+#endif
 		case IWN_STOP_SCAN:
 		{
 			bus_dmamap_sync(sc->rxq.data_dmat, data->map,



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