On Tue, Sep 20, 2016 at 11:53:41AM +0200, Stefan Sperling wrote: > On Tue, Sep 20, 2016 at 10:46:54AM +0200, Jan Stary wrote: > > This is ALIX 2C1, just upgraded to current/i386 (dmesg below). > > It serves as a wifi AP using ral(4). The console gets spammed with > > > > ral0: sending data frame failed 0x02faaafa > > > > This used to work fine since 5.9/i386. > > This is the only known fallout from ieee80211_proto.c r1.68 and seems to > affect ral 2560 chips only. Apparently this driver has always had a bug > with RTS/CTS and the wireless stack is now triggering it.
This seems to be a transmission failure mode which Linux rt2x00 simply ignores. We don't have a name for it, and neither has linux, and I don't have docs, so I don't know what the reason for the failure mode could be. It's curious that this started showing up when we enabled RTS/CTS for large frames, but RTS/CTS seems to be working fine and was already being enabled in other cases. For now, I'd just disable this message and only show it if the driver is compiled in debug mode. The only problem with this driver/device I've observed is that transmit rates are fairly slow. It settles at 1Mbit/s and never recovers, which means the ral(4) device is retrying frames excessively. But I don't believe that's a new problem. I remember using ral(4) as my AP years ago and speed always sucked even back then. There might be other bugs to fix in here but this message by itself won't help us find them. Index: rt2560.c =================================================================== RCS file: /cvs/src/sys/dev/ic/rt2560.c,v retrieving revision 1.80 diff -u -p -r1.80 rt2560.c --- rt2560.c 13 Apr 2016 10:49:26 -0000 1.80 +++ rt2560.c 5 Oct 2016 22:53:37 -0000 @@ -959,9 +959,10 @@ rt2560_tx_intr(struct rt2560_softc *sc) case RT2560_TX_FAIL_INVALID: case RT2560_TX_FAIL_OTHER: default: - printf("%s: sending data frame failed 0x%08x\n", - sc->sc_dev.dv_xname, letoh32(desc->flags)); + DPRINTF(("%s: sending data frame failed 0x%08x\n", + sc->sc_dev.dv_xname, letoh32(desc->flags))); ifp->if_oerrors++; + break; } /* descriptor is no longer valid */ @@ -1031,8 +1032,9 @@ rt2560_prio_intr(struct rt2560_softc *sc case RT2560_TX_FAIL_INVALID: case RT2560_TX_FAIL_OTHER: default: - printf("%s: sending mgt frame failed 0x%08x\n", - sc->sc_dev.dv_xname, letoh32(desc->flags)); + DPRINTF(("%s: sending mgt frame failed 0x%08x\n", + sc->sc_dev.dv_xname, letoh32(desc->flags))); + break; } /* descriptor is no longer valid */ @@ -1945,6 +1947,8 @@ rt2560_start(struct ifnet *ifp) break; } else { + /* Because RTS/CTS requires an extra frame we need + * space for 2 frames on the regular Tx queue. */ if (sc->txq.queued >= RT2560_TX_RING_COUNT - 1) { ifq_set_oactive(&ifp->if_snd); sc->sc_flags |= RT2560_DATA_OACTIVE;