diff options
author | Samuel Ortiz <samuel@sortiz.org> | 2007-07-02 22:55:31 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-10 22:16:44 -0700 |
commit | 411725280bd0058ebb83c0e32133b7a94902c3a6 (patch) | |
tree | 7fc21a6c4b07ad80cf426c466400ed4679834e98 /net/irda/irlap_frame.c | |
parent | 89da1ecf5483e6aa29b456a15ad6d05a6797c5a5 (diff) | |
download | blackbird-op-linux-411725280bd0058ebb83c0e32133b7a94902c3a6.tar.gz blackbird-op-linux-411725280bd0058ebb83c0e32133b7a94902c3a6.zip |
[IrDA]: Monitor mode.
Through the IrDA netlink set mode command, we switch to IrDA monitor
mode, where one IrLAP instance receives all the packets on the media,
without ever responding to them.
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/irlap_frame.c')
-rw-r--r-- | net/irda/irlap_frame.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c index 3013c49ab975..25a3444a9234 100644 --- a/net/irda/irlap_frame.c +++ b/net/irda/irlap_frame.c @@ -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); } |