X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=blobdiff_plain;f=carlfw%2Fsrc%2Fwlan.c;h=d3328d67e74a9be0a57cc467ce3af72548114e6c;hp=c23831bd358ffad0f2a4d5453e4f838dbb85004f;hb=3ea9a05ea4197045ff042588b06f3a270db9b8a3;hpb=4b209fe6b104793582c9286c0367a1a9ff83e8e8 diff --git a/carlfw/src/wlan.c b/carlfw/src/wlan.c index c23831b..d3328d6 100644 --- a/carlfw/src/wlan.c +++ b/carlfw/src/wlan.c @@ -459,6 +459,10 @@ static bool wlan_tx_status(struct dma_queue *queue, wlan_tx_complete(super, success); + if (ieee80211_is_back_req(super->f.data.i3e.frame_control)) { + fw.wlan.queued_bar--; + } + /* recycle freed descriptors */ dma_reclaim(&fw.pta.down_queue, desc); down_trigger(); @@ -493,6 +497,10 @@ void __hot wlan_tx(struct dma_desc *desc) { struct carl9170_tx_superframe *super = DESC_PAYLOAD(desc); + if (ieee80211_is_back_req(super->f.data.i3e.frame_control)) { + fw.wlan.queued_bar++; + } + /* initialize rate control struct */ super->s.rix = 0; super->s.cnt = 1; @@ -693,12 +701,22 @@ static unsigned int wlan_rx_filter(struct dma_desc *desc) switch (le16_to_cpu(hdr->frame_control) & IEEE80211_FCTL_STYPE) { case IEEE80211_STYPE_BACK_REQ: handle_bar(desc, hdr, data_len, mac_err); - /* fallthrough */ rx_filter |= CARL9170_RX_FILTER_CTL_BACKR; break; case IEEE80211_STYPE_PSPOLL: rx_filter |= CARL9170_RX_FILTER_CTL_PSPOLL; break; + case IEEE80211_STYPE_BACK: + if (fw.wlan.queued_bar) { + /* + * Don't filter block acks when the application + * has queued BARs. This is because the firmware + * can't do the accouting and the application + * has to sort out if the BA belongs to any BARs. + */ + break; + } + /* otherwise fall through */ default: rx_filter |= CARL9170_RX_FILTER_CTL_OTHER; break;