|
@@ -752,6 +752,28 @@ static int rndis_filter_query_device_link_status(struct rndis_device *dev)
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
+static int rndis_filter_query_link_speed(struct rndis_device *dev)
|
|
|
+{
|
|
|
+ u32 size = sizeof(u32);
|
|
|
+ u32 link_speed;
|
|
|
+ struct net_device_context *ndc;
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ ret = rndis_filter_query_device(dev, RNDIS_OID_GEN_LINK_SPEED,
|
|
|
+ &link_speed, &size);
|
|
|
+
|
|
|
+ if (!ret) {
|
|
|
+ ndc = netdev_priv(dev->ndev);
|
|
|
+
|
|
|
+ /* The link speed reported from host is in 100bps unit, so
|
|
|
+ * we convert it to Mbps here.
|
|
|
+ */
|
|
|
+ ndc->speed = link_speed / 10000;
|
|
|
+ }
|
|
|
+
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+
|
|
|
int rndis_filter_set_packet_filter(struct rndis_device *dev, u32 new_filter)
|
|
|
{
|
|
|
struct rndis_request *request;
|
|
@@ -1044,6 +1066,8 @@ int rndis_filter_device_add(struct hv_device *dev,
|
|
|
if (net_device->nvsp_version < NVSP_PROTOCOL_VERSION_5)
|
|
|
return 0;
|
|
|
|
|
|
+ rndis_filter_query_link_speed(rndis_device);
|
|
|
+
|
|
|
/* vRSS setup */
|
|
|
memset(&rsscap, 0, rsscap_size);
|
|
|
ret = rndis_filter_query_device(rndis_device,
|