We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdb65b3 commit 168d21cCopy full SHA for 168d21c
fs/cifs/smb2ops.c
@@ -564,7 +564,8 @@ parse_server_interfaces(struct network_interface_info_ioctl_rsp *buf,
564
565
while (bytes_left >= sizeof(*p)) {
566
memset(&tmp_iface, 0, sizeof(tmp_iface));
567
- tmp_iface.speed = le64_to_cpu(p->LinkSpeed);
+ /* default to 1Gbps when link speed is unset */
568
+ tmp_iface.speed = le64_to_cpu(p->LinkSpeed) ?: 1000000000;
569
tmp_iface.rdma_capable = le32_to_cpu(p->Capability & RDMA_CAPABLE) ? 1 : 0;
570
tmp_iface.rss_capable = le32_to_cpu(p->Capability & RSS_CAPABLE) ? 1 : 0;
571
0 commit comments