aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar7
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-05-06 21:19:14 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-05-06 21:19:14 +0000
commit0ff3c396d39e762cb0230eb84b9bd1d29dddc520 (patch)
tree25a23535641b48d2b83e90e007c977404cade1b7 /target/linux/ar7
parentc3f0b757a3bd952f8d85753cd975618a3008ab36 (diff)
downloadupstream-0ff3c396d39e762cb0230eb84b9bd1d29dddc520.tar.gz
upstream-0ff3c396d39e762cb0230eb84b9bd1d29dddc520.tar.bz2
upstream-0ff3c396d39e762cb0230eb84b9bd1d29dddc520.zip
kernel: rewrite the phy packet hook, put it in the network stack to avoid having to keep non-upstream ethernet driver changes
SVN-Revision: 31637
Diffstat (limited to 'target/linux/ar7')
-rw-r--r--target/linux/ar7/patches-3.3/973-cpmac_handle_mvswitch.patch70
1 files changed, 0 insertions, 70 deletions
diff --git a/target/linux/ar7/patches-3.3/973-cpmac_handle_mvswitch.patch b/target/linux/ar7/patches-3.3/973-cpmac_handle_mvswitch.patch
deleted file mode 100644
index 9c2ab5057b..0000000000
--- a/target/linux/ar7/patches-3.3/973-cpmac_handle_mvswitch.patch
+++ /dev/null
@@ -1,70 +0,0 @@
---- a/drivers/net/ethernet/ti/cpmac.c
-+++ b/drivers/net/ethernet/ti/cpmac.c
-@@ -373,6 +373,7 @@ static struct sk_buff *cpmac_rx_one(stru
- struct cpmac_desc *desc)
- {
- struct sk_buff *skb, *result = NULL;
-+ int offset;
-
- if (unlikely(netif_msg_hw(priv)))
- cpmac_dump_desc(priv->dev, desc);
-@@ -384,10 +385,15 @@ static struct sk_buff *cpmac_rx_one(stru
- return NULL;
- }
-
-- skb = netdev_alloc_skb_ip_align(priv->dev, CPMAC_SKB_SIZE);
-+ skb = netdev_alloc_skb(priv->dev, CPMAC_SKB_SIZE);
- if (likely(skb)) {
-+ offset = 2;
-+ if (priv->phy) {
-+ offset += priv->phy->pkt_align;
-+ }
-+ skb_reserve(skb, offset);
-+
- skb_put(desc->skb, desc->datalen);
-- desc->skb->protocol = eth_type_trans(desc->skb, priv->dev);
- skb_checksum_none_assert(desc->skb);
- priv->dev->stats.rx_packets++;
- priv->dev->stats.rx_bytes += desc->datalen;
-@@ -459,7 +465,12 @@ static int cpmac_poll(struct napi_struct
-
- skb = cpmac_rx_one(priv, desc);
- if (likely(skb)) {
-- netif_receive_skb(skb);
-+ if (priv->phy->netif_receive_skb) {
-+ priv->phy->netif_receive_skb(skb);
-+ } else {
-+ skb->protocol = eth_type_trans(skb, priv->dev);
-+ netif_receive_skb(skb);
-+ }
- received++;
- }
- desc = desc->next;
-@@ -952,7 +963,7 @@ static void cpmac_adjust_link(struct net
-
- static int cpmac_open(struct net_device *dev)
- {
-- int i, size, res;
-+ int i, size, res, offset;
- struct cpmac_priv *priv = netdev_priv(dev);
- struct resource *mem;
- struct cpmac_desc *desc;
-@@ -991,11 +1002,17 @@ static int cpmac_open(struct net_device
-
- priv->rx_head = &priv->desc_ring[CPMAC_QUEUES];
- for (i = 0, desc = priv->rx_head; i < priv->ring_size; i++, desc++) {
-- skb = netdev_alloc_skb_ip_align(dev, CPMAC_SKB_SIZE);
-+ skb = netdev_alloc_skb(dev, CPMAC_SKB_SIZE);
- if (unlikely(!skb)) {
- res = -ENOMEM;
- goto fail_desc;
- }
-+ offset = 2;
-+ if (priv->phy) {
-+ offset += priv->phy->pkt_align;
-+ }
-+ skb_reserve(skb, offset);
-+
- desc->skb = skb;
- desc->data_mapping = dma_map_single(&dev->dev, skb->data,
- CPMAC_SKB_SIZE,