git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
net
/
bluetooth
/
af_bluetooth.c
diff --git
a/net/bluetooth/af_bluetooth.c
b/net/bluetooth/af_bluetooth.c
index
12b4334
..
469eda0
100644
(file)
--- a/
net/bluetooth/af_bluetooth.c
+++ b/
net/bluetooth/af_bluetooth.c
@@
-36,7
+36,6
@@
#include <linux/skbuff.h>
#include <linux/init.h>
#include <linux/poll.h>
#include <linux/skbuff.h>
#include <linux/init.h>
#include <linux/poll.h>
-#include <linux/proc_fs.h>
#include <net/sock.h>
#if defined(CONFIG_KMOD)
#include <net/sock.h>
#if defined(CONFIG_KMOD)
@@
-50,10
+49,7
@@
#define BT_DBG(D...)
#endif
#define BT_DBG(D...)
#endif
-#define VERSION "2.7"
-
-struct proc_dir_entry *proc_bt;
-EXPORT_SYMBOL(proc_bt);
+#define VERSION "2.8"
/* Bluetooth sockets */
#define BT_MAX_PROTO 8
/* Bluetooth sockets */
#define BT_MAX_PROTO 8
@@
-242,6
+238,9
@@
unsigned int bt_sock_poll(struct file * file, struct socket *sock, poll_table *w
if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
mask |= POLLERR;
if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
mask |= POLLERR;
+ if (sk->sk_shutdown & RCV_SHUTDOWN)
+ mask |= POLLRDHUP;
+
if (sk->sk_shutdown == SHUTDOWN_MASK)
mask |= POLLHUP;
if (sk->sk_shutdown == SHUTDOWN_MASK)
mask |= POLLHUP;
@@
-291,10
+290,9
@@
int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
timeo = schedule_timeout(timeo);
lock_sock(sk);
timeo = schedule_timeout(timeo);
lock_sock(sk);
- if (sk->sk_err) {
- err = sock_error(sk);
+ err = sock_error(sk);
+ if (err)
break;
break;
- }
}
set_current_state(TASK_RUNNING);
remove_wait_queue(sk->sk_sleep, &wait);
}
set_current_state(TASK_RUNNING);
remove_wait_queue(sk->sk_sleep, &wait);
@@
-308,20
+306,10
@@
static struct net_proto_family bt_sock_family_ops = {
.create = bt_sock_create,
};
.create = bt_sock_create,
};
-extern int hci_sock_init(void);
-extern int hci_sock_cleanup(void);
-
-extern int bt_sysfs_init(void);
-extern int bt_sysfs_cleanup(void);
-
static int __init bt_init(void)
{
BT_INFO("Core ver %s", VERSION);
static int __init bt_init(void)
{
BT_INFO("Core ver %s", VERSION);
- proc_bt = proc_mkdir("bluetooth", NULL);
- if (proc_bt)
- proc_bt->owner = THIS_MODULE;
-
sock_register(&bt_sock_family_ops);
BT_INFO("HCI device and connection manager initialized");
sock_register(&bt_sock_family_ops);
BT_INFO("HCI device and connection manager initialized");
@@
-340,8
+328,6
@@
static void __exit bt_exit(void)
bt_sysfs_cleanup();
sock_unregister(PF_BLUETOOTH);
bt_sysfs_cleanup();
sock_unregister(PF_BLUETOOTH);
-
- remove_proc_entry("bluetooth", NULL);
}
subsys_initcall(bt_init);
}
subsys_initcall(bt_init);