Date: Mon, 27 Mar 2017 07:02:27 +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: r316010 - head/sys/dev/iwm Message-ID: <201703270702.v2R72ROX035041@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <ohartmann@walstatt.org> 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 &&
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703270702.v2R72ROX035041>