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 df891f2 commit b14215fCopy full SHA for b14215f
fs/smb/client/smb2ops.c
@@ -622,7 +622,8 @@ parse_server_interfaces(struct network_interface_info_ioctl_rsp *buf,
622
623
while (bytes_left >= (ssize_t)sizeof(*p)) {
624
memset(&tmp_iface, 0, sizeof(tmp_iface));
625
- tmp_iface.speed = le64_to_cpu(p->LinkSpeed);
+ /* default to 1Gbps when link speed is unset */
626
+ tmp_iface.speed = le64_to_cpu(p->LinkSpeed) ?: 1000000000;
627
tmp_iface.rdma_capable = le32_to_cpu(p->Capability & RDMA_CAPABLE) ? 1 : 0;
628
tmp_iface.rss_capable = le32_to_cpu(p->Capability & RSS_CAPABLE) ? 1 : 0;
629
0 commit comments