Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
ae01d279
Commit
ae01d279
authored
Sep 13, 2005
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6
parents
adcb5ad1
0915e886
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
90 additions
and
8 deletions
+90
-8
drivers/bluetooth/hci_usb.c
drivers/bluetooth/hci_usb.c
+18
-1
drivers/bluetooth/hci_usb.h
drivers/bluetooth/hci_usb.h
+3
-2
include/net/bluetooth/hci.h
include/net/bluetooth/hci.h
+11
-0
net/bluetooth/hci_event.c
net/bluetooth/hci_event.c
+33
-0
net/bluetooth/rfcomm/sock.c
net/bluetooth/rfcomm/sock.c
+25
-5
No files found.
drivers/bluetooth/hci_usb.c
View file @
ae01d279
...
...
@@ -65,13 +65,15 @@
#endif
static
int
ignore
=
0
;
static
int
ignore_csr
=
0
;
static
int
ignore_sniffer
=
0
;
static
int
reset
=
0
;
#ifdef CONFIG_BT_HCIUSB_SCO
static
int
isoc
=
2
;
#endif
#define VERSION "2.
8
"
#define VERSION "2.
9
"
static
struct
usb_driver
hci_usb_driver
;
...
...
@@ -98,6 +100,9 @@ static struct usb_device_id bluetooth_ids[] = {
MODULE_DEVICE_TABLE
(
usb
,
bluetooth_ids
);
static
struct
usb_device_id
blacklist_ids
[]
=
{
/* CSR BlueCore devices */
{
USB_DEVICE
(
0x0a12
,
0x0001
),
.
driver_info
=
HCI_CSR
},
/* Broadcom BCM2033 without firmware */
{
USB_DEVICE
(
0x0a5c
,
0x2033
),
.
driver_info
=
HCI_IGNORE
},
...
...
@@ -836,6 +841,12 @@ static int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id
if
(
ignore
||
id
->
driver_info
&
HCI_IGNORE
)
return
-
ENODEV
;
if
(
ignore_csr
&&
id
->
driver_info
&
HCI_CSR
)
return
-
ENODEV
;
if
(
ignore_sniffer
&&
id
->
driver_info
&
HCI_SNIFFER
)
return
-
ENODEV
;
if
(
intf
->
cur_altsetting
->
desc
.
bInterfaceNumber
>
0
)
return
-
ENODEV
;
...
...
@@ -1061,6 +1072,12 @@ module_exit(hci_usb_exit);
module_param
(
ignore
,
bool
,
0644
);
MODULE_PARM_DESC
(
ignore
,
"Ignore devices from the matching table"
);
module_param
(
ignore_csr
,
bool
,
0644
);
MODULE_PARM_DESC
(
ignore_csr
,
"Ignore devices with id 0a12:0001"
);
module_param
(
ignore_sniffer
,
bool
,
0644
);
MODULE_PARM_DESC
(
ignore_sniffer
,
"Ignore devices with id 0a12:0002"
);
module_param
(
reset
,
bool
,
0644
);
MODULE_PARM_DESC
(
reset
,
"Send HCI reset command on initialization"
);
...
...
drivers/bluetooth/hci_usb.h
View file @
ae01d279
...
...
@@ -31,9 +31,10 @@
#define HCI_IGNORE 0x01
#define HCI_RESET 0x02
#define HCI_DIGIANSWER 0x04
#define HCI_
SNIFFER
0x08
#define HCI_
BROKEN_ISOC
0x10
#define HCI_
CSR
0x08
#define HCI_
SNIFFER
0x10
#define HCI_BCM92035 0x20
#define HCI_BROKEN_ISOC 0x40
#define HCI_MAX_IFACE_NUM 3
...
...
include/net/bluetooth/hci.h
View file @
ae01d279
...
...
@@ -463,6 +463,17 @@ struct inquiry_info_with_rssi_and_pscan_mode {
__s8
rssi
;
}
__attribute__
((
packed
));
#define HCI_EV_EXTENDED_INQUIRY_RESULT 0x2F
struct
extended_inquiry_info
{
bdaddr_t
bdaddr
;
__u8
pscan_rep_mode
;
__u8
pscan_period_mode
;
__u8
dev_class
[
3
];
__u16
clock_offset
;
__s8
rssi
;
__u8
data
[
240
];
}
__attribute__
((
packed
));
#define HCI_EV_CONN_COMPLETE 0x03
struct
hci_ev_conn_complete
{
__u8
status
;
...
...
net/bluetooth/hci_event.c
View file @
ae01d279
...
...
@@ -558,6 +558,35 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct
hci_dev_unlock
(
hdev
);
}
/* Extended Inquiry Result */
static
inline
void
hci_extended_inquiry_result_evt
(
struct
hci_dev
*
hdev
,
struct
sk_buff
*
skb
)
{
struct
inquiry_data
data
;
struct
extended_inquiry_info
*
info
=
(
struct
extended_inquiry_info
*
)
(
skb
->
data
+
1
);
int
num_rsp
=
*
((
__u8
*
)
skb
->
data
);
BT_DBG
(
"%s num_rsp %d"
,
hdev
->
name
,
num_rsp
);
if
(
!
num_rsp
)
return
;
hci_dev_lock
(
hdev
);
for
(;
num_rsp
;
num_rsp
--
)
{
bacpy
(
&
data
.
bdaddr
,
&
info
->
bdaddr
);
data
.
pscan_rep_mode
=
info
->
pscan_rep_mode
;
data
.
pscan_period_mode
=
info
->
pscan_period_mode
;
data
.
pscan_mode
=
0x00
;
memcpy
(
data
.
dev_class
,
info
->
dev_class
,
3
);
data
.
clock_offset
=
info
->
clock_offset
;
data
.
rssi
=
info
->
rssi
;
info
++
;
hci_inquiry_cache_update
(
hdev
,
&
data
);
}
hci_dev_unlock
(
hdev
);
}
/* Connect Request */
static
inline
void
hci_conn_request_evt
(
struct
hci_dev
*
hdev
,
struct
sk_buff
*
skb
)
{
...
...
@@ -940,6 +969,10 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb)
hci_inquiry_result_with_rssi_evt
(
hdev
,
skb
);
break
;
case
HCI_EV_EXTENDED_INQUIRY_RESULT
:
hci_extended_inquiry_result_evt
(
hdev
,
skb
);
break
;
case
HCI_EV_CONN_REQUEST
:
hci_conn_request_evt
(
hdev
,
skb
);
break
;
...
...
net/bluetooth/rfcomm/sock.c
View file @
ae01d279
...
...
@@ -363,6 +363,11 @@ static int rfcomm_sock_bind(struct socket *sock, struct sockaddr *addr, int addr
goto
done
;
}
if
(
sk
->
sk_type
!=
SOCK_STREAM
)
{
err
=
-
EINVAL
;
goto
done
;
}
write_lock_bh
(
&
rfcomm_sk_list
.
lock
);
if
(
sa
->
rc_channel
&&
__rfcomm_get_sock_by_addr
(
sa
->
rc_channel
,
&
sa
->
rc_bdaddr
))
{
...
...
@@ -393,13 +398,17 @@ static int rfcomm_sock_connect(struct socket *sock, struct sockaddr *addr, int a
if
(
addr
->
sa_family
!=
AF_BLUETOOTH
||
alen
<
sizeof
(
struct
sockaddr_rc
))
return
-
EINVAL
;
if
(
sk
->
sk_state
!=
BT_OPEN
&&
sk
->
sk_state
!=
BT_BOUND
)
return
-
EBADFD
;
lock_sock
(
sk
);
if
(
sk
->
sk_type
!=
SOCK_STREAM
)
return
-
EINVAL
;
if
(
sk
->
sk_state
!=
BT_OPEN
&&
sk
->
sk_state
!=
BT_BOUND
)
{
err
=
-
EBADFD
;
goto
done
;
}
lock_sock
(
sk
);
if
(
sk
->
sk_type
!=
SOCK_STREAM
)
{
err
=
-
EINVAL
;
goto
done
;
}
sk
->
sk_state
=
BT_CONNECT
;
bacpy
(
&
bt_sk
(
sk
)
->
dst
,
&
sa
->
rc_bdaddr
);
...
...
@@ -410,6 +419,7 @@ static int rfcomm_sock_connect(struct socket *sock, struct sockaddr *addr, int a
err
=
bt_sock_wait_state
(
sk
,
BT_CONNECTED
,
sock_sndtimeo
(
sk
,
flags
&
O_NONBLOCK
));
done:
release_sock
(
sk
);
return
err
;
}
...
...
@@ -428,6 +438,11 @@ static int rfcomm_sock_listen(struct socket *sock, int backlog)
goto
done
;
}
if
(
sk
->
sk_type
!=
SOCK_STREAM
)
{
err
=
-
EINVAL
;
goto
done
;
}
if
(
!
rfcomm_pi
(
sk
)
->
channel
)
{
bdaddr_t
*
src
=
&
bt_sk
(
sk
)
->
src
;
u8
channel
;
...
...
@@ -472,6 +487,11 @@ static int rfcomm_sock_accept(struct socket *sock, struct socket *newsock, int f
goto
done
;
}
if
(
sk
->
sk_type
!=
SOCK_STREAM
)
{
err
=
-
EINVAL
;
goto
done
;
}
timeo
=
sock_rcvtimeo
(
sk
,
flags
&
O_NONBLOCK
);
BT_DBG
(
"sk %p timeo %ld"
,
sk
,
timeo
);
...
...
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