Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Ashutosh Naik <ashutosh.naik@gmail.com>
Cc: Vishnu V <vishnu@chelsio.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ashutosh Naik and committed by
Linus Torvalds
65fd2105 9e4a5bda

+2 -2
+2 -2
drivers/firmware/iscsi_ibft.c
··· 754 754 rc = 1; 755 755 break; 756 756 case ibft_eth_ip_addr: 757 - if (!memcmp(nic->dhcp, nulls, sizeof(nic->dhcp))) 757 + if (memcmp(nic->ip_addr, nulls, sizeof(nic->ip_addr))) 758 758 rc = 1; 759 759 break; 760 760 case ibft_eth_subnet_mask: 761 - if (!memcmp(nic->dhcp, nulls, sizeof(nic->dhcp))) 761 + if (nic->subnet_mask_prefix) 762 762 rc = 1; 763 763 break; 764 764 case ibft_eth_origin: