summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mac80211.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-01-24 16:19:14 +0100
committerKalle Valo <kvalo@codeaurora.org>2018-01-26 10:18:39 +0100
commitaee5b8cf2477bbb293cb84a4f726f5c0f91f587e (patch)
treedc5e4cdb5f4c35af89432ad85bf13c8693b96552 /drivers/net/wireless/mediatek/mt76/mac80211.c
parentmt76: get station pointer by wcid and pass it to mac80211 (diff)
downloadlinux-aee5b8cf2477bbb293cb84a4f726f5c0f91f587e.tar.xz
linux-aee5b8cf2477bbb293cb84a4f726f5c0f91f587e.zip
mt76: implement A-MPDU rx reordering in the driver code
This is required for performing CCMP PN validation in software Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mac80211.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mac80211.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index c1982211d658..5978e5b0a2fe 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -384,8 +384,7 @@ int mt76_get_survey(struct ieee80211_hw *hw, int idx,
}
EXPORT_SYMBOL_GPL(mt76_get_survey);
-static struct ieee80211_sta *
-mt76_rx_convert(struct sk_buff *skb)
+struct ieee80211_sta *mt76_rx_convert(struct sk_buff *skb)
{
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct mt76_rx_status mstat;
@@ -414,9 +413,15 @@ mt76_rx_convert(struct sk_buff *skb)
void mt76_rx_complete(struct mt76_dev *dev, enum mt76_rxq_id q)
{
struct ieee80211_sta *sta;
+ struct sk_buff_head frames;
struct sk_buff *skb;
- while ((skb = __skb_dequeue(&dev->rx_skb[q])) != NULL) {
+ __skb_queue_head_init(&frames);
+
+ while ((skb = __skb_dequeue(&dev->rx_skb[q])) != NULL)
+ mt76_rx_aggr_reorder(skb, &frames);
+
+ while ((skb = __skb_dequeue(&frames)) != NULL) {
sta = mt76_rx_convert(skb);
ieee80211_rx_napi(dev->hw, sta, skb, &dev->napi[q]);
}