From owner-svn-src-head@freebsd.org Mon Mar 27 07:02:28 2017 Return-Path: Delivered-To: svn-src-head@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 E4366D1F0A4; Mon, 27 Mar 2017 07:02:28 +0000 (UTC) (envelope-from avos@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 9789F1BA4; Mon, 27 Mar 2017 07:02:28 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2R72RP0035042; Mon, 27 Mar 2017 07:02:27 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2R72ROX035041; Mon, 27 Mar 2017 07:02:27 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201703270702.v2R72ROX035041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 27 Mar 2017 07:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316010 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 07:02:29 -0000 Author: avos Date: Mon Mar 27 07:02:27 2017 New Revision: 316010 URL: https://svnweb.freebsd.org/changeset/base/316010 Log: iwm: fix build without IWM_DEBUG. Reported by: O. Hartmann Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D10146 Modified: head/sys/dev/iwm/if_iwm_scan.c Modified: head/sys/dev/iwm/if_iwm_scan.c ============================================================================== --- head/sys/dev/iwm/if_iwm_scan.c Mon Mar 27 06:37:03 2017 (r316009) +++ head/sys/dev/iwm/if_iwm_scan.c Mon Mar 27 07:02:27 2017 (r316010) @@ -201,6 +201,7 @@ iwm_mvm_scan_rate_n_flags(struct iwm_sof return htole32(IWM_RATE_6M_PLCP | tx_ant); } +#ifdef IWM_DEBUG static const char * iwm_mvm_ebs_status_str(enum iwm_scan_ebs_status status) { @@ -216,12 +217,18 @@ iwm_mvm_ebs_status_str(enum iwm_scan_ebs } } +static const char * +iwm_mvm_offload_status_str(enum iwm_scan_offload_complete_status status) +{ + return (status == IWM_SCAN_OFFLOAD_ABORTED) ? "aborted" : "completed"; +} +#endif + void iwm_mvm_rx_lmac_scan_complete_notif(struct iwm_softc *sc, struct iwm_rx_packet *pkt) { struct iwm_periodic_scan_complete *scan_notif = (void *)pkt->data; - boolean_t aborted = (scan_notif->status == IWM_SCAN_OFFLOAD_ABORTED); /* If this happens, the firmware has mistakenly sent an LMAC * notification during UMAC scans -- warn and ignore it. @@ -234,7 +241,7 @@ iwm_mvm_rx_lmac_scan_complete_notif(stru } IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "Regular scan %s, EBS status %s (FW)\n", - aborted ? "aborted" : "completed", + iwm_mvm_offload_status_str(scan_notif->status), iwm_mvm_ebs_status_str(scan_notif->ebs_status)); sc->last_ebs_successful = @@ -248,13 +255,11 @@ iwm_mvm_rx_umac_scan_complete_notif(stru struct iwm_rx_packet *pkt) { struct iwm_umac_scan_complete *notif = (void *)pkt->data; - uint32_t uid = le32toh(notif->uid); - boolean_t aborted = (notif->status == IWM_SCAN_OFFLOAD_ABORTED); IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "Scan completed, uid %u, status %s, EBS status %s\n", - uid, - aborted ? "aborted" : "completed", + le32toh(notif->uid), + iwm_mvm_offload_status_str(notif->status), iwm_mvm_ebs_status_str(notif->ebs_status)); if (notif->ebs_status != IWM_SCAN_EBS_SUCCESS &&