From: Ashutosh Naik Date: Thu, 30 Apr 2009 22:08:58 +0000 (-0700) Subject: ibft: fix the display of a few fields in the NIC attribute structure in sysfs X-Git-Tag: v2.6.30-rc5~60 X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=commitdiff_plain;h=65fd21058a791f35aff11eeccd2e270f0faf11ec 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 Cc: Vishnu V Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c index 7b7ddc2d51c9..420a96e7f2db 100644 --- a/drivers/firmware/iscsi_ibft.c +++ b/drivers/firmware/iscsi_ibft.c @@ -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: