]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
r8152: correct the rx early size
authorhayeswang <hayeswang@realtek.com>
Thu, 16 Jun 2016 02:55:19 +0000 (10:55 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Jun 2016 06:39:18 +0000 (23:39 -0700)
The rx early size should be

(agg_buf_sz - packet size) / 8

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c

index f5bc351e09ef06c271d3dd9e6ad7dd0ecf12835c..4e257b8d8f3e37e616e9ea5b5bf0de3d037bae90 100644 (file)
@@ -31,7 +31,7 @@
 #define NETNEXT_VERSION                "08"
 
 /* Information for net */
-#define NET_VERSION            "3"
+#define NET_VERSION            "4"
 
 #define DRIVER_VERSION         "v1." NETNEXT_VERSION "." NET_VERSION
 #define DRIVER_AUTHOR "Realtek linux nic maintainers <nic_swsd@realtek.com>"
@@ -2174,7 +2174,7 @@ static void r8153_set_rx_early_timeout(struct r8152 *tp)
 static void r8153_set_rx_early_size(struct r8152 *tp)
 {
        u32 mtu = tp->netdev->mtu;
-       u32 ocp_data = (agg_buf_sz - mtu - VLAN_ETH_HLEN - VLAN_HLEN) / 4;
+       u32 ocp_data = (agg_buf_sz - mtu - VLAN_ETH_HLEN - VLAN_HLEN) / 8;
 
        ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_SIZE, ocp_data);
 }