Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65fd2105 authored by Ashutosh Naik's avatar Ashutosh Naik Committed by Linus Torvalds
Browse files

ibft: fix the display of a few fields in the NIC attribute structure in sysfs



Fix the display of a few fields in the iBFT NIC attribute structure in
sysfs.

Ensure that, if the DHCP IP address and the subnet mask for the interface
is present in the iBFT NIC structure, the corresponding entries are
created in sysfs tree for the device.  This would hence create the
additional entries in the tree based on the iBFT table and would not
delete any existing entries.

Signed-off-by: default avatarAshutosh Naik <ashutosh.naik@gmail.com>
Cc: Vishnu V <vishnu@chelsio.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9e4a5bda
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -754,11 +754,11 @@ static int __init ibft_check_nic_for(struct ibft_nic *nic, int entry)
		rc = 1;
		break;
	case ibft_eth_ip_addr:
		if (!memcmp(nic->dhcp, nulls, sizeof(nic->dhcp)))
		if (memcmp(nic->ip_addr, nulls, sizeof(nic->ip_addr)))
			rc = 1;
		break;
	case ibft_eth_subnet_mask:
		if (!memcmp(nic->dhcp, nulls, sizeof(nic->dhcp)))
		if (nic->subnet_mask_prefix)
			rc = 1;
		break;
	case ibft_eth_origin: