Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Mar 2015 21:17:04 +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: r280103 - head/sys/dev/wpi
Message-ID:  <201503152117.t2FLH4NU085490@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sun Mar 15 21:17:03 2015
New Revision: 280103
URL: https://svnweb.freebsd.org/changeset/base/280103

Log:
  Minor optimisation in wpi_limit_dwell()
  
  PR:		kenr/197143
  Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>

Modified:
  head/sys/dev/wpi/if_wpi.c

Modified: head/sys/dev/wpi/if_wpi.c
==============================================================================
--- head/sys/dev/wpi/if_wpi.c	Sun Mar 15 21:12:57 2015	(r280102)
+++ head/sys/dev/wpi/if_wpi.c	Sun Mar 15 21:17:03 2015	(r280103)
@@ -3810,14 +3810,12 @@ static uint16_t
 wpi_limit_dwell(struct wpi_softc *sc, uint16_t dwell_time)
 {
 	struct ieee80211com *ic = sc->sc_ifp->if_l2com;
-	struct ieee80211vap *vap = NULL;
+	struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
 	int bintval = 0;
 
 	/* bintval is in TU (1.024mS) */
-	if (! TAILQ_EMPTY(&ic->ic_vaps)) {
-		vap = TAILQ_FIRST(&ic->ic_vaps);
+	if (vap != NULL)
 		bintval = vap->iv_bss->ni_intval;
-	}
 
 	/*
 	 * If it's non-zero, we should calculate the minimum of



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