]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/atlx/atl1.c
atl1: fix vlan tag regression
[linux-2.6-omap-h63xx.git] / drivers / net / atlx / atl1.c
index 5f157e09e94dea20ddd7df06dac004c2726b9729..246d92b426360b37865352d0d6133e71415770b4 100644 (file)
  * file called COPYING.
  *
  * Contact Information:
- * Xiong Huang <xiong_huang@attansic.com>
- * Attansic Technology Corp. 3F 147, Xianzheng 9th Road, Zhubei,
- * Xinzhu  302, TAIWAN, REPUBLIC OF CHINA
- *
+ * Xiong Huang <xiong.huang@atheros.com>
+ * Jie Yang <jie.yang@atheros.com>
  * Chris Snook <csnook@redhat.com>
  * Jay Cliburn <jcliburn@gmail.com>
  *
- * This version is adapted from the Attansic reference driver for
- * inclusion in the Linux kernel.  It is currently under heavy development.
- * A very incomplete list of things that need to be dealt with:
+ * This version is adapted from the Attansic reference driver.
  *
  * TODO:
  * Add more ethtool functions.
@@ -2314,7 +2310,8 @@ static void atl1_tx_queue(struct atl1_adapter *adapter, u16 count,
                if (tpd != ptpd)
                        memcpy(tpd, ptpd, sizeof(struct tx_packet_desc));
                tpd->buffer_addr = cpu_to_le64(buffer_info->dma);
-               tpd->word2 = (cpu_to_le16(buffer_info->length) &
+               tpd->word2 &= ~(TPD_BUFLEN_MASK << TPD_BUFLEN_SHIFT);
+               tpd->word2 |= (cpu_to_le16(buffer_info->length) &
                        TPD_BUFLEN_MASK) << TPD_BUFLEN_SHIFT;
 
                /*
@@ -2413,8 +2410,8 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
                vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) |
                        ((vlan_tag >> 9) & 0x8);
                ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;
-               ptpd->word3 |= (vlan_tag & TPD_VL_TAGGED_MASK) <<
-                       TPD_VL_TAGGED_SHIFT;
+               ptpd->word2 |= (vlan_tag & TPD_VLANTAG_MASK) <<
+                       TPD_VLANTAG_SHIFT;
        }
 
        tso = atl1_tso(adapter, skb, ptpd);