1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

net: cosmetic: net.c checkpatch compliance

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Joe Hershberger
2012-05-15 08:59:08 +00:00
parent 66c7385a5f
commit 48522bb503
4 changed files with 17 additions and 15 deletions

View File

@@ -973,7 +973,6 @@ int readline_into_buffer(const char *const prompt, char *buffer, int timeout)
#ifdef CONFIG_SHOW_ACTIVITY #ifdef CONFIG_SHOW_ACTIVITY
while (!tstc()) { while (!tstc()) {
extern void show_activity(int arg);
show_activity(0); show_activity(0);
WATCHDOG_RESET(); WATCHDOG_RESET();
} }

View File

@@ -794,6 +794,10 @@ int pcmcia_init (void);
#include <bootstage.h> #include <bootstage.h>
#ifdef CONFIG_SHOW_ACTIVITY
void show_activity(int arg);
#endif
/* Multicore arch functions */ /* Multicore arch functions */
#ifdef CONFIG_MP #ifdef CONFIG_MP
int cpu_status(int nr); int cpu_status(int nr);

View File

@@ -433,6 +433,11 @@ extern int NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport,
/* Processes a received packet */ /* Processes a received packet */
extern void NetReceive(uchar *, int); extern void NetReceive(uchar *, int);
#ifdef CONFIG_NETCONSOLE
void NcStart(void);
int nc_input_packet(uchar *pkt, unsigned dest, unsigned src, unsigned len);
#endif
/* /*
* Check if autoload is enabled. If so, use either NFS or TFTP to download * Check if autoload is enabled. If so, use either NFS or TFTP to download
* the boot file. * the boot file.

View File

@@ -77,6 +77,7 @@
#include <common.h> #include <common.h>
#include <watchdog.h> #include <watchdog.h>
#include <command.h> #include <command.h>
#include <linux/compiler.h>
#include <net.h> #include <net.h>
#include "bootp.h" #include "bootp.h"
#include "tftp.h" #include "tftp.h"
@@ -203,11 +204,6 @@ IPaddr_t NetNtpServerIP;
int NetTimeOffset; int NetTimeOffset;
#endif #endif
#ifdef CONFIG_NETCONSOLE
void NcStart(void);
int nc_input_packet(uchar *pkt, unsigned dest, unsigned src, unsigned len);
#endif
uchar PktBuf[(PKTBUFSRX+1) * PKTSIZE_ALIGN + PKTALIGN]; uchar PktBuf[(PKTBUFSRX+1) * PKTSIZE_ALIGN + PKTALIGN];
/* Receive packet */ /* Receive packet */
@@ -527,10 +523,7 @@ restart:
for (;;) { for (;;) {
WATCHDOG_RESET(); WATCHDOG_RESET();
#ifdef CONFIG_SHOW_ACTIVITY #ifdef CONFIG_SHOW_ACTIVITY
{ show_activity(1);
extern void show_activity(int arg);
show_activity(1);
}
#endif #endif
/* /*
* Check the ethernet for a new packet. The ethernet * Check the ethernet for a new packet. The ethernet
@@ -1103,8 +1096,8 @@ CDPHandler(const uchar *pkt, unsigned len)
* output a warning * output a warning
*/ */
if (pkt[0] != 0x02) if (pkt[0] != 0x02)
printf("** WARNING: CDP packet received with a protocol version %d > 2\n", printf("**WARNING: CDP packet received with a protocol version "
pkt[0] & 0xff); "%d > 2\n", pkt[0] & 0xff);
if (CDP_compute_csum(pkt, len) != 0) if (CDP_compute_csum(pkt, len) != 0)
return; return;
@@ -1239,7 +1232,7 @@ struct hole {
static IP_t *__NetDefragment(IP_t *ip, int *lenp) static IP_t *__NetDefragment(IP_t *ip, int *lenp)
{ {
static uchar pkt_buff[IP_PKTSIZE] __attribute__((aligned(PKTALIGN))); static uchar pkt_buff[IP_PKTSIZE] __aligned(PKTALIGN);
static u16 first_hole, total_len; static u16 first_hole, total_len;
struct hole *payload, *thisfrag, *h, *newh; struct hole *payload, *thisfrag, *h, *newh;
IP_t *localip = (IP_t *)pkt_buff; IP_t *localip = (IP_t *)pkt_buff;
@@ -1611,6 +1604,7 @@ NetReceive(uchar *inpkt, int len)
/* matched waiting packet's address */ /* matched waiting packet's address */
if (tmp == NetArpWaitReplyIP) { if (tmp == NetArpWaitReplyIP) {
debug("Got it\n"); debug("Got it\n");
/* save address for later use */ /* save address for later use */
memcpy(NetArpWaitPacketMAC, memcpy(NetArpWaitPacketMAC,
&arp->ar_data[0], 6); &arp->ar_data[0], 6);
@@ -1619,7 +1613,8 @@ NetReceive(uchar *inpkt, int len)
(*packetHandler)(0, 0, 0, 0, 0); (*packetHandler)(0, 0, 0, 0, 0);
#endif #endif
/* modify header, and transmit it */ /* modify header, and transmit it */
memcpy(((Ethernet_t *)NetArpWaitTxPacket)->et_dest, NetArpWaitPacketMAC, 6); memcpy(((Ethernet_t *)NetArpWaitTxPacket)->
et_dest, NetArpWaitPacketMAC, 6);
(void) eth_send(NetArpWaitTxPacket, (void) eth_send(NetArpWaitTxPacket,
NetArpWaitTxPacketSize); NetArpWaitTxPacketSize);
@@ -1856,7 +1851,6 @@ common:
case CDP: case CDP:
case DHCP: case DHCP:
if (memcmp(NetOurEther, "\0\0\0\0\0\0", 6) == 0) { if (memcmp(NetOurEther, "\0\0\0\0\0\0", 6) == 0) {
extern int eth_get_dev_index(void);
int num = eth_get_dev_index(); int num = eth_get_dev_index();
switch (num) { switch (num) {