--- /dev/null
+diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+index 279873c..670f7dd 100644
+--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
++++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+@@ -70,7 +70,9 @@
+ #include "cxgb4_dcb.h"
+ #include "l2t.h"
+
+-#include <../drivers/net/bonding/bonding.h>
++#ifdef HAVE_BONDING_H
++#include <net/bonding.h>
++#endif
+
+ #ifdef DRV_VERSION
+ #undef DRV_VERSION
+@@ -3014,26 +3016,58 @@ static u32 get_rss_table_size(struct net_device *dev)
+ return pi->rss_size;
+ }
+
+-static int get_rss_table(struct net_device *dev, u32 *p, u8 *key)
++static int get_rss_table(struct net_device *dev, u32 *p,
++#ifdef HAVE_ETH_SS_RSS_HASH_FUNCS
++ u8 *key, u8 *hfunc)
++#else
++ u8 *key)
++#endif
+ {
+ const struct port_info *pi = netdev_priv(dev);
+ unsigned int n = pi->rss_size;
+
++#ifdef HAVE_ETH_SS_RSS_HASH_FUNCS
++ if (hfunc)
++ *hfunc = ETH_RSS_HASH_TOP;
++#endif
++ if (!p)
++ return 0;
++
+ while (n--)
+ p[n] = pi->rss[n];
+ return 0;
+ }
+
+-static int set_rss_table(struct net_device *dev, const u32 *p, const u8 *key)
++static int set_rss_table(struct net_device *dev, const u32 *p,
++#ifdef HAVE_ETH_SS_RSS_HASH_FUNCS
++ const u8 *key, const u8 hfunc)
++#else
++ const u8 *key)
++#endif
+ {
+ unsigned int i;
+ struct port_info *pi = netdev_priv(dev);
+
+- for (i = 0; i < pi->rss_size; i++)
+- pi->rss[i] = p[i];
+- if (pi->adapter->flags & FULL_INIT_DONE)
++#ifdef HAVE_ETH_SS_RSS_HASH_FUNCS
++ /* We require at least one supported parameter to be changed and no
++ * change in any of the unsupported parameters
++ */
++ if (key ||
++ (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP))
++ return -EOPNOTSUPP;
++#endif
++ if (!p)
++ return 0;
++
++ /* Interface must be brought up atleast once */
++ if (pi->adapter->flags & FULL_INIT_DONE) {
++ for (i = 0; i < pi->rss_size; i++)
++ pi->rss[i] = p[i];
++
+ return write_rss(pi, pi->rss);
+- return 0;
++ }
++
++ return -EPERM;
+ }
+
+ static int get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,