public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: "alok barsode" <alokbarsode@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [Patch]Netlink: adding nlbluetooth.c for netlink support
Date: Tue, 28 Oct 2008 20:46:06 +0530	[thread overview]
Message-ID: <8b5debfa0810280816p60f475d4s6f105b0d89f20c80@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 121 bytes --]

Marcel,

Patch for adding nlbluetooth.c for netlink support .
let me know if anything needs modification.

Thanks,
Alok.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Adding-net-bluetooth-nlbluetooth.c-for-netlink-suppo.patch --]
[-- Type: text/x-diff; name=0001-Adding-net-bluetooth-nlbluetooth.c-for-netlink-suppo.patch, Size: 2639 bytes --]

From bb509e62c9209af1e2b2a86272155afa6453262e Mon Sep 17 00:00:00 2001
From: Alok Barsode <alok.barsode@azingo.com>
Date: Mon, 27 Oct 2008 11:30:48 +0530
Subject: [PATCH] Adding net/bluetooth/nlbluetooth.c for netlink support.

Signed-off-by: Alok Barsode <alok.barsode@azingo.com>
---
 include/net/bluetooth/bluetooth.h |    3 +++
 net/bluetooth/Makefile            |    2 +-
 net/bluetooth/af_bluetooth.c      |    6 ++++++
 net/bluetooth/nlbluetooth.c       |   24 ++++++++++++++++++++++++
 4 files changed, 34 insertions(+), 1 deletions(-)
 create mode 100644 net/bluetooth/nlbluetooth.c

diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 6f8418b..b02c7aa 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -178,4 +178,7 @@ extern void bt_sysfs_cleanup(void);
 
 extern struct class *bt_class;
 
+extern int nlbluetooth_init(void);
+extern void nlbluetooth_cleanup(void);
+
 #endif /* __BLUETOOTH_H */
diff --git a/net/bluetooth/Makefile b/net/bluetooth/Makefile
index d1e433f..c48f176 100644
--- a/net/bluetooth/Makefile
+++ b/net/bluetooth/Makefile
@@ -10,4 +10,4 @@ obj-$(CONFIG_BT_BNEP)	+= bnep/
 obj-$(CONFIG_BT_CMTP)	+= cmtp/
 obj-$(CONFIG_BT_HIDP)	+= hidp/
 
-bluetooth-objs := af_bluetooth.o hci_core.o hci_conn.o hci_event.o hci_sock.o hci_sysfs.o lib.o
+bluetooth-objs := af_bluetooth.o hci_core.o hci_conn.o hci_event.o hci_sock.o hci_sysfs.o lib.o nlbluetooth.o
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 8907eff..b6487dc 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -436,6 +436,10 @@ static int __init bt_init(void)
 	if (err < 0)
 		return err;
 
+	err = nlbluetooth_init();
+	if (err < 0)
+		return err;
+
 	err = sock_register(&bt_sock_family_ops);
 	if (err < 0) {
 		bt_sysfs_cleanup();
@@ -456,6 +460,8 @@ static void __exit bt_exit(void)
 	sock_unregister(PF_BLUETOOTH);
 
 	bt_sysfs_cleanup();
+
+	nlbluetooth_cleanup();
 }
 
 subsys_initcall(bt_init);
diff --git a/net/bluetooth/nlbluetooth.c b/net/bluetooth/nlbluetooth.c
new file mode 100644
index 0000000..4606bbc
--- /dev/null
+++ b/net/bluetooth/nlbluetooth.c
@@ -0,0 +1,24 @@
+/*
+ * This is the netlink-based bluetooth interface.
+ *
+ * Copyright 2008 Alok Barsode <alok.barsode@azingo.com>
+ */
+
+#include <net/genetlink.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+
+#include <net/bluetooth/bluetooth.h>
+#include <net/bluetooth/hci_core.h>
+
+/* initialisation/exit functions */
+
+int __init nlbluetooth_init(void)
+{
+	return 0;
+}
+
+void nlbluetooth_cleanup(void)
+{
+
+}
-- 
1.5.4.3


                 reply	other threads:[~2008-10-28 15:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=8b5debfa0810280816p60f475d4s6f105b0d89f20c80@mail.gmail.com \
    --to=alokbarsode@gmail.com \
    --cc=linux-bluetooth@vger.kernel.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