net: hns: fix return value of the function about rss
[deliverable/linux.git] / drivers / net / ethernet / hisilicon / hns / hns_ae_adapt.c
index d4f92ed322d6e5c4ac10a3f8d208d94445760e27..648b31a5425d111b219f03dc42eddbd0a2fc6acf 100644 (file)
@@ -175,6 +175,7 @@ struct hnae_handle *hns_ae_get_handle(struct hnae_ae_dev *dev,
        ae_handle->phy_node = vf_cb->mac_cb->phy_node;
        ae_handle->if_support = vf_cb->mac_cb->if_support;
        ae_handle->port_type = vf_cb->mac_cb->mac_type;
+       ae_handle->dport_id = port_idx;
 
        return ae_handle;
 vf_id_err:
@@ -419,7 +420,10 @@ static int hns_ae_set_autoneg(struct hnae_handle *handle, u8 enable)
 
 static void hns_ae_set_promisc_mode(struct hnae_handle *handle, u32 en)
 {
+       struct hns_mac_cb *mac_cb = hns_get_mac_cb(handle);
+
        hns_dsaf_set_promisc_mode(hns_ae_get_dsaf_dev(handle->dev), en);
+       hns_mac_set_promisc(mac_cb, (u8)!!en);
 }
 
 static int hns_ae_get_autoneg(struct hnae_handle *handle)
@@ -799,7 +803,7 @@ static int hns_ae_set_rss(struct hnae_handle *handle, const u32 *indir,
 
        /* set the RSS Hash Key if specififed by the user */
        if (key)
-               hns_ppe_set_rss_key(ppe_cb, (int *)key);
+               hns_ppe_set_rss_key(ppe_cb, (u32 *)key);
 
        /* update the shadow RSS table with user specified qids */
        memcpy(ppe_cb->rss_indir_table, indir, HNS_PPEV2_RSS_IND_TBL_SIZE);
This page took 0.026239 seconds and 5 git commands to generate.