diff options
author | Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> | 2014-03-17 09:34:22 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-03-17 13:44:18 -0400 |
commit | b5998e6a3d695c9261a1b1d9cf27db526aa72b3b (patch) | |
tree | ebc69a4d9b844564971ce8aef719bbe95678d729 /drivers/net | |
parent | 9c3bde56b7e6403a9f86b63bb02c9a5cb74456fa (diff) |
wil6210: use GRO
GRO is easy to enable when already using NAPI framework,
and it improves CPU utilisation. Enable it by default.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/netdev.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/txrx.c | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/wil6210/netdev.c b/drivers/net/wireless/ath/wil6210/netdev.c index 5991802a6701..fdcaeb820e75 100644 --- a/drivers/net/wireless/ath/wil6210/netdev.c +++ b/drivers/net/wireless/ath/wil6210/netdev.c | |||
@@ -128,7 +128,7 @@ void *wil_if_alloc(struct device *dev, void __iomem *csr) | |||
128 | ndev->netdev_ops = &wil_netdev_ops; | 128 | ndev->netdev_ops = &wil_netdev_ops; |
129 | ndev->ieee80211_ptr = wdev; | 129 | ndev->ieee80211_ptr = wdev; |
130 | ndev->hw_features = NETIF_F_HW_CSUM | NETIF_F_RXCSUM | | 130 | ndev->hw_features = NETIF_F_HW_CSUM | NETIF_F_RXCSUM | |
131 | NETIF_F_SG; | 131 | NETIF_F_SG | NETIF_F_GRO; |
132 | ndev->features |= ndev->hw_features; | 132 | ndev->features |= ndev->hw_features; |
133 | SET_NETDEV_DEV(ndev, wiphy_dev(wdev->wiphy)); | 133 | SET_NETDEV_DEV(ndev, wiphy_dev(wdev->wiphy)); |
134 | wdev->netdev = ndev; | 134 | wdev->netdev = ndev; |
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index 97d036adb382..cfd36cc0336b 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c | |||
@@ -488,7 +488,7 @@ static int wil_rx_refill(struct wil6210_priv *wil, int count) | |||
488 | */ | 488 | */ |
489 | void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev) | 489 | void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev) |
490 | { | 490 | { |
491 | int rc; | 491 | gro_result_t rc; |
492 | struct wil6210_priv *wil = ndev_to_wil(ndev); | 492 | struct wil6210_priv *wil = ndev_to_wil(ndev); |
493 | unsigned int len = skb->len; | 493 | unsigned int len = skb->len; |
494 | struct vring_rx_desc *d = wil_skb_rxdesc(skb); | 494 | struct vring_rx_desc *d = wil_skb_rxdesc(skb); |
@@ -497,17 +497,17 @@ void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev) | |||
497 | 497 | ||
498 | skb_orphan(skb); | 498 | skb_orphan(skb); |
499 | 499 | ||
500 | rc = netif_receive_skb(skb); | 500 | rc = napi_gro_receive(&wil->napi_rx, skb); |
501 | 501 | ||
502 | if (likely(rc == NET_RX_SUCCESS)) { | 502 | if (unlikely(rc == GRO_DROP)) { |
503 | ndev->stats.rx_dropped++; | ||
504 | stats->rx_dropped++; | ||
505 | wil_dbg_txrx(wil, "Rx drop %d bytes\n", len); | ||
506 | } else { | ||
503 | ndev->stats.rx_packets++; | 507 | ndev->stats.rx_packets++; |
504 | stats->rx_packets++; | 508 | stats->rx_packets++; |
505 | ndev->stats.rx_bytes += len; | 509 | ndev->stats.rx_bytes += len; |
506 | stats->rx_bytes += len; | 510 | stats->rx_bytes += len; |
507 | |||
508 | } else { | ||
509 | ndev->stats.rx_dropped++; | ||
510 | stats->rx_dropped++; | ||
511 | } | 511 | } |
512 | } | 512 | } |
513 | 513 | ||