}
 
 static int bnxt_rxfh_context_check(struct bnxt *bp,
+                                  const struct ethtool_rxfh_param *rxfh,
                                   struct netlink_ext_ack *extack)
 {
+       if (rxfh->hfunc && rxfh->hfunc != ETH_RSS_HASH_TOP) {
+               NL_SET_ERR_MSG_MOD(extack, "RSS hash function not supported");
+               return -EOPNOTSUPP;
+       }
+
        if (!BNXT_SUPPORTS_MULTI_RSS_CTX(bp)) {
                NL_SET_ERR_MSG_MOD(extack, "RSS contexts not supported");
                return -EOPNOTSUPP;
        struct bnxt_vnic_info *vnic;
        int rc;
 
-       rc = bnxt_rxfh_context_check(bp, extack);
+       rc = bnxt_rxfh_context_check(bp, rxfh, extack);
        if (rc)
                return rc;
 
        struct bnxt_rss_ctx *rss_ctx;
        int rc;
 
-       rc = bnxt_rxfh_context_check(bp, extack);
+       rc = bnxt_rxfh_context_check(bp, rxfh, extack);
        if (rc)
                return rc;