Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
632189d8
Commit
632189d8
authored
Nov 01, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge
http://linux-mh.bkbits.net/bluetooth-2.6
into nuts.davemloft.net:/disk1/BK/net-2.6
parents
ef395d24
84038c1d
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
100 additions
and
17 deletions
+100
-17
drivers/bluetooth/bluecard_cs.c
drivers/bluetooth/bluecard_cs.c
+5
-3
drivers/bluetooth/bt3c_cs.c
drivers/bluetooth/bt3c_cs.c
+4
-3
drivers/bluetooth/btuart_cs.c
drivers/bluetooth/btuart_cs.c
+4
-3
drivers/bluetooth/dtl1_cs.c
drivers/bluetooth/dtl1_cs.c
+4
-3
drivers/bluetooth/hci_usb.c
drivers/bluetooth/hci_usb.c
+4
-0
include/net/bluetooth/hci_core.h
include/net/bluetooth/hci_core.h
+47
-1
net/bluetooth/af_bluetooth.c
net/bluetooth/af_bluetooth.c
+1
-1
net/bluetooth/hci_core.c
net/bluetooth/hci_core.c
+28
-0
net/bluetooth/hci_event.c
net/bluetooth/hci_event.c
+3
-3
No files found.
drivers/bluetooth/bluecard_cs.c
View file @
632189d8
...
...
@@ -34,6 +34,8 @@
#include <linux/ptrace.h>
#include <linux/ioport.h>
#include <linux/spinlock.h>
#include <linux/moduleparam.h>
#include <linux/skbuff.h>
#include <asm/io.h>
...
...
@@ -54,11 +56,11 @@
/* Bit map of interrupts to choose from */
static
u
_
int
irq_mask
=
0x86bc
;
static
u
nsigned
int
irq_mask
=
0x86bc
;
static
int
irq_list
[
4
]
=
{
-
1
};
MODULE_PARM
(
irq_mask
,
"i"
);
MODULE_PARM
(
irq_list
,
"1-4i"
);
module_param
(
irq_mask
,
uint
,
0
);
module_param_array
(
irq_list
,
int
,
NULL
,
0
);
MODULE_AUTHOR
(
"Marcel Holtmann <marcel@holtmann.org>"
);
MODULE_DESCRIPTION
(
"Bluetooth driver for the Anycom BlueCard (LSE039/LSE041)"
);
...
...
drivers/bluetooth/bt3c_cs.c
View file @
632189d8
...
...
@@ -34,6 +34,7 @@
#include <linux/ptrace.h>
#include <linux/ioport.h>
#include <linux/spinlock.h>
#include <linux/moduleparam.h>
#include <linux/skbuff.h>
#include <linux/string.h>
...
...
@@ -63,11 +64,11 @@
/* Bit map of interrupts to choose from */
static
u
_
int
irq_mask
=
0xffff
;
static
u
nsigned
int
irq_mask
=
0xffff
;
static
int
irq_list
[
4
]
=
{
-
1
};
MODULE_PARM
(
irq_mask
,
"i"
);
MODULE_PARM
(
irq_list
,
"1-4i"
);
module_param
(
irq_mask
,
uint
,
0
);
module_param_array
(
irq_list
,
int
,
NULL
,
0
);
MODULE_AUTHOR
(
"Marcel Holtmann <marcel@holtmann.org>, Jose Orlando Pereira <jop@di.uminho.pt>"
);
MODULE_DESCRIPTION
(
"Bluetooth driver for the 3Com Bluetooth PCMCIA card"
);
...
...
drivers/bluetooth/btuart_cs.c
View file @
632189d8
...
...
@@ -33,6 +33,7 @@
#include <linux/ptrace.h>
#include <linux/ioport.h>
#include <linux/spinlock.h>
#include <linux/moduleparam.h>
#include <linux/skbuff.h>
#include <linux/string.h>
...
...
@@ -59,11 +60,11 @@
/* Bit map of interrupts to choose from */
static
u
_
int
irq_mask
=
0xffff
;
static
u
nsigned
int
irq_mask
=
0xffff
;
static
int
irq_list
[
4
]
=
{
-
1
};
MODULE_PARM
(
irq_mask
,
"i"
);
MODULE_PARM
(
irq_list
,
"1-4i"
);
module_param
(
irq_mask
,
uint
,
0
);
module_param_array
(
irq_list
,
int
,
NULL
,
0
);
MODULE_AUTHOR
(
"Marcel Holtmann <marcel@holtmann.org>"
);
MODULE_DESCRIPTION
(
"Bluetooth driver for Bluetooth PCMCIA cards with HCI UART interface"
);
...
...
drivers/bluetooth/dtl1_cs.c
View file @
632189d8
...
...
@@ -33,6 +33,7 @@
#include <linux/ptrace.h>
#include <linux/ioport.h>
#include <linux/spinlock.h>
#include <linux/moduleparam.h>
#include <linux/skbuff.h>
#include <linux/string.h>
...
...
@@ -59,11 +60,11 @@
/* Bit map of interrupts to choose from */
static
u
_
int
irq_mask
=
0xffff
;
static
u
nsigned
int
irq_mask
=
0xffff
;
static
int
irq_list
[
4
]
=
{
-
1
};
MODULE_PARM
(
irq_mask
,
"i"
);
MODULE_PARM
(
irq_list
,
"1-4i"
);
module_param
(
irq_mask
,
uint
,
0
);
module_param_array
(
irq_list
,
int
,
NULL
,
0
);
MODULE_AUTHOR
(
"Marcel Holtmann <marcel@holtmann.org>"
);
MODULE_DESCRIPTION
(
"Bluetooth driver for Nokia Connectivity Card DTL-1"
);
...
...
drivers/bluetooth/hci_usb.c
View file @
632189d8
...
...
@@ -101,8 +101,12 @@ static struct usb_device_id blacklist_ids[] = {
{
USB_DEVICE
(
0x0a5c
,
0x2033
),
.
driver_info
=
HCI_IGNORE
},
/* Broadcom BCM2035 */
{
USB_DEVICE
(
0x0a5c
,
0x2009
),
.
driver_info
=
HCI_RESET
|
HCI_BROKEN_ISOC
},
{
USB_DEVICE
(
0x0a5c
,
0x200a
),
.
driver_info
=
HCI_RESET
|
HCI_BROKEN_ISOC
},
/* Microsoft Wireless Transceiver for Bluetooth 2.0 */
{
USB_DEVICE
(
0x045e
,
0x009c
),
.
driver_info
=
HCI_RESET
|
HCI_BROKEN_ISOC
},
/* ISSC Bluetooth Adapter v3.1 */
{
USB_DEVICE
(
0x1131
,
0x1001
),
.
driver_info
=
HCI_RESET
},
...
...
include/net/bluetooth/hci_core.h
View file @
632189d8
...
...
@@ -161,7 +161,9 @@ struct hci_conn {
extern
struct
hci_proto
*
hci_proto
[];
extern
struct
list_head
hci_dev_list
;
extern
struct
list_head
hci_cb_list
;
extern
rwlock_t
hci_dev_list_lock
;
extern
rwlock_t
hci_cb_list_lock
;
/* ----- Inquiry cache ----- */
#define INQUIRY_CACHE_AGE_MAX (HZ*30) // 30 seconds
...
...
@@ -229,7 +231,7 @@ static inline void hci_conn_hash_del(struct hci_dev *hdev, struct hci_conn *c)
struct
hci_conn_hash
*
h
=
&
hdev
->
conn_hash
;
list_del
(
&
c
->
list
);
if
(
c
->
type
==
ACL_LINK
)
h
->
acl_num
++
;
h
->
acl_num
--
;
else
h
->
sco_num
--
;
}
...
...
@@ -491,6 +493,50 @@ static inline void hci_proto_encrypt_cfm(struct hci_conn *conn, __u8 status)
int
hci_register_proto
(
struct
hci_proto
*
hproto
);
int
hci_unregister_proto
(
struct
hci_proto
*
hproto
);
/* ----- HCI callbacks ----- */
struct
hci_cb
{
struct
list_head
list
;
char
*
name
;
void
(
*
auth_cfm
)
(
struct
hci_conn
*
conn
,
__u8
status
);
void
(
*
encrypt_cfm
)
(
struct
hci_conn
*
conn
,
__u8
status
,
__u8
encrypt
);
};
static
inline
void
hci_auth_cfm
(
struct
hci_conn
*
conn
,
__u8
status
)
{
struct
list_head
*
p
;
hci_proto_auth_cfm
(
conn
,
status
);
read_lock_bh
(
&
hci_cb_list_lock
);
list_for_each
(
p
,
&
hci_cb_list
)
{
struct
hci_cb
*
cb
=
list_entry
(
p
,
struct
hci_cb
,
list
);
if
(
cb
->
auth_cfm
)
cb
->
auth_cfm
(
conn
,
status
);
}
read_unlock_bh
(
&
hci_cb_list_lock
);
}
static
inline
void
hci_encrypt_cfm
(
struct
hci_conn
*
conn
,
__u8
status
,
__u8
encrypt
)
{
struct
list_head
*
p
;
hci_proto_encrypt_cfm
(
conn
,
status
);
read_lock_bh
(
&
hci_cb_list_lock
);
list_for_each
(
p
,
&
hci_cb_list
)
{
struct
hci_cb
*
cb
=
list_entry
(
p
,
struct
hci_cb
,
list
);
if
(
cb
->
encrypt_cfm
)
cb
->
encrypt_cfm
(
conn
,
status
,
encrypt
);
}
read_unlock_bh
(
&
hci_cb_list_lock
);
}
int
hci_register_cb
(
struct
hci_cb
*
hcb
);
int
hci_unregister_cb
(
struct
hci_cb
*
hcb
);
int
hci_register_notifier
(
struct
notifier_block
*
nb
);
int
hci_unregister_notifier
(
struct
notifier_block
*
nb
);
...
...
net/bluetooth/af_bluetooth.c
View file @
632189d8
...
...
@@ -51,7 +51,7 @@
#define BT_DBG(D...)
#endif
#define VERSION "2.
6
"
#define VERSION "2.
7
"
struct
proc_dir_entry
*
proc_bt
;
EXPORT_SYMBOL
(
proc_bt
);
...
...
net/bluetooth/hci_core.c
View file @
632189d8
...
...
@@ -65,6 +65,10 @@ rwlock_t hci_task_lock = RW_LOCK_UNLOCKED;
LIST_HEAD
(
hci_dev_list
);
rwlock_t
hci_dev_list_lock
=
RW_LOCK_UNLOCKED
;
/* HCI callback list */
LIST_HEAD
(
hci_cb_list
);
rwlock_t
hci_cb_list_lock
=
RW_LOCK_UNLOCKED
;
/* HCI protocols */
#define HCI_MAX_PROTO 2
struct
hci_proto
*
hci_proto
[
HCI_MAX_PROTO
];
...
...
@@ -930,6 +934,30 @@ int hci_unregister_proto(struct hci_proto *hp)
}
EXPORT_SYMBOL
(
hci_unregister_proto
);
int
hci_register_cb
(
struct
hci_cb
*
cb
)
{
BT_DBG
(
"%p name %s"
,
cb
,
cb
->
name
);
write_lock_bh
(
&
hci_cb_list_lock
);
list_add
(
&
cb
->
list
,
&
hci_cb_list
);
write_unlock_bh
(
&
hci_cb_list_lock
);
return
0
;
}
EXPORT_SYMBOL
(
hci_register_cb
);
int
hci_unregister_cb
(
struct
hci_cb
*
cb
)
{
BT_DBG
(
"%p name %s"
,
cb
,
cb
->
name
);
write_lock_bh
(
&
hci_cb_list_lock
);
list_del
(
&
cb
->
list
);
write_unlock_bh
(
&
hci_cb_list_lock
);
return
0
;
}
EXPORT_SYMBOL
(
hci_unregister_cb
);
static
int
hci_send_frame
(
struct
sk_buff
*
skb
)
{
struct
hci_dev
*
hdev
=
(
struct
hci_dev
*
)
skb
->
dev
;
...
...
net/bluetooth/hci_event.c
View file @
632189d8
...
...
@@ -739,7 +739,7 @@ static inline void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *s
conn
->
link_mode
|=
HCI_LM_AUTH
;
clear_bit
(
HCI_CONN_AUTH_PEND
,
&
conn
->
pend
);
hci_
proto_
auth_cfm
(
conn
,
ev
->
status
);
hci_auth_cfm
(
conn
,
ev
->
status
);
if
(
test_bit
(
HCI_CONN_ENCRYPT_PEND
,
&
conn
->
pend
))
{
if
(
!
ev
->
status
)
{
...
...
@@ -751,7 +751,7 @@ static inline void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *s
sizeof
(
cp
),
&
cp
);
}
else
{
clear_bit
(
HCI_CONN_ENCRYPT_PEND
,
&
conn
->
pend
);
hci_
proto_encrypt_cfm
(
conn
,
ev
->
status
);
hci_
encrypt_cfm
(
conn
,
ev
->
status
,
0x00
);
}
}
}
...
...
@@ -780,7 +780,7 @@ static inline void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *
}
clear_bit
(
HCI_CONN_ENCRYPT_PEND
,
&
conn
->
pend
);
hci_
proto_encrypt_cfm
(
conn
,
ev
->
status
);
hci_
encrypt_cfm
(
conn
,
ev
->
status
,
ev
->
encrypt
);
}
hci_dev_unlock
(
hdev
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment