summaryrefslogtreecommitdiff
path: root/target/linux/generic
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-05-06 17:08:30 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-05-06 17:08:30 +0000
commit9b20187ad5a2055bcabb3ee905afade92aaa3be2 (patch)
treeeb5307a5e2a7d77d4a5f2ff535c85b957990f047 /target/linux/generic
parent9a34f9d01e04ae80e1eba30deaf7fc8382d01706 (diff)
downloadmtk-20170518-9b20187ad5a2055bcabb3ee905afade92aaa3be2.zip
mtk-20170518-9b20187ad5a2055bcabb3ee905afade92aaa3be2.tar.gz
mtk-20170518-9b20187ad5a2055bcabb3ee905afade92aaa3be2.tar.bz2
atheros: update to 3.3.4 (based on work by acoul), fix mvswitch driver for newer kernels
SVN-Revision: 31625
Diffstat (limited to 'target/linux/generic')
-rw-r--r--target/linux/generic/files/drivers/net/phy/mvswitch.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/mvswitch.c b/target/linux/generic/files/drivers/net/phy/mvswitch.c
index f3a9c74..1324a80 100644
--- a/target/linux/generic/files/drivers/net/phy/mvswitch.c
+++ b/target/linux/generic/files/drivers/net/phy/mvswitch.c
@@ -43,7 +43,6 @@ MODULE_LICENSE("GPL");
struct mvswitch_priv {
const struct net_device_ops *ndo_old;
struct net_device_ops ndo;
- struct vlan_group *grp;
u8 vlans[16];
};
@@ -162,9 +161,6 @@ mvswitch_mangle_rx(struct sk_buff *skb, int napi)
if (!priv)
goto error;
- if (!priv->grp)
- goto error;
-
#ifdef HEADER_MODE
buf = skb->data;
skb_pull(skb, MV_HEADER_SIZE);
@@ -185,10 +181,11 @@ mvswitch_mangle_rx(struct sk_buff *skb, int napi)
skb->protocol = eth_type_trans(skb, skb->dev);
+ __vlan_hwaccel_put_tag(skb, vlan);
if (napi)
- return vlan_hwaccel_receive_skb(skb, priv->grp, vlan);
+ return netif_receive_skb(skb);
else
- return vlan_hwaccel_rx(skb, priv->grp, vlan);
+ return netif_rx(skb);
error:
/* no vlan? eat the packet! */
@@ -210,14 +207,6 @@ mvswitch_netif_receive_skb(struct sk_buff *skb)
}
-static void
-mvswitch_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
-{
- struct mvswitch_priv *priv = dev->phy_ptr;
- priv->grp = grp;
-}
-
-
static int
mvswitch_wait_mask(struct phy_device *pdev, int addr, int reg, u16 mask, u16 val)
{
@@ -346,7 +335,6 @@ mvswitch_config_init(struct phy_device *pdev)
priv->ndo_old = dev->netdev_ops;
memcpy(&priv->ndo, priv->ndo_old, sizeof(struct net_device_ops));
priv->ndo.ndo_start_xmit = mvswitch_mangle_tx;
- priv->ndo.ndo_vlan_rx_register = mvswitch_vlan_rx_register;
dev->netdev_ops = &priv->ndo;
pdev->pkt_align = 2;