From owner-svn-src-all@freebsd.org Thu Jun 2 04:54:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0236B67876; Thu, 2 Jun 2016 04:54:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A11E21B71; Thu, 2 Jun 2016 04:54:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u524suGF008293; Thu, 2 Jun 2016 04:54:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u524susg008291; Thu, 2 Jun 2016 04:54:56 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201606020454.u524susg008291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 2 Jun 2016 04:54:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301190 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2016 04:54:57 -0000 Author: adrian Date: Thu Jun 2 04:54:56 2016 New Revision: 301190 URL: https://svnweb.freebsd.org/changeset/base/301190 Log: [iwm] Clean up iwm(4) scanning logic a bit. Submitted by: Imre Vadasz Obtained from: DragonflyBSD 8f3ffab9136e33263d424275ec28f57ad2096437 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_scan.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Thu Jun 2 04:53:28 2016 (r301189) +++ head/sys/dev/iwm/if_iwm.c Thu Jun 2 04:54:56 2016 (r301190) @@ -3642,7 +3642,8 @@ iwm_endscan_cb(void *arg, int pending) done = 0; if ((error = iwm_mvm_scan_request(sc, IEEE80211_CHAN_5GHZ, 0, NULL, 0)) != 0) { - device_printf(sc->sc_dev, "could not initiate scan\n"); + device_printf(sc->sc_dev, + "could not initiate 5 GHz scan\n"); done = 1; } } else { @@ -4883,9 +4884,10 @@ iwm_scan_start(struct ieee80211com *ic) IWM_LOCK(sc); error = iwm_mvm_scan_request(sc, IEEE80211_CHAN_2GHZ, 0, NULL, 0); if (error) { - device_printf(sc->sc_dev, "could not initiate scan\n"); + device_printf(sc->sc_dev, "could not initiate 2 GHz scan\n"); IWM_UNLOCK(sc); ieee80211_cancel_scan(vap); + sc->sc_scanband = 0; } else { iwm_led_blink_start(sc); IWM_UNLOCK(sc); Modified: head/sys/dev/iwm/if_iwm_scan.c ============================================================================== --- head/sys/dev/iwm/if_iwm_scan.c Thu Jun 2 04:53:28 2016 (r301189) +++ head/sys/dev/iwm/if_iwm_scan.c Thu Jun 2 04:54:56 2016 (r301190) @@ -443,7 +443,6 @@ iwm_mvm_scan_request(struct iwm_softc *s * to allocate the time events. Warn on it, but maybe we * should try to send the command again with different params. */ - sc->sc_scanband = 0; ret = EIO; } return ret;