rdma.m4: Fixing and adding defines for be2net driver backport
authorSelvin Xavier <selvin.xavier@emulex.com>
Tue, 24 Mar 2015 11:22:05 +0000 (16:52 +0530)
committerMitesh Ahuja <mitesh.ahuja@emulex.com>
Tue, 24 Mar 2015 11:08:27 +0000 (04:08 -0700)
Correcting HAVE_NDO_RX_ADD_VID_HAS_3_PARAMS used by be2net driver.
Also, add rule to define  HAVE_DMA_SET_MASK_AND_COHERENT for
dma_set_mask_and_coherent.

Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
config/rdma.m4

index e2363bf..fe9fac1 100644 (file)
@@ -1294,14 +1294,15 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
        LB_LINUX_TRY_COMPILE([
                #include <linux/netdevice.h>
 
+       ],[
                int vlan_rx_add_vid(struct net_device *dev,__be16 proto, u16 vid)
                {
                        return 0;
                }
-       ],[
                struct net_device_ops netdev_ops;
 
                netdev_ops.ndo_vlan_rx_add_vid = vlan_rx_add_vid;
+               netdev_ops.ndo_vlan_rx_add_vid (NULL, 1, 1) ;
 
                return 0;
        ],[
@@ -2062,6 +2063,21 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
        ],[
                AC_MSG_RESULT(no)
        ])
+
+       AC_MSG_CHECKING([if dma-mapping.h has dma_set_mask_and_coherent])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/dma-mapping.h>
+       ],[
+               dma_set_mask_and_coherent(NULL, 0);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_DMA_SET_MASK_AND_COHERENT, 1,
+                         [dma_set_mask_and_coherent is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
 ])
 #
 # COMPAT_CONFIG_HEADERS