From: Stefan Hajnoczi Date: Fri, 1 Mar 2013 15:32:16 +0000 (+0100) Subject: [iscsi] Include 802.1Q VLAN identifier in iBFT X-Git-Tag: v1.20.1~1581 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d64abbc5d0b5dfe4810883f372b905a359f2697;p=thirdparty%2Fipxe.git [iscsi] Include 802.1Q VLAN identifier in iBFT The iBFT NIC section has a VLAN field which must be filled in so that iSCSI booting works over VLANs. Unfortunately it is unclear from the IBM specification linked in ibft.c whether the VLAN field is just the 802.1Q VLAN Identifier or the full 802.1Q TCI. For now just fill in the VID, the Priority Code Point and Drop Eligible Indicator could be set in the future if it turns out they should be present too. Signed-off-by: Stefan Hajnoczi Modified-by: Michael Brown Signed-off-by: Michael Brown --- diff --git a/src/drivers/block/ibft.c b/src/drivers/block/ibft.c index f16096377..75ca51a9c 100644 --- a/src/drivers/block/ibft.c +++ b/src/drivers/block/ibft.c @@ -37,6 +37,7 @@ FILE_LICENCE ( BSD2 ); #include #include #include +#include #include #include #include @@ -264,6 +265,8 @@ static int ibft_fill_nic ( struct ibft_nic *nic, DBG ( "iBFT NIC subnet = /%d\n", nic->subnet_mask_prefix ); /* Extract values from net-device configuration */ + nic->vlan = cpu_to_le16 ( vlan_tag ( netdev ) ); + DBG ( "iBFT NIC VLAN = %02x\n", le16_to_cpu ( nic->vlan ) ); if ( ( rc = ll_protocol->eth_addr ( netdev->ll_addr, nic->mac_address ) ) != 0 ) { DBG ( "Could not determine iBFT MAC: %s\n", strerror ( rc ) );