You can subscribe to this list here.
| 2001 |
Jan
|
Feb
(44) |
Mar
(202) |
Apr
(134) |
May
(89) |
Jun
(94) |
Jul
(58) |
Aug
(58) |
Sep
(56) |
Oct
(75) |
Nov
(26) |
Dec
(14) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(24) |
Feb
(30) |
Mar
(15) |
Apr
(49) |
May
(12) |
Jun
(6) |
Jul
(11) |
Aug
(20) |
Sep
(19) |
Oct
(3) |
Nov
(13) |
Dec
(1) |
| 2003 |
Jan
(7) |
Feb
(4) |
Mar
(7) |
Apr
(5) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(51) |
Dec
(1) |
| 2004 |
Jan
(11) |
Feb
(5) |
Mar
|
Apr
(5) |
May
(2) |
Jun
|
Jul
(21) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Anders J. <and...@us...> - 2003-06-05 11:35:06
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bnep_test.c 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Corrected set protocol filter function.
The diff of the modified file(s):
--- bnep_test.c 2002/04/11 11:54:13 1.3
+++ bnep_test.c 2003/06/05 11:35:03 1.4
@@ -512,17 +512,15 @@ bnep_set_protocol_filter(u16 *filter)
local =3D dev->priv;
l2cap =3D local->l2cap;
=20
- printk("Set remote multicast filter %02x:%02x:%02x:%02x:%02x:%02x - "
- "%02x:%02x:%02x:%02x:%02x:%02x",
- filter[0], filter[1], filter[2], filter[3], filter[4], filter[5],
- filter[6], filter[7], filter[8], filter[9], filter[10], filter[11]);
+ printk("Set remote protocol filter %04x-%04x\n",
+ filter[0], filter[1]);
=20
bnep.bnep_type =3D BNEP_CONTROL;
bnep.bnep_control_type =3D BNEP_FILTER_NET_TYPE_SET_MSG;
bnep.list_length=3Dcpu_to_be16(4);
len =3D sizeof(struct bnep_filter_set) + 4;
=20=20=20=20=20=20=20=20=20
- for(i=3D0;i<4;i++)
+ for(i=3D0;i<2;i++)
if(filter[i]!=3D0)
reset_filter=3D0;
=20=09
|
|
From: Anders J. <and...@us...> - 2003-06-05 11:32:30
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bnep.c 1.17 1.18=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Filters are reset after a disconnect.
The diff of the modified file(s):
--- bnep.c 2003/03/30 17:13:31 1.17
+++ bnep.c 2003/06/05 11:32:28 1.18
@@ -153,6 +153,8 @@ static void bnep_receive_packet(l2cap_co
static int bnep_control(l2cap_con *l2cap, u8 *data, u8 bnep_control_type);
=20
/* Misc functions */
+static void bnep_reset_multicast_filter(struct net_local *local);
+static void bnep_reset_protocol_filter(struct net_local *local);
s32 check_filter(unsigned char *filter1, unsigned char *filter2, u16 size);
=20
=20
@@ -1163,20 +1165,10 @@ bnep_control(l2cap_con *l2cap, u8 *data,
rsp.bnep_control_type =3D BNEP_FILTER_NET_TYPE_RESPONSE_MSG;
rsp.bnep_response_msg =3D cpu_to_be16(SUCCESS);
=20=09=09
-=09=20=20=20=20=20=20=20
- {
/* Reset filter */
- D_MISC("Reset filter\n");
- for (i=3D0;i<BNEP_MAX_PROTOCOL_FILTER_RANGES;i++) {
- local->filter_list[i*2] =3D 0;
- local->filter_list[i*2+1] =3D 0;
- }
-
- /* Accept all packet types */
- local->filter_list[0] =3D 0x0000;
- local->filter_list[1] =3D 0xffff;
+ bnep_reset_protocol_filter(local);
used_filters=3D0;
- }=20
+=09=09=20
if (n =3D=3D 0) {
}=20
else if (n > BNEP_MAX_PROTOCOL_FILTER_RANGES) {
@@ -1266,12 +1258,7 @@ bnep_control(l2cap_con *l2cap, u8 *data,
=20=09=09
/* If no filters are set, reset filter list */
D_MISC(__FUNCTION__" Reset all multicast filters and accep=
t all addresses\n");
- for (i=3D0;i<BNEP_MAX_MCAST_FILTER_RANGES;i++) {
- memset(&local->filter_multi_addr_list[i*2].addr[0],0,6);
- memset(&local->filter_multi_addr_list[i*2+1].addr[0],0,6);
- }
- /* Accept all multicast addresses */
- memset(&local->filter_multi_addr_list[1].addr[0],0xff,6);
+ bnep_reset_multicast_filter(local);
used_filters=3D0;
=20
if (n =3D=3D 0) {
@@ -1552,6 +1539,8 @@ bnep_disconnect_ind(l2cap_con *l2cap)=20
local =3D dev->priv;
local->l2cap =3D NULL;
local->state =3D DISCONNECTED;
+ bnep_reset_multicast_filter(local);
+ bnep_reset_protocol_filter(local);
}
}
=20
@@ -1566,6 +1555,8 @@ bnep_disconnect_cfm(l2cap_con *l2cap)=20
dev =3D (struct net_device *)l2cap->upper_con;
local =3D dev->priv;
local->state =3D DISCONNECTED;
+ bnep_reset_multicast_filter(local);
+ bnep_reset_protocol_filter(local);
=20=09
DSYS(__FUNCTION__": disconnected\n");
local->l2cap =3D NULL;
@@ -1646,6 +1637,32 @@ bnep_disconnect_req(u8 *bd_addr)
}
DSYS("BNEP: bnep_disconnect_req bd_addr no found !!!\n");
return -1;
+}
+
+static void=20
+bnep_reset_multicast_filter(struct net_local *local)
+{
+ int i;
+ for (i =3D 0 ; i < BNEP_MAX_MCAST_FILTER_RANGES ; i++) {
+ memset(&local->filter_multi_addr_list[i*2].addr[0],0,6);
+ memset(&local->filter_multi_addr_list[i*2+1].addr[0],0,6);
+ }
+ /* Accept all multicast addresses */
+ memset(&local->filter_multi_addr_list[1].addr[0],0xff,6);
+}
+
+static void=20
+bnep_reset_protocol_filter(struct net_local *local)
+{
+ int i;
+ for (i=3D0;i<BNEP_MAX_PROTOCOL_FILTER_RANGES;i++) {
+ local->filter_list[i*2] =3D 0;
+ local->filter_list[i*2+1] =3D 0;
+ }
+=09
+ /* Accept all packet types */
+ local->filter_list[0] =3D 0x0000;
+ local->filter_list[1] =3D 0xffff;
}
=20
s32
|
|
From: Anders J. <and...@us...> - 2003-05-22 15:17:36
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
sec_client.c 1.26 1.27=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Removed global request struct, replaced with a ringbuffer as we need to=20
be able to receive more than one request before the sec client has a=20
chance to read data. Will solve the problem with linkeys which aren't
saved due to overwrite of previous data.
The diff of the modified file(s):
--- sec_client.c 2002/08/01 16:19:29 1.26
+++ sec_client.c 2003/05/22 14:51:11 1.27
@@ -107,6 +107,7 @@
#define BUFFER_SIZE 256
#define MAX_EVENT_DATA_LENGTH 16
#define MAX_LINKKEYLISTSIZE 255 /* for now */
+#define MAX_QUEUE_ENTRIES 5
=20
/****************** TYPE DEFINITION SECTION ******************************=
***/
=20
@@ -131,7 +132,7 @@ enum originator_types {
KERNEL
};
=20
-struct security_query {
+typedef struct security_query {
u16 request_type; /* out */
u32 request_value; /* out */
u8 remote_bd[BD_ADDRESS_SIZE];
@@ -143,6 +144,16 @@ struct security_query {
u16 request_result; /* in */=09
} security_query;
=20
+struct proc_buffer {
+ u8 elements;
+ u8 data[sizeof(security_query) * MAX_QUEUE_ENTRIES];
+ u32 in;
+ u32 out;
+} proc_buffer;
+
+
+=09
+
/****************** LOCAL FUNCTION DECLARATION SECTION *******************=
***/
=20
#ifdef __KERNEL__
@@ -297,7 +308,7 @@ static s32 sec_man_sock;
=20
void sec_client_shutdown()
{
- security_query.originator =3D KERNEL;=20=20
+ proc_buffer.elements =3D 0;
#ifdef __KERNEL__
D_PROC("wake_up process %i (%s) awakening\n", current->pid, current->com=
m);
wake_up_interruptible(&sec_man_wq);
@@ -313,9 +324,9 @@ sec_man_init(enum security_requests user
sec_man_sock =3D open_socket(SEC_MAN_SRV_SOCK);
#endif
init_link_key_list();
-
- /* To indicate that nothing is ready */
- security_query.originator =3D SEC_CLIENT;
+ proc_buffer.in =3D 0;
+ proc_buffer.out =3D 0;
+ proc_buffer.elements =3D 0;
=20=09
for(i =3D 0 ; i < BD_ADDRESS_SIZE ; i++) {
null_bd_addr[i] =3D 0;
@@ -503,10 +514,13 @@ sec_man_remove_proc_file(void)
=20
/* fixme -- add return value for calling functions to indicate status of=
=20
check */
-void=20
+s32
sec_man_check(enum security_requests user, BD_ADDR bd_addr, u32 service_da=
ta,
u32 user_data)
{
+ u32 pos;
+ security_query *query;
+=09
#ifndef __KERNEL__
if (sec_man_sock < 0) {
/* What to do if no security manager present?? */
@@ -522,27 +536,46 @@ sec_man_check(enum security_requests use
=20
}
#endif
+ D_PROC(__FUNCTION__ ": Current elements in buffer: %d\n", proc_buffer.ele=
ments);
=20
- security_query.request_type =3D user;
- security_query.request_value =3D service_data;
- memcpy(security_query.remote_bd, bd_addr, BD_ADDRESS_SIZE);
- security_query.originator =3D BT_SEC_MAN;
- security_query.originator_data =3D user_data;
- security_query.request_result =3D GENERAL_FAILURE;
+ if(proc_buffer.elements >=3D MAX_QUEUE_ENTRIES) {
+ D_ERR(__FUNCTION__ ": Not room for any queries at the moment");
+ return -1;
+ }
+=09
+ pos =3D proc_buffer.in;
+ proc_buffer.in +=3D sizeof(security_query);
+ ++proc_buffer.elements;
+ if(proc_buffer.in >=3D (sizeof(security_query) * MAX_QUEUE_ENTRIES)) {
+ proc_buffer.in =3D 0;
+ }
+
+ query =3D (security_query *)(proc_buffer.data + pos);
+
+ query->request_type =3D user;
+ query->request_value =3D service_data;
+ memcpy(query->remote_bd, bd_addr, BD_ADDRESS_SIZE);
+ query->originator =3D BT_SEC_MAN;
+ query->originator_data =3D user_data;
+ query->request_result =3D GENERAL_FAILURE;
=20
#ifdef __KERNEL__
D_PROC("wake_up process %i (%s) awakening\n", current->pid, current->comm=
);
wake_up_interruptible(&sec_man_wq);
D_PROC("wake_up process %i (%s) woke up\n", current->pid, current->comm);
+ return 0;
#else
- sec_man_doquery(sec_man_sock, (u8*) &security_query);
+ return sec_man_doquery(sec_man_sock, (u8*)query);
#endif
}
=20
-void
+s32
sec_man_event(enum security_requests user, BD_ADDR bd_addr, u8 event,
u8 *param, u8 param_len)
{
+ security_query *query;
+ u32 pos;
+=09
if (event =3D=3D HCI_VALUE_RETURN_LINK_KEYS)
{
/* Ok, link key has to be stored locally */
@@ -553,41 +586,59 @@ sec_man_event(enum security_requests use
link_key =3D create_link_key(bd_addr, link_key_str);
insert_link_key(link_key);
D_PROC("sec_man_event: Number of elements in list: %d\n", link_key_list.=
count);
+ return 0;
=20=09=09
}
else
{
#ifndef __KERNEL__
if (sec_man_sock < 0) {
- /* What to do if no security manager present?? */
+ return -1;
}
#endif
D_PROC("Called sec_man_event user:%d event:%02x\n", user, event);
- security_query.request_type =3D user;
- security_query.request_value =3D event;
+ D_PROC(__FUNCTION__ ": Current elements in buffer: %d\n", proc_buffer.el=
ements);
+
+ if(proc_buffer.elements >=3D MAX_QUEUE_ENTRIES) {
+ D_ERR(__FUNCTION__ ": Not room for any queries at the moment");
+ return -1;
+ }
+=09=09
+ pos =3D proc_buffer.in;
+ proc_buffer.in +=3D sizeof(security_query);
+ ++proc_buffer.elements;
+ if(proc_buffer.in >=3D (sizeof(security_query) * MAX_QUEUE_ENTRIES)) {
+ proc_buffer.in =3D 0;
+ }
+=09=09
+ query =3D (security_query *)(proc_buffer.data + pos);
+=09=09
+ query->request_type =3D user;
+ query->request_value =3D event;
if(bd_addr) {
- memcpy(security_query.remote_bd, bd_addr, BD_ADDRESS_SIZE);
+ memcpy(query->remote_bd, bd_addr, BD_ADDRESS_SIZE);
} else {
- memcpy(security_query.remote_bd, null_bd_addr, BD_ADDRESS_SIZE);
+ memcpy(query->remote_bd, null_bd_addr, BD_ADDRESS_SIZE);
}
=20=09=09
- security_query.originator =3D BT_SEC_MAN;
+ query->originator =3D BT_SEC_MAN;
=20=09=09
if (param_len > MAX_EVENT_DATA_LENGTH) {
D_PROC("Event data length too long, %d byte\n", param_len);
- memcpy(security_query.event_param, param, MAX_EVENT_DATA_LENGTH);
+ memcpy(query->event_param, param, MAX_EVENT_DATA_LENGTH);
} else {
- memcpy(security_query.event_param, param, param_len);
+ memcpy(query->event_param, param, param_len);
}
=20=09=09
- security_query.request_result =3D GENERAL_FAILURE;
+ query->request_result =3D GENERAL_FAILURE;
=20=09=09
#ifdef __KERNEL__
D_PROC("wake_up process %i (%s) awakening\n", current->pid, current->com=
m);
wake_up_interruptible(&sec_man_wq);
D_PROC("wake_up process %i (%s) woke up\n", current->pid, current->comm);
+ return 0;
#else
- sec_man_doquery(sec_man_sock, (u8*) &security_query);
+ return sec_man_doquery(sec_man_sock, (u8*)query);
#endif
}
}
@@ -674,24 +725,33 @@ s32 sec_man_read(struct inode *inode, st
char * buf, s32 count)
#endif
{
- s32 tmp;
-=09
+ u16 entry_size =3D sizeof(security_query);
D_PROC(__FUNCTION__ ": Someone is trying to read %d bytes from sec proc-f=
ile\n", count);
+ D_PROC(__FUNCTION__ ": Current elements in buffer: %d\n", proc_buffer.ele=
ments);
=20
cli();
- if (security_query.originator !=3D BT_SEC_MAN) {
- D_PROC(__FUNCTION__ ": No response yet, going to sleep\n");
+ if (proc_buffer.elements =3D=3D 0) {
+ D_PROC(__FUNCTION__ ": Nothing to be read, going to sleep\n");
interruptible_sleep_on(&sec_man_wq);
}
sti();
=20
- tmp =3D sizeof security_query;
- memcpy(buf, &security_query, tmp);
-=09
- D_PROC(__FUNCTION__ ": Returning %d bytes\n", tmp);
- security_query.originator =3D SEC_CLIENT; /* Change so we lock aga=
in */
=20=20=20=20=20=20=20=20=20
- return tmp;
+ if(proc_buffer.elements > 0)
+ {
+ memcpy(buf, proc_buffer.data + proc_buffer.out, entry_size);
+ D_PROC(__FUNCTION__ ": Returning %d bytes\n", entry_size);
+ --proc_buffer.elements;
+ proc_buffer.out +=3D entry_size;
+ if(proc_buffer.out >=3D (entry_size * MAX_QUEUE_ENTRIES)) {
+ proc_buffer.out =3D 0;
+ }
+ return entry_size;
+ } else {
+ /* If no data was available (weird case), send a EAGAIN
+ error to the client which probably will try again. */
+ return -EAGAIN;
+ }
}
=20
#ifdef USE_NEW_PROC
@@ -715,9 +775,6 @@ s32 sec_man_write(struct inode *inode, s
/* D_XMIT(__FUNCTION__ ": Preparing to send data to sec_con[%d]\n", secb_h=
dl->sec_con_id); */
if (sec_hdl->originator =3D=3D BT_SEC_MAN) /* o.k. new request */
{
- /* Change so we do not receive old data */
- security_query.originator =3D SEC_CLIENT;
-=09=09
switch (sec_hdl->request_type) {
case L2CAP:
D_PROC(__FUNCTION__ ": Message to L2CAP\n");
|
|
From: Anders J. <and...@us...> - 2003-05-22 14:56:37
|
The following file was modified in linux/include/linux/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
sec_client.h 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
sec_man_event and sec_man_check now return a value so errors can be=20
detected by the caller.
The diff of the modified file(s):
--- sec_client.h 2001/04/26 13:56:17 1.9
+++ sec_client.h 2003/05/22 14:52:12 1.10
@@ -85,10 +85,10 @@ s32 sec_man_create_proc_file(void);
s32 sec_man_remove_proc_file(void);
#endif
=20
-void sec_man_check(enum security_requests user, BD_ADDR bd_addr,
+s32 sec_man_check(enum security_requests user, BD_ADDR bd_addr,
u32 service_data, u32 user_data);
=20
-void sec_man_event(enum security_requests user, BD_ADDR bd_addr, u8 event,
+s32 sec_man_event(enum security_requests user, BD_ADDR bd_addr, u8 event,
u8 *param, u8 param_len);
=20
void sec_man_get_cached_link_key(u8 *param);
|
|
From: Peter K. <pk...@us...> - 2003-05-15 13:27:46
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bcsp_datagram.c 1.12 1.13=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20
The accompanying log:
* Send a CONF_RSP packet when a CONF packet is received.
* Do not use concatenation with __FUNCTION__ (it is deprecated).
The diff of the modified file(s):
--- bcsp_datagram.c 2002/08/01 16:19:28 1.12
+++ bcsp_datagram.c 2003/05/15 13:27:45 1.13
@@ -2,7 +2,7 @@
* bcsp_datagram.c -- Implementation of the Datagram layer in the BCSP
* protocol stack
*
- * Copyright (C) 2001 Axis Communications AB
+ * Copyright (C) 2001, 2002, 2003 Axis Communications AB
*
* Author: Mats Friden <Mat...@ax...>
*
@@ -109,13 +109,13 @@ bcsp_datagram_receive(struct bcsp *bcsp)
if (!bcsp_datagram_initiated)
return 0; /* FIXME: Should this be an error code? */
=20
+ D("%s: Datagram packet received:\n", __FUNCTION__);
+ PRINTPKT(bcsp->payload, bcsp->payload_length);
+
if (handle_sync_pkt(bcsp)) {
return 0;
}
=20
- D(__FUNCTION__ ": Datagram packet received:\n");
- PRINTPKT(bcsp->payload, bcsp->payload_length);
-=09
return 0;
}
=20
@@ -146,25 +146,27 @@ handle_sync_pkt(struct bcsp *bcsp)
sync_string =3D le32_to_cpu(get_unaligned((u32 *)bcsp->payload));
=20
switch (sync_string) {
-
case SYNC:=09
- D(__FUNCTION__ ": Found SYNC\n");
- D(__FUNCTION__ ": Send SYNC_RSP\n");
+ D("%s: Found SYNC\n", __FUNCTION__);
+ D("%s: Send SYNC_RSP\n", __FUNCTION__);
bcsp_send_sync(SYNC_RSP);
return TRUE;
=20
case SYNC_RSP:
- D(__FUNCTION__": Found SYNC_RSP\n");
+ D("%s: Found SYNC_RSP\n", __FUNCTION__);
bcsp_syncronized();
return TRUE;
=20
case CONF: /* this should always be done */
- D(__FUNCTION__ ": Found CONF, silent discard\n");
+ D("%s: Found CONF\n", __FUNCTION__);
+ D("%s: Send CONF_RSP\n", __FUNCTION__);
+ bcsp_send_sync(CONF_RSP);
return TRUE;
=20
case CONF_RSP:
- D(__FUNCTION__": Found CONF_RSP\n");
+ D("%s: Found CONF_RSP\n", __FUNCTION__);
return TRUE;
+
default:
return FALSE;
}
|
|
From: Peter K. <pk...@us...> - 2003-05-05 10:43:53
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
btd.c 1.107 1.108=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Made the user mode stack build again after the latest changes.
If it actually works? I have no idea, but I would not bet on it...
The diff of the modified file(s):
--- btd.c 2002/09/27 12:52:48 1.107
+++ btd.c 2003/05/05 10:43:49 1.108
@@ -1611,6 +1611,8 @@
else if(sscanf(buf, "bb_conn %x:%x:%x:%x:%x:%x",
&bd[5], &bd[4], &bd[3], &bd[2], &bd[1], &bd[0]) =3D=3D 6)
{
+ unsigned char class_of_dev[3] =3D { 0, 0, 0 };
+
for (i =3D 0; i < 6; i++)
{
tmp_bd[i] =3D (unsigned char)bd[i];
@@ -1621,13 +1623,13 @@
=20
/* we must store bd address in l2cap con to keep track of peer */
=20
- l2cap_create_con(tmp_bd);
+ l2cap_create_con(tmp_bd, class_of_dev);
lp_connect_req(tmp_bd);
}
else if(sscanf(buf, "bb_disc %d", &i) =3D=3D 1)
{
printf("Disconnecting hci handle %d\n", i);
- lp_disconnect((unsigned short)i);
+ lp_disconnect((unsigned short)i, TRUE);
}
=20=20=20
#endif /* BTD_USERSTACK */
@@ -2574,6 +2576,11 @@
}
=20
return client_sockfd;
+}
+
+unsigned long min(unsigned long a, unsigned long b)
+{
+ return a < b ? a : b;
}
=20
#endif /* BTD_USERSTACK */
|
|
From: Peter K. <pk...@us...> - 2003-05-05 10:28:21
|
The following file was modified in apps/bluetooth/userstack: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- Makefile 1.29 1.30=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Made it possible to build with glibc. The diff of the modified file(s): --- Makefile 2003/03/07 15:38:10 1.29 +++ Makefile 2003/05/05 10:28:18 1.30 @@ -1,6 +1,6 @@ # $Id$ =20 -AXIS_USABLE_LIBS =3D UCLIBC +AXIS_USABLE_LIBS =3D GLIBC UCLIBC -include $(AXIS_TOP_DIR)/tools/build/Rules.axis =20 PROGS =3D btduser |
|
From: Peter K. <pk...@us...> - 2003-05-05 10:24:19
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- Makefile 1.12 1.13=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Made it possible to build with glibc. The diff of the modified file(s): --- Makefile 2002/09/27 12:59:02 1.12 +++ Makefile 2003/05/05 10:24:18 1.13 @@ -1,6 +1,6 @@ # $Id$ =20 -AXIS_USABLE_LIBS =3D UCLIBC +AXIS_USABLE_LIBS =3D GLIBC UCLIBC -include $(AXIS_TOP_DIR)/tools/build/Rules.axis =20 PROGS =3D btd @@ -34,6 +34,8 @@ CFLAGS +=3D -MMD =20 all: $(PROGS) + +$(PROGS): $(OBJS) =20 install: $(PROGS) $(INSTALL) -d $(INSTDIR) |
|
From: Anders J. <and...@us...> - 2003-04-14 16:11:08
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
rfcomm.c 1.139 1.140=20=20=20=20=20=20=20=20=20=20=20=20=20
sdp.c 1.89 1.90=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Respond with a negative reply if we are out of TTY:s in RFCOMM.
Corrected possible problem with get_free_sdp_con.
The diff of the modified file(s):
--- rfcomm.c 6 Mar 2003 16:04:05 -0000 1.139
+++ rfcomm.c 14 Apr 2003 16:11:03 -0000 1.140
@@ -843,9 +843,9 @@
D_CTRL("rfcomm_connect_ind\n");
if (!(rfcomm =3D get_new_rfcomm_con())) {
D_ERR("rfcomm_connect_ind: error: couldn't find free tty\n");
-
- /* fixme -- respond neg ! */
-
+ if(l2ca_connect_rsp(l2cap, RES_NOSRC, STAT_NOINFO)) {
+ D_ERR("rfcomm_connect_ind: l2ca_connect_rsp failed\n");
+ }
return;
} else {
if (l2ca_connect_rsp(l2cap, RES_SUCCESS, STAT_NOINFO)) {
--- sdp.c 1 Aug 2002 16:15:11 -0000 1.89
+++ sdp.c 14 Apr 2003 16:11:05 -0000 1.90
@@ -1052,7 +1052,7 @@
}
=20
if (i =3D=3D MAX_NBR_SDP) {
- return 0;
+ return NULL;
}
=20
return &sdp_con_list[i];
|
|
From: Anders J. <and...@us...> - 2003-04-14 12:30:08
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- l2cap_con.c 1.16 1.17=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Copy the role when cloning the l2cap-object. The diff of the modified file(s): --- l2cap_con.c 18 Feb 2003 15:22:58 -0000 1.16 +++ l2cap_con.c 14 Apr 2003 12:30:05 -0000 1.17 @@ -309,6 +309,7 @@ /* set bd address in new connection */ memcpy(new_con->remote_bd, found->remote_bd, 6); memcpy(new_con->remote_class_of_dev, found->remote_class_of_dev, 3); + new_con->role =3D found->role; =20=20=20=20=20=20=20=20=20=20=20=20=20 insert_con(new_con); SHOW_LIST(); |
|
From: Anders J. <and...@us...> - 2003-04-14 08:47:57
|
The following files were modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_if.c 1.57 1.58=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bt_if.h 1.39 1.40=20=20=20=20=20=20=20=20=20=20=20=20=20=20
btconfig.c 1.11 1.12=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added option p to btconfig, set to one to force piconet mode if we
are acting as a server. This means that any client which fail to
do the M/S switch will be disconnected.
The diff of the modified file(s):
--- bt_if.c 6 Feb 2003 15:31:08 -0000 1.57
+++ bt_if.c 14 Apr 2003 08:47:22 -0000 1.58
@@ -669,6 +669,20 @@
return 0;
}
=20
+int bt_dont_allow_slave(int bt_cfd, int flag)
+{
+ syslog(LOG_INFO, __FUNCTION__": %d", flag);
+#ifndef BT_USERSTACK
+ if (ioctl(bt_cfd, BTDONTALLOWSLAVE, &flag) < 0)
+ {
+ perror(__FUNCTION__);
+ return -1;
+ }
+#endif
+ return 0;
+}
+
+
int bt_set_max_conections(int bt_cfd, int connections)
{
syslog(LOG_INFO, __FUNCTION__ ": %d", connections);
--- bt_if.h 13 Jan 2003 19:48:14 -0000 1.39
+++ bt_if.h 14 Apr 2003 08:47:23 -0000 1.40
@@ -257,6 +257,8 @@
#define BTSETMSSWITCH _IOW(BT_IOC_MAGIC, 0xf3, unsigned char)
#define BTSETBCSPMODE _IOWR(BT_IOC_MAGIC, 0xf4, int)
=20
+#define BTDONTALLOWSLAVE _IOW(BT_IOC_MAGIC, 0xfb, unsigned char)
+
#define CSR_PSKEY_MSGHDR_SIZE 3
#define CSR_PSKEY_MAXPARAMS 40
=20
@@ -340,6 +342,7 @@
int bt_send(int fd, int len, int repeat);
void bt_showstatus(void);
int bt_force_msswitch_as_server(int bt_cfd, int enable);
+int bt_dont_allow_slave(int bt_cfd, int flag);
int bt_set_max_conections(int bt_cfd, int connections);
=20
/*
--- btconfig.c 26 Feb 2002 17:43:32 -0000 1.11
+++ btconfig.c 14 Apr 2003 08:47:23 -0000 1.12
@@ -107,6 +107,7 @@
static int var_add_host_name =3D FALSE;
static int var_write_scan_enable =3D -1; /* not yet set */
static int var_force_ms_switch =3D -1; /* not yet set */
+static int var_dont_allow_slave =3D -1; /* not yet set */
static int var_set_local_name =3D 0;
static int var_max_connections =3D -1; /* not yet set */
static short var_max_power =3D SHRT_MAX; /* not yet set */
@@ -120,6 +121,8 @@
{ "name", 1, NULL, 'n' }, /* set BT friendly name */
{ "wrscan-enable", 1, NULL, 'w' }, /* sets write scan enable */
{ "max-connections", 1, NULL, 'c' }, /* sets max simultatious connectio=
ns */
+ { "piconet-mode", 1, NULL, 'p' }, /* set if we disallow clients whic=
h doesn't support
+ the M/S switch */
{ 0, 0, 0, 0 }
};
=20
@@ -138,13 +141,14 @@
int opt_write_scan_enable =3D -1;
int opt_force_ms_switch =3D -1;
int opt_max_connections =3D -1;
+ int opt_dont_allow_slave =3D -1;
=20=20=20
char *opt_name =3D NULL;
char *opt_config_file =3D CONF_FILE;
=20
/* Parse command line options */
=20
- while ((opt =3D getopt_long(argc, argv, "f:hm:n:w:c:",
+ while ((opt =3D getopt_long(argc, argv, "f:hm:n:w:c:p:",
long_options, &option_index)) !=3D -1)
{
switch (opt)
@@ -177,6 +181,12 @@
opt_max_connections =3D atoi(optarg);
break;
=20=20=20=20=20=20=20
+ case 'p':
+ /* Piconet mode, meaning that we disconnect any
+ clients which fail to do M/S switching */
+ opt_dont_allow_slave =3D atoi(optarg);
+ break;
+=20=20=20=20=20=20
default:
break;
}
@@ -208,7 +218,8 @@
var_write_scan_enable >=3D 0 ||
var_force_ms_switch >=3D 0 ||
var_max_connections >=3D 0 ||
- var_max_power !=3D SHRT_MAX)
+ var_max_power !=3D SHRT_MAX ||
+ var_dont_allow_slave >=3D 0)
{
/* Open BT ctrl device */=20=20
if ((bt_cfd =3D bt_openctrl()) < 0)
@@ -240,6 +251,9 @@
if (var_max_power !=3D SHRT_MAX)
bt_set_max_power(bt_cfd, var_max_power);
=20=20=20=20=20
+ if (var_dont_allow_slave >=3D 0)
+ bt_dont_allow_slave(bt_cfd, var_dont_allow_slave);
+=20=20=20=20
close(bt_cfd);
}
=20
@@ -465,6 +479,13 @@
D(syslog(LOG_INFO, __FUNCTION__ ": Maximum transmit power: %s", value)=
);
}
=20=20=20
+ else if (!strcasecmp(field, "DisconnectOnMSFailure"))
+ {
+ var_dont_allow_slave =3D !strcasecmp(value, "yes");
+ D(syslog(LOG_INFO, __FUNCTION__ ": Disconnect on MS-switch failure: %s=
",
+ (var_dont_allow_slave ? "yes" : "no")));
+ }
+
return TRUE;
} /* configure_field */
=20
|
|
From: Anders J. <and...@us...> - 2003-04-14 08:45:36
|
The following files were modified in linux/include/linux/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- btcommon.h 1.99 1.100=20=20=20=20=20=20=20=20=20=20=20=20=20 hci.h 1.80 1.81=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added role to the l2cap_con struct to allow us to keep track on our current role for a specific connection. The diff of the modified file(s): --- btcommon.h 13 Jan 2003 19:48:37 -0000 1.99 +++ btcommon.h 14 Apr 2003 08:45:34 -0000 1.100 @@ -252,6 +252,8 @@ =20 #define BTSETMAXCONNECTIONS _IOW(BT_IOC_MAGIC, 0xfa, u8) =20 +#define BTDONTALLOWSLAVE _IOW(BT_IOC_MAGIC, 0xfb, u8) + /* NOTE ! * N_BT should be defined in /include/asm/termios.h=20 * However, if you are compiling this source standalone, the following def= ine @@ -372,6 +374,7 @@ s32 magic; BD_ADDR remote_bd; /* 6 bytes */ CLASS_OF_DEVICE remote_class_of_dev; + u8 role; u16 hci_hdl; =20 /* FIXME - add multiple HCI handles for group=20 --- hci.h 6 Feb 2003 15:36:22 -0000 1.80 +++ hci.h 14 Apr 2003 08:45:34 -0000 1.81 @@ -127,7 +127,7 @@ =20 s32 lp_connect_req(u8 bd_addr[]); s32 lp_connect_rsp(u8 bd_addr[], u32 cfm); -s32 lp_disconnect(u32 con_hdl); +s32 lp_disconnect(u32 con_hdl, u8 block); =20 u8* get_err_msg(u32 err_code); s32 get_client_bd_addr(u8 *bd); |
|
From: Anders J. <and...@us...> - 2003-04-14 08:43:54
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bluetooth.c 1.238 1.239=20=20=20=20=20=20=20=20=20=20=20=20=20
hci.c 1.209 1.210=20=20=20=20=20=20=20=20=20=20=20=20=20
l2cap.c 1.136 1.137=20=20=20=20=20=20=20=20=20=20=20=20=20
tcs.c 1.17 1.18=20=20=20=20=20=20=20=20=20=20=20=20=20=20
test.c 1.39 1.40=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
lp_disconnect can now be used non-blocking to allow us to disconnect
remote clients in an interupt.
Added option to disconnect clients which fail to switch roles.
The diff of the modified file(s):
--- bluetooth.c 6 Mar 2003 16:04:00 -0000 1.238
+++ bluetooth.c 14 Apr 2003 08:43:46 -0000 1.239
@@ -273,6 +273,7 @@
=20
extern hci_controller hci_ctrl;
extern u8 name_request_response[BT_NAME_LENGTH + 1];
+extern u8 dont_allow_slave;
=20
/* Use global variables to store line and server channel of a new incoming=
connection */
#ifdef CONFIG_BLUETOOTH_PROC
@@ -647,7 +648,7 @@
return -MSGCODE(MSG_BT_INTERFACE, BT_NOTCONNECTED);
}
=20
- return lp_disconnect(con_str->hci_hdl);
+ return lp_disconnect(con_str->hci_hdl, 1);
}
=20
case BTWAITFORCONNECTION:
@@ -1427,6 +1428,20 @@
=20
BT_DRIVER("BTSETMSSWITCH: %d\n", enable);
hci_force_msswitch(enable);
+ return 0;
+ }
+
+ /* set dont_allow_slave flag. If set to 1 and we are
+ using the force_ms flag any client which doesn't
+ support M/S-switching will be disconnected by
+ us if we are non-initiators */
+ case BTDONTALLOWSLAVE:
+ {
+ u8 flag;
+ GET_USER(tmp, (s32*)arg);
+ flag =3D (u8)(tmp & 0xff);
+ BT_DRIVER("BTDONTALLOWSLAVE: %d\n", flag);
+ dont_allow_slave =3D flag;
return 0;
}
=20
--- hci.c 6 Mar 2003 16:03:57 -0000 1.209
+++ hci.c 14 Apr 2003 08:43:46 -0000 1.210
@@ -193,7 +193,7 @@
=20
/* Link Control Commands */
static s32 create_connection(u8 *bd, u32 pkt_type, u8 psrm, u8 psm, u32 c_=
off, u32 rol_sw);
-static s32 disconnect(u32 hdl, u8 reason);
+static s32 disconnect(u32 hdl, u8 reason, u8 block);
static s32 accept_connection_request(u8 bd_addr[], u8 role);
static s32 reject_connection_request(u8 bd_addr[], u32 reason);
static s32 change_connection_packet_type(u32 hci_hdl, u32 pkt_type);
@@ -816,6 +816,8 @@
{
u16 hci_hdl;
s32 i;
+ l2cap_con *con;
+ u8 rev_bd[6];
=20
PRINTPKT(__FUNCTION__, buf, len);
=20
@@ -1118,6 +1120,18 @@
case ROLE_CHANGED:
DSYS(__FUNCTION__ ": ROLE_CHANGED\n");
=20
+ /* Find the connection and set the role */
+ if ((con =3D get_con(buf + 1, CLOSED)) =3D=3D NULL) {
+ D_ERR(__FUNCTION__ ": couldn't find connection!\n");
+ break;
+ }
+
+ if(con->initiator) {
+ con->role =3D 0x00;
+ } else {
+ con->role =3D 0x01;
+ }
+
if (buf[0]) {
D_ERR(__FUNCTION__ ": Role changed failed due to %s\n",
get_err_msg(buf[0]));
@@ -1126,9 +1140,11 @@
} else if (buf[7]) {
DSYS(__FUNCTION__ ": Current master is 0x%04x%08x\n",
le16_to_cpuu(&buf[5]), le32_to_cpuu(&buf[1]));
+ con->role =3D 0x01;
} else {
DSYS(__FUNCTION__ ": Our role is master for BD Address 0x%04x%08x\n",
le16_to_cpuu(&buf[5]), le32_to_cpuu(&buf[1]));
+ con->role =3D 0x00;
}
break;
=20
@@ -2218,7 +2234,7 @@
disconnected. The Reason function parameter indicates the reason for en=
ding
the connection, see page 552 specification core 1.0B */
s32
-disconnect(u32 hdl, u8 reason)
+disconnect(u32 hdl, u8 reason, u8 block)
{
D_CMD(__FUNCTION__ "\n");
c_pkt.type =3D CMD_PKT;
@@ -2229,8 +2245,12 @@
c_pkt.data[2] =3D reason;
c_pkt.len =3D 3;
=20
+ if(block) {
return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN,
DEFAULT_TIMEOUT);
+ } else {
+ return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
+ }
}
=20
/* A positive response to a previous connection request, role =3D 0 sets m=
aster,
@@ -3557,9 +3577,9 @@
=20
/* Disconnect a certain connection handler */
s32
-lp_disconnect(u32 hci_hdl)
+lp_disconnect(u32 hci_hdl, u8 block)
{
- return disconnect(hci_hdl, DISCMSG_USER_ENDED_CONNECTION);
+ return disconnect(hci_hdl, DISCMSG_USER_ENDED_CONNECTION, block);
}
=20
=20
--- l2cap.c 6 Mar 2003 16:03:59 -0000 1.136
+++ l2cap.c 14 Apr 2003 08:43:47 -0000 1.137
@@ -237,6 +237,7 @@
static struct protocol_layer default_protocol;
extern int bt_max_connections;
extern hci_controller hci_ctrl;
+u8 dont_allow_slave =3D 0;
=20
/****************** FUNCTION DEFINITION SECTION **************************=
***/
=20=20=20
@@ -1637,7 +1638,7 @@
callers responsibility to take proper action */
D_ERR(__FUNCTION__ ": failed (status %d)\n", retval);
if(!tmpcon) {
- lp_disconnect(con->hci_hdl);
+ lp_disconnect(con->hci_hdl, 1);
}
ENTERSTATE(con, CLOSED);
delete_con(con);
@@ -1654,7 +1655,7 @@
}
=20
if(!tmpcon) {
- lp_disconnect(con->hci_hdl);
+ lp_disconnect(con->hci_hdl, 1);
}
=20=09=09
switch(con->c_status) {
@@ -1769,7 +1770,7 @@
if (count_con(tmp_hdl) =3D=3D 0) {
DSYS("l2ca_disconnect_req : (C) no more l2cap cons\n");
DSYS("Shutdown baseband\n");
- lp_disconnect(tmp_hdl);
+ lp_disconnect(tmp_hdl, 1);
}
=20
return retval;
@@ -2797,6 +2798,18 @@
return;
}
=20=20=20
+ /* Check which role the device have at the moment,=20
+ if we only accept us to be the master and the=20
+ client currently is the master as a result of
+ a failure of the MS-switch we deny the connection
+ here */
+ if(dont_allow_slave && (!con->initiator) && con->role) {
+ D_ERR(__FUNCTION__ ": Remote role not allowed, the client failed to swit=
ch roles. Disconnecting.\n");
+ l2ca_connect_rsp(con, RES_SECNEG, STAT_NOINFO);
+ lp_disconnect(con->hci_hdl, 0);
+ return;
+ }
+=20=20
get_upper(con->psm)->con_ind(con);
}
=20
@@ -2954,7 +2967,7 @@
}
=20
if(first_conn) {
- lp_disconnect(con->hci_hdl);
+ lp_disconnect(con->hci_hdl, 1);
}
=20
return retval;
--- tcs.c 1 Aug 2002 16:19:29 -0000 1.17
+++ tcs.c 14 Apr 2003 08:43:50 -0000 1.18
@@ -490,7 +490,7 @@
=20=09
case RELEASE:
D_REC(FNC"Received RELEASE message\n");
- if (lp_disconnect(tcs[0].sco_hdl)) {
+ if (lp_disconnect(tcs[0].sco_hdl, 1)) {
D_ERR("lp_disconnect failed\n");
} else {
send_single_octet_msg(l2cap, RELEASE_COMPLETE, CALL_CONTROL);
--- test.c 6 Mar 2003 16:04:08 -0000 1.39
+++ test.c 14 Apr 2003 08:43:50 -0000 1.40
@@ -525,7 +525,7 @@
}
else if(!strncmp(cmd, "bb_disc ", 8)) {
int i =3D strtoul(cmd+8, NULL, 0);
- return lp_disconnect((unsigned short)i);
+ return lp_disconnect((unsigned short)i, 1);
}
else if(!strncmp(cmd, "lcid_disconnect ", 16)) {
l2cap_con *con =3D NULL;
|
|
From: Orjan F. <or...@us...> - 2003-03-30 17:14:20
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bnep.c 1.16 1.17=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
(On behalf of anderstj.) Added support for forwarding unknown extension
headers.
The diff of the modified file(s):
--- bnep.c 9 Jan 2003 09:56:19 -0000 1.16
+++ bnep.c 30 Mar 2003 17:13:31 -0000 1.17
@@ -112,6 +112,7 @@
#endif
=20
#define BNEP_INTERFACES 7
+#define MAX_EHEADERS 20
=20
/****************** TYPE DEFINITION SECTION ******************************=
***/
=20
@@ -708,6 +709,9 @@
struct net_device *dev;
struct net_local *local;
struct ethhdr *eth, eth_header;
+ bt_tx_buf *tx_buf;
+ u8 *unknown_eheaders[MAX_EHEADERS];
+ u8 eheader_count =3D 0;
u8 type;
u8 eheaders;
int blen,skblen;
@@ -847,8 +851,13 @@
break;
=20
default:
- D_ERR(__FUNCTION__": Unknown extension header %02x length %i\n",
+ D_ERR(__FUNCTION__": Unknown extension header %02x length %i, store tem=
porarily for receiving PANU\n",
type, eheader->length);
+ if (eheader_count < MAX_EHEADERS) {
+ unknown_eheaders[eheader_count++] =3D data=
+ pos;
+ } else {
+ D_ERR(__FUNCTION__": Too many extension he=
aders\n");
+ }
}
=20
pos +=3D eheader->length + 2;
@@ -858,6 +867,109 @@
}
}
=20
+ /* If we found any unknown eheaders we must forward them if the destinati=
on
+ address belongs to a PANU currently connected to us */
+ if(eheader_count && eth_frame) {
+ struct net_local *remote;
+ int i, j;
+ for (i =3D 0; i < BNEP_INTERFACES; i++) {
+ remote =3D dev_bnep[i].priv;
+ if (remote !=3D NULL && remote->l2cap !=3D NULL && remote->l2cap->remot=
e_bd !=3D NULL) {
+ for(j =3D 0 ; j < 6 ; j++) {
+ if(eth->h_dest[j] !=3D remote->l2cap->remote_bd[5 - j]) {
+ break;
+ }
+ }
+=09=09=09=09
+ if(j =3D=3D 6) {
+ break;
+ }
+ }
+ }
+=09=09
+ if(i !=3D BNEP_INTERFACES) {
+ /* OK, this PANU is connected to us, let's forward
+ all data with the unknown extentionheaders to
+ the PANU */
+ struct bnep_compressed_ethernet_source_only bnep_c_s;
+ struct bnep_eheader *eheader;
+ u16 totallen;
+
+ bnep_c_s.bnep_type =3D BNEP_COMPRESSED_ETHERNET_SOURCE_ONLY | 0x80;
+ bnep_c_s.type =3D eth->h_proto;
+ for ( i =3D 0 ; i < 6; i++) {
+ bnep_c_s.saddr[i] =3D eth->h_source[i];
+ }
+
+ totallen =3D sizeof(struct bnep_compressed_ethernet_source_only);
+=09=09=09
+ /* Calculate length for all eheaders and make sure eheader-bit is set */
+ for(i =3D 0 ; i < eheader_count ; i++)
+ {
+ totallen +=3D sizeof(struct bnep_eheader);
+ eheader =3D (struct bnep_eheader *)unknown_eheaders[i];
+ totallen +=3D eheader->length;
+ eheader->bnep_type |=3D 0x80;
+ }
+=09=09=09
+ /* Clear last extension bit in eheaders */
+ eheader->bnep_type &=3D 0x7f;
+
+ /* Calculate length for the payload data */
+ totallen +=3D (len - pos);
+=09=09=09
+ /* Subscribe from memorybuffer */
+ if (buf_write_room() < totallen) {
+ D_XMIT(__FUNCTION__": not enough room for a %d byte bt_tx_buf\n", skb-=
>len);
+ /* don't necessarily need to discard the buffer; could set dev->tbusy =
=3D 1
+ and then start a timer to check for free buffer space */
+ local->stats.tx_dropped++;
+ return;
+=09=09=09=09
+ } else {
+ int header_len =3D sizeof(struct bnep_compressed_ethernet_source_only);
+ /* subscribe to a bt_tx_buf */
+ D_XMIT("New bt buf length %i \n", totallen);
+ if ((tx_buf =3D subscribe_bt_buf(totallen + sizeof(bnep_tx_buf))) =3D=
=3D NULL) {
+ D_ERR(__FUNCTION__": failed to subscribe %d bytes\n",=20
+ totallen);
+ remote->stats.tx_dropped++;
+ return;
+=09=09=09=09=09
+ } else {
+ /* copy the header to the bt_tx_buf */
+ memcpy(tx_buf->data + sizeof(bnep_tx_buf),=20
+ &bnep_c_s,=20
+ header_len);
+=09=09=09=09=09
+ /* copy all extension headers into buffer */
+ j =3D 0;
+ for(i =3D 0 ; i < eheader_count ; i++) {
+ eheader =3D (struct bnep_eheader *)unknown_eheaders[i];
+ printk("Copy eheader val: %02x, len %02x\n", eheader->bnep_type, ehe=
ader->length);
+ memcpy(tx_buf->data + sizeof(bnep_tx_buf) + header_len + j,=20
+ unknown_eheaders[i], eheader->length + sizeof(struct bnep_ehe=
ader));
+ j +=3D eheader->length + sizeof(struct bnep_eheader);
+ }
+=09=09=09=09=09
+ /* copy rest of the payload data */
+ memcpy(tx_buf->data + sizeof(bnep_tx_buf) + header_len + j,
+ data + pos,
+ len - pos);
+=09
+ tx_buf->cur_len =3D header_len + j + (len - pos);
+ /* transmit the packet */
+ D_XMIT("bnep: tx packet\n");
+ /* update the device statistics */
+ remote->stats.tx_packets++;
+ remote->stats.tx_bytes +=3D totallen;
+ l2cap_send_data(tx_buf, remote->l2cap);
+ return;
+ }
+ }
+ }
+ }=09=09
+
if (eth_frame =3D=3D 1) {
D_REC("eth header src %02x.%02x.%02x.%02x.%02x.%02x "
"dst %02x.%02x.%02x.%02x.%02x.%02x type %04x\n",=20
@@ -1255,7 +1367,7 @@
(void*)&rsp,
sizeof(struct bnep_control_command_not_understood));
tx_buf->cur_len =3D sizeof(struct bnep_control_command_not_understood);
- D_MISC("BNEP send filter response msg\n");
+ D_MISC("BNEP send command not understood response msg\n");
l2cap_send_data(tx_buf, local->l2cap);
}
}
|
|
From: Anders J. <and...@us...> - 2003-03-29 18:44:57
|
The following file was modified in apps/bluetooth/sdp_server:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
sdp_server.c 1.32 1.33=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Corrected read of the attribute-list.
The diff of the modified file(s):
--- sdp_server.c 7 Mar 2002 21:23:19 -0000 1.32
+++ sdp_server.c 29 Mar 2003 18:44:56 -0000 1.33
@@ -723,14 +723,14 @@
return_sequence[pos++] =3D 0;
=20=20=20
/* Find the first attribute in the range */
- while ((i < attr_lst[0]) && (attr_lst[i] < (attr_id_code >> 16)))
+ while ((i <=3D attr_lst[0]) && (attr_lst[i] < (attr_id_code >> 16)))
{
i++;
}
D_ATTR("attr_lst[0]: %d, attr_id_code: 0x%04x",
attr_lst[0], attr_id_code);
=20=20=20
- while ((i < attr_lst[0]) && (attr_lst[i] <=3D (attr_id_code & 0xffff)))
+ while ((i <=3D attr_lst[0]) && (attr_lst[i] <=3D (attr_id_code & 0xffff)=
))
{
D_REC("attr_lst[%d]: 0x%04x", i, attr_lst[i]);
/* we mask the attribute her so we don't by misstake send a range as
|
|
From: Peter K. <pk...@us...> - 2003-03-13 17:51:29
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
btd.c 1.42 1.43=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added NAS-Port-Type, Calling-Station-Id and Called-Station-Id.
The diff of the modified file(s):
--- btd.c 13 Jan 2003 19:48:16 -0000 1.42
+++ btd.c 13 Mar 2003 17:51:26 -0000 1.43
@@ -497,6 +497,8 @@
static unsigned char ms_wins2[35];
static unsigned char netmask[35];
static char remote_bd_addr[18];
+ static char calling_str[37];
+ static char called_str[36];
static char remote_bd_str[36];
static char local_bd_str[32];
static char remote_class_of_dev[27];
@@ -558,7 +560,32 @@
opts[i++] =3D "remote-bd-addr";
opts[i++] =3D remote_bd_addr;
=20
+ opts[i++] =3D "avpair";
+ opts[i++] =3D "NAS-Port-Type=3D18"; /* Wireless -Other */
+
read_local_bd(bt_cfd, local_bd);
+ sprintf(called_str, "Called-Station-Id=3D%02x:%02x:%02x:%02x:%02x:%0=
2x",
+ local_bd[0],
+ local_bd[1],
+ local_bd[2],
+ local_bd[3],
+ local_bd[4],
+ local_bd[5]);
+
+ opts[i++] =3D "avpair";
+ opts[i++] =3D called_str;
+
+ sprintf(calling_str, "Calling-Station-Id=3D%02x:%02x:%02x:%02x:%02x:=
%02x",
+ PEER(line).remote_bd[0],
+ PEER(line).remote_bd[1],
+ PEER(line).remote_bd[2],
+ PEER(line).remote_bd[3],
+ PEER(line).remote_bd[4],
+ PEER(line).remote_bd[5]);
+
+ opts[i++] =3D "avpair";
+ opts[i++] =3D calling_str;
+
sprintf(local_bd_str, "Axis-BT-AP-ID=3D%02x:%02x:%02x:%02x:%02x:%02x=
",
local_bd[0],
local_bd[1],
|
|
From: Peter K. <pk...@us...> - 2003-03-07 15:46:41
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- Makefile 1.32 1.33=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Use a better default for INCLUDEDIR. The diff of the modified file(s): --- Makefile 25 Apr 2002 14:56:21 -0000 1.32 +++ Makefile 7 Mar 2003 15:46:02 -0000 1.33 @@ -67,7 +67,7 @@ # The INCLUDEDIR variable allows LSB compliant distros to be able to compi= le # the module correctly. Use 'make INCLUDEDIR=3D/usr/src/linux/include' whe= re # /usr/src/linux/include is the directory that was used to build the kerne= l. -INCLUDEDIR =3D /usr/include +INCLUDEDIR =3D /lib/modules/`uname -r`/build/include =20 CC =3D $(CROSSCOMPILE)gcc LD =3D $(CROSSCOMPILE)ld |
|
From: Peter K. <pk...@us...> - 2003-03-07 15:42:00
|
The following file was modified in : Name Old version New version Tag Comment ---- ----------- ----------- --- ------- Makefile 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Do not create the links in apps/bluetooth/userstack from here. It is done by the Makefile in apps/bluetooth/userstack as part of the normal build anyway. The diff of the modified file(s): --- Makefile 27 Sep 2002 12:59:02 -0000 1.3 +++ Makefile 7 Mar 2003 15:41:55 -0000 1.4 @@ -8,7 +8,6 @@ all: make -C linux/drivers/char/bluetooth make -C libs install - make -C apps/bluetooth/userstack links make -C apps/bluetooth make -C apps/bluetooth/sdp_server sdp_user =20 |
|
From: Peter K. <pk...@us...> - 2003-03-07 15:38:16
|
The following file was modified in apps/bluetooth/userstack: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- Makefile 1.28 1.29=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Prevent a recursive link to the include directory from being created. The diff of the modified file(s): --- Makefile 27 Sep 2002 12:59:03 -0000 1.28 +++ Makefile 7 Mar 2003 15:38:10 -0000 1.29 @@ -98,7 +98,7 @@ @ln -sf $(srcdir)/rfcomm_sec.c @ln -sf $(srcdir)/sec_client.c @ln -sf $(srcdir)/unplug_test.c - @ln -sf $(incdir) include + @ln -sfn $(incdir) include =20 unlinks: rm -f $(BTDSRCS) $(KSRCS) include |
|
From: Anders J. <and...@us...> - 2003-03-06 16:12:22
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bluetooth.c 1.237 1.238=20=20=20=20=20=20=20=20=20=20=20=20=20
hci.c 1.208 1.209=20=20=20=20=20=20=20=20=20=20=20=20=20
l2cap.c 1.135 1.136=20=20=20=20=20=20=20=20=20=20=20=20=20
rfcomm.c 1.138 1.139=20=20=20=20=20=20=20=20=20=20=20=20=20
test.c 1.38 1.39=20=20=20=20=20=20=20=20=20=20=20=20=20=20
unplug_test.c 1.14 1.15=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Added some testcases.
* Added more command to testlayer.
* Improved errorhandling when receiving corrupt headers in l2cap.
* Corrected usage of some bits in rpn-messages in rfcomm.
* Corrected read_remote_name, it now uses the length specified correclty (t=
hanks to Ed Orchard).
The diff of the modified file(s):
--- bluetooth.c 6 Feb 2003 15:36:20 -0000 1.237
+++ bluetooth.c 6 Mar 2003 16:04:00 -0000 1.238
@@ -746,12 +746,16 @@
copy_from_user(&length, (s32*)arg + 1, sizeof length);
=20=09=09
con_hdl =3D bt_get_conhdl_from_line(line);
+
if(con_hdl >=3D 0) {
+ /* get_remote_name will set max BT_NAME_LENGTH chars
+ in remote_name if specified length happend to be
+ more than that */
err =3D get_remote_name(con_hdl, remote_name, length);
} else {
err =3D -EINVAL;
}
- copy_to_user((s32*)arg, remote_name, BT_NAME_LENGTH);
+ copy_to_user((s32*)arg, remote_name, length);
return err;
}
=20
--- hci.c 6 Feb 2003 15:36:20 -0000 1.208
+++ hci.c 6 Mar 2003 16:03:57 -0000 1.209
@@ -511,7 +511,8 @@
header and we silently discard the previous packet */
=20
if(get_inbuffer(hci_hdl)) {
- D_ERR(__FUNCTION__ ": Discarding data in previous buffer\n");
+ D_ERR(__FUNCTION__ ": Received new frame while waiting for a continu=
ation frame"
+ ", channel unreliable\n");
hci_clear_buffer(hci_hdl);
}
=20
--- l2cap.c 13 Jan 2003 19:48:32 -0000 1.135
+++ l2cap.c 6 Mar 2003 16:03:59 -0000 1.136
@@ -222,6 +222,12 @@
=20
#endif
=20
+#if CONFIG_BLUETOOTH_UNPLUG_TEST
+extern s32 add_value;
+extern u16 contflag;
+#endif
+
+
/****************** GLOBAL VARIABLE DECLARATION SECTION ******************=
***/
=20
/****************** LOCAL VARIABLE DECLARATION SECTION *******************=
***/
@@ -525,6 +531,14 @@
=20=20=20=20=20
D_RCV(__FUNCTION__ ": New frame len:%d cid:%d\n", pkt_len, pkt_cid);
=20
+ if(len > *l2cap_len) {
+ /* We have received more data than the l2cap header
+ specified, discard this buffer */
+ DSYS(__FUNCTION__ ": Received %d bytes, expected %d bytes, channel unre=
liable\n", len, *l2cap_len);
+ hci_clear_buffer(hci_handle);
+ return;
+ }
+=09=09
/* check length */
if (!(pkt_len =3D=3D (len - L2CAP_HDRSIZE)))
return;
@@ -532,7 +546,7 @@
/* Not recieved full frame yet or BIG packet */
=20=09=09
if (len > *l2cap_len) {
- DSYS(__FUNCTION__ ": BIG PACKET ! (%d bytes) discard\n", len);
+ DSYS(__FUNCTION__ ": Received %d bytes, expected %d bytes, channel unre=
liable\n", len, *l2cap_len);
hci_clear_buffer(hci_handle);
}
return;
@@ -2203,7 +2217,11 @@
=20
/* Request header */
req->dst_cid =3D cpu_to_le16(con->remote_cid); /* Sending end */
- req->flags =3D 0; /* Negotiate same as remote */
+#ifdef CONFIG_BLUETOOTH_UNPLUG_TEST
+ req->flags =3D cpu_to_le16(contflag); /* Negotiate same as remote */
+#else
+ req->flags =3D 0;
+#endif
=20
/* Signalling header */
cmd->code =3D SIG_CONFREQ;
@@ -2743,7 +2761,12 @@
=20
l2cap_buf =3D (l2cap_tx_buf *)(tx->data);
=20
+#ifdef CONFIG_BLUETOOTH_UNPLUG_TEST
+ /* Used to send packets with incorrect header */
+ SET_L2CAP_HDR(l2cap_buf->frame, tx->cur_len + add_value, con->remote_cid);
+#else
SET_L2CAP_HDR(l2cap_buf->frame, tx->cur_len, con->remote_cid);
+#endif
=20
/* pb_flag is set from hci_send_data */
tx->hci_hdl =3D con->hci_hdl;
--- rfcomm.c 1 Nov 2002 10:30:16 -0000 1.138
+++ rfcomm.c 6 Mar 2003 16:04:05 -0000 1.139
@@ -138,6 +138,8 @@
=20
#define RFCOMM_MAX_HDR_SIZE 5
=20
+/* Set to 0 if you intend to initiate connections with no credit based flo=
w control */
+#define CL_BITS 0xf
#define MAX_CREDITS 30
#define START_CREDITS 7
#define MIN_CREDITS 6
@@ -756,8 +758,8 @@
/* must fit i l2cap mtu */
D_CTRL(FNC"negotiate mtu : %d bytes\n",
rfcomm->l2cap->remote_mtu - 5);
- return send_pn_msg(rfcomm, 7, rfcomm->dlci[tmp_dlci].mtu, 0, 0,
- tmp_dlci, TRUE);
+ return send_pn_msg(rfcomm, 7, rfcomm->dlci[tmp_dlci].mtu, CL_BITS, START=
_CREDITS,
+ tmp_dlci, FALSE);
}
=20
return 0;
@@ -1143,8 +1145,8 @@
((~rfcomm->initiator) & 0x1));
=20
/* must fit in l2cap mtu incl rfcomm hdrs */
- send_pn_msg(rfcomm, 7, rfcomm->dlci[tmp_dlci].mtu, 0,
- 0, tmp_dlci, TRUE);
+ send_pn_msg(rfcomm, 7, rfcomm->dlci[tmp_dlci].mtu, CL_BITS,
+ START_CREDITS, tmp_dlci, TRUE);
rfcomm->dlci[tmp_dlci].state =3D NEGOTIATING;
=20
} else if (rfcomm->dlci[tmp_dlci].state =3D=3D NEGOTIATING) {
@@ -1577,6 +1579,7 @@
for now) */
D_CTRL(FNC"Received Remote port negotiation respons\n");
memcpy(&rpn_val, &mcc_short_pkt->value[1], 8);
+ memset(&rpn_val.pm, 0xff, 2);
rfcomm_rpn_msg(rfcomm, MCC_RSP, tmp_dlci, 0);
/* Zero the parametermask after respons */
memset(&rpn_val.pm, 0, 2);
@@ -2182,6 +2185,7 @@
rpn_msg* rpn_pkt;
u32 rfcomm_frame_size;
u32 rfcomm_payload_size;
+ s32 retval;
=20
rfcomm_frame_size =3D sizeof(rpn_msg);
=20
@@ -2218,17 +2222,20 @@
rpn_pkt->dlci.d =3D dlci & 1;
rpn_pkt->dlci.server_chn =3D (dlci >> 1);
=20
+ memset(&rpn_val.pm, 0xff, 2);
+
if (req) {
rpn_pkt->mcc_s_head.length.len =3D 1;
/* Fix, since the packet is ends here when it is a request */
rpn_pkt->rpn_val.bit_rate =3D rpn_pkt->fcs;
- return l2cap_send_data(tx_buf, rfcomm->l2cap);
} else {
rpn_pkt->mcc_s_head.length.len =3D 8;
memcpy(&(rpn_pkt->rpn_val), &rpn_val, sizeof(rpn_values));
- //print_data("",(u8*) rpn_pkt, rfcomm_frame_size);
- return l2cap_send_data(tx_buf, rfcomm->l2cap);
}
+
+ retval =3D l2cap_send_data(tx_buf, rfcomm->l2cap);
+ memset(&rpn_val.pm, 0, 2);
+ return retval;
}
=20
s32
--- test.c 14 Jan 2003 15:19:03 -0000 1.38
+++ test.c 6 Mar 2003 16:04:08 -0000 1.39
@@ -158,6 +158,7 @@
void test_init(void)
{
protocol_layer this_layer;
+ int i;
=20
DSYS("Initialising TEST\n");
=20
@@ -176,6 +177,9 @@
l2cap_register_upper(L2CAP_TEST_LAYER, &this_layer);
l2cap_register_upper(L2CAP_TEST2_LAYER, &this_layer);
l2cap_register_upper(L2CAP_TEST3_LAYER, &this_layer);
+ for(i =3D 0 ; i < UPTEST_DATA_LEN ; i ++) {
+ testdata[i] =3D (unsigned char)i;
+ }
}
=20
void test_shutdown(void)
@@ -354,15 +358,7 @@
D_STATE("test_config_ind : remote cid : %d remote_mtu : %d\n",
con->remote_cid, con->remote_mtu);
=20
- if(dont_accept_mtu) {
- if (l2ca_config_rsp(con, 640, NULL, CONF_FAILURE)) {
- D_ERR("test_config_ind : Configuration response failed\n");
- }
- dont_accept_mtu =3D 0;
- }
- else if (l2ca_config_rsp(con, 0, NULL, CONF_SUCCESS)) {
- D_ERR("test_config_ind : Configuration response failed\n");
- }
+=09
=20
/* Are we ready with our sides configuration */
if (!l2ca_local_conf_done(con) && !con->conf_req_sent) {
@@ -397,13 +393,23 @@
=20
} else
D_RCV("already ready with config req\n");
+
+ if(dont_accept_mtu) {
+ if (l2ca_config_rsp(con, 640, NULL, CONF_FAILURE)) {
+ D_ERR("test_config_ind : Configuration response failed\n");
+ }
+ dont_accept_mtu =3D 0;
+ }
+ else if (l2ca_config_rsp(con, 0, NULL, CONF_SUCCESS)) {
+ D_ERR("test_config_ind : Configuration response failed\n");
+ }
}
=20
void test_config_cfm(l2cap_con *con, s32 status)
{
D_STATE("test_config_cfm : remote cid : %d\n", con->remote_cid);
if(status) {
- if(l2ca_config_req(con, con->remote_mtu, &con->remote_qos, con->flush_ti=
meout, 0)) {
+ if(l2ca_config_req(con, con->remote_mtu, NULL, 0, 0)) {
D_ERR("test_config_cfm : Configuration request failed\n");
}
return;
@@ -586,6 +592,27 @@
} else if(!strncmp(cmd, "dont_send_connect_response ", 27)) {
dont_send_connect_response =3D strtoul(cmd+27, NULL, 0);
return 0;
+ } else if(!strcmp(cmd, "test_case_use_cont_flag")) {
+ use_contflag =3D 1;
+ return 0;
+ } else if(!strcmp(cmd, "test_case_emulate_pending")) {
+ emulate_pending =3D 1;
+ return 0;
+ } else if(!strncmp(cmd, "configure_mtu ", 8)) {
+ int lcid, mtu;
+ char *p =3D cmd+14;
+ l2cap_con *con;
+ lcid =3D strtoul(p, &p, 0);
+ mtu =3D strtoul(p+1, &p, 0);
+
+ /* first find connection based on local cid */
+ con =3D get_lcon(lcid);
+ if (!con) {
+ printk("Found no connection with lcid : %d\n", lcid);
+ return -1;
+ }
+
+ return l2ca_config_req(con, mtu, NULL, 0, 0);
} else {
printk("Unknown test cmd!\n");
return -1;
--- unplug_test.c 1 Aug 2002 16:19:29 -0000 1.14
+++ unplug_test.c 6 Mar 2003 16:04:07 -0000 1.15
@@ -166,6 +166,35 @@
=20
/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */
=20
+/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D SPP =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */
+unsigned char spp_data_53111[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x00, 0x03, 0x00, 0xff,
+ 0x00 };
+
+unsigned char spp_data_53112[] =3D { 0x04, 0x88, 0x91, 0x00, 0x12,
+ 0x00, 0x10, 0x00, 0x09,=20
+ 0x00, 0xff,=20
+ 0x35, 0x09,=20
+ 0x09, 0x00, 0x01,=20
+ 0x09, 0x00, 0x04,
+ 0x09, 0x01, 0x00,
+ 0x00 };
+
+unsigned char spp_data_53113[] =3D { 0x06, 0x88, 0x88, 0x00, 0x13,
+ 0x35, 0x03,=20
+ 0x19, 0x00, 0x03,=20
+ 0x00, 0xff,
+ 0x35, 0x09,=20
+ 0x09, 0x00, 0x01,=20
+ 0x09, 0x00, 0x04,
+ 0x09, 0x01, 0x00,
+ 0x00 };
+
+
+/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */
+
+
+
=20
/* UUID 16 */
unsigned char sdp_data_52111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
@@ -1773,7 +1802,22 @@
/*
* Serial Port Profile Stuff
*/
+static s32 spp_test_53111(void)
+{
+ return sdp_send_data(&sdp_con_list[0], spp_data_53111, spp_data_53111[4] =
+ 5);
+}
+
+static s32 spp_test_53112(void)
+{
+ return sdp_send_data(&sdp_con_list[0], spp_data_53112, spp_data_53112[4] =
+ 5);
+}
+
+static s32 spp_test_53113(void)
+{
+ return sdp_send_data(&sdp_con_list[0], spp_data_53113, spp_data_53113[4] =
+ 5);
+}
=20
+#if 0
static s32 spp_test_52211(void)
{
static int t =3D 0;
@@ -1963,11 +2007,12 @@
switch (t) {
case 0:
retval =3D rfcomm_pn_msg(&rfcomm_con_list[0], 2, 0, 1000);
- t++;
+ t =3D 1;
break;
=20
case 1:
retval =3D rfcomm_pn_msg(&rfcomm_con_list[0], 2, 0, 667);
+ t =3D 0;
break;
}
return retval;
@@ -2036,6 +2081,8 @@
return 0;
}
=20
+#endif
+
/*
* RFCOMM stuff
*/
@@ -2509,7 +2556,7 @@
case 54122: return sdp_test_54122();
case 55111: return sdp_test_55111();
case 55112: return sdp_test_55112();
-
+#if 0
case 62211: return spp_test_52211();
=20
case 62311: return spp_test_52311();
@@ -2530,6 +2577,12 @@
case 631111: return spp_test_531111();
case 631112: return spp_test_531112();
case 66211: return spp_test_56211();
+#endif
+=20=20=20=20=20=20=20=20=20
+ case 653111: return spp_test_53111();
+ case 653112: return spp_test_53112();
+ case 653113: return spp_test_53113();
+=20=20=20=20=20=20=20=20=20=20
=20
case 41: return test_4_1();
case 421: return test_4_2_1();
|
|
From: Anders J. <and...@us...> - 2003-02-18 15:23:32
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- l2cap_con.c 1.15 1.16=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: CoD copied to any new l2cap-connections which are "cloned" from an existing= one. The diff of the modified file(s): --- l2cap_con.c 27 Sep 2002 12:54:11 -0000 1.15 +++ l2cap_con.c 18 Feb 2003 15:22:58 -0000 1.16 @@ -308,6 +308,7 @@ new_con->initiator =3D FALSE; /* set bd address in new connection */ memcpy(new_con->remote_bd, found->remote_bd, 6); + memcpy(new_con->remote_class_of_dev, found->remote_class_of_dev, 3); =20=20=20=20=20=20=20=20=20=20=20=20=20 insert_con(new_con); SHOW_LIST(); @@ -599,10 +600,10 @@ pos +=3D sprintf(buf + pos, " ]\n"); =20 pos +=3D sprintf(buf + pos,=20 - "lcid[%d] rcid[%d] state[%s] psm[%s]\n", + "lcid[%d] rcid[%d] state[%s] psm[%s] CoD[0x%02x%02x%02x]\n", con->local_cid, con->remote_cid,=20 state_name[con->current_state],=20 - psm2str(con->psm)); + psm2str(con->psm), con->remote_class_of_dev[2], con->remote_clas= s_of_dev[1], con->remote_class_of_dev[0]); =20 pos +=3D sprintf(buf + pos, "remote_mtu[%d] local_mtu [%d] clnt[%s] link_up[%s]\n", |
|
From: Anders J. <and...@us...> - 2003-02-06 15:36:53
|
The following files were modified in linux/include/linux/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- bluetooth.h 1.49 1.50=20=20=20=20=20=20=20=20=20=20=20=20=20=20 hci.h 1.79 1.80=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: get_remote_name and get_remote_bd now uses hci_hdl to refer to a connection as bt_ctrl.session[line] !=3D hci_ctrl[line] !!=20=20 The diff of the modified file(s): --- bluetooth.h 31 Jul 2002 08:21:16 -0000 1.49 +++ bluetooth.h 6 Feb 2003 15:36:22 -0000 1.50 @@ -67,6 +67,7 @@ s32 bt_init(void); #endif =20 +s32 bt_get_conhdl_from_line(s32 line); s32 bt_register_rfcomm(rfcomm_con *rfcomm, u8 dlci); s32 bt_unregister_rfcomm(s32 line); s32 bt_register_sdp(u8 line, u8 sdpID); --- hci.h 19 Nov 2002 14:11:43 -0000 1.79 +++ hci.h 6 Feb 2003 15:36:22 -0000 1.80 @@ -198,8 +198,8 @@ =20 /* Internal */ /* FIXME -- add parameter to choose from different devices */ -s32 get_remote_bd(int line, u8 *bd); -s32 get_remote_name(int line, u8 *name, u32 length); +s32 get_remote_bd(u16 con_hdl, u8 *bd); +s32 get_remote_name(u16 con_hdl, u8 *name, u32 length); =20 void update_ncp(u8 nbr_of_hdl, u8 *pkt); =20 |
|
From: Anders J. <and...@us...> - 2003-02-06 15:36:53
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bluetooth.c 1.236 1.237=20=20=20=20=20=20=20=20=20=20=20=20=20
hci.c 1.207 1.208=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
get_remote_name and get_remote_bd now uses hci_hdl to refer to a connection
as bt_ctrl.session[line] !=3D hci_ctrl[line] !!=20=20
The diff of the modified file(s):
--- bluetooth.c 13 Jan 2003 19:48:26 -0000 1.236
+++ bluetooth.c 6 Feb 2003 15:36:20 -0000 1.237
@@ -546,7 +546,7 @@
s32 err =3D 0;
s32 size =3D _IOC_SIZE(cmd);
bt_connection btcon;
- u8 bd_addr[6];
+ u8 bd_addr[6] =3D {0, 0, 0, 0, 0, 0};
#ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP
static u8 dfu_data[2044];
#endif
@@ -693,13 +693,20 @@
{
BD_ADDR rev_bd;
s32 line;
- u16 i;
+ s32 i;
=20
BT_DRIVER(__FUNCTION__ ": BTREADREMOTEBDADDR\n");
=20
copy_from_user(&line, (s32*)arg, size);
=20
- err =3D get_remote_bd(line, bd_addr);
+ /* Get the session for this line */
+ i =3D bt_get_conhdl_from_line(line);
+=09=09
+ if(i >=3D 0) {
+ err =3D get_remote_bd(i, bd_addr);
+ } else {
+ err =3D -EINVAL;
+ }
=20
/* return as big endian */
for (i =3D 0; i < 6; i++) {
@@ -729,14 +736,21 @@
u8 remote_name[BT_NAME_LENGTH];
s32 line;
u32 length;
+ s32 con_hdl;
=20
BT_DRIVER(__FUNCTION__ ": BTREADREMOTENAME\n");
=20
+ memset(remote_name, 0, BT_NAME_LENGTH);
+
copy_from_user(&line, (s32*)arg, sizeof line);
copy_from_user(&length, (s32*)arg + 1, sizeof length);
=20
- err =3D get_remote_name(line, remote_name, length);
-
+ con_hdl =3D bt_get_conhdl_from_line(line);
+ if(con_hdl >=3D 0) {
+ err =3D get_remote_name(con_hdl, remote_name, length);
+ } else {
+ err =3D -EINVAL;
+ }
copy_to_user((s32*)arg, remote_name, BT_NAME_LENGTH);
return err;
}
@@ -3226,6 +3240,25 @@
=20
return pos;
}
+
+s32
+bt_get_conhdl_from_line(s32 line)=20
+{
+ rfcomm_con *con;
+=09
+ if(line >=3D BT_NBR_DATAPORTS) {
+ return -1;
+ }
+
+ con =3D bt_ctrl.session[line].rfcomm;
+=09
+ if(con && con->l2cap) {
+ return (*(con->l2cap)).hci_hdl;
+ }
+
+ return -1;
+}
+
=20
/*
* FIXME -- make this register function more general i.e
--- hci.c 13 Jan 2003 19:48:30 -0000 1.207
+++ hci.c 6 Feb 2003 15:36:20 -0000 1.208
@@ -3328,22 +3328,29 @@
/* Consider changing bd to BD_ADDR */
=20
s32
-get_remote_bd(s32 line, u8 *bd)
+get_remote_bd(u16 con_hdl, u8 *bd)
{
+ u32 i;
D_CMD(__FUNCTION__ "\n");
=20
+ for (i =3D 0 ; i < MAX_NBR_OF_CONNECTIONS ; i ++) {
+ if (hci_ctrl.con[i].con_hdl =3D=3D con_hdl) {
+ break;
+ }
+ }
+
memset(bd, 0, 6);
=20
- if (line >=3D 0 && line < MAX_NBR_OF_CONNECTIONS) {
- if (hci_ctrl.con[line].state !=3D NOT_CONNECTED) {
- memcpy(bd, hci_ctrl.con[line].bd, 6);
+ if (i >=3D 0 && i < MAX_NBR_OF_CONNECTIONS) {
+ if (hci_ctrl.con[i].state !=3D NOT_CONNECTED) {
+ memcpy(bd, hci_ctrl.con[i].bd, 6);
}
DSYS(__FUNCTION__ ": %02x:%02x:%02x:%02x:%02x:%02x\n",
bd[5], bd[4], bd[3], bd[2], bd[1], bd[0]);
return 0;
} else {
/* No connection yet */
- D_WARN(__FUNCTION__ ": Unknown line: %d!\n", line);
+ D_WARN(__FUNCTION__ ": Can't find connection with hci_hdl: %d!\n", con_h=
dl);
return -EINVAL;
}
}
@@ -3353,19 +3360,26 @@
*/
=20
s32
-get_remote_name(s32 line, u8 *name, u32 length)
+get_remote_name(u16 con_hdl, u8 *name, u32 length)
{
+ u32 i;
D_CMD(__FUNCTION__ "\n");
=20
- if (line >=3D 0 && line < MAX_NBR_OF_CONNECTIONS) {
+ for (i =3D 0 ; i < MAX_NBR_OF_CONNECTIONS ; i ++) {
+ if (hci_ctrl.con[i].con_hdl =3D=3D con_hdl) {
+ break;
+ }
+ }
+
+ if (i >=3D 0 && i < MAX_NBR_OF_CONNECTIONS) {
memset(name, '\0', min(length, BT_NAME_LENGTH));
- if (hci_ctrl.con[line].state !=3D NOT_CONNECTED) {
- strncpy(name, hci_ctrl.con[line].name, min(length, BT_NAME_LENGTH)-1);
+ if (hci_ctrl.con[i].state !=3D NOT_CONNECTED) {
+ strncpy(name, hci_ctrl.con[i].name, min(length, BT_NAME_LENGTH)-1);
}
return 0;
} else {
/* No connection yet */
- D_WARN(__FUNCTION__ ": Unknown line: %d!\n", line);
+ D_WARN(__FUNCTION__ ": Unknown hci_hdl: %d!\n", con_hdl);
return -EINVAL;
}
}
|
|
From: Anders J. <and...@us...> - 2003-02-06 15:31:12
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- bt_if.c 1.56 1.57=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: get_remote_name and get_remote_bd changed to use hci_hdl to find the connection. The diff of the modified file(s): --- bt_if.c 13 Jan 2003 19:48:07 -0000 1.56 +++ bt_if.c 6 Feb 2003 15:31:08 -0000 1.57 @@ -1211,7 +1211,7 @@ BD_ADDR rev_bd; int i; =20 - get_remote_bd(line, rev_bd); + get_remote_bd(bt_get_conhdl_from_line(line), rev_bd); =20 /* return as big endian */ for (i =3D 0; i < 6; i++) |
|
From: Peter K. <pk...@us...> - 2003-01-22 13:33:50
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bnep_status_proc.c 1.2 1.3=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20
The accompanying log:
bnep_status_remove_proc_file() should not be static.
The diff of the modified file(s):
--- bnep_status_proc.c 11 Apr 2002 11:54:44 -0000 1.2
+++ bnep_status_proc.c 22 Jan 2003 13:33:49 -0000 1.3
@@ -170,7 +170,7 @@
return procfs_status;
}
=20
-static s32
+s32
bnep_status_remove_proc_file(void)
{
#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,4,0)
|