]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - net/bootp.c
net: cosmetic: Rename OPT_SIZE to OPT_FIELD_SIZE
[karo-tx-uboot.git] / net / bootp.c
index b8d27606761ea4916930714b4fc62b324fb5bf5f..009369b3bd382c236387eb28bba94714b92954e5 100644 (file)
@@ -71,7 +71,7 @@ static int BootpCheckPkt(uchar *pkt, unsigned dest, unsigned src, unsigned len)
 
        if (dest != PORT_BOOTPC || src != PORT_BOOTPS)
                retval = -1;
-       else if (len < sizeof(struct Bootp_t) - OPT_SIZE)
+       else if (len < sizeof(struct Bootp_t) - OPT_FIELD_SIZE)
                retval = -2;
        else if (bp->bp_op != OP_BOOTREQUEST &&
                        bp->bp_op != OP_BOOTREPLY &&
@@ -103,7 +103,7 @@ static void BootpCopyNetParams(struct Bootp_t *bp)
        NetCopyIP(&tmp_ip, &bp->bp_siaddr);
        if (tmp_ip != 0)
                NetCopyIP(&NetServerIP, &bp->bp_siaddr);
-       memcpy(NetServerEther, ((Ethernet_t *)NetRxPacket)->et_src, 6);
+       memcpy(NetServerEther, ((struct ethernet_hdr *)NetRxPacket)->et_src, 6);
 #endif
        if (strlen(bp->bp_file) > 0)
                copy_filename(BootFile, bp->bp_file, sizeof(BootFile));
@@ -368,8 +368,8 @@ static int DhcpExtended(u8 *e, int message_type, IPaddr_t ServerID,
 
        *e++ = 57;              /* Maximum DHCP Message Size */
        *e++ = 2;
-       *e++ = (576 - 312 + OPT_SIZE) >> 8;
-       *e++ = (576 - 312 + OPT_SIZE) & 0xff;
+       *e++ = (576 - 312 + OPT_FIELD_SIZE) >> 8;
+       *e++ = (576 - 312 + OPT_FIELD_SIZE) & 0xff;
 
        if (ServerID) {
                int tmp = ntohl(ServerID);
@@ -519,8 +519,8 @@ static int BootpExtended(u8 *e)
 
        *e++ = 57;              /* Maximum DHCP Message Size */
        *e++ = 2;
-       *e++ = (576 - 312 + OPT_SIZE) >> 16;
-       *e++ = (576 - 312 + OPT_SIZE) & 0xff;
+       *e++ = (576 - 312 + OPT_FIELD_SIZE) >> 16;
+       *e++ = (576 - 312 + OPT_FIELD_SIZE) & 0xff;
 #endif
 
 #if defined(CONFIG_BOOTP_SUBNETMASK)