summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions/network/40-netdev-hw-features
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-06-27 18:35:55 +0000
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-07-01 13:39:11 -0700
commitafe18ac2454e8ba8c3a45a837da7c7fca65c5aae (patch)
tree4c6922e03967d591f9d40b20ac5c0d987921528c /patches/collateral-evolutions/network/40-netdev-hw-features
parente3220f58fc08f986c3b84458d50eee2d3b983690 (diff)
backports: add new alx upstream backport
This backports the new upstream alx driver and properly splits up each required backports into its respective collateral evolution bucket. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Diffstat (limited to 'patches/collateral-evolutions/network/40-netdev-hw-features')
-rw-r--r--patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_alx_main.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_alx_main.patch b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_alx_main.patch
new file mode 100644
index 00000000..35e33717
--- /dev/null
+++ b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_alx_main.patch
@@ -0,0 +1,58 @@
+--- a/drivers/net/ethernet/atheros/alx/main.c
++++ b/drivers/net/ethernet/atheros/alx/main.c
+@@ -737,6 +737,7 @@ static int alx_init_sw(struct alx_priv *
+ }
+
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+ static netdev_features_t alx_fix_features(struct net_device *netdev,
+ netdev_features_t features)
+ {
+@@ -745,6 +746,7 @@ static netdev_features_t alx_fix_feature
+
+ return features;
+ }
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */
+
+ static void alx_netif_stop(struct alx_priv *alx)
+ {
+@@ -820,7 +822,17 @@ static int alx_change_mtu(struct net_dev
+ alx->hw.mtu = mtu;
+ alx->rxbuf_size = mtu > ALX_DEF_RXBUF_SIZE ?
+ ALIGN(max_frame, 8) : ALX_DEF_RXBUF_SIZE;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
++ if (mtu > (7*1024)) {
++ netdev->features &= ~NETIF_F_TSO;
++ netdev->features &= ~NETIF_F_TSO6;
++ } else {
++ netdev->features |= NETIF_F_TSO;
++ netdev->features |= NETIF_F_TSO6;
++ }
++#else
+ netdev_update_features(netdev);
++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */
+ if (netif_running(netdev))
+ alx_reinit(alx);
+ return 0;
+@@ -1238,7 +1250,9 @@ static const struct net_device_ops alx_n
+ .ndo_change_mtu = alx_change_mtu,
+ .ndo_do_ioctl = alx_ioctl,
+ .ndo_tx_timeout = alx_tx_timeout,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+ .ndo_fix_features = alx_fix_features,
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */
+ #ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = alx_poll_controller,
+ #endif
+@@ -1361,7 +1375,11 @@ static int alx_probe(struct pci_dev *pde
+ }
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+ netdev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM;
++#else
++ netdev->features = NETIF_F_SG | NETIF_F_HW_CSUM;
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */
+
+ if (alx_get_perm_macaddr(hw, hw->perm_addr)) {
+ dev_warn(&pdev->dev,