]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - drivers/net/hyperv/rndis_filter.c
hv_netvsc: Fix tx_table init in rndis_set_subchannel()
[thirdparty/linux.git] / drivers / net / hyperv / rndis_filter.c
index 206b4e77eaf0394d6c677b094a60258e64576ede..05bc5ec8bb1f0b3e889f44a57fd9a3bb972eab36 100644 (file)
@@ -1171,6 +1171,9 @@ int rndis_set_subchannel(struct net_device *ndev,
        wait_event(nvdev->subchan_open,
                   atomic_read(&nvdev->open_chn) == nvdev->num_chn);
 
+       for (i = 0; i < VRSS_SEND_TAB_SIZE; i++)
+               ndev_ctx->tx_table[i] = i % nvdev->num_chn;
+
        /* ignore failures from setting rss parameters, still have channels */
        if (dev_info)
                rndis_filter_set_rss_param(rdev, dev_info->rss_key);
@@ -1180,9 +1183,6 @@ int rndis_set_subchannel(struct net_device *ndev,
        netif_set_real_num_tx_queues(ndev, nvdev->num_chn);
        netif_set_real_num_rx_queues(ndev, nvdev->num_chn);
 
-       for (i = 0; i < VRSS_SEND_TAB_SIZE; i++)
-               ndev_ctx->tx_table[i] = i % nvdev->num_chn;
-
        return 0;
 }