]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/irda/irlap_frame.c
[IRDA]: Compilation for CONFIG_INET=n case
[linux-2.6-omap-h63xx.git] / net / irda / irlap_frame.c
index 3013c49ab975e865b593746911f0d88f2921c8b0..4f3764546b2fe1eae1d4aef2582d97c807c120e4 100644 (file)
@@ -18,7 +18,7 @@
  *     published by the Free Software Foundation; either version 2 of
  *     the License, or (at your option) any later version.
  *
- *     Neither Dag Brattli nor University of Tromsø admit liability nor
+ *     Neither Dag Brattli nor University of Tromsø admit liability nor
  *     provide warranty for any of this software. This material is
  *     provided "AS-IS" and at no charge.
  *
@@ -101,6 +101,13 @@ void irlap_queue_xmit(struct irlap_cb *self, struct sk_buff *skb)
 
        irlap_insert_info(self, skb);
 
+       if (unlikely(self->mode & IRDA_MODE_MONITOR)) {
+               IRDA_DEBUG(3, "%s(): %s is in monitor mode\n", __FUNCTION__,
+                          self->netdev->name);
+               dev_kfree_skb(skb);
+               return;
+       }
+
        dev_queue_xmit(skb);
 }
 
@@ -1319,6 +1326,9 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
        int command;
        __u8 control;
 
+       if (dev->nd_net != &init_net)
+               goto out;
+
        /* FIXME: should we get our own field? */
        self = (struct irlap_cb *) dev->atalk_ptr;