*
********************************************************************/
-#include <linux/config.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/inetdevice.h>
++self->stats.rx_dropped;
return 0;
}
- ASSERT(skb->len > 1, return 0;);
+ if (skb->len < ETH_HLEN) {
+ IRDA_DEBUG(0, "%s() : IrLAN frame too short (%d)\n",
+ __FUNCTION__, skb->len);
+ ++self->stats.rx_dropped;
+ dev_kfree_skb(skb);
+ return 0;
+ }
/*
* Adopt this frame! Important to set all these fields since they
self = (struct irlan_cb *) instance;
- ASSERT(self != NULL, return;);
- ASSERT(self->magic == IRLAN_MAGIC, return;);
+ IRDA_ASSERT(self != NULL, return;);
+ IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
dev = self->dev;
- ASSERT(dev != NULL, return;);
+ IRDA_ASSERT(dev != NULL, return;);
IRDA_DEBUG(0, "%s() : flow %s ; running %d\n", __FUNCTION__,
flow == FLOW_STOP ? "FLOW_STOP" : "FLOW_START",
#ifdef CONFIG_INET
IRDA_DEBUG(4, "IrLAN: Sending gratuitous ARP\n");
rcu_read_lock();
- in_dev = __in_dev_get(dev);
+ in_dev = __in_dev_get_rcu(dev);
if (in_dev == NULL)
goto out;
if (in_dev->ifa_list)
if (dev->flags & IFF_PROMISC) {
/* Enable promiscuous mode */
- WARNING("Promiscous mode not implemented by IrLAN!\n");
+ IRDA_WARNING("Promiscous mode not implemented by IrLAN!\n");
}
else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) {
/* Disable promiscuous mode, use normal mode. */