Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/alx_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1797,6 +1797,6 @@ static const struct ethtool_ops alx_ethtool_ops = {

void alx_set_ethtool_ops(struct net_device *dev)
{
SET_ETHTOOL_OPS(dev, &alx_ethtool_ops);
dev->ethtool_ops = &alx_ethtool_ops;
}

26 changes: 13 additions & 13 deletions src/alx_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ static bool alx_dispatch_skb(struct alx_rx_queue *rxq)
/* vlan tag */
if (rrd->word3 & (1 << RRD_VLTAGGED_SHIFT)) {
u16 tag = ntohs(FIELD_GETX(rrd->word2, RRD_VLTAG));
__vlan_hwaccel_put_tag(skb, ntohs(tag));
__vlan_hwaccel_put_tag(skb, ntohs(tag), skb->vlan_tci);
}
qnum = FIELD_GETX(rrd->word2, RRD_RSSQ) % adpt->nr_rxq;
tmp_rxq = ALX_CAP(&adpt->hw, MRQ) ?
Expand Down Expand Up @@ -1129,7 +1129,7 @@ static int alx_init_sw(struct alx_adapter *adpt)
static void alx_set_vlan_mode(struct alx_hw *hw,
netdev_features_t features)
{
if (features & NETIF_F_HW_VLAN_RX)
if (features & NETIF_F_HW_VLAN_CTAG_RX)
hw->rx_ctrl |= ALX_MAC_CTRL_VLANSTRIP;
else
hw->rx_ctrl &= ~ALX_MAC_CTRL_VLANSTRIP;
Expand All @@ -1145,10 +1145,10 @@ static netdev_features_t alx_fix_features(struct net_device *netdev,
* 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)
features &= ~(NETIF_F_TSO | NETIF_F_TSO6);
Expand All @@ -1163,7 +1163,7 @@ static int alx_set_features(struct net_device *netdev,
struct alx_adapter *adpt = netdev_priv(netdev);
netdev_features_t changed = netdev->features ^ features;

if (!(changed & NETIF_F_HW_VLAN_RX))
if (!(changed & NETIF_F_HW_VLAN_CTAG_RX))
return 0;

alx_set_vlan_mode(&adpt->hw, features);
Expand Down Expand Up @@ -2256,9 +2256,9 @@ static netdev_tx_t alx_start_xmit_ring(struct alx_tx_queue *txq,
memset(first, 0, sizeof(struct tpd_desc));

/* NOTE, chip only supports single-VLAN insertion (81-00-TAG) */
if (vlan_tx_tag_present(skb)) {
if (skb_vlan_tag_present(skb)) {
first->word1 |= 1 << TPD_INS_VLTAG_SHIFT;
first->word0 |= FIELDX(TPD_VLTAG, htons(vlan_tx_tag_get(skb)));
first->word0 |= FIELDX(TPD_VLTAG, htons(skb_vlan_tag_get(skb)));
}
if (skb->protocol == htons(ETH_P_8021Q))
first->word1 |= 1 << TPD_VLTAGGED_SHIFT;
Expand Down Expand Up @@ -2608,12 +2608,12 @@ alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
}
}

netdev->hw_features = NETIF_F_SG |
NETIF_F_HW_CSUM |
NETIF_F_HW_VLAN_RX |
NETIF_F_TSO |
netdev->hw_features = NETIF_F_SG |
NETIF_F_HW_CSUM |
NETIF_F_HW_VLAN_CTAG_RX |
NETIF_F_TSO |
NETIF_F_TSO6;
netdev->features = netdev->hw_features | NETIF_F_HW_VLAN_TX;
netdev->features = netdev->hw_features | NETIF_F_HW_VLAN_CTAG_TX;

/* read permanent mac addr from register or eFuse */
if (alx_get_perm_macaddr(hw, hw->perm_addr)) {
Expand Down