drivers/: Change some nerr() ERRORS to nwarn() WARNINGS. Anomolous network evernts are not errors.

This commit is contained in:
Gregory Nutt
2016-06-12 08:31:22 -06:00
parent b1eb4fdd8e
commit efb02f2ef1
55 changed files with 457 additions and 431 deletions
+4 -4
View File
@@ -704,7 +704,7 @@ static int cs89x0_interrupt(int irq, FAR void *context)
case ISQ_BUFEVENT:
if ((isq & ISQ_BUFEVENT_TXUNDERRUN) != 0)
{
nerr("Transmit underrun\n");
nerr("ERROR: Transmit underrun\n");
#ifdef CONFIG_CS89x0_XMITEARLY
cd89x0->cs_txunderrun++;
if (cd89x0->cs_txunderrun == 3)
@@ -819,9 +819,9 @@ static int cs89x0_ifup(struct net_driver_s *dev)
{
struct cs89x0_driver_s *cs89x0 = (struct cs89x0_driver_s *)dev->d_private;
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Initialize the Ethernet interface */
#warning "Missing logic"
+23 -22
View File
@@ -865,7 +865,7 @@ static void dm9x_receive(FAR struct dm9x_driver_s *dm9x)
{
/* Bad RX packet... update statistics */
nerr("Received packet with errors: %02x\n", rx.desc.rx_status);
nerr("ERROR: Received packet with errors: %02x\n", rx.desc.rx_status);
NETDEV_RXERRORS(&dm9x->dm_dev);
/* Drop this packet and continue to check the next packet */
@@ -877,7 +877,7 @@ static void dm9x_receive(FAR struct dm9x_driver_s *dm9x)
else if (rx.desc.rx_len < ETH_HDRLEN || rx.desc.rx_len > (CONFIG_NET_ETH_MTU + 2))
{
nerr("RX length error\n");
nerr("ERROR: RX length error\n");
NETDEV_RXERRORS(&dm9x->dm_dev);
/* Drop this packet and continue to check the next packet */
@@ -1042,7 +1042,7 @@ static void dm9x_txdone(struct dm9x_driver_s *dm9x)
}
else
{
nerr("Bad TX count (TX1END)\n");
nerr("ERROR: Bad TX count (TX1END)\n");
}
}
@@ -1054,7 +1054,7 @@ static void dm9x_txdone(struct dm9x_driver_s *dm9x)
}
else
{
nerr("Bad TX count (TX2END)\n");
nerr("ERROR: Bad TX count (TX2END)\n");
}
}
@@ -1144,7 +1144,8 @@ static int dm9x_interrupt(int irq, FAR void *context)
}
up_mdelay(1);
}
nerr("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M");
nerr("ERROR: delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M");
}
/* Check if we received an incoming packet */
@@ -1206,17 +1207,17 @@ static void dm9x_txtimeout(int argc, uint32_t arg, ...)
{
struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)arg;
nerr("TX timeout\n");
nerr("ERROR: TX timeout\n");
/* Increment statistics and dump debug info */
NETDEV_TXTIMEOUTS(dm9x->dm_dev);
nerr(" TX packet count: %d\n", dm9x->dm_ntxpending);
nerr(" TX read pointer address: 0x%02x:%02x\n",
getreg(DM9X_TRPAH), getreg(DM9X_TRPAL));
nerr(" Memory data write address: 0x%02x:%02x (DM9010)\n",
getreg(DM9X_MDWAH), getreg(DM9X_MDWAL));
ninfo(" TX packet count: %d\n", dm9x->dm_ntxpending);
ninfo(" TX read pointer address: 0x%02x:%02x\n",
getreg(DM9X_TRPAH), getreg(DM9X_TRPAL));
ninfo(" Memory data write address: 0x%02x:%02x (DM9010)\n",
getreg(DM9X_MDWAH), getreg(DM9X_MDWAL));
/* Then reset the DM90x0 */
@@ -1342,9 +1343,9 @@ static int dm9x_ifup(struct net_driver_s *dev)
uint8_t netstatus;
int i;
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Initilize DM90x0 chip */
@@ -1372,7 +1373,7 @@ static int dm9x_ifup(struct net_driver_s *dev)
up_mdelay(1);
}
nerr("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M");
ninfo("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M");
/* Set and activate a timer process */
@@ -1407,7 +1408,7 @@ static int dm9x_ifdown(struct net_driver_s *dev)
struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private;
irqstate_t flags;
nerr("Stopping\n");
ninfo("Stopping\n");
/* Disable the DM9X interrupt */
@@ -1456,7 +1457,7 @@ static int dm9x_txavail(struct net_driver_s *dev)
struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private;
irqstate_t flags;
nerr("Polling\n");
ninfo("Polling\n");
flags = enter_critical_section();
/* Ignore the notification if the interface is not yet up */
@@ -1557,7 +1558,7 @@ static int dm9x_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac)
static void dm9x_bringup(struct dm9x_driver_s *dm9x)
{
nerr("Initializing\n");
ninfo("Initializing\n");
/* Set the internal PHY power-on, GPIOs normal, and wait 2ms */
@@ -1722,13 +1723,13 @@ int dm9x_initialize(void)
vid = (((uint16_t)getreg(DM9X_VIDH)) << 8) | (uint16_t)getreg(DM9X_VIDL);
pid = (((uint16_t)getreg(DM9X_PIDH)) << 8) | (uint16_t)getreg(DM9X_PIDL);
nllerr("I/O base: %08x VID: %04x PID: %04x\n", CONFIG_DM9X_BASE, vid, pid);
nllinfo("I/O base: %08x VID: %04x PID: %04x\n", CONFIG_DM9X_BASE, vid, pid);
/* Check if a DM90x0 chip is recognized at this I/O base */
if (vid != DM9X_DAVICOMVID || (pid != DM9X_DM9000PID && pid != DM9X_DM9010PID))
{
nllerr("DM90x0 vendor/product ID not found at this base address\n");
nllerr("ERROR: DM90x0 vendor/product ID not found at this base address\n");
return -ENODEV;
}
@@ -1738,7 +1739,7 @@ int dm9x_initialize(void)
{
/* We could not attach the ISR to the ISR */
nllerr("irq_attach() failed\n");
nllerr("ERROR: irq_attach() failed\n");
return -EAGAIN;
}
@@ -1767,7 +1768,7 @@ int dm9x_initialize(void)
mptr[i] = getreg(j);
}
nllerr("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n",
nllinfo("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n",
mptr[0], mptr[1], mptr[2], mptr[3], mptr[4], mptr[5]);
/* Register the device with the OS so that socket IOCTLs can be performed */
+3 -3
View File
@@ -799,9 +799,9 @@ static int e1000_ifup(struct net_driver_s *dev)
{
struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private;
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */
+11 -11
View File
@@ -1484,7 +1484,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
else
#endif
{
nllerr("Unsupported packet type dropped (%02x)\n", htons(BUF->type));
nllerr("ERROR: Unsupported packet type dropped (%02x)\n", htons(BUF->type));
NETDEV_RXDROPPED(&priv->dev);
}
}
@@ -1558,7 +1558,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv)
else if (pktlen > (CONFIG_NET_ETH_MTU + 4) || pktlen <= (ETH_HDRLEN + 4))
{
nllerr("Bad packet size dropped (%d)\n", pktlen);
nllerr("ERROR: Bad packet size dropped (%d)\n", pktlen);
NETDEV_RXERRORS(&priv->dev);
}
@@ -1878,7 +1878,7 @@ static void enc_toworker(FAR void *arg)
net_lock_t lock;
int ret;
nllerr("Tx timeout\n");
nllerr("ERROR: Tx timeout\n");
DEBUGASSERT(priv);
/* Get exclusive access to the network */
@@ -2067,9 +2067,9 @@ static int enc_ifup(struct net_driver_s *dev)
FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private;
int ret;
nllerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
nllinfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Lock the SPI bus so that we have exclusive access */
@@ -2139,9 +2139,9 @@ static int enc_ifdown(struct net_driver_s *dev)
irqstate_t flags;
int ret;
nllerr("Taking down: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
nllinfo("Taking down: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Lock the SPI bus so that we have exclusive access */
@@ -2473,7 +2473,7 @@ static int enc_reset(FAR struct enc_driver_s *priv)
{
uint8_t regval;
nllerr("Reset\n");
nllwarn("WARNING: Reset\n");
/* Configure SPI for the ENC28J60 */
@@ -2524,7 +2524,7 @@ static int enc_reset(FAR struct enc_driver_s *priv)
regval = enc_rdbreg(priv, ENC_EREVID);
if (regval == 0x00 || regval == 0xff)
{
nllerr("Bad Rev ID: %02x\n", regval);
nllerr("ERROR: Bad Rev ID: %02x\n", regval);
return -ENODEV;
}
+17 -17
View File
@@ -1127,7 +1127,7 @@ static int enc_txenqueue(FAR struct enc_driver_s *priv)
}
else
{
nllerr("no free descriptors\n");
nllerr("ERROR: no free descriptors\n");
ret = -ENOMEM;
}
@@ -1612,7 +1612,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
enc_rxrmpkt(priv, descr);
nllerr("Unsupported packet type dropped (%02x)\n", htons(BUF->type));
nllerr("ERROR: Unsupported packet type dropped (%02x)\n", htons(BUF->type));
NETDEV_RXDROPPED(&priv->dev);
}
@@ -1719,7 +1719,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv)
else if (pktlen > (CONFIG_NET_ETH_MTU + 4) || pktlen <= (ETH_HDRLEN + 4))
{
nllerr("Bad packet size dropped (%d)\n", pktlen);
nllerr("ERROR: Bad packet size dropped (%d)\n", pktlen);
/* Discard packet */
@@ -1774,17 +1774,17 @@ static void enc_rxabtif(FAR struct enc_driver_s *priv)
#if 0
/* Free the last received packet from the RX queue */
nllerr("rx abort\n");
nllerr("ESTAT: %04x\n", enc_rdreg(priv, ENC_ESTAT));
nllerr("EIR: %04x\n", enc_rdreg(priv, ENC_EIR));
nllerr("ERXTAIL: %04x\n", enc_rdreg(priv, ENC_ERXTAIL));
nllerr("ERXHAED: %04x\n", enc_rdreg(priv, ENC_ERXHEAD));
nllinfo("rx abort\n");
nllinfo("ESTAT: %04x\n", enc_rdreg(priv, ENC_ESTAT));
nllinfo("EIR: %04x\n", enc_rdreg(priv, ENC_EIR));
nllinfo("ERXTAIL: %04x\n", enc_rdreg(priv, ENC_ERXTAIL));
nllinfo("ERXHAED: %04x\n", enc_rdreg(priv, ENC_ERXHEAD));
descr = (FAR struct enc_descr_s *)sq_peek(&priv->rxqueue);
while (descr != NULL)
{
nllerr("addr: %04x len: %d\n", descr->addr, descr->len);
nllinfo("addr: %04x len: %d\n", descr->addr, descr->len);
descr = (FAR struct enc_descr_s *)sq_next(descr);
}
@@ -1797,7 +1797,7 @@ static void enc_rxabtif(FAR struct enc_driver_s *priv)
{
enc_rxrmpkt(priv, descr);
nllerr("pending packet freed\n");
nllinfo("pending packet freed\n");
}
else
{
@@ -2043,7 +2043,7 @@ static void enc_toworker(FAR void *arg)
net_lock_t lock;
int ret;
nllerr("Tx timeout\n");
nllerr("ERROR: Tx timeout\n");
DEBUGASSERT(priv);
/* Get exclusive access to the network. */
@@ -2231,9 +2231,9 @@ static int enc_ifup(struct net_driver_s *dev)
FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private;
int ret;
nllerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
nllinfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Lock the SPI bus so that we have exclusive access */
@@ -2307,9 +2307,9 @@ static int enc_ifdown(struct net_driver_s *dev)
irqstate_t flags;
int ret;
nllerr("Taking down: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
nllinfo("Taking down: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Lock the SPI bus so that we have exclusive access */
+7 -7
View File
@@ -1311,15 +1311,15 @@ static int ftmac100_ifup(struct net_driver_s *dev)
FAR struct ftmac100_driver_s *priv = (FAR struct ftmac100_driver_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
#endif
#ifdef CONFIG_NET_IPv6
nerr("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
#endif
/* Initialize PHYs, the Ethernet interface, and setup up Ethernet
+8 -8
View File
@@ -203,7 +203,7 @@ static int lo_txpoll(FAR struct net_driver_s *dev)
else
#endif
{
nerr("WARNING: Unrecognized packet type dropped: %02x\n", IPv4BUF->vhl);
nwarn("WARNING: Unrecognized packet type dropped: %02x\n", IPv4BUF->vhl);
NETDEV_RXDROPPED(&priv->lo_dev);
priv->lo_dev.d_len = 0;
}
@@ -323,15 +323,15 @@ static int lo_ifup(FAR struct net_driver_s *dev)
FAR struct lo_driver_s *priv = (FAR struct lo_driver_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
#endif
#ifdef CONFIG_NET_IPv6
nerr("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
#endif
/* Set and activate a timer process */
+10 -6
View File
@@ -82,9 +82,13 @@
*/
#ifdef CONFIG_NETDEV_PHY_DEBUG
# define phyinfo info
# define phyllinfo llinfo
# define phyerr err
# define phyllerr llerr
#else
# define phyinfo(x...)
# define phyllinfo(x...)
# define phyerr(x...)
# define phyllerr(x...)
#endif
@@ -208,7 +212,7 @@ static FAR struct phy_notify_s *phy_find_unassigned(void)
/* Return the client entry assigned to the caller */
phy_semgive();
phyerr("Returning client %d\n", i);
phyinfo("Returning client %d\n", i);
return client;
}
}
@@ -243,7 +247,7 @@ static FAR struct phy_notify_s *phy_find_assigned(FAR const char *intf,
/* Return the matching client entry to the caller */
phy_semgive();
phyerr("Returning client %d\n", i);
phyinfo("Returning client %d\n", i);
return client;
}
}
@@ -266,8 +270,8 @@ static int phy_handler(FAR struct phy_notify_s *client)
int ret;
DEBUGASSERT(client && client->assigned && client->enable);
phyllerr("Entry client %d, signalling PID=%d with signal %d\n",
client->index, client->pid, client->signo);
phyllinfo("Entry client %d, signalling PID=%d with signal %d\n",
client->index, client->pid, client->signo);
/* Disable further interrupts */
@@ -287,7 +291,7 @@ static int phy_handler(FAR struct phy_notify_s *client)
int errcode = errno;
DEBUGASSERT(errcode > 0);
nllerr("ERROR: sigqueue failed: %d\n", errcode);
nllinfo("ERROR: sigqueue failed: %d\n", errcode);
UNUSED(errcode);
}
@@ -367,7 +371,7 @@ int phy_notify_subscribe(FAR const char *intf, pid_t pid, int signo,
if (pid == 0)
{
pid = getpid();
phyerr("Actual PID=%d\n", pid);
phyinfo("Actual PID=%d\n", pid);
}
/* Check if this client already exists */
+7 -7
View File
@@ -855,15 +855,15 @@ static int skel_ifup(FAR struct net_driver_s *dev)
FAR struct skel_driver_s *priv = (FAR struct skel_driver_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
#endif
#ifdef CONFIG_NET_IPv6
nerr("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
#endif
/* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */
+7 -7
View File
@@ -447,7 +447,7 @@ static void telnet_sendopt(FAR struct telnet_dev_s *priv, uint8_t option,
telnet_dumpbuffer("Send optbuf", optbuf, 4);
if (psock_send(&priv->td_psock, optbuf, 4, 0) < 0)
{
nllerr("Failed to send TELNET_IAC\n");
nllerr("ERROR: Failed to send TELNET_IAC\n");
}
}
@@ -566,7 +566,7 @@ static int telnet_close(FAR struct file *filep)
if (ret != -EBUSY)
{
nllerr("Failed to unregister the driver %s: %d\n",
nllerr("ERROR: Failed to unregister the driver %s: %d\n",
devpath, ret);
}
}
@@ -706,7 +706,7 @@ static ssize_t telnet_write(FAR struct file *filep, FAR const char *buffer, size
ret = psock_send(&priv->td_psock, priv->td_txbuffer, ncopied, 0);
if (ret < 0)
{
nllerr("psock_send failed '%s': %d\n", priv->td_txbuffer, ret);
nllerr("ERROR: psock_send failed '%s': %d\n", priv->td_txbuffer, ret);
return ret;
}
@@ -723,7 +723,7 @@ static ssize_t telnet_write(FAR struct file *filep, FAR const char *buffer, size
ret = psock_send(&priv->td_psock, priv->td_txbuffer, ncopied, 0);
if (ret < 0)
{
nllerr("psock_send failed '%s': %d\n", priv->td_txbuffer, ret);
nllerr("ERROR: psock_send failed '%s': %d\n", priv->td_txbuffer, ret);
return ret;
}
}
@@ -767,7 +767,7 @@ static int telnet_session(FAR struct telnet_session_s *session)
priv = (FAR struct telnet_dev_s*)malloc(sizeof(struct telnet_dev_s));
if (!priv)
{
nllerr("Failed to allocate the driver data structure\n");
nllerr("ERROR: Failed to allocate the driver data structure\n");
return -ENOMEM;
}
@@ -788,7 +788,7 @@ static int telnet_session(FAR struct telnet_session_s *session)
psock = sockfd_socket(session->ts_sd);
if (!psock)
{
nllerr("Failed to convert sd=%d to a socket structure\n", session->ts_sd);
nllerr("ERROR: Failed to convert sd=%d to a socket structure\n", session->ts_sd);
ret = -EINVAL;
goto errout_with_dev;
}
@@ -796,7 +796,7 @@ static int telnet_session(FAR struct telnet_session_s *session)
ret = net_clone(psock, &priv->td_psock);
if (ret < 0)
{
nllerr("net_clone failed: %d\n", ret);
nllerr("ERROR: net_clone failed: %d\n", ret);
goto errout_with_dev;
}
+7 -7
View File
@@ -646,15 +646,15 @@ static int tun_ifup(struct net_driver_s *dev)
FAR struct tun_device_s *priv = (FAR struct tun_device_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
#endif
#ifdef CONFIG_NET_IPv6
nerr("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
#endif
/* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */
+3 -3
View File
@@ -546,9 +546,9 @@ static int vnet_ifup(struct net_driver_s *dev)
{
FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private;
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */