diff options
| -rw-r--r-- | drivers/net/ethernet/broadcom/bgmac.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c index 1d96cd594ade..8eef9fb6b1fe 100644 --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c | |||
| @@ -128,8 +128,6 @@ bgmac_dma_tx_add_buf(struct bgmac *bgmac, struct bgmac_dma_ring *ring, | |||
| 128 | dma_desc->ctl1 = cpu_to_le32(ctl1); | 128 | dma_desc->ctl1 = cpu_to_le32(ctl1); |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | #define ENET_BRCM_TAG_LEN 4 | ||
| 132 | |||
| 133 | static netdev_tx_t bgmac_dma_tx_add(struct bgmac *bgmac, | 131 | static netdev_tx_t bgmac_dma_tx_add(struct bgmac *bgmac, |
| 134 | struct bgmac_dma_ring *ring, | 132 | struct bgmac_dma_ring *ring, |
| 135 | struct sk_buff *skb) | 133 | struct sk_buff *skb) |
| @@ -142,18 +140,6 @@ static netdev_tx_t bgmac_dma_tx_add(struct bgmac *bgmac, | |||
| 142 | u32 flags; | 140 | u32 flags; |
| 143 | int i; | 141 | int i; |
| 144 | 142 | ||
| 145 | /* The Ethernet switch we are interfaced with needs packets to be at | ||
| 146 | * least 64 bytes (including FCS) otherwise they will be discarded when | ||
| 147 | * they enter the switch port logic. When Broadcom tags are enabled, we | ||
| 148 | * need to make sure that packets are at least 68 bytes | ||
| 149 | * (including FCS and tag) because the length verification is done after | ||
| 150 | * the Broadcom tag is stripped off the ingress packet. | ||
| 151 | */ | ||
| 152 | if (netdev_uses_dsa(net_dev)) { | ||
| 153 | if (skb_put_padto(skb, ETH_ZLEN + ENET_BRCM_TAG_LEN)) | ||
| 154 | goto err_stats; | ||
| 155 | } | ||
| 156 | |||
| 157 | if (skb->len > BGMAC_DESC_CTL1_LEN) { | 143 | if (skb->len > BGMAC_DESC_CTL1_LEN) { |
| 158 | netdev_err(bgmac->net_dev, "Too long skb (%d)\n", skb->len); | 144 | netdev_err(bgmac->net_dev, "Too long skb (%d)\n", skb->len); |
| 159 | goto err_drop; | 145 | goto err_drop; |
| @@ -240,7 +226,6 @@ err_dma_head: | |||
| 240 | 226 | ||
| 241 | err_drop: | 227 | err_drop: |
| 242 | dev_kfree_skb(skb); | 228 | dev_kfree_skb(skb); |
| 243 | err_stats: | ||
| 244 | net_dev->stats.tx_dropped++; | 229 | net_dev->stats.tx_dropped++; |
| 245 | net_dev->stats.tx_errors++; | 230 | net_dev->stats.tx_errors++; |
| 246 | return NETDEV_TX_OK; | 231 | return NETDEV_TX_OK; |
