linux/debian/patches/features/all/alx/alx-update-for-3.10.patch

70 lines
2.3 KiB
Diff

From: Ben Hutchings <ben@decadent.org.uk>
Subject: alx: update for 3.10
Date: Mon, 03 Jun 2013 02:41:11 +0100
Bug-Debian: http://bugs.debian.org/699129
Forwarded: no
The VLAN infrastructure now supports both C-tags or S-tags, so we need
to be explicit that we support C-tags only.
--- a/drivers/net/ethernet/atheros/alx/alx_main.c
+++ b/drivers/net/ethernet/atheros/alx/alx_main.c
@@ -432,7 +432,7 @@ static void alx_receive_skb(struct alx_a
if (vlan_flag) {
u16 vlan;
ALX_TAG_TO_VLAN(vlan_tag, vlan);
- __vlan_hwaccel_put_tag(skb, vlan);
+ __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan);
}
netif_receive_skb(skb);
}
@@ -1465,7 +1465,7 @@ static void alx_vlan_mode(struct net_dev
if (!CHK_ADPT_FLAG(1, STATE_DOWN))
alx_disable_intr(adpt);
- if (features & NETIF_F_HW_VLAN_RX) {
+ if (features & NETIF_F_HW_VLAN_CTAG_RX) {
/* enable VLAN tag insert/strip */
SET_HW_FLAG(VLANSTRIP_EN);
} else {
@@ -2487,10 +2487,10 @@ static netdev_features_t alx_fix_feature
* Since there is no support for separate rx/tx vlan accel
* enable/disable make sure tx flag is always in same state as rx.
*/
- if (features & NETIF_F_HW_VLAN_RX)
- features |= NETIF_F_HW_VLAN_TX;
+ if (features & NETIF_F_HW_VLAN_CTAG_RX)
+ features |= NETIF_F_HW_VLAN_CTAG_TX;
else
- features &= ~NETIF_F_HW_VLAN_TX;
+ features &= ~NETIF_F_HW_VLAN_CTAG_TX;
if (netdev->mtu > ALX_MAX_TSO_PKT_SIZE ||
adpt->hw.mac_type == alx_mac_l1c ||
@@ -2506,7 +2506,7 @@ static int alx_set_features(struct net_d
{
netdev_features_t changed = netdev->features ^ features;
- if (changed & NETIF_F_HW_VLAN_RX)
+ if (changed & NETIF_F_HW_VLAN_CTAG_RX)
alx_vlan_mode(netdev, features);
return 0;
}
@@ -3577,7 +3577,7 @@ static int alx_init(struct pci_dev *pdev
netdev->hw_features = NETIF_F_SG |
NETIF_F_HW_CSUM |
- NETIF_F_HW_VLAN_RX;
+ NETIF_F_HW_VLAN_CTAG_RX;
if (adpt->hw.mac_type != alx_mac_l1c &&
adpt->hw.mac_type != alx_mac_l2c) {
netdev->hw_features = netdev->hw_features |
@@ -3585,7 +3585,7 @@ static int alx_init(struct pci_dev *pdev
NETIF_F_TSO6;
}
netdev->features = netdev->hw_features |
- NETIF_F_HW_VLAN_TX;
+ NETIF_F_HW_VLAN_CTAG_TX;
/* get mac addr and perm mac addr, set to register */
if (hw->cbs.get_mac_addr)