@@ -2290,6 +2290,7 @@ int ena_com_fill_hash_function(struct ena_com_dev *ena_dev,
struct ena_admin_get_feat_resp get_resp;
struct ena_admin_feature_rss_flow_hash_control *hash_key =
rss->hash_key;
+ enum ena_admin_hash_functions old_func;
int rc;
/* Make sure size is a mult of DWs */
@@ -2329,12 +2330,13 @@ int ena_com_fill_hash_function(struct ena_com_dev *ena_dev,
return -EINVAL;
}
+ old_func = rss->hash_func;
rss->hash_func = func;
rc = ena_com_set_hash_function(ena_dev);
/* Restore the old function */
if (unlikely(rc))
- ena_com_get_hash_function(ena_dev, NULL, NULL);
+ rss->hash_func = old_func;
return rc;
}