]> bbs.cooldavid.org Git - jme.git/blobdiff - jme.c
net: introduce and use netdev_features_t for device features sets
[jme.git] / jme.c
diff --git a/jme.c b/jme.c
index 66865b9903751358e5c07dc8baaa532d965aacaa..c62014dcecebd39ab83d94b3b5f453076d6bfcd6 100644 (file)
--- 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;
@@ -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);