summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/eth.c8
-rw-r--r--net/net.c2
-rw-r--r--net/tftp.c36
3 files changed, 23 insertions, 23 deletions
diff --git a/net/eth.c b/net/eth.c
index 9ccbcca..c2c23f6 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -356,12 +356,12 @@ void eth_set_enetaddr(int num, char *addr) {
#ifdef CONFIG_MCAST_TFTP
/* Multicast.
* mcast_addr: multicast ipaddr from which multicast Mac is made
- * join: 1=join, 0=leave.
+ * join: 1=join, 0=leave.
*/
int eth_mcast_join( IPaddr_t mcast_ip, u8 join)
{
u8 mcast_mac[6];
- if (!eth_current || !eth_current->mcast)
+ if (!eth_current || !eth_current->mcast)
return -1;
mcast_mac[5] = htonl(mcast_ip) & 0xff;
mcast_mac[4] = (htonl(mcast_ip)>>8) & 0xff;
@@ -372,8 +372,8 @@ int eth_mcast_join( IPaddr_t mcast_ip, u8 join)
return eth_current->mcast(eth_current, mcast_mac, join);
}
-/* the 'way' for ethernet-CRC-32. Spliced in from Linux lib/crc32.c
- * and this is the ethernet-crc method needed for TSEC -- and perhaps
+/* the 'way' for ethernet-CRC-32. Spliced in from Linux lib/crc32.c
+ * and this is the ethernet-crc method needed for TSEC -- and perhaps
* some other adapter -- hash tables
*/
#define CRCPOLY_LE 0xedb88320
diff --git a/net/net.c b/net/net.c
index 2b11a13..c47610e 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1391,7 +1391,7 @@ NetReceive(volatile uchar * inpkt, int len)
tmp = NetReadIP(&ip->ip_dst);
if (NetOurIP && tmp != NetOurIP && tmp != 0xFFFFFFFF) {
#ifdef CONFIG_MCAST_TFTP
- if (Mcast_addr != tmp)
+ if (Mcast_addr != tmp)
#endif
return;
}
diff --git a/net/tftp.c b/net/tftp.c
index 95fee77..888ec98 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -61,8 +61,8 @@ static char *tftp_filename;
extern flash_info_t flash_info[];
#endif
-/* 512 is poor choice for ethernet, MTU is typically 1500.
- * Minus eth.hdrs thats 1468. Can get 2x better throughput with
+/* 512 is poor choice for ethernet, MTU is typically 1500.
+ * Minus eth.hdrs thats 1468. Can get 2x better throughput with
* almost-MTU block sizes. At least try... fall back to 512 if need be.
*/
#define TFTP_MTU_BLOCKSIZE 1468
@@ -145,11 +145,11 @@ TftpSend (void)
int len = 0;
volatile ushort *s;
-#ifdef CONFIG_MCAST_TFTP
+#ifdef CONFIG_MCAST_TFTP
/* Multicast TFTP.. non-MasterClients do not ACK data. */
- if (Multicast
- && (TftpState == STATE_DATA)
- && (MasterClient == 0))
+ if (Multicast
+ && (TftpState == STATE_DATA)
+ && (MasterClient == 0))
return;
#endif
/*
@@ -179,10 +179,10 @@ TftpSend (void)
/* try for more effic. blk size */
pkt += sprintf((char *)pkt,"blksize%c%d%c",
0,htons(TftpBlkSizeOption),0);
-#ifdef CONFIG_MCAST_TFTP
+#ifdef CONFIG_MCAST_TFTP
/* Check all preconditions before even trying the option */
- if (!ProhibitMcast
- && (Bitmap=malloc(Mapsize))
+ if (!ProhibitMcast
+ && (Bitmap=malloc(Mapsize))
&& eth_get_dev()->mcast) {
free(Bitmap);
Bitmap=NULL;
@@ -244,7 +244,7 @@ TftpHandler (uchar * pkt, unsigned dest, unsigned src, unsigned len)
if (dest != TftpOurPort) {
#ifdef CONFIG_MCAST_TFTP
- if (Multicast
+ if (Multicast
&& (!Mcast_port || (dest != Mcast_port)))
#endif
return;
@@ -290,7 +290,7 @@ TftpHandler (uchar * pkt, unsigned dest, unsigned src, unsigned len)
}
#ifdef CONFIG_MCAST_TFTP
parse_multicast_oack((char *)pkt,len-1);
- if ((Multicast) && (!MasterClient))
+ if ((Multicast) && (!MasterClient))
TftpState = STATE_DATA; /* passive.. */
else
#endif
@@ -366,14 +366,14 @@ TftpHandler (uchar * pkt, unsigned dest, unsigned src, unsigned len)
* the server for the next one.
*/
#ifdef CONFIG_MCAST_TFTP
- /* if I am the MasterClient, actively calculate what my next
- * needed block is; else I'm passive; not ACKING
+ /* if I am the MasterClient, actively calculate what my next
+ * needed block is; else I'm passive; not ACKING
*/
if (Multicast) {
if (len < TftpBlkSize) {
TftpEndingBlock = TftpBlock;
} else if (MasterClient) {
- TftpBlock = PrevBitmapHole =
+ TftpBlock = PrevBitmapHole =
ext2_find_next_zero_bit(
Bitmap,
(Mapsize*8),
@@ -398,7 +398,7 @@ TftpHandler (uchar * pkt, unsigned dest, unsigned src, unsigned len)
puts ("\nMulticast tftp done\n");
mcast_cleanup();
NetState = NETLOOP_SUCCESS;
- }
+ }
}
else
#endif
@@ -555,7 +555,7 @@ static void parse_multicast_oack(char *pkt, int len)
break;
if (i >= (len-14)) /* non-Multicast OACK, ign. */
return;
-
+
i+=10; /* strlen multicast */
mc_adr = pkt+i;
for (;i<len;i++) {
@@ -584,8 +584,8 @@ static void parse_multicast_oack(char *pkt, int len)
return ;
}
/* I malloc instead of pre-declare; so that if the file ends
- * up being too big for this bitmap I can retry
- */
+ * up being too big for this bitmap I can retry
+ */
if (!(Bitmap = malloc (Mapsize))) {
printf ("No Bitmap, no multicast. Sorry.\n");
ProhibitMcast=1;