Skip to content

Commit

Permalink
mt76: use ieee80211_rx_list to pass frames to the network stack as a …
Browse files Browse the repository at this point in the history
…batch

Improves icache footprint

Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Aug 22, 2020
1 parent 72f0979 commit f9ce5c7
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions mac80211.c
Expand Up @@ -952,7 +952,8 @@ void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames,
{
struct ieee80211_sta *sta;
struct ieee80211_hw *hw;
struct sk_buff *skb;
struct sk_buff *skb, *tmp;
LIST_HEAD(list);

spin_lock(&dev->rx_lock);
while ((skb = __skb_dequeue(frames)) != NULL) {
Expand All @@ -962,9 +963,19 @@ void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames,
}

mt76_rx_convert(dev, skb, &hw, &sta);
ieee80211_rx_napi(hw, sta, skb, napi);
ieee80211_rx_list(hw, sta, skb, &list);
}
spin_unlock(&dev->rx_lock);

if (!napi) {
netif_receive_skb_list(&list);
return;
}

list_for_each_entry_safe(skb, tmp, &list, list) {
skb_list_del_init(skb);
napi_gro_receive(napi, skb);
}
}

void mt76_rx_poll_complete(struct mt76_dev *dev, enum mt76_rxq_id q,
Expand Down

0 comments on commit f9ce5c7

Please sign in to comment.