From owner-svn-src-all@freebsd.org Sun Jul 30 22:17:10 2017 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 F2624DC380D; Sun, 30 Jul 2017 22:17:09 +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 B2DCE82B55; Sun, 30 Jul 2017 22:17:09 +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 v6UMH8lQ074932; Sun, 30 Jul 2017 22:17:08 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6UMH8ff074931; Sun, 30 Jul 2017 22:17:08 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201707302217.v6UMH8ff074931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 30 Jul 2017 22:17:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321732 - head/sys/dev/usb/wlan X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/dev/usb/wlan X-SVN-Commit-Revision: 321732 X-SVN-Commit-Repository: base 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.23 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: Sun, 30 Jul 2017 22:17:10 -0000 Author: avos Date: Sun Jul 30 22:17:08 2017 New Revision: 321732 URL: https://svnweb.freebsd.org/changeset/base/321732 Log: zyd: code cleanup + drop unneeded cast. No functional change intended. Modified: head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Sun Jul 30 21:57:19 2017 (r321731) +++ head/sys/dev/usb/wlan/if_zyd.c Sun Jul 30 22:17:08 2017 (r321732) @@ -648,11 +648,12 @@ zyd_intr_read_callback(struct usb_xfer *xfer, usb_erro { struct zyd_notif_retry *retry = (struct zyd_notif_retry *)cmd->data; + uint16_t count = le16toh(retry->count); DPRINTF(sc, ZYD_DEBUG_TX_PROC, "retry intr: rate=0x%x addr=%s count=%d (0x%x)\n", le16toh(retry->rate), ether_sprintf(retry->macaddr), - le16toh(retry->count)&0xff, le16toh(retry->count)); + count & 0xff, count); /* * Find the node to which the packet was sent and @@ -664,13 +665,12 @@ zyd_intr_read_callback(struct usb_xfer *xfer, usb_erro if (ni != NULL) { struct ieee80211_ratectl_tx_status *txs = &sc->sc_txs; - int retrycnt = - (int)(le16toh(retry->count) & 0xff); + int retrycnt = count & 0xff; txs->flags = IEEE80211_RATECTL_STATUS_LONG_RETRY; txs->long_retries = retrycnt; - if (le16toh(retry->count) & 0x100) { + if (count & 0x100) { txs->status = IEEE80211_RATECTL_TX_FAIL_LONG; } else { @@ -682,7 +682,7 @@ zyd_intr_read_callback(struct usb_xfer *xfer, usb_erro ieee80211_ratectl_tx_complete(ni, txs); ieee80211_free_node(ni); } - if (le16toh(retry->count) & 0x100) + if (count & 0x100) /* too many retries */ if_inc_counter(vap->iv_ifp, IFCOUNTER_OERRORS, 1);