X-Git-Url: http://bbs.cooldavid.org/git/?a=blobdiff_plain;f=jme.c;h=c62014dcecebd39ab83d94b3b5f453076d6bfcd6;hb=e0ae0351d0ae63a0b5d7d50cd43cb2abc6eefdd0;hp=e918eaaea9d7a064789fcec30cb777f9ff71f53c;hpb=a2f95d8127f356665e029b054b27a51698b2b6de;p=jme.git diff --git a/jme.c b/jme.c index e918eaa..c62014d 100644 --- a/jme.c +++ b/jme.c @@ -1991,7 +1991,7 @@ jme_map_tx_skb(struct jme_adapter *jme, struct sk_buff *skb, int idx) struct jme_ring *txring = &(jme->txring[0]); struct txdesc *txdesc = txring->desc, *ctxdesc; struct jme_buffer_info *txbi = txring->bufinf, *ctxbi; - u8 hidma = jme->dev->features & NETIF_F_HIGHDMA; + u8 hidma = !!(jme->dev->features & NETIF_F_HIGHDMA); int i, nr_frags = skb_shinfo(skb)->nr_frags; int mask = jme->tx_ring_mask; const struct skb_frag_struct *frag; @@ -2463,9 +2463,9 @@ jme_get_drvinfo(struct net_device *netdev, { struct jme_adapter *jme = netdev_priv(netdev); - strcpy(info->driver, DRV_NAME); - strcpy(info->version, DRV_VERSION); - strcpy(info->bus_info, pci_name(jme->pdev)); + strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); + strlcpy(info->version, DRV_VERSION, sizeof(info->version)); + strlcpy(info->bus_info, pci_name(jme->pdev), sizeof(info->bus_info)); } static int @@ -2862,8 +2862,13 @@ jme_set_tso(struct net_device *netdev, u32 on) return 0; } #else +#ifndef __NEW_FIX_FEATURES_TYPE__ static u32 jme_fix_features(struct net_device *netdev, u32 features) +#else +static netdev_features_t +jme_fix_features(struct net_device *netdev, netdev_features_t features) +#endif { if (netdev->mtu > 1900) features &= ~(NETIF_F_ALL_TSO | NETIF_F_ALL_CSUM); @@ -2871,7 +2876,11 @@ jme_fix_features(struct net_device *netdev, u32 features) } static int +#ifndef __NEW_FIX_FEATURES_TYPE__ jme_set_features(struct net_device *netdev, u32 features) +#else +jme_set_features(struct net_device *netdev, netdev_features_t features) +#endif { struct jme_adapter *jme = netdev_priv(netdev);