aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tehuti.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tehuti.c')
-rw-r--r--drivers/net/tehuti.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c
index 0c9780217c87..20ab16192325 100644
--- a/drivers/net/tehuti.c
+++ b/drivers/net/tehuti.c
@@ -808,7 +808,7 @@ static void bdx_setmulti(struct net_device *ndev)
808 WRITE_REG(priv, regRX_MCST_HASH0 + i * 4, ~0); 808 WRITE_REG(priv, regRX_MCST_HASH0 + i * 4, ~0);
809 } else if (!netdev_mc_empty(ndev)) { 809 } else if (!netdev_mc_empty(ndev)) {
810 u8 hash; 810 u8 hash;
811 struct dev_mc_list *mclist; 811 struct netdev_hw_addr *ha;
812 u32 reg, val; 812 u32 reg, val;
813 813
814 /* set IMF to deny all multicast frames */ 814 /* set IMF to deny all multicast frames */
@@ -825,10 +825,10 @@ static void bdx_setmulti(struct net_device *ndev)
825 * into RX_MAC_MCST regs. we skip this phase now and accept ALL 825 * into RX_MAC_MCST regs. we skip this phase now and accept ALL
826 * multicast frames throu IMF */ 826 * multicast frames throu IMF */
827 /* accept the rest of addresses throu IMF */ 827 /* accept the rest of addresses throu IMF */
828 netdev_for_each_mc_addr(mclist, ndev) { 828 netdev_for_each_mc_addr(ha, ndev) {
829 hash = 0; 829 hash = 0;
830 for (i = 0; i < ETH_ALEN; i++) 830 for (i = 0; i < ETH_ALEN; i++)
831 hash ^= mclist->dmi_addr[i]; 831 hash ^= ha->addr[i];
832 reg = regRX_MCST_HASH0 + ((hash >> 5) << 2); 832 reg = regRX_MCST_HASH0 + ((hash >> 5) << 2);
833 val = READ_REG(priv, reg); 833 val = READ_REG(priv, reg);
834 val |= (1 << (hash % 32)); 834 val |= (1 << (hash % 32));
@@ -1303,7 +1303,6 @@ static int bdx_rx_receive(struct bdx_priv *priv, struct rxd_fifo *f, int budget)
1303 priv->net_stats.rx_bytes += len; 1303 priv->net_stats.rx_bytes += len;
1304 1304
1305 skb_put(skb, len); 1305 skb_put(skb, len);
1306 skb->dev = priv->ndev;
1307 skb->ip_summed = CHECKSUM_UNNECESSARY; 1306 skb->ip_summed = CHECKSUM_UNNECESSARY;
1308 skb->protocol = eth_type_trans(skb, priv->ndev); 1307 skb->protocol = eth_type_trans(skb, priv->ndev);
1309 1308
@@ -1509,7 +1508,7 @@ bdx_tx_map_skb(struct bdx_priv *priv, struct sk_buff *skb,
1509 int nr_frags = skb_shinfo(skb)->nr_frags; 1508 int nr_frags = skb_shinfo(skb)->nr_frags;
1510 int i; 1509 int i;
1511 1510
1512 db->wptr->len = skb->len - skb->data_len; 1511 db->wptr->len = skb_headlen(skb);
1513 db->wptr->addr.dma = pci_map_single(priv->pdev, skb->data, 1512 db->wptr->addr.dma = pci_map_single(priv->pdev, skb->data,
1514 db->wptr->len, PCI_DMA_TODEVICE); 1513 db->wptr->len, PCI_DMA_TODEVICE);
1515 pbl->len = CPU_CHIP_SWAP32(db->wptr->len); 1514 pbl->len = CPU_CHIP_SWAP32(db->wptr->len);
@@ -1851,7 +1850,7 @@ static void bdx_tx_push_desc(struct bdx_priv *priv, void *data, int size)
1851 * @data - desc's data 1850 * @data - desc's data
1852 * @size - desc's size 1851 * @size - desc's size
1853 * 1852 *
1854 * NOTE: this func does check for available space and, if neccessary, waits for 1853 * NOTE: this func does check for available space and, if necessary, waits for
1855 * NIC to read existing data before writing new one. 1854 * NIC to read existing data before writing new one.
1856 */ 1855 */
1857static void bdx_tx_push_desc_safe(struct bdx_priv *priv, void *data, int size) 1856static void bdx_tx_push_desc_safe(struct bdx_priv *priv, void *data, int size)
@@ -2034,7 +2033,6 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2034 /************** priv ****************/ 2033 /************** priv ****************/
2035 priv = nic->priv[port] = netdev_priv(ndev); 2034 priv = nic->priv[port] = netdev_priv(ndev);
2036 2035
2037 memset(priv, 0, sizeof(struct bdx_priv));
2038 priv->pBdxRegs = nic->regs + port * 0x8000; 2036 priv->pBdxRegs = nic->regs + port * 0x8000;
2039 priv->port = port; 2037 priv->port = port;
2040 priv->pdev = pdev; 2038 priv->pdev = pdev;