Add a very hacked up station only A-MPDU negotiation path.
This is enough to set things up; there are still lots of retransmits seen but it's enough to get things working.
This commit is contained in:
parent
1f3a8d1129
commit
237c4b4378
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=287949
@ -1318,6 +1318,35 @@ rsu_event_join_bss(struct rsu_softc *sc, uint8_t *buf, int len)
|
||||
RSU_LOCK(sc);
|
||||
}
|
||||
|
||||
static void
|
||||
rsu_event_addba_req_report(struct rsu_softc *sc, uint8_t *buf, int len)
|
||||
{
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
|
||||
struct r92s_add_ba_event *ba = (void *) buf;
|
||||
struct ieee80211_node *ni;
|
||||
|
||||
if (len < sizeof(*ba)) {
|
||||
device_printf(sc->sc_dev, "%s: short read (%d)\n", __func__, len);
|
||||
return;
|
||||
}
|
||||
|
||||
if (vap == NULL)
|
||||
return;
|
||||
|
||||
device_printf(sc->sc_dev, "%s: mac=%s, tid=%d, ssn=%d\n",
|
||||
__func__,
|
||||
ether_sprintf(ba->mac_addr),
|
||||
(int) ba->tid,
|
||||
(int) le16toh(ba->ssn));
|
||||
|
||||
/* XXX do node lookup; this is STA specific */
|
||||
|
||||
ni = ieee80211_ref_node(vap->iv_bss);
|
||||
ieee80211_ampdu_rx_start_ext(ni, ba->tid, le16toh(ba->ssn) >> 4, 32);
|
||||
ieee80211_free_node(ni);
|
||||
}
|
||||
|
||||
static void
|
||||
rsu_rx_event(struct rsu_softc *sc, uint8_t code, uint8_t *buf, int len)
|
||||
{
|
||||
@ -1370,6 +1399,10 @@ rsu_rx_event(struct rsu_softc *sc, uint8_t code, uint8_t *buf, int len)
|
||||
buf[60] = '\0';
|
||||
RSU_DPRINTF(sc, RSU_DEBUG_FWDBG, "FWDBG: %s\n", (char *)buf);
|
||||
break;
|
||||
|
||||
case R92S_EVT_ADDBA_REQ_REPORT:
|
||||
rsu_event_addba_req_report(sc, buf, len);
|
||||
break;
|
||||
default:
|
||||
RSU_DPRINTF(sc, RSU_DEBUG_ANY, "%s: unhandled code (%d)\n",
|
||||
__func__, code);
|
||||
@ -1640,6 +1673,8 @@ rsu_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error)
|
||||
ni = ieee80211_find_rxnode(ic,
|
||||
(struct ieee80211_frame_min *)wh);
|
||||
if (ni != NULL) {
|
||||
if (ni->ni_flags & IEEE80211_NODE_HT)
|
||||
m->m_flags |= M_AMPDU;
|
||||
(void)ieee80211_input(ni, m, rssi, 0);
|
||||
ieee80211_free_node(ni);
|
||||
} else
|
||||
|
@ -593,6 +593,11 @@ struct r92s_tx_desc {
|
||||
uint16_t reserved1;
|
||||
} __packed __aligned(4);
|
||||
|
||||
struct r92s_add_ba_event {
|
||||
uint8_t mac_addr[IEEE80211_ADDR_LEN];
|
||||
uint16_t ssn;
|
||||
uint8_t tid;
|
||||
};
|
||||
|
||||
/*
|
||||
* Driver definitions.
|
||||
|
Loading…
Reference in New Issue
Block a user