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
nexedi
linux
Commits
f022978a
Commit
f022978a
authored
Dec 23, 2002
by
Marcel Holtmann
Browse files
Options
Browse Files
Download
Plain Diff
Merge hostme.bitkeeper.com:/ua/repos/l/linux-bt/bt-2.5
into hostme.bitkeeper.com:/ua/repos/l/linux-bt/marcel-2.5
parents
a6e59b2b
02291ed8
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
76 additions
and
47 deletions
+76
-47
arch/sparc64/kernel/ioctl32.c
arch/sparc64/kernel/ioctl32.c
+20
-0
drivers/bluetooth/Kconfig
drivers/bluetooth/Kconfig
+6
-6
drivers/bluetooth/btuart_cs.c
drivers/bluetooth/btuart_cs.c
+0
-2
net/bluetooth/bnep/bnep.h
net/bluetooth/bnep/bnep.h
+15
-9
net/bluetooth/bnep/core.c
net/bluetooth/bnep/core.c
+6
-6
net/bluetooth/bnep/sock.c
net/bluetooth/bnep/sock.c
+10
-6
net/bluetooth/hci_sock.c
net/bluetooth/hci_sock.c
+1
-1
net/bluetooth/rfcomm/core.c
net/bluetooth/rfcomm/core.c
+13
-12
net/bluetooth/rfcomm/sock.c
net/bluetooth/rfcomm/sock.c
+3
-3
net/bluetooth/rfcomm/tty.c
net/bluetooth/rfcomm/tty.c
+1
-1
net/bluetooth/sco.c
net/bluetooth/sco.c
+1
-1
No files found.
arch/sparc64/kernel/ioctl32.c
View file @
f022978a
...
...
@@ -97,6 +97,7 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci.h>
#include <net/bluetooth/rfcomm.h>
#include <linux/usb.h>
#include <linux/usbdevice_fs.h>
...
...
@@ -3797,6 +3798,14 @@ static int ioc_settimeout(unsigned int fd, unsigned int cmd, unsigned long arg)
return
rw_long
(
fd
,
AUTOFS_IOC_SETTIMEOUT
,
arg
);
}
#define HCIUARTSETPROTO _IOW('U', 200, int)
#define HCIUARTGETPROTO _IOR('U', 201, int)
#define BNEPCONNADD _IOW('B', 200, int)
#define BNEPCONNDEL _IOW('B', 201, int)
#define BNEPGETCONNLIST _IOR('B', 210, int)
#define BNEPGETCONNINFO _IOR('B', 211, int)
struct
usbdevfs_ctrltransfer32
{
__u8
bRequestType
;
__u8
bRequest
;
...
...
@@ -4968,6 +4977,17 @@ COMPATIBLE_IOCTL(HCISETLINKMODE)
COMPATIBLE_IOCTL
(
HCISETACLMTU
)
COMPATIBLE_IOCTL
(
HCISETSCOMTU
)
COMPATIBLE_IOCTL
(
HCIINQUIRY
)
COMPATIBLE_IOCTL
(
HCIUARTSETPROTO
)
COMPATIBLE_IOCTL
(
HCIUARTGETPROTO
)
COMPATIBLE_IOCTL
(
RFCOMMCREATEDEV
)
COMPATIBLE_IOCTL
(
RFCOMMRELEASEDEV
)
COMPATIBLE_IOCTL
(
RFCOMMGETDEVLIST
)
COMPATIBLE_IOCTL
(
RFCOMMGETDEVINFO
)
COMPATIBLE_IOCTL
(
RFCOMMSTEALDLC
)
COMPATIBLE_IOCTL
(
BNEPCONNADD
)
COMPATIBLE_IOCTL
(
BNEPCONNDEL
)
COMPATIBLE_IOCTL
(
BNEPGETCONNLIST
)
COMPATIBLE_IOCTL
(
BNEPGETCONNINFO
)
/* Misc. */
COMPATIBLE_IOCTL
(
0x41545900
)
/* ATYIO_CLKR */
COMPATIBLE_IOCTL
(
0x41545901
)
/* ATYIO_CLKW */
...
...
drivers/bluetooth/Kconfig
View file @
f022978a
...
...
@@ -100,7 +100,7 @@ config BT_HCIBLUECARD
help
Bluetooth HCI BlueCard (PC Card) driver.
This driver provides support for Bluetooth PCMCIA devices with
Anycom BlueCard interface:
Anycom BlueCard interface:
Anycom Bluetooth PC Card
Anycom Bluetooth CF Card
...
...
@@ -114,11 +114,11 @@ config BT_HCIBTUART
Bluetooth HCI UART (PC Card) driver.
This driver provides support for Bluetooth PCMCIA devices with
an UART interface:
Xircom CreditCard Bluetooth Adapter
Xircom RealPort2 Bluetooth Adapter
Sphinx PICO Card
H-Soft blue+Card
Cyber-blue Compact Flash Card
Xircom CreditCard Bluetooth Adapter
Xircom RealPort2 Bluetooth Adapter
Sphinx PICO Card
H-Soft blue+Card
Cyber-blue Compact Flash Card
Say Y here to compile support for HCI UART devices into the
kernel or say M to compile it as module (btuart_cs.o).
...
...
drivers/bluetooth/btuart_cs.c
View file @
f022978a
...
...
@@ -903,5 +903,3 @@ void __exit exit_btuart_cs(void)
module_init
(
init_btuart_cs
);
module_exit
(
exit_btuart_cs
);
EXPORT_NO_SYMBOLS
;
net/bluetooth/bnep/bnep.h
View file @
f022978a
...
...
@@ -111,25 +111,31 @@ struct bnep_ext_hdr {
__u8
data
[
0
];
}
__attribute__
((
packed
));
/* BNEP ioctl defines */
#define BNEPCONNADD _IOW('B', 200, int)
#define BNEPCONNDEL _IOW('B', 201, int)
#define BNEPGETCONNLIST _IOR('B', 210, int)
#define BNEPGETCONNINFO _IOR('B', 211, int)
// Ioctl interface
#define BNEPCONADD 1
#define BNEPCONDEL 2
#define BNEPGETCONLIST 3
#define BNEPGETCONINFO 4
struct
bnep_conadd_req
{
struct
bnep_con
n
add_req
{
int
sock
;
// Connected socket
__u32
flags
;
__u16
role
;
char
device
[
16
];
// Name of the Ethernet device
};
struct
bnep_condel_req
{
struct
bnep_con
n
del_req
{
__u32
flags
;
__u8
dst
[
ETH_ALEN
];
};
struct
bnep_coninfo
{
struct
bnep_con
n
info
{
__u32
flags
;
__u16
role
;
__u16
state
;
...
...
@@ -137,9 +143,9 @@ struct bnep_coninfo {
char
device
[
16
];
};
struct
bnep_conlist_req
{
struct
bnep_con
n
list_req
{
__u32
cnum
;
struct
bnep_coninfo
*
ci
;
struct
bnep_con
n
info
*
ci
;
};
struct
bnep_proto_filter
{
...
...
@@ -147,10 +153,10 @@ struct bnep_proto_filter {
__u16
end
;
};
int
bnep_add_connection
(
struct
bnep_conadd_req
*
req
,
struct
socket
*
sock
);
int
bnep_del_connection
(
struct
bnep_condel_req
*
req
);
int
bnep_get_con
list
(
struct
bnep_co
nlist_req
*
req
);
int
bnep_get_con
info
(
struct
bnep_co
ninfo
*
ci
);
int
bnep_add_connection
(
struct
bnep_con
n
add_req
*
req
,
struct
socket
*
sock
);
int
bnep_del_connection
(
struct
bnep_con
n
del_req
*
req
);
int
bnep_get_con
nlist
(
struct
bnep_con
nlist_req
*
req
);
int
bnep_get_con
ninfo
(
struct
bnep_con
ninfo
*
ci
);
// BNEP sessions
struct
bnep_session
{
...
...
net/bluetooth/bnep/core.c
View file @
f022978a
...
...
@@ -531,7 +531,7 @@ static int bnep_session(void *arg)
return
0
;
}
int
bnep_add_connection
(
struct
bnep_conadd_req
*
req
,
struct
socket
*
sock
)
int
bnep_add_connection
(
struct
bnep_con
n
add_req
*
req
,
struct
socket
*
sock
)
{
struct
net_device
*
dev
;
struct
bnep_session
*
s
,
*
ss
;
...
...
@@ -622,7 +622,7 @@ int bnep_add_connection(struct bnep_conadd_req *req, struct socket *sock)
return
err
;
}
int
bnep_del_connection
(
struct
bnep_condel_req
*
req
)
int
bnep_del_connection
(
struct
bnep_con
n
del_req
*
req
)
{
struct
bnep_session
*
s
;
int
err
=
0
;
...
...
@@ -647,7 +647,7 @@ int bnep_del_connection(struct bnep_condel_req *req)
return
err
;
}
static
void
__bnep_copy_ci
(
struct
bnep_coninfo
*
ci
,
struct
bnep_session
*
s
)
static
void
__bnep_copy_ci
(
struct
bnep_con
n
info
*
ci
,
struct
bnep_session
*
s
)
{
memcpy
(
ci
->
dst
,
s
->
eh
.
h_source
,
ETH_ALEN
);
strcpy
(
ci
->
device
,
s
->
dev
.
name
);
...
...
@@ -656,7 +656,7 @@ static void __bnep_copy_ci(struct bnep_coninfo *ci, struct bnep_session *s)
ci
->
role
=
s
->
role
;
}
int
bnep_get_con
list
(
struct
bnep_co
nlist_req
*
req
)
int
bnep_get_con
nlist
(
struct
bnep_con
nlist_req
*
req
)
{
struct
list_head
*
p
;
int
err
=
0
,
n
=
0
;
...
...
@@ -665,7 +665,7 @@ int bnep_get_conlist(struct bnep_conlist_req *req)
list_for_each
(
p
,
&
bnep_session_list
)
{
struct
bnep_session
*
s
;
struct
bnep_coninfo
ci
;
struct
bnep_con
n
info
ci
;
s
=
list_entry
(
p
,
struct
bnep_session
,
list
);
...
...
@@ -687,7 +687,7 @@ int bnep_get_conlist(struct bnep_conlist_req *req)
return
err
;
}
int
bnep_get_con
info
(
struct
bnep_co
ninfo
*
ci
)
int
bnep_get_con
ninfo
(
struct
bnep_con
ninfo
*
ci
)
{
struct
bnep_session
*
s
;
int
err
=
0
;
...
...
net/bluetooth/bnep/sock.c
View file @
f022978a
...
...
@@ -73,10 +73,10 @@ static int bnep_sock_release(struct socket *sock)
static
int
bnep_sock_ioctl
(
struct
socket
*
sock
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
bnep_conlist_req
cl
;
struct
bnep_conadd_req
ca
;
struct
bnep_condel_req
cd
;
struct
bnep_coninfo
ci
;
struct
bnep_con
n
list_req
cl
;
struct
bnep_con
n
add_req
ca
;
struct
bnep_con
n
del_req
cd
;
struct
bnep_con
n
info
ci
;
struct
socket
*
nsock
;
int
err
;
...
...
@@ -84,6 +84,7 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
switch
(
cmd
)
{
case
BNEPCONADD
:
case
BNEPCONNADD
:
if
(
!
capable
(
CAP_NET_ADMIN
))
return
-
EACCES
;
...
...
@@ -107,6 +108,7 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
return
err
;
case
BNEPCONDEL
:
case
BNEPCONNDEL
:
if
(
!
capable
(
CAP_NET_ADMIN
))
return
-
EACCES
;
...
...
@@ -116,23 +118,25 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
return
bnep_del_connection
(
&
cd
);
case
BNEPGETCONLIST
:
case
BNEPGETCONNLIST
:
if
(
copy_from_user
(
&
cl
,
(
void
*
)
arg
,
sizeof
(
cl
)))
return
-
EFAULT
;
if
(
cl
.
cnum
<=
0
)
return
-
EINVAL
;
err
=
bnep_get_conlist
(
&
cl
);
err
=
bnep_get_con
n
list
(
&
cl
);
if
(
!
err
&&
copy_to_user
((
void
*
)
arg
,
&
cl
,
sizeof
(
cl
)))
return
-
EFAULT
;
return
err
;
case
BNEPGETCONINFO
:
case
BNEPGETCONNINFO
:
if
(
copy_from_user
(
&
ci
,
(
void
*
)
arg
,
sizeof
(
ci
)))
return
-
EFAULT
;
err
=
bnep_get_coninfo
(
&
ci
);
err
=
bnep_get_con
n
info
(
&
ci
);
if
(
!
err
&&
copy_to_user
((
void
*
)
arg
,
&
ci
,
sizeof
(
ci
)))
return
-
EFAULT
;
...
...
net/bluetooth/hci_sock.c
View file @
f022978a
...
...
@@ -73,7 +73,7 @@ static struct hci_sec_filter hci_sec_filter = {
/* OGF_LINK_POLICY */
{
0x1200
,
0x0
,
0x0
,
0x0
},
/* OGF_HOST_CTL */
{
0x80100000
,
0xa
,
0x0
,
0x0
},
{
0x80100000
,
0x
2
a
,
0x0
,
0x0
},
/* OGF_INFO_PARAM */
{
0x22a
,
0x0
,
0x0
,
0x0
}
}
...
...
net/bluetooth/rfcomm/core.c
View file @
f022978a
...
...
@@ -263,7 +263,7 @@ static void rfcomm_dlc_unlink(struct rfcomm_dlc *d)
rfcomm_session_put
(
s
);
}
static
struct
rfcomm_dlc
*
rfcomm_dlc_get
(
struct
rfcomm_session
*
s
,
int
dlci
)
static
struct
rfcomm_dlc
*
rfcomm_dlc_get
(
struct
rfcomm_session
*
s
,
u8
dlci
)
{
struct
rfcomm_dlc
*
d
;
struct
list_head
*
p
;
...
...
@@ -279,7 +279,8 @@ static struct rfcomm_dlc *rfcomm_dlc_get(struct rfcomm_session *s, int dlci)
static
int
__rfcomm_dlc_open
(
struct
rfcomm_dlc
*
d
,
bdaddr_t
*
src
,
bdaddr_t
*
dst
,
u8
channel
)
{
struct
rfcomm_session
*
s
;
int
err
=
0
,
dlci
=
__dlci
(
0
,
channel
);
u8
dlci
=
__dlci
(
0
,
channel
);
int
err
=
0
;
BT_DBG
(
"dlc %p state %ld %s %s channel %d dlci %d"
,
d
,
d
->
state
,
batostr
(
src
),
batostr
(
dst
),
channel
,
dlci
);
...
...
@@ -923,7 +924,7 @@ static void rfcomm_make_uih(struct sk_buff *skb, u8 addr)
}
/* ---- RFCOMM frame reception ---- */
static
int
rfcomm_recv_ua
(
struct
rfcomm_session
*
s
,
int
dlci
)
static
int
rfcomm_recv_ua
(
struct
rfcomm_session
*
s
,
u8
dlci
)
{
BT_DBG
(
"session %p state %ld dlci %d"
,
s
,
s
->
state
,
dlci
);
...
...
@@ -964,7 +965,7 @@ static int rfcomm_recv_ua(struct rfcomm_session *s, int dlci)
return
0
;
}
static
int
rfcomm_recv_dm
(
struct
rfcomm_session
*
s
,
int
dlci
)
static
int
rfcomm_recv_dm
(
struct
rfcomm_session
*
s
,
u8
dlci
)
{
int
err
=
0
;
...
...
@@ -994,7 +995,7 @@ static int rfcomm_recv_dm(struct rfcomm_session *s, int dlci)
return
0
;
}
static
int
rfcomm_recv_disc
(
struct
rfcomm_session
*
s
,
int
dlci
)
static
int
rfcomm_recv_disc
(
struct
rfcomm_session
*
s
,
u8
dlci
)
{
int
err
=
0
;
...
...
@@ -1030,10 +1031,10 @@ static int rfcomm_recv_disc(struct rfcomm_session *s, int dlci)
return
0
;
}
static
int
rfcomm_recv_sabm
(
struct
rfcomm_session
*
s
,
int
dlci
)
static
int
rfcomm_recv_sabm
(
struct
rfcomm_session
*
s
,
u8
dlci
)
{
struct
rfcomm_dlc
*
d
;
int
channel
;
u8
channel
;
BT_DBG
(
"session %p state %ld dlci %d"
,
s
,
s
->
state
,
dlci
);
...
...
@@ -1116,7 +1117,7 @@ static int rfcomm_recv_pn(struct rfcomm_session *s, int cr, struct sk_buff *skb)
{
struct
rfcomm_pn
*
pn
=
(
void
*
)
skb
->
data
;
struct
rfcomm_dlc
*
d
;
int
dlci
=
pn
->
dlci
;
u8
dlci
=
pn
->
dlci
;
BT_DBG
(
"session %p state %ld dlci %d"
,
s
,
s
->
state
,
dlci
);
...
...
@@ -1141,7 +1142,7 @@ static int rfcomm_recv_pn(struct rfcomm_session *s, int cr, struct sk_buff *skb)
}
}
}
else
{
int
channel
=
__srv_channel
(
dlci
);
u8
channel
=
__srv_channel
(
dlci
);
if
(
!
cr
)
return
0
;
...
...
@@ -1167,7 +1168,7 @@ static int rfcomm_recv_pn(struct rfcomm_session *s, int cr, struct sk_buff *skb)
static
int
rfcomm_recv_rpn
(
struct
rfcomm_session
*
s
,
int
cr
,
int
len
,
struct
sk_buff
*
skb
)
{
struct
rfcomm_rpn
*
rpn
=
(
void
*
)
skb
->
data
;
int
dlci
=
__get_dlci
(
rpn
->
dlci
);
u8
dlci
=
__get_dlci
(
rpn
->
dlci
);
u8
bit_rate
=
0
;
u8
data_bits
=
0
;
...
...
@@ -1257,7 +1258,7 @@ static int rfcomm_recv_msc(struct rfcomm_session *s, int cr, struct sk_buff *skb
{
struct
rfcomm_msc
*
msc
=
(
void
*
)
skb
->
data
;
struct
rfcomm_dlc
*
d
;
int
dlci
=
__get_dlci
(
msc
->
dlci
);
u8
dlci
=
__get_dlci
(
msc
->
dlci
);
BT_DBG
(
"dlci %d cr %d v24 0x%x"
,
dlci
,
cr
,
msc
->
v24_sig
);
...
...
@@ -1323,7 +1324,7 @@ static int rfcomm_recv_mcc(struct rfcomm_session *s, struct sk_buff *skb)
return
0
;
}
static
int
rfcomm_recv_data
(
struct
rfcomm_session
*
s
,
int
dlci
,
int
pf
,
struct
sk_buff
*
skb
)
static
int
rfcomm_recv_data
(
struct
rfcomm_session
*
s
,
u8
dlci
,
int
pf
,
struct
sk_buff
*
skb
)
{
struct
rfcomm_dlc
*
d
;
...
...
net/bluetooth/rfcomm/sock.c
View file @
f022978a
...
...
@@ -112,7 +112,7 @@ static void rfcomm_sk_state_change(struct rfcomm_dlc *d, int err)
}
/* ---- Socket functions ---- */
static
struct
sock
*
__rfcomm_get_sock_by_addr
(
int
channel
,
bdaddr_t
*
src
)
static
struct
sock
*
__rfcomm_get_sock_by_addr
(
u8
channel
,
bdaddr_t
*
src
)
{
struct
sock
*
sk
;
...
...
@@ -128,7 +128,7 @@ static struct sock *__rfcomm_get_sock_by_addr(int channel, bdaddr_t *src)
/* Find socket with channel and source bdaddr.
* Returns closest match.
*/
static
struct
sock
*
__rfcomm_get_sock_by_channel
(
int
state
,
__u16
channel
,
bdaddr_t
*
src
)
static
struct
sock
*
__rfcomm_get_sock_by_channel
(
int
state
,
u8
channel
,
bdaddr_t
*
src
)
{
struct
sock
*
sk
,
*
sk1
=
NULL
;
...
...
@@ -151,7 +151,7 @@ static struct sock *__rfcomm_get_sock_by_channel(int state, __u16 channel, bdadd
/* Find socket with given address (channel, src).
* Returns locked socket */
static
inline
struct
sock
*
rfcomm_get_sock_by_channel
(
int
state
,
__u16
channel
,
bdaddr_t
*
src
)
static
inline
struct
sock
*
rfcomm_get_sock_by_channel
(
int
state
,
u8
channel
,
bdaddr_t
*
src
)
{
struct
sock
*
s
;
read_lock
(
&
rfcomm_sk_list
.
lock
);
...
...
net/bluetooth/rfcomm/tty.c
View file @
f022978a
...
...
@@ -854,7 +854,7 @@ static struct tty_driver rfcomm_tty_driver = {
#ifdef CONFIG_DEVFS_FS
.
name
=
"bluetooth/rfcomm/%d"
,
#else
.
name
=
"rfcomm
%d
"
,
.
name
=
"rfcomm"
,
#endif
.
major
=
RFCOMM_TTY_MAJOR
,
.
minor_start
=
RFCOMM_TTY_MINOR
,
...
...
net/bluetooth/sco.c
View file @
f022978a
...
...
@@ -698,7 +698,7 @@ int sco_sock_getsockopt(struct socket *sock, int level, int optname, char *optva
opts
.
mtu
=
sco_pi
(
sk
)
->
conn
->
mtu
;
BT_
INFO
(
"mtu %d"
,
opts
.
mtu
);
BT_
DBG
(
"mtu %d"
,
opts
.
mtu
);
len
=
min_t
(
unsigned
int
,
len
,
sizeof
(
opts
));
if
(
copy_to_user
(
optval
,
(
char
*
)
&
opts
,
len
))
...
...
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