diff options
Diffstat (limited to 'drivers/net/tulip/uli526x.c')
| -rw-r--r-- | drivers/net/tulip/uli526x.c | 15 | 
1 files changed, 8 insertions, 7 deletions
| diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c index 0ab05af237e5..c7f972852921 100644 --- a/drivers/net/tulip/uli526x.c +++ b/drivers/net/tulip/uli526x.c | |||
| @@ -25,7 +25,6 @@ | |||
| 25 | #include <linux/timer.h> | 25 | #include <linux/timer.h> | 
| 26 | #include <linux/errno.h> | 26 | #include <linux/errno.h> | 
| 27 | #include <linux/ioport.h> | 27 | #include <linux/ioport.h> | 
| 28 | #include <linux/slab.h> | ||
| 29 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> | 
| 30 | #include <linux/pci.h> | 29 | #include <linux/pci.h> | 
| 31 | #include <linux/init.h> | 30 | #include <linux/init.h> | 
| @@ -851,13 +850,15 @@ static void uli526x_rx_packet(struct net_device *dev, struct uli526x_board_info | |||
| 851 | 850 | ||
| 852 | if ( !(rdes0 & 0x8000) || | 851 | if ( !(rdes0 & 0x8000) || | 
| 853 | ((db->cr6_data & CR6_PM) && (rxlen>6)) ) { | 852 | ((db->cr6_data & CR6_PM) && (rxlen>6)) ) { | 
| 853 | struct sk_buff *new_skb = NULL; | ||
| 854 | |||
| 854 | skb = rxptr->rx_skb_ptr; | 855 | skb = rxptr->rx_skb_ptr; | 
| 855 | 856 | ||
| 856 | /* Good packet, send to upper layer */ | 857 | /* Good packet, send to upper layer */ | 
| 857 | /* Shorst packet used new SKB */ | 858 | /* Shorst packet used new SKB */ | 
| 858 | if ( (rxlen < RX_COPY_SIZE) && | 859 | if ((rxlen < RX_COPY_SIZE) && | 
| 859 | ( (skb = dev_alloc_skb(rxlen + 2) ) | 860 | (((new_skb = dev_alloc_skb(rxlen + 2)) != NULL))) { | 
| 860 | != NULL) ) { | 861 | skb = new_skb; | 
| 861 | /* size less than COPY_SIZE, allocate a rxlen SKB */ | 862 | /* size less than COPY_SIZE, allocate a rxlen SKB */ | 
| 862 | skb_reserve(skb, 2); /* 16byte align */ | 863 | skb_reserve(skb, 2); /* 16byte align */ | 
| 863 | memcpy(skb_put(skb, rxlen), | 864 | memcpy(skb_put(skb, rxlen), | 
| @@ -1392,7 +1393,7 @@ static void update_cr6(u32 cr6_data, unsigned long ioaddr) | |||
| 1392 | static void send_filter_frame(struct net_device *dev, int mc_cnt) | 1393 | static void send_filter_frame(struct net_device *dev, int mc_cnt) | 
| 1393 | { | 1394 | { | 
| 1394 | struct uli526x_board_info *db = netdev_priv(dev); | 1395 | struct uli526x_board_info *db = netdev_priv(dev); | 
| 1395 | struct dev_mc_list *mcptr; | 1396 | struct netdev_hw_addr *ha; | 
| 1396 | struct tx_desc *txptr; | 1397 | struct tx_desc *txptr; | 
| 1397 | u16 * addrptr; | 1398 | u16 * addrptr; | 
| 1398 | u32 * suptr; | 1399 | u32 * suptr; | 
| @@ -1415,8 +1416,8 @@ static void send_filter_frame(struct net_device *dev, int mc_cnt) | |||
| 1415 | *suptr++ = 0xffff << FLT_SHIFT; | 1416 | *suptr++ = 0xffff << FLT_SHIFT; | 
| 1416 | 1417 | ||
| 1417 | /* fit the multicast address */ | 1418 | /* fit the multicast address */ | 
| 1418 | netdev_for_each_mc_addr(mcptr, dev) { | 1419 | netdev_for_each_mc_addr(ha, dev) { | 
| 1419 | addrptr = (u16 *) mcptr->dmi_addr; | 1420 | addrptr = (u16 *) ha->addr; | 
| 1420 | *suptr++ = addrptr[0] << FLT_SHIFT; | 1421 | *suptr++ = addrptr[0] << FLT_SHIFT; | 
| 1421 | *suptr++ = addrptr[1] << FLT_SHIFT; | 1422 | *suptr++ = addrptr[1] << FLT_SHIFT; | 
| 1422 | *suptr++ = addrptr[2] << FLT_SHIFT; | 1423 | *suptr++ = addrptr[2] << FLT_SHIFT; | 
