diff options
| author | Andriy Voskoboinyk <avos@FreeBSD.org> | 2017-07-30 22:17:08 +0000 |
|---|---|---|
| committer | Andriy Voskoboinyk <avos@FreeBSD.org> | 2017-07-30 22:17:08 +0000 |
| commit | a08e9300f367d7ebd1e777c17d12957cd24b2ce9 (patch) | |
| tree | ba9249ead8e48a29b95cef2914533f1cc9a5994b /sys/dev/usb/wlan | |
| parent | 9adf30b0c32233d526b7cdbd9fee680a77eb1b8b (diff) | |
Notes
Diffstat (limited to 'sys/dev/usb/wlan')
| -rw-r--r-- | sys/dev/usb/wlan/if_zyd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/usb/wlan/if_zyd.c b/sys/dev/usb/wlan/if_zyd.c index de32bd02a677..5d9f7b10d6f9 100644 --- a/sys/dev/usb/wlan/if_zyd.c +++ b/sys/dev/usb/wlan/if_zyd.c @@ -648,11 +648,12 @@ zyd_intr_read_callback(struct usb_xfer *xfer, usb_error_t error) { 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_error_t error) 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_error_t error) 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); |
