Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
[pandora-kernel.git] / drivers / net / ethernet / atheros / atlx / atl1.c
index c34e823..33a4e35 100644 (file)
@@ -858,7 +858,7 @@ static s32 atl1_init_hw(struct atl1_hw *hw)
        atl1_init_flash_opcode(hw);
 
        if (!hw->phy_configured) {
-               /* enable GPHY LinkChange Interrrupt */
+               /* enable GPHY LinkChange Interrupt */
                ret_val = atl1_write_phy_reg(hw, 18, 0xC00);
                if (ret_val)
                        return ret_val;
@@ -2267,11 +2267,11 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
        }
 
        for (f = 0; f < nr_frags; f++) {
-               struct skb_frag_struct *frag;
+               const struct skb_frag_struct *frag;
                u16 i, nseg;
 
                frag = &skb_shinfo(skb)->frags[f];
-               buf_len = frag->size;
+               buf_len = skb_frag_size(frag);
 
                nseg = (buf_len + ATL1_MAX_TX_BUF_LEN - 1) /
                        ATL1_MAX_TX_BUF_LEN;
@@ -2283,10 +2283,9 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
                        buffer_info->length = (buf_len > ATL1_MAX_TX_BUF_LEN) ?
                                ATL1_MAX_TX_BUF_LEN : buf_len;
                        buf_len -= buffer_info->length;
-                       buffer_info->dma = pci_map_page(adapter->pdev,
-                               frag->page,
-                               frag->page_offset + (i * ATL1_MAX_TX_BUF_LEN),
-                               buffer_info->length, PCI_DMA_TODEVICE);
+                       buffer_info->dma = skb_frag_dma_map(&adapter->pdev->dev,
+                               frag, i * ATL1_MAX_TX_BUF_LEN,
+                               buffer_info->length, DMA_TO_DEVICE);
 
                        if (++next_to_use == tpd_ring->count)
                                next_to_use = 0;
@@ -2357,7 +2356,6 @@ static netdev_tx_t atl1_xmit_frame(struct sk_buff *skb,
        int count = 1;
        int ret_val;
        struct tx_packet_desc *ptpd;
-       u16 frag_size;
        u16 vlan_tag;
        unsigned int nr_frags = 0;
        unsigned int mss = 0;
@@ -2373,10 +2371,9 @@ static netdev_tx_t atl1_xmit_frame(struct sk_buff *skb,
 
        nr_frags = skb_shinfo(skb)->nr_frags;
        for (f = 0; f < nr_frags; f++) {
-               frag_size = skb_shinfo(skb)->frags[f].size;
-               if (frag_size)
-                       count += (frag_size + ATL1_MAX_TX_BUF_LEN - 1) /
-                               ATL1_MAX_TX_BUF_LEN;
+               unsigned int f_size = skb_frag_size(&skb_shinfo(skb)->frags[f]);
+               count += (f_size + ATL1_MAX_TX_BUF_LEN - 1) /
+                        ATL1_MAX_TX_BUF_LEN;
        }
 
        mss = skb_shinfo(skb)->gso_size;
@@ -3474,12 +3471,8 @@ static void atl1_get_ringparam(struct net_device *netdev,
 
        ring->rx_max_pending = ATL1_MAX_RFD;
        ring->tx_max_pending = ATL1_MAX_TPD;
-       ring->rx_mini_max_pending = 0;
-       ring->rx_jumbo_max_pending = 0;
        ring->rx_pending = rxdr->count;
        ring->tx_pending = txdr->count;
-       ring->rx_mini_pending = 0;
-       ring->rx_jumbo_pending = 0;
 }
 
 static int atl1_set_ringparam(struct net_device *netdev,