Date: Sun, 3 May 2015 22:49:47 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282378 - head/sys/dev/wpi Message-ID: <201505032249.t43Mnl8s069803@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sun May 3 22:49:47 2015 New Revision: 282378 URL: https://svnweb.freebsd.org/changeset/base/282378 Log: Add TX status codes (obtained from iwlegacy) PR: kern/197143 Differential Revision: Andriy Voskoboinyk <s3erios@gmail.com> Obtained from: Linux drivers/net/wireless/iwlegacy Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpireg.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun May 3 22:47:06 2015 (r282377) +++ head/sys/dev/wpi/if_wpi.c Sun May 3 22:49:47 2015 (r282378) @@ -1983,7 +1983,7 @@ wpi_tx_done(struct wpi_softc *sc, struct /* * Update rate control statistics for the node. */ - if ((status & 0xff) != 1) { + if (status & WPI_TX_STATUS_FAIL) { if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); ieee80211_ratectl_tx_complete(vap, ni, IEEE80211_RATECTL_TX_FAILURE, &ackfailcnt, NULL); @@ -1993,7 +1993,7 @@ wpi_tx_done(struct wpi_softc *sc, struct IEEE80211_RATECTL_TX_SUCCESS, &ackfailcnt, NULL); } - ieee80211_tx_complete(ni, m, (status & 0xff) != 1); + ieee80211_tx_complete(ni, m, (status & WPI_TX_STATUS_FAIL) != 0); WPI_TXQ_STATE_LOCK(sc); ring->queued -= 1; Modified: head/sys/dev/wpi/if_wpireg.h ============================================================================== --- head/sys/dev/wpi/if_wpireg.h Sun May 3 22:47:06 2015 (r282377) +++ head/sys/dev/wpi/if_wpireg.h Sun May 3 22:49:47 2015 (r282378) @@ -256,6 +256,26 @@ struct wpi_tx_stat { uint8_t rate; uint32_t duration; uint32_t status; +#define WPI_TX_STATUS_SUCCESS 0x01 +#define WPI_TX_STATUS_DIRECT_DONE 0x02 +#define WPI_TX_STATUS_FAIL 0x80 +#define WPI_TX_STATUS_FAIL_SHORT_LIMIT 0x82 +#define WPI_TX_STATUS_FAIL_LONG_LIMIT 0x83 +#define WPI_TX_STATUS_FAIL_FIFO_UNDERRUN 0x84 +#define WPI_TX_STATUS_FAIL_MGMNT_ABORT 0x85 +#define WPI_TX_STATUS_FAIL_NEXT_FRAG 0x86 +#define WPI_TX_STATUS_FAIL_LIFE_EXPIRE 0x87 +#define WPI_TX_STATUS_FAIL_NODE_PS 0x88 +#define WPI_TX_STATUS_FAIL_ABORTED 0x89 +#define WPI_TX_STATUS_FAIL_BT_RETRY 0x8a +#define WPI_TX_STATUS_FAIL_NODE_INVALID 0x8b +#define WPI_TX_STATUS_FAIL_FRAG_DROPPED 0x8c +#define WPI_TX_STATUS_FAIL_TID_DISABLE 0x8d +#define WPI_TX_STATUS_FAIL_FRAME_FLUSHED 0x8e +#define WPI_TX_STATUS_FAIL_INSUFFICIENT_CF_POLL 0x8f +#define WPI_TX_STATUS_FAIL_TX_LOCKED 0x90 +#define WPI_TX_STATUS_FAIL_NO_BEACON_ON_RADAR 0x91 + } __packed; struct wpi_rx_desc {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505032249.t43Mnl8s069803>