From c6329999bdc4f8d8e1b69baa61f239bf1e601760 Mon Sep 17 00:00:00 2001 From: Alexander Egorenkov Date: Tue, 16 Mar 2010 19:56:14 +0100 Subject: [PATCH] Use ieee80211_anyhdrsize/ieee80211_anyhdrspace instead of ieee80211_hdrsize/ieee80211_hdrspace because of control frames (e.g. BAR); Pass 1 as status to ieee80211_process_callback --- rt2860.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rt2860.c b/rt2860.c index 7558cb3..04532d6 100644 --- a/rt2860.c +++ b/rt2860.c @@ -4137,8 +4137,8 @@ static int rt2860_tx_mgmt(struct rt2860_softc *sc, /* calculate MPDU length without padding */ - hdrsize = ieee80211_hdrsize(wh); - hdrspace = ieee80211_hdrspace(ic, wh); + hdrsize = ieee80211_anyhdrsize(wh); + hdrspace = ieee80211_anyhdrspace(ic, wh); mpdu_len = m->m_pkthdr.len - hdrspace + hdrsize; memset(txwi, 0, sizeof(struct rt2860_txwi)); @@ -4505,8 +4505,8 @@ static int rt2860_tx_data(struct rt2860_softc *sc, /* calculate MPDU length without padding */ - hdrsize = ieee80211_hdrsize(wh); - hdrspace = ieee80211_hdrspace(ic, wh); + hdrsize = ieee80211_anyhdrsize(wh); + hdrspace = ieee80211_anyhdrspace(ic, wh); mpdu_len = m->m_pkthdr.len - hdrspace + hdrsize; memset(txwi, 0, sizeof(struct rt2860_txwi)); @@ -5837,7 +5837,7 @@ static void rt2860_tx_eof(struct rt2860_softc *sc, data = &ring->data[ring->data_next]; if (data->m->m_flags & M_TXCB) - ieee80211_process_callback(data->ni, data->m, 0); + ieee80211_process_callback(data->ni, data->m, 1); bus_dmamap_sync(ring->data_dma_tag, data->dma_map, BUS_DMASYNC_POSTWRITE); -- 2.11.4.GIT