Date: Mon, 2 Dec 2013 09:07:44 +0000 (UTC) From: Kevin Lo <kevlo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258840 - head/sys/dev/usb/wlan Message-ID: <201312020907.rB297iIL038802@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevlo Date: Mon Dec 2 09:07:43 2013 New Revision: 258840 URL: http://svnweb.freebsd.org/changeset/base/258840 Log: The RUN_MAX_TXSZ constat is defined as Tx desc + Tx wireless info + MCLBYTES + max padding. We were lucky in that run(4) working fine since both rt2860_rxwi and rt2860_txwi structure sizes are the same. Modified: head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_runvar.h Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Mon Dec 2 08:36:53 2013 (r258839) +++ head/sys/dev/usb/wlan/if_run.c Mon Dec 2 09:07:43 2013 (r258840) @@ -3167,8 +3167,9 @@ run_tx(struct run_softc *sc, struct mbuf usbd_transfer_start(sc->sc_xfer[qid]); - DPRINTFN(8, "sending data frame len=%d rate=%d qid=%d\n", m->m_pkthdr.len + - (int)(sizeof (struct rt2870_txd) + sizeof (struct rt2860_rxwi)), + DPRINTFN(8, "sending data frame len=%d rate=%d qid=%d\n", + m->m_pkthdr.len + + (int)(sizeof(struct rt2870_txd) + sizeof(struct rt2860_txwi)), rt2860_rates[ridx].rate, qid); return (0); @@ -3233,7 +3234,7 @@ run_tx_mgt(struct run_softc *sc, struct run_set_tx_desc(sc, data); DPRINTFN(10, "sending mgt frame len=%d rate=%d\n", m->m_pkthdr.len + - (int)(sizeof (struct rt2870_txd) + sizeof (struct rt2860_rxwi)), + (int)(sizeof(struct rt2870_txd) + sizeof(struct rt2860_txwi)), rt2860_rates[ridx].rate); STAILQ_INSERT_TAIL(&sc->sc_epq[0].tx_qh, data, next); Modified: head/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_runvar.h Mon Dec 2 08:36:53 2013 (r258839) +++ head/sys/dev/usb/wlan/if_runvar.h Mon Dec 2 09:07:43 2013 (r258840) @@ -35,7 +35,7 @@ /* NB: "11" is the maximum number of padding bytes needed for Tx */ #define RUN_MAX_TXSZ \ (sizeof (struct rt2870_txd) + \ - sizeof (struct rt2860_rxwi) + \ + sizeof (struct rt2860_txwi) + \ MCLBYTES + 11) #define RUN_TX_TIMEOUT 5000 /* ms */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312020907.rB297iIL038802>