mediatek: update patches
[openwrt.git] / target / linux / mediatek / patches-4.4 / 0066-net-next-mediatek-mtk_cal_txd_req-returns-bad-value.patch
1 From a160c7846e1f81b5cd6c5d0fbe5c1f8757e8884b Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Tue, 22 Mar 2016 04:42:27 +0100
4 Subject: [PATCH 66/66] net-next: mediatek: mtk_cal_txd_req() returns bad
5  value
6
7 The code used to also support the PDMA engine, which had 2 packet pointers
8 per descriptor. Because of this we have to divide the result by 2 and round
9 it up. This is no longer needed as the code only supports QDMA.
10
11 Signed-off-by: John Crispin <blogic@openwrt.org>
12 ---
13  drivers/net/ethernet/mediatek/mtk_eth_soc.c |    2 +-
14  1 file changed, 1 insertion(+), 1 deletion(-)
15
16 diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
17 index dd7f6e3..da9968ae 100644
18 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
19 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
20 @@ -693,7 +693,7 @@ static inline int mtk_cal_txd_req(struct sk_buff *skb)
21                 nfrags += skb_shinfo(skb)->nr_frags;
22         }
23  
24 -       return DIV_ROUND_UP(nfrags, 2);
25 +       return nfrags;
26  }
27  
28  static int mtk_start_xmit(struct sk_buff *skb, struct net_device *dev)
29 -- 
30 1.7.10.4
31