From: samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH 2/4] [IrDA] Monitor mode
Date: Mon, 02 Jul 2007 01:14:29 +0300 [thread overview]
Message-ID: <20070701221705.413124168@sortiz.org> (raw)
In-Reply-To: 20070701221427.101308704@sortiz.org
[-- Attachment #1: IrDA-monitor-mode.patch --]
[-- Type: text/plain, Size: 1522 bytes --]
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-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
Index: net-2.6-quilt/include/linux/irda.h
===================================================================
--- net-2.6-quilt.orig/include/linux/irda.h 2007-05-12 03:04:09.000000000 +0300
+++ net-2.6-quilt/include/linux/irda.h 2007-05-12 03:07:41.000000000 +0300
@@ -242,6 +242,7 @@
/* IrDA modes */
#define IRDA_MODE_PRIMARY 0x1
#define IRDA_MODE_SECONDARY 0x2
+#define IRDA_MODE_MONITOR 0x4
#endif /* KERNEL_IRDA_H */
Index: net-2.6-quilt/net/irda/irlap_frame.c
===================================================================
--- net-2.6-quilt.orig/net/irda/irlap_frame.c 2007-05-12 03:02:16.000000000 +0300
+++ net-2.6-quilt/net/irda/irlap_frame.c 2007-05-12 03:07:41.000000000 +0300
@@ -101,6 +101,13 @@
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);
}
--
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
next prev parent reply other threads:[~2007-07-01 22:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-01 22:14 [PATCH 0/4] [IrDA] Update for net-2.6.23 samuel-jcdQHdrhKHMdnm+yROfE0A
2007-07-01 22:14 ` [PATCH 1/4] [IrDA] Netlink layer samuel-jcdQHdrhKHMdnm+yROfE0A
2007-07-03 5:54 ` David Miller
2007-07-01 22:14 ` samuel-jcdQHdrhKHMdnm+yROfE0A [this message]
2007-07-03 5:55 ` [PATCH 2/4] [IrDA] Monitor mode David Miller
2007-07-01 22:14 ` [PATCH 3/4] [IrDA] kingsun-sir.c charset fix samuel-jcdQHdrhKHMdnm+yROfE0A
[not found] ` <20070701221705.948742675-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
2007-07-03 5:56 ` David Miller
2007-07-01 22:14 ` [PATCH 4/4] [IrDA] tsap init routine factorisation samuel-jcdQHdrhKHMdnm+yROfE0A
2007-07-03 5:57 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070701221705.413124168@sortiz.org \
--to=samuel-jcdqhdrhkhmdnm+yrofe0a@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).