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: Willy S. <sag...@us...> - 2002-04-10 18:40:51
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- bluetooth.c 1.226 1.227=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added linux version ifdef for malloc.h/slab.h The diff of the modified file(s): --- bluetooth.c 8 Apr 2002 09:15:21 -0000 1.226 +++ bluetooth.c 10 Apr 2002 11:34:55 -0000 1.227 @@ -46,8 +46,11 @@ #include <linux/termios.h> #include <linux/tty.h> #include <linux/module.h> -//#include <linux/malloc.h> +#if LINUX_VERSION_CODE >=3D 0x20200 #include <linux/slab.h> +#else +#include <linux/malloc.h> +#endif #include <linux/sched.h> #include <linux/delay.h> #include <linux/timer.h> |
|
From: Willy S. <sag...@us...> - 2002-04-10 18:40:09
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- hci.c 1.198 1.199=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added linux version ifdef for malloc.h/slab.h The diff of the modified file(s): --- hci.c 8 Apr 2002 09:58:37 -0000 1.198 +++ hci.c 10 Apr 2002 11:37:50 -0000 1.199 @@ -47,7 +47,11 @@ #ifdef __KERNEL__ #include <linux/config.h> #include <linux/bluetooth/sysdep-2.1.h> +#if LINUX_VERSION_CODE >=3D 0x20200 #include <linux/slab.h> +#else +#include <linux/malloc.h> +#endif #include <linux/timer.h> #include <linux/bluetooth/hci.h> #include <linux/bluetooth/hci_internal.h> |
|
From: Willy S. <sag...@us...> - 2002-04-08 16:45:40
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bluetooth.c 1.225 1.226=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added READCLOCKOFFSET HCIPARKMODE HCISNIFFMODE WRITELINKPOLICY HCIHOLDMODE =
HCIREADNUMBROADCASTRETRANS HCIREADTRANSMITTPOWERLEVEL HCIREADRSSI HCIWRITEP=
AGETO
The diff of the modified file(s):
--- bluetooth.c 8 Mar 2002 09:41:42 -0000 1.225
+++ bluetooth.c 8 Apr 2002 09:15:21 -0000 1.226
@@ -46,7 +46,8 @@
#include <linux/termios.h>
#include <linux/tty.h>
#include <linux/module.h>
-#include <linux/malloc.h>
+//#include <linux/malloc.h>
+#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/timer.h>
@@ -535,6 +536,7 @@
}
}=09
=20
+=09
switch (cmd) {
case BT_SDP_REQUEST:
{
@@ -802,6 +804,31 @@
hci_set_connection_encryption_bd(param + 1, *param);
break;
}
+
+ case HCIREADCLOCKOFFSET:
+ {
+ /* Return parameters (4 bytes):
+ * | 2 bytes CLOCK OFFSET | 1 byte tmp | 2 bytes unused |
+ * if tmp < 0 then not valid CLOCK OFFSET=20
+ * else valid CLOCK OFFSET
+ */
+ u32 con_hdl;
+ s32 result;
+ u8 param[2];
+
+ BT_DRIVER(__FUNCTION__ ": HCIREADCLOCKOFFSET\n");=09
+
+ copy_from_user(param, (u8*)arg, 2);
+ con_hdl =3D (0x0ff¶m[1]) + (0x0ff&(param[0]<<8));
+
+ result =3D hci_read_clock_offset(con_hdl);
+ put_user(result, (s32*)arg);
+ break;
+
+ }
+
+
+
/* Link Policy Commands */
=20=09
case HCISWITCHROLE:
@@ -814,6 +841,106 @@
break;
}
=20
+ case HCIPARKMODE:
+ {
+ /* Packet format received (6 bytes) params =3D
+ * | 2 bytes Con Hdl | 2 bytes Beacon Max Int | 2 bytes Beacon Min Int |
+ */
+ s32 result;
+ u8 param[6];
+ u16 con_hdl;
+ u16 Beacon_Max_Int, Beacon_Min_Int;
+
+ BT_DRIVER(__FUNCTION__ ": HCI_PARK_MODE\n");
+ copy_from_user(param, (u8*)arg, 6);
+ con_hdl =3D (0x0ff¶m[1]) + (0x0ff00&(param[0]<<8));
+ Beacon_Max_Int =3D (0x0ff¶m[3]) + (0x0ff00&(param[2]<<8));=09=09
+ Beacon_Min_Int =3D (0x0ff¶m[5]) + (0x0ff00&(param[4]<<8));
+=09=09
+ result =3D hci_park_mode(con_hdl, Beacon_Max_Int, Beacon_Min_Int);
+ put_user(result, (s32*)arg);
+ break;
+ }
+
+
+ case HCISNIFFMODE:
+ {
+ /* Packet format received (10 bytes) params =3D
+ * | 2 bytes Con Hdl | 2 bytes Sniff Max Int | 2 bytes Sniff Min Int |
+ * 2 bytes Sniff_Attempt | 2 bytes Sniff_Timeout=20
+ */
+ s32 result;
+ u8 param[10];
+ u16 con_hdl;
+ u16 Sniff_Max_Int, Sniff_Min_Int, Sniff_Attempt, Sniff_Timeout;
+
+ BT_DRIVER(__FUNCTION__ ": HCI_PARK_MODE\n");
+ copy_from_user(param, (u8*)arg, 10);
+ con_hdl =3D (0x0ff¶m[1]) + (0x0ff00&(param[0]<<8));
+ Sniff_Max_Int =3D (0x0ff¶m[3]) + (0x0ff00&(param[2]<<8));=09=09
+ Sniff_Min_Int =3D (0x0ff¶m[5]) + (0x0ff00&(param[4]<<8));
+ Sniff_Attempt =3D (0x0ff¶m[7]) + (0x0ff00&(param[6]<<8));
+ Sniff_Timeout =3D (0x0ff¶m[9]) + (0x0ff00&(param[8]<<8));
+=09=09
+ result =3D hci_sniff_mode(con_hdl, Sniff_Max_Int, Sniff_Min_Int, Sniff_A=
ttempt, Sniff_Timeout);
+ put_user(result, (s32*)arg);
+ break;
+ }
+
+ case HCIEXITPARKMODE:
+ {=09
+ s32 result;
+ u16 con_hdl;
+=20=20
+ BT_DRIVER(__FUNCTION__ ": HCI_EXIT_PARK_MODE\n");
+ GET_USER(con_hdl,(u16*)arg);
+=20=20=20=20=20=20=20=20=20=20=20=20=20
+ result =3D hci_exit_park_mode(con_hdl);
+ put_user(result, (s32*)arg);
+ break;
+ }
+
+ case HCIWRITELINKPOLICYSETTINGS:
+ {
+ /* Packet format received (4 bytes) params =3D
+ * | 2 bytes Con Hdl | 2 bytes Link Policy Settings
+ */
+ s32 result;
+ u16 con_hdl;
+ u16 link_policy_settings;
+ u8 param[4];
+
+ copy_from_user(param, (u8*)arg, 4);
+ con_hdl =3D (0x0ff¶m[1]) + (0x0ff00&(param[0]<<8));
+ link_policy_settings =3D (0x0ff¶m[3]) + (0x0ff00&(param[2]=
<<8));=09
+
+ result =3D hci_write_link_policy_settings(con_hdl, link_po=
licy_settings);
+ put_user(result, (s32*)arg);
+ break;
+ }
+
+ case HCIHOLDMODE:
+ {
+ /* Packet format received (6 bytes) params =3D
+ * | 2 bytes Con Hdl | 2 bytes Hold Mode Max Interval | 2 bytes =
Hold Mode Max Interval | 2 bytes Hold Mode Min Interval
+ */
+ s32 result;
+ u16 con_hdl;
+ u16 hold_mode_max_interval;
+ u16 hold_mode_min_interval;
+ u8 param[6];
+
+ copy_from_user(param, (u8*)arg, 4);
+ con_hdl =3D (0x0ff¶m[1]) + (0x0ff00&(param[0]<<8));
+ hold_mode_max_interval =3D (0x0ff¶m[3]) + (0x0ff00&(par=
am[2]<<8));=09
+ hold_mode_min_interval =3D (0x0ff¶m[5]) + (0x0ff00&(par=
am[4]<<8));
+
+ result =3D hci_hold_mode(con_hdl, hold_mode_max_interval, h=
old_mode_min_interval);=09
+
+ put_user(result, (s32*)arg);
+ break;=20=20=20=20=20=20=20=20=20=20=20=20=20=20
+ }
+
/* Host Controller & Baseband Commands */
=20
case HCIRESET:
@@ -972,11 +1099,89 @@
=20
/* The size of the filter is in the first two bytes */
filter_size =3D ((param[0] << 8) & 0xff00) | param [1];
-
hci_set_event_filter(¶m[2], filter_size);
break;
}=09
=20=09=09
+ case HCIREADNUMBROADCASTRETRANSMISSIONS:
+ {
+ u8 num_broadcast_retran[2];
+ s32 result;
+=20
+ BT_DRIVER(__FUNCTION__ ": HCIREADNUMBROACASTRETRANSMISSIONS\n");
+ result =3D hci_read_num_broadcast_restransmissions();
+ num_broadcast_retran[0] =3D (u8)(0x0ff&result);
+ num_broadcast_retran[1] =3D (u8)(0x0ff&(result>>8));
+ copy_to_user((u8*)arg, num_broadcast_retran, 2);
+ break;
+ }
+
+ case HCIWRITENUMBROADCASTRETRANSMISSIONS:
+ {
+ u8 status;
+ u8 num_broadcast_retran;
+ u32 result;
+
+ BT_DRIVER(__FUNCTION__ ": HCIREADNUMBROACASTRETRANSMISSIONS\n");
+ GET_USER(num_broadcast_retran, (u8*)arg);
+ result =3D hci_write_num_broadcast_restransmissions(num_broadcast_retran=
);
+ status =3D (u8)(0x0ff&result);
+ put_user(status, (u8*)arg);
+ break;
+ }
+ case HCIREADTRANSMITPOWERLEVEL:
+ {
+ /* Packet received format:
+ * | 2 bytes Connection Handle | 1 bite Type |
+ * Packet transmitted format:
+ * | 1 byte status | 1 byte Transmit Power Level | 1 byte unused |
+ */
+ u8 param[3];
+ u32 con_hdl;
+ u8 type;
+ s32 result;
+=09=09
+ BT_DRIVER(__FUNCTION__ ": HCIREADTRANSMITPOWERLEVEL\n");
+ copy_from_user(param, (u8*)arg, 3);
+ con_hdl =3D (0x0ff¶m[1]) + (0x0ff&(param[0]<<8));
+ type =3D param[2];
+ result =3D hci_read_power_transmit_level(con_hdl, type);
+ param[0] =3D (0x0ff&result);
+ param[1] =3D 0x0ff&(result>>8);
+ copy_to_user((u8*)arg, param, 3);
+ break;
+ }
+
+
+ case HCIWRITELINKSUPERVISIONTO:
+ {
+ /* The vector param[2] is:
+ * param[0] =3D Connection Handle
+ * param[1] =3D Link Supervision Timeout
+ */
+ u32 param[2];
+ s32 result;
+
+ BT_DRIVER(__FUNCTION__ ": HCIWRITELINKSUPERVISIONTO\n");
+ copy_from_user(param, (u32*)arg, 8);
+ result =3D hci_write_link_supervision_to(param[0], param[1],1);
+ param[0] =3D result;
+ put_user(param[0], (u32*)arg);
+ break;
+ }
+=20=09=09
+ case HCIWRITEPAGETO:
+ {
+ u32 page_to;
+ s32 result;
+
+ BT_DRIVER(__FUNCTION__ ": HCIWRITEPAGETO\n");
+ GET_USER(page_to, (u32*)arg);
+ result =3D hci_write_page_to(page_to);
+ put_user(result, (s32*)arg);
+ break;
+ }
+
/* Informational Parameters */
=20
case HCIREADLOCALBDADDR:
@@ -996,6 +1201,30 @@
break;
}
=20
+ /* Status Parameters */
+ case HCIREADRSSI:
+ {
+ /* Return parameters (4 bytes):
+ * | 1 byte RSSI | 1 byte tmp | 2 bytes unused |
+ * if tmp < 0 then not valid RSSI=20
+ * else valid RSSI
+ */
+ u32 con_hdl;
+ u8 param[2];
+
+ BT_DRIVER(__FUNCTION__ ": HCIREADRSSI\n");
+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
+ copy_from_user(param, (u8*)arg, 2);
+ con_hdl =3D (0x0ff¶m[1]) + (0x0ff&(param[0]<<8));
+
+ GET_USER(con_hdl, (u32*)arg);
+ tmp =3D hci_read_rssi(con_hdl);
+ put_user(tmp, (s32*)arg);
+=09=09=20=20
+ break;
+ }
+=20
+
case HCIREADCOUNTRYCODE:
BT_DRIVER(__FUNCTION__ ": HCIREADCOUNTRYCODE\n");
=20=09=09
@@ -1192,10 +1421,29 @@
#ifdef CONFIG_BLUETOOTH_PAN
case BNEPCONNECT:
{
+ s32 tmp;
+ u8 result[4];
+
copy_from_user(&bd_addr, (s32*)arg, size);
BT_DRIVER("BNEP connection to %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
bd_addr[0],bd_addr[1],bd_addr[2],bd_addr[3],bd_addr[4],bd_addr[5]);
- return bnep_connect_req(bd_addr);
+ tmp =3D bnep_connect_req(bd_addr);
+
+ result[0] =3D (tmp>>8)&0x0ff; // conn hdl
+ result[1] =3D (tmp>>16)&0x0ff; // conn hdl
+ result[2] =3D (tmp>>24)&0x0ff; // BNEP interface number
+
+ copy_to_user((s32*)arg, (u8*)result, 4);
+ return 0x0ff&tmp;
+ }
+
+ case BNEPDISCONNECT:
+ {
+ copy_from_user(&bd_addr, (s32*)arg, size);
+ BT_DRIVER("BNEP DISconnection from %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
+ bd_addr[0],bd_addr[1],bd_addr[2],bd_addr[3],bd_addr[4],bd_addr[5]);
+=20
+ return bnep_disconnect_req(bd_addr);
}
=20
#ifdef CONFIG_BLUETOOTH_UNPLUG_TEST
@@ -2494,6 +2742,7 @@
procfs_status =3D proc_register_dynamic(&proc_root, &bt_proc_doit);
#endif /* LINUX_VERSION_CODE */
=20
+
if (procfs_status < 0) {
D_ERR("Could not register proc file bt_status %d\n",=20
procfs_status);
@@ -2505,6 +2754,14 @@
D_ERR("Could not register proc file bnep_status %d\n",
procfs_status);
}
+#ifdef BNEP_PROC
+ procfs_status =3D bnep_create_proc_file();
+ if (procfs_status < 0) {
+ D_ERR("Could not register proc file bnep_proc %d\n",
+ procfs_status);
+ }
+
+#endif
#endif /* CONFIG_BLUETOOTH_PAN */
=20
#endif /* CONFIG_BLUETOOTH_PROC */
|
|
From: Willy S. <sag...@us...> - 2002-04-08 16:45:25
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- bt_proc.h 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added bt_proc proc file The diff of the modified file(s): --- bt_proc.h 15 Feb 2001 16:28:46 -0000 1.5 +++ bt_proc.h 8 Apr 2002 10:06:34 -0000 1.6 @@ -48,6 +48,9 @@ extern struct proc_dir_entry sdp_proc_entry; extern struct proc_dir_entry bt_status; extern struct proc_dir_entry bt_internal_info; +#ifdef BNEP_PROC +extern struct proc_dir_entry bnep_proc_entry; +#endif #else extern int bt_read_internal(u8 *buf); #endif |
|
From: Willy S. <sag...@us...> - 2002-04-08 16:45:07
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bnep.c 1.14 1.15=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added bnep_disconnect_req=20
The diff of the modified file(s):
--- bnep.c 21 Mar 2002 15:15:06 -0000 1.14
+++ bnep.c 8 Apr 2002 09:39:46 -0000 1.15
@@ -58,7 +58,7 @@
#include <linux/ioctl.h>
#include <linux/config.h>
#include <linux/module.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
@@ -117,6 +117,8 @@
=20
/****************** GLOBAL VARIABLE DECLARATION SECTION ******************=
***/
=20
+static s32 result_param_bnep;
+
/*************************** UPF TEST VARS *******************************=
***/
extern int dont_send_reply;
=20
@@ -1277,18 +1279,23 @@
if (l2ca_connect_rsp(l2cap, RES_NOSRC, STAT_NOINFO)) {
D_ERR("bnep_connect_ind: l2ca_connect_rsp failed\n");
}
+ result_param_bnep |=3D 0xff;
return;
}
=20=20=20
if (l2ca_connect_rsp(l2cap, RES_SUCCESS, STAT_NOINFO)) {
D_ERR("bnep_connect_ind: l2ca_connect_rsp failed\n");
+ result_param_bnep |=3D 0xff;
return;
}
=20=09
// l2cap->dev =3D &dev_bnep[i];
+ result_param_bnep =3D ((l2cap->hci_hdl<<8)&0x0ffff00) + ((i<<24)&0=
xff000000);
local->state =3D BNEP_CONFIG;
local->initiator =3D 0;
l2cap->upper_con =3D (void *)&dev_bnep[i];
+
+ result_param_bnep &=3D 0xffffff00;
}
=20
static void
@@ -1474,7 +1481,33 @@
return -1;
}
=20=09
+ return result_param_bnep;
+}
+
+u32
+bnep_disconnect_req(u8 *bd_addr)
+{
+ struct net_local *local;
+ int i;
+
+ DSYS("BNEP: Shutting down BD_ADDR %02x:%02x:%02x:%02x:%02x:%02x\n",
+ bd_addr[0],bd_addr[1],bd_addr[2],bd_addr[3],bd_addr[4],bd_addr[5]);
+=20=09
+ for (i =3D 0; i < BNEP_INTERFACES; i++) {
+ local =3D dev_bnep[i].priv;
+ if (local !=3D NULL && local->l2cap !=3D NULL && local->l2cap->remote_bd=
!=3D NULL)
+ if (memcmp(local->l2cap->remote_bd, bd_addr, 6)) {
+ D_MISC("Disconnecting %s\n", dev_bnep[i].name);
+ if (l2ca_disconnect_req(local->l2cap)) {
+ D_ERR(__FUNCTION__": l2ca_connect_req failed\n");
+ return -1;
+ }
+ else
return 0;
+ }
+ }
+ DSYS("BNEP: bnep_disconnect_req bd_addr no found !!!\n");
+ return -1;
}
=20
s32
|
|
From: Willy S. <sag...@us...> - 2002-04-08 16:44:58
|
The following file was modified in linux/include/linux/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bnep.h 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added some new messages
The diff of the modified file(s):
--- bnep.h 8 Mar 2002 09:37:19 -0000 1.5
+++ bnep.h 8 Apr 2002 10:03:36 -0000 1.6
@@ -125,6 +125,12 @@
#define BNEP_MAX_MCAST_FILTER_RANGES 5
=20
/****************** TYPE DEFINITION SECTION ******************************=
***/
+#define ETH_ALEN 6
+
+typedef struct macaddr=20
+{
+ unsigned char addr[ETH_ALEN];
+} __attribute__ ((packed)) macaddr;
=20
/* structure used to reserve space in at bt_tx_buf for hci and l2cap heade=
rs */
typedef struct bnep_tx_buf=20
@@ -253,6 +259,72 @@
u16 bnep_response_msg;
} __attribute__ ((packed)) bnep_filter_response_msg;
=20
+
+/* BNEP proc messages */
+#ifdef BNEP_PROC
+typedef struct disconnect_msg
+{
+ u16 type;
+ u16 len;
+ void *reserved;
+ u16 connection_id;
+ macaddr addr;
+} __attribute__ ((packed)) disconnect_msg;
+
+
+typedef struct connect_msg
+{
+ u16 type;
+ u16 len;
+ void *reserved;
+ u16 connection_id;
+ macaddr addr;
+} __attribute__ ((packed)) connect_msg;
+
+
+typedef struct disconnected_msg
+{
+ u16 type;
+ u16 len;
+ void *reserved;
+ u16 connection_id;
+ macaddr addr;
+} __attribute__ ((packed)) disconnected_msg;
+
+
+typedef struct connected_msg
+{
+ u16 type;
+ u16 len;
+ void *reserved;
+ u16 connection_id;
+ macaddr addr;
+} __attribute__ ((packed)) connected_msg;
+
+typedef struct handover_req_msg
+{
+ u16 type;
+ u16 len;
+ void *reserved;
+ u16 connection_id;
+ macaddr addr;
+ u8 nap_bd_addr[6];
+ u16 time_window;
+ u16 time_delay;=20
+} __attribute__ ((packed)) handover_req_msg;
+
+
+typedef struct handover_rsp_msg
+{
+ u16 type;
+ u16 len;
+ void *reserved;
+ u16 connection_id;
+ macaddr addr;
+} __attribute__ ((packed)) handover_rsp_msg;
+#endif
+
+
/****************** EXPORTED FUNCTION DECLARATION SECTION ****************=
***/
=20
int bnep_init_module(void);
@@ -260,7 +332,7 @@
void bnep_init(void);
void bnep_shutdown(void);
u32 bnep_connect_req(u8* bd_addr);
-void bnep_disconnect_req(u8 line);
+u32 bnep_disconnect_req(u8* bd_addr);
u32 bnep_test(u8 *p);
void bnep_set_mac_address_all(u8 *addr);
s32 bnep_set_multicast_filter(u8 *filter);
@@ -268,6 +340,16 @@
=20
s32 bnep_status_create_proc_file(void);
s32 bnep_status_remove_proc_file(void);
+
+#ifdef BNEP_PROC
+s32 bnep_create_proc_file(void);
+static s32 bnep_remove_proc_file(void);
+
+s32 bnep_disconnected_msg(macaddr *addr);
+s32 bnep_connected_msg(macaddr *addr);
+s32 bnep_handover_req_received_msg(macaddr *addr);
+s32 bnep_handover_rsp_received_msg(macaddr *addr);
+#endif
=20
#endif
/****************** END OF FILE bnep.h ***********************************=
***/
|
|
From: Willy S. <sag...@us...> - 2002-04-08 16:44:09
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
hci.c 1.197 1.198=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added sniff, park and readnumbroadcast
The diff of the modified file(s):
--- hci.c 15 Mar 2002 14:45:34 -0000 1.197
+++ hci.c 8 Apr 2002 09:58:37 -0000 1.198
@@ -47,7 +47,7 @@
#ifdef __KERNEL__
#include <linux/config.h>
#include <linux/bluetooth/sysdep-2.1.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
#include <linux/timer.h>
#include <linux/bluetooth/hci.h>
#include <linux/bluetooth/hci_internal.h>
@@ -195,7 +195,6 @@
=20
/* Link Policy Commands */
static s32 role_discovery(u16 con_hdl);
-static s32 write_link_policy_settings(u16 con_hdl, u16 settings);
=20
/* Host Controller and Baseband Commands */
static s32 write_inquiryscan_activity(u32 interval, u32 wind);
@@ -300,22 +299,25 @@
static u8 hci_inq_aborted =3D 0;
=20
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
-struct wait_queue *hci_wq =3D NULL;
struct wait_queue *inq_wq =3D NULL;
struct wait_queue *set_baudrate_wq =3D NULL;
struct wait_queue *test_wq =3D NULL;
struct wait_queue *get_name_wq =3D NULL;
+struct wait_queue *read_clk_wq =3D NULL;
+struct wait_queue *hci_wq =3D NULL;
#else
wait_queue_head_t hci_wq;
wait_queue_head_t inq_wq;
wait_queue_head_t set_baudrate_wq;
wait_queue_head_t test_wq;
wait_queue_head_t get_name_wq;
+wait_queue_head_t read_clk_wq;
#endif /* LINUX_VERSION_CODE */
=20
static s32 test_wq_active =3D 0;
=20
static s32 result_param;
+static u32 result_param_offset;
=20
static struct inquiry_results *inq_res =3D NULL;
=20
@@ -888,7 +890,7 @@
remote_name_request(buf + 3, 0);
=20
/* enable m/s switch */=20
- write_link_policy_settings(hci_hdl, 0x01);
+ hci_write_link_policy_settings(hci_hdl, 0x01);
/* we demand role switch as server */
if (force_msswitch && !i_am_initiator) {
/* FIXME -- check return code */
@@ -948,7 +950,6 @@
hci_ctrl.acl_buf_count[hci_hdl], hci_hdl);
hci_ctrl.hc_buf.acl_num +=3D hci_ctrl.acl_buf_count[hci_hdl];
hci_ctrl.acl_buf_count[hci_hdl] =3D 0;
-
#ifdef __KERNEL__
/* Trigger the send task to start sending data. */
if (buf_count()) {=09=20=20=20=20=20
@@ -1180,6 +1181,20 @@
=20
case READ_CLOCK_OFFSET_COMPLETE:
D_CMD(__FUNCTION__ ": READ_CLOCK_OFFSET_COMPLETE\n");
+
+ if (buf[0]) {=20
+ D_ERR(__FUNCTION__ ": Read clock offset failed due to %s\n",
+ get_err_msg(buf[0]));
+ result_param_offset =3D 0x0ff<<16; //Insert -1 in the third byte, erro=
r to read clk offset
+ } else {
+ result_param_offset =3D (0x0ff&buf[3]) + (0x0ff00&(buf[4]<<8));
+ DSYS(__FUNCTION__ ": Read clock offset result_param_offset =3D 0x%X\n"=
,=20
+ result_param_offset);
+ }
+
+#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,4,0)
+ wake_up_interruptible(&read_clk_wq);
+#endif /* LINUX_VERSION_CODE */
break;
=20
case CONNECTION_PACKET_TYPE_CHANGED:
@@ -1202,6 +1217,7 @@
process_vendor_event(buf, len, event_code);
break;
=20
+=09
default:
DSYS(__FUNCTION__ ": UNKNOWN EVENT CODE 0x%x\n", event_code);
break;
@@ -1247,7 +1263,6 @@
D_CMD(__FUNCTION__ ": LINK_KEY_REQUEST_REPLY Success\n");
result_param =3D 0;
}
-=09=09=09
wake_up_interruptible(&hci_wq);
break;
=20=09=09
@@ -1263,7 +1278,6 @@
D_CMD(__FUNCTION__ ": LINK_KEY_REQUEST_NEGATIVE_REPLY Success\n");
result_param =3D 0;
}
-=09=09=09
wake_up_interruptible(&hci_wq);
break;
=20=09=09
@@ -1279,7 +1293,6 @@
D_CMD(__FUNCTION__ ": PIN_CODE_REQUEST_REPLY Success\n");
result_param =3D 0;
}
-
wake_up_interruptible(&hci_wq);
break;
=20
@@ -1296,8 +1309,8 @@
D_CMD(__FUNCTION__ ": PIN_CODE_REQUEST_NEGATIVE_REPLY Success\n");
result_param =3D 0;
}
-
wake_up_interruptible(&hci_wq);
+=20
break;=09
=20
default:
@@ -1373,6 +1386,7 @@
break;
} else {
DSYS("READ_TRANSMIT_POWER_LEVEL: handle %d, %d dBm\n", hci_handle(&r_v=
al[1]), r_val[3]);
+ result_param =3D 0x0ff&r_val[3];
}
break;
=20
@@ -1514,15 +1528,35 @@
break;
=20=20=20=20=20=20=20=20=20=20=20=20=20
case SET_EVENT_FILTER:
+=20
D_CMD(__FUNCTION__ ": SET_EVENT_FILTER\n");
break;
=20=20=20=20=20=20=20=20=20=20=20=20=20
+ case READ_NUM_BROADCAST_RETRANSMISSIONS:
+ D_CMD(__FUNCTION__ ": READ_NUM_BROADCAST_RETRANSMISSIONS =
\n");
+=09=09=20=20=20=20=20=20=20=20
+ if (r_val[0]) {
+ D_ERR(__FUNCTION__ ": READ_NUM_BROADCAST_RETRANSMISSIONS: %s\n",
+ get_err_msg(r_val[0]));
+ } else {
+ result_param =3D r_val[1];
+ D_CMD(__FUNCTION__ ": READ_NUM_BROADCAST_RETRANSMISSIONS: num_b=
roadcast_retran =3D 0x%X\n",
+ result_param);
+ }
+ break;
+
+ case WRITE_NUM_BROADCAST_RETRANSMISSIONS:
+ D_CMD(__FUNCTION__ ": WRITE_NUM_BROADCAST_RETRANSMISSIONS \n ");
+ break;
+
+
default:
D_CMD(__FUNCTION__ ": HCI_HC, ocf %d not recognised!\n", ocf);
break;
}
/* FIX ME : Wake up from the correct queue */
wake_up_interruptible(&hci_wq);
+=20
break;
=20
case HCI_LP: /* Link policy commands */
@@ -1602,6 +1636,7 @@
#endif
#endif
wake_up_interruptible(&hci_wq);
+=20
break;
=20=20=20=20=20=20=20=20=20=20=20=20=20
case READ_BD_ADDR:
@@ -1622,6 +1657,31 @@
wake_up_interruptible(&hci_wq);
break;
=20=20=20=20=20=20=20=20=20=20=20
+ case HCI_SP:=09
+ release_cmd_timer();
+ switch (ocf) {=20=20
+ case READ_RSSI:
+ D_CMD(__FUNCTION__ ": READ_RSSI\n");
+ if (r_val[0]) {
+ D_ERR(__FUNCTION__ ": READ_RSSI: %s\n",
+ get_err_msg(r_val[0]));
+ result_param =3D 256;
+ break;
+ } else {
+ result_param =3D r_val[3];
+ D_CMD(__FUNCTION__ ": READ_RSSI : con_hdl=3D0x%X%X, RSSI_value=3D0x%X\=
n",
+ r_val[1], r_val[2], result_param);
+ }
+ break;
+ default:
+ D_ERR(__FUNCTION__ ": HCI_SP, ocf %d not recognised!\n", ocf);
+ break;
+ }
+ wake_up_interruptible(&hci_wq);
+=20
+ break;
+
+
case HCI_TC: /* Test Commands */
release_cmd_timer();
=20
@@ -1892,6 +1952,7 @@
init_waitqueue_head(&set_baudrate_wq);
init_waitqueue_head(&test_wq);
init_waitqueue_head(&get_name_wq);
+ init_waitqueue_head(&read_clk_wq);
sema_init(&hci_cmd_semaphore, 1);
sema_init(&hci_inq_semaphore, 1);
#endif /* LINUX_VERSION_CODE */
@@ -1905,6 +1966,32 @@
}
=20
s32
+hci_read_num_broadcast_restransmissions(void)
+{
+ s32 tmp;
+
+ c_pkt.type =3D CMD_PKT;
+ c_pkt.opcode =3D hci_put_opcode(READ_NUM_BROADCAST_RETRANSMISSIONS, HCI_H=
C);;
+ c_pkt.len =3D 0;
+=20=20
+ tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);
+=09
+ return tmp < 0 ? (-1)<<8 : result_param|(1<<8);
+}
+
+s32
+hci_write_num_broadcast_restransmissions(u8 num_broadcast_retran)
+{
+
+ c_pkt.type =3D CMD_PKT;
+ c_pkt.opcode =3D hci_put_opcode(WRITE_NUM_BROADCAST_RETRANSMISSIONS, HCI_=
HC);;
+ c_pkt.len =3D 1;
+ c_pkt.data[0] =3D num_broadcast_retran;
+
+ return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
+}
+
+s32
hci_init(void)
{
u32 i;
@@ -2426,7 +2513,7 @@
}
=20
s32
-write_link_policy_settings(u16 con_hdl, u16 settings)
+hci_write_link_policy_settings(u16 con_hdl, u16 settings)
{
D_CMD(__FUNCTION__ "\n");
=20
@@ -2855,6 +2942,7 @@
c_pkt.opcode =3D hci_put_opcode(SET_EVENT_FILTER, HCI_HC);
memcpy(c_pkt.data, data, len);
c_pkt.len =3D len;
+
return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
}
=20
@@ -2900,15 +2988,18 @@
s32
hci_read_power_transmit_level(u32 con_hdl, unsigned char type)
{
+ s32 tmp;
+
D_CMD(__FUNCTION__ "\n");
c_pkt.type =3D CMD_PKT;
- c_pkt.opcode =3D hci_put_opcode(READ_TRANSMIT_POWER_LEVEL, HCI_LP);
+ c_pkt.opcode =3D hci_put_opcode(READ_TRANSMIT_POWER_LEVEL, HCI_HC);
c_pkt.len =3D 3;
c_pkt.data[0] =3D con_hdl & 0xff;
c_pkt.data[1] =3D (con_hdl >> 8) & 0xff;
c_pkt.data[2] =3D type;
=20=09
- return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
+ tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI=
_HDR_LEN, DEFAULT_TIMEOUT);
+ return tmp<0 ? 2<<8 : result_param|(1<<8);
}
=20
/* The hci_host_buffer_size function is used by the Host to notify the Host
@@ -3000,6 +3091,8 @@
return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);
else
return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
+
+
}
=20
/* Defines of Informational Parameters function */
@@ -3116,13 +3209,14 @@
return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
}
=20
+
s32
-hci_sniff_mode(u16 hci_hdl, u16 max_int, u16 min_int, u16 attempt, u16 tim=
eout)
+hci_park_mode(u16 hci_hdl, u16 max_int, u16 min_int)
{=20=20
D_CMD(__FUNCTION__ ": for connnection handle 0x%x\n", hci_hdl);
=20
c_pkt.type =3D CMD_PKT;
- c_pkt.opcode =3D hci_put_opcode(SNIFF_MODE, HCI_LP);
+ c_pkt.opcode =3D hci_put_opcode(PARK_MODE, HCI_LP);
=20=09
c_pkt.data[0] =3D hci_hdl & 0xff;
c_pkt.data[1] =3D (hci_hdl >> 8) & 0xff;
@@ -3130,46 +3224,45 @@
c_pkt.data[3] =3D (max_int >> 8) & 0xff;
c_pkt.data[4] =3D min_int & 0xff;
c_pkt.data[5] =3D (min_int >> 8) & 0xff;
- c_pkt.data[6] =3D attempt & 0xff;
- c_pkt.data[7] =3D (attempt >> 8) & 0xff;
- c_pkt.data[8] =3D timeout & 0xff;
- c_pkt.data[9] =3D (timeout >> 8) & 0xff;
-=09
- c_pkt.len =3D 10;
+ c_pkt.len =3D 6;
=20
return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
}
=20
s32
-hci_exit_sniff_mode(u16 hci_hdl)
+hci_sniff_mode(u16 hci_hdl, u16 max_int, u16 min_int, u16 attempt, u16 tim=
eout)
{=20
D_CMD(__FUNCTION__ ": for connnection handle 0x%x\n", hci_hdl);
=20
c_pkt.type =3D CMD_PKT;
- c_pkt.opcode =3D hci_put_opcode(EXIT_SNIFF_MODE, HCI_LP);
+ c_pkt.opcode =3D hci_put_opcode(SNIFF_MODE, HCI_LP);
=20=09
c_pkt.data[0] =3D hci_hdl & 0xff;
c_pkt.data[1] =3D (hci_hdl >> 8) & 0xff;
- c_pkt.len =3D 2;
+ c_pkt.data[2] =3D max_int & 0xff;
+ c_pkt.data[3] =3D (max_int >> 8) & 0xff;
+ c_pkt.data[4] =3D min_int & 0xff;
+ c_pkt.data[5] =3D (min_int >> 8) & 0xff;
+ c_pkt.data[6] =3D attempt & 0xff;
+ c_pkt.data[7] =3D (attempt >> 8) & 0xff;
+ c_pkt.data[8] =3D timeout & 0xff;
+ c_pkt.data[9] =3D (timeout >> 8) & 0xff;
+ c_pkt.len =3D 10;
=20
return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
}
=20
s32
-hci_park_mode(u16 hci_hdl, u16 max_int, u16 min_int)
+hci_exit_sniff_mode(u16 hci_hdl)
{=20=20
D_CMD(__FUNCTION__ ": for connnection handle 0x%x\n", hci_hdl);
=20
c_pkt.type =3D CMD_PKT;
- c_pkt.opcode =3D hci_put_opcode(PARK_MODE, HCI_LP);
+ c_pkt.opcode =3D hci_put_opcode(EXIT_SNIFF_MODE, HCI_LP);
=20=09
c_pkt.data[0] =3D hci_hdl & 0xff;
c_pkt.data[1] =3D (hci_hdl >> 8) & 0xff;
- c_pkt.data[2] =3D max_int & 0xff;
- c_pkt.data[3] =3D (max_int >> 8) & 0xff;
- c_pkt.data[4] =3D min_int & 0xff;
- c_pkt.data[5] =3D (min_int >> 8) & 0xff;
- c_pkt.len =3D 6;
+ c_pkt.len =3D 2;
=20
return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
}
@@ -3340,22 +3433,29 @@
=20
s32 hci_read_clock_offset(u32 hdl)
{
+ s32 tmp;
+
c_pkt.type =3D CMD_PKT;
c_pkt.opcode =3D hci_put_opcode(READ_CLOCK_OFFSET, HCI_LC);
c_pkt.data[0] =3D (hdl & 0xff);
c_pkt.data[1] =3D ((hdl >> 8) & 0xff);
c_pkt.len =3D 2;
- return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
+ tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI=
_HDR_LEN, DEFAULT_TIMEOUT*HZ);=20
+ return tmp < 0 ? 2<<16 : result_param_offset|(1<<16);
}
=20
s32 hci_read_rssi(u32 hdl)
{
+ s32 tmp;
+
c_pkt.type =3D CMD_PKT;
c_pkt.opcode =3D hci_put_opcode(READ_RSSI, HCI_SP);
c_pkt.data[0] =3D (hdl & 0xff);
c_pkt.data[1] =3D ((hdl >> 8) & 0xff);
c_pkt.len =3D 2;
- return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
+ tmp =3D send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_L=
EN);
+=20=20=20=20=20=20=20=20
+ return (tmp<0)|(result_param=3D=3D256) ? 2<<8 : result_param|(1<<8=
);
}
=20
/* Sends a connect request to the BT unit with the address bd_addr */
@@ -4091,7 +4191,9 @@
=20=09
printk(__FUNCTION__ ": Timeout when waiting for command response\n");
hci_cmd_pending =3D 0;
+=20
wake_up_interruptible(&hci_wq);
+=20
}
#endif
=20
@@ -4149,25 +4251,18 @@
#else
DECLARE_WAITQUEUE(wait, current);
#endif
-
down(&hci_cmd_semaphore);
-=20
add_wait_queue(&hci_wq, &wait);
current->state =3D TASK_INTERRUPTIBLE;
-
#endif
hci_cmd_pending =3D 1;
-=20=20
start_cmd_timer(max_time);
-=09
tmp =3D send_cmd(cmd, len);
=20
#ifdef __KERNEL__
while (hci_cmd_pending)
schedule();
-
remove_wait_queue(&hci_wq, &wait);
-
up(&hci_cmd_semaphore);
#else
while (hci_cmd_pending)=09=09
|
|
From: Willy S. <sag...@us...> - 2002-04-08 16:44:07
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- hci.h 1.77 1.78=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added read/write num broadcast commands The diff of the modified file(s): --- hci.h 17 Mar 2002 16:14:39 -0000 1.77 +++ hci.h 8 Apr 2002 10:14:07 -0000 1.78 @@ -155,6 +155,7 @@ s32 hci_exit_sniff_mode(u16 hci_hdl); s32 hci_park_mode(u16 hci_hdl, u16 max_int, u16 min_int); s32 hci_exit_park_mode(u16 hci_hdl); +s32 hci_write_link_policy_settings(u16 con_hdl, u16 settings); s32 hci_switch_role(u8 *bd, u8 role); =20 /* Host Controller and Baseband Commands */ @@ -184,6 +185,9 @@ s32 hci_inquiry_cancel(void); s32 hci_read_clock_offset(u32 hdl); s32 hci_read_rssi(u32 hdl); +s32 hci_read_num_broadcast_restransmissions(void); +s32 hci_write_num_broadcast_restransmissions(u8 num_broadcast_retran); +=20 =20 /* Informational Parameters */ s32 hci_read_local_bd(u8 *bd); |
|
From: Willy S. <sag...@us...> - 2002-04-08 16:44:07
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- bt_if.h 1.32 1.33=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added new commands The diff of the modified file(s): --- bt_if.h 28 Feb 2002 20:08:31 -0000 1.32 +++ bt_if.h 8 Apr 2002 11:23:11 -0000 1.33 @@ -150,16 +150,24 @@ #define HCIAUTHENTICATION_REQUESTED _IOW(BT_IOC_MAGIC, 0x25, unsigned char= [6]) #define HCISETCONNECTION_ENCRYPTION _IOW(BT_IOC_MAGIC, 0x26, unsigned char= [7]) #define HCIREMOTENAME_REQUEST _IOW(BT_IOC_MAGIC, 0x27, unsigned char[255]) +#define HCIREADCLOCKOFFSET _IOWR(BT_IOC_MAGIC, 0x53, unsigned char[4]) =20 /* Link Policy Commands */ =20 #define HCISWITCHROLE _IOW(BT_IOC_MAGIC, 0x28, unsigned char[7]) +#define HCIPARKMODE _IOW(BT_IOC_MAGIC, 0x51, unsigned char[6]) +#define HCIEXITPARKMODE _IOW(BT_IOC_MAGIC, 0x52, unsigned char[4]) +#define HCISNIFFMODE _IOW(BT_IOC_MAGIC, 0x59, unsigned char[8]) +#define HCIEXITSNIFFMODE _IOW(BT_IOC_MAGIC, 0x5a, unsigned char[4]) +#define HCIWRITELINKPOLICYSETTINGS _IOW(BT_IOC_MAGIC, 0x5b, unsigned char[= 4]) +#define HCIHOLDMODE _IOW(BT_IOC_MAGIC, 0x5c, unsigned char[6]) =20 /* BNEP Control Commands */ -#define BNEPCONNECT _IOW(BT_IOC_MAGIC, 0x29, unsigned char[6]) +#define BNEPCONNECT _IOWR(BT_IOC_MAGIC, 0x29, unsigned char[6]) #define BNEPTEST _IOW(BT_IOC_MAGIC, 0x2a, unsigned char[5]) #define BNEPADDPROTOCOLFILTER _IOW(BT_IOC_MAGIC, 0x2b, unsigned int[2]) #define BNEPADDMULTICASTFILTER _IOW(BT_IOC_MAGIC, 0x2c, unsigned char[12]) +#define BNEPDISCONNECT _IOWR(BT_IOC_MAGIC, 0x2d, unsigned char[6]) =20 /* Host Controller & Baseband Commands */ =20 @@ -179,6 +187,12 @@ #define HCIREAD_ENCRYPTION_MODE _IOR(BT_IOC_MAGIC, 0x3d, int) #define HCIWRITE_ENCRYPTION_MODE _IOWR(BT_IOC_MAGIC, 0x3e, int) #define HCISET_EVENT_FILTER _IOW(BT_IOC_MAGIC, 0x3f, unsigned char[255]) +#define HCIREADNUMBROADCASTRETRANSMISSIONS _IOWR(BT_IOC_MAGIC, 0x55, unsig= ned char[2]) +#define HCIWRITENUMBROADCASTRETRANSMISSIONS _IOWR(BT_IOC_MAGIC, 0x56, unsi= gned char) +#define HCIWRITEPAGETO _IOW(BT_IOC_MAGIC, 0x54, unsigned char[4]) +#define HCIREADTRANSMITPOWERLEVEL _IOWR(BT_IOC_MAGIC, 0x57, unsigned char[= 3]) +#define HCIWRITELINKSUPERVISIONTO _IOW(BT_IOC_MAGIC, 0x58, unsigned char[8= ]) +=20 =20 /* Informational Parameters */ =20 @@ -186,6 +200,7 @@ #define HCIREADLOCALBDADDR _IOR(BT_IOC_MAGIC, 0x45, unsigned char[6]) =20 /* Status Parameters */ +#define HCIREADRSSI _IOWR(BT_IOC_MAGIC, 0x50, unsigned char[4]) =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 */ /* Testing Commands */ @@ -299,6 +314,14 @@ void set_bt_line_disc(int phys_fd, int bt_disc, char* physdev); =20 /*=20 + * BNEP functions + */ +#ifndef BTD_USERSTACK +void bnep_connect(int bt_fd, unsigned char *bd); +void bnep_disconnect(int bt_fd, unsigned char *bd); +#endif + +/*=20 * Connect/Disconnect functions=20 */ =20 @@ -344,6 +367,20 @@ =20 int bt_read_country_code(int bt_cfd); =20 +void bt_read_rssi(int bt_cfd, unsigned char* con_hdl); +void bt_park_mode(int bt_cfd, unsigned char* park_params); +void bt_exit_park_mode(int bt_cfd, unsigned char* con_hdl); +void bt_sniff_mode(int bt_cfd, unsigned char* park_params); +void bt_exit_sniff_mode(int bt_cfd, unsigned char* con_hdl); +void bt_read_clock_offset(int bt_cfd, unsigned char* con_hdl); +void bt_read_num_broadcast_rtx(int bt_cfd); +void bt_write_num_broadcast_rtx(int bt_cfd, unsigned char* num_rtx); +void bt_write_page_to(int bt_cfd, unsigned char* page_to); +void bt_read_tx_power_level(int bt_cfd, unsigned char* tx_power_level); +void bt_write_link_supervision_to(int bt_cfd, unsigned char* link_to); +void bt_write_page_scan_activity(int bt_cfd, unsigned char* page_scan); +void bt_write_link_policy_settings(int bt_cfd, unsigned char* policy_param= s); +void bt_hold_mode(int bt_cfd, unsigned char* hold_params); void enable_dut(int bt_cfd); =20 =20 |
|
From: Willy S. <sag...@us...> - 2002-04-08 16:43:57
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_if.c 1.44 1.45=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added new commands
The diff of the modified file(s):
--- bt_if.c 28 Feb 2002 20:08:31 -0000 1.44
+++ bt_if.c 8 Apr 2002 11:20:31 -0000 1.45
@@ -665,9 +665,313 @@
}
=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 */
+/* BNEP functions */
+
+
+void
+bnep_connect(int bt_fd, unsigned char *bd)
+{
+ unsigned int result;
+=20=20=20=20=20=20=20=20=20=20
+#ifndef BTD_USERSTACK
+ result =3D ioctl(bt_fd, BNEPCONNECT, bd);
+ if (result&0x0ff)
+ printf("Connect failed [%s ((0x%X))]\n", error_msg(result&0x0ff), resu=
lt);
+ else {
+ printf("Connected on con_hdl =3D %.2X:%.2X\n", bd[0], bd[1]);
+ printf("BNEP Interface =3D 0x%X\n", bd[2]);
+ }
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+=20
+void
+bnep_disconnect(int bt_fd, unsigned char *bd)
+{
+ int result;
+=20=20=20=20=20=20=20=20
+ #ifndef BTD_USERSTACK
+ result =3D ioctl(bt_fd, BNEPDISCONNECT, bd);
+ if (result)=20
+ printf("Disconnect failed [%s ((0x%X))]\n", error_msg(resul=
t&0x0ff), result&0x0ff);
+ else=20
+ printf("Disconnect OK\n");
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+
+
+
+/* =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 */
/* HCI functions */
=20
=20
+void
+bt_read_rssi(int bt_cfd, unsigned char* con_hdl)
+{
+
+#ifndef BTD_USERSTACK=20
+ if (ioctl(bt_cfd, HCIREADRSSI, con_hdl) < 0)
+ {
+ perror("read_rssi");
+ }
+ else
+ {
+ if (con_hdl[1] =3D=3D 2)
+ printf("RSSI level =3D 0x%X\n", con_hdl[0]);
+ else
+ printf("Not valid RSSI value !!!\n");
+ }
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+
+void
+bt_park_mode(int bt_cfd, unsigned char* park_params)
+{
+
+#ifndef BTD_USERSTACK=20
+ if (ioctl(bt_cfd, HCIPARKMODE, park_params) < 0)
+ {
+ perror("park_mode");
+ }
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+
+void
+bt_exit_park_mode(int bt_cfd, unsigned char* con_hdl)
+{
+
+#ifndef BTD_USERSTACK=20
+ if (ioctl(bt_cfd, HCIEXITPARKMODE, con_hdl) < 0)
+ {
+ perror("exit_park_mode");
+ }
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+
+void
+bt_sniff_mode(int bt_cfd, unsigned char* sniff_params)
+{
+
+#ifndef BTD_USERSTACK=20
+ if (ioctl(bt_cfd, HCISNIFFMODE, sniff_params) < 0)
+ {
+ perror("sniff_mode");
+ }
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+
+void
+bt_exit_sniff_mode(int bt_cfd, unsigned char* con_hdl)
+{
+
+#ifndef BTD_USERSTACK=20
+ if (ioctl(bt_cfd, HCIEXITSNIFFMODE, con_hdl) < 0)
+ {
+ perror("exit_sniff_mode");
+ }
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+
+void=20
+bt_hold_mode(int bt_cfd, unsigned char* hold_params)
+{
+#ifndef BTD_USERSTACK=20
+ if (ioctl(bt_cfd, HCIHOLDMODE, hold_params) < 0)
+ {
+ perror("hold mode");
+ }
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+
+void
+bt_write_link_policy_settings(int bt_cfd, unsigned char* policy_params)
+{
+
+#ifndef BTD_USERSTACK=20
+ if (ioctl(bt_cfd, HCIWRITELINKPOLICYSETTINGS, policy_params) < 0)
+ {
+ perror("write_link_policy_settings");
+ }
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+
+
+void
+bt_read_clock_offset(int bt_cfd, unsigned char* con_hdl)
+{
+
+#ifndef BTD_USERSTACK=20
+ if (ioctl(bt_cfd, HCIREADCLOCKOFFSET, con_hdl) < 0)
+ {
+ perror("read_rssi");
+ }
+ else
+ {
+ if ((char)con_hdl[2] >=3D 0)
+ printf("CLOCK OFFSET =3D 0x%X%X\n", con_hdl[1], con_hdl[0]);
+ else
+ printf("Not valid CLOCK OFFSET value !!!\n");
+ }
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+
+void
+bt_read_num_broadcast_rtx(int bt_cfd)
+{
+ unsigned char num_rtx[2];
+
+#ifndef BTD_USERSTACK=20
+ if (ioctl(bt_cfd, HCIREADNUMBROADCASTRETRANSMISSIONS, num_rtx) < 0)
+ {
+ perror("read_num_broadcast_rtx");
+ }
+ else
+ {
+ if ( (char)num_rtx[1] >=3D 0 )
+ printf("read num broadcast rtx =3D 0x%X\n", num_rtx[0]);
+ else
+ printf("Not valid BROADCAST RTX value =3D 0x%X !!!\n",num_rtx[1]);
+ }
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+
+void
+bt_write_num_broadcast_rtx(int bt_cfd, unsigned char* num_rtx)
+{
+
+#ifndef BTD_USERSTACK=20
+ if (ioctl(bt_cfd, HCIWRITENUMBROADCASTRETRANSMISSIONS, num_rtx) < 0)
+ {
+ perror("write_num_broadcast_rtx");
+ }
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+
+void
+bt_write_page_to(int bt_cfd, unsigned char* page_to)
+{
+
+#ifndef BTD_USERSTACK=20
+ if (ioctl(bt_cfd, HCIWRITEPAGETO, page_to) < 0)
+ {
+ perror("write_page_to");
+ }
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+
+void
+bt_read_tx_power_level(int bt_cfd, unsigned char* tx_power_level)
+{
+
+#ifndef BTD_USERSTACK=20
+ if (ioctl(bt_cfd, HCIREADTRANSMITPOWERLEVEL, tx_power_level) < 0)
+ {
+ perror("read_tx_power_level");
+ }
+ else
+ {
+ if ( (char)tx_power_level[1] =3D=3D 1 )
+ printf("read tx power level =3D 0x%X\n", tx_power_level[0]);
+ else
+ printf("Not valid TX POWER LEVEL value !!!\n");
+ }
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+
+void
+bt_write_link_supervision_to(int bt_cfd, unsigned char* link_to)
+{
+
+#ifndef BTD_USERSTACK=20
+ if (ioctl(bt_cfd, HCIWRITELINKSUPERVISIONTO, link_to) < 0)
+ {
+ perror("link_supervision_to");
+ }
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+
+
+
+
+void
+bt_write_page_scan_activity(int bt_cfd, unsigned char* page_scan)
+{
+
+#ifndef BTD_USERSTACK=20
+ printf("Setting write_pagescan_activity: p_s_int =3D 0x%X%X p_s_win=
=3D 0x%X
+%X\n",page_scan[0]&0x0FF, page_scan[1]&0x0FF, page_scan[4]&0x0FF, page_sca=
n[5]&0x0FF);
+=20=20
+ if (ioctl(bt_cfd, HCIWRITEPAGESCANACTIVITY, page_scan) < 0)
+ {=20
+ perror("write_page_scan_activity");
+ }
+#else
+ {=20=20
+ printf("Unsupported in usermode\n");
+ }
+#endif
+}
+
+
int
bt_inquiry(int bt_cfd, int nbr_rsp, int t)
{
@@ -756,6 +1060,10 @@
return result;
}
=20
+
+
+
+
void
read_local_bd(int bt_cfd, unsigned char *bd_addr)
{
@@ -1529,3 +1837,8 @@
return bt_initdone;
}
#endif /* BT_USERSTACK */
+
+
+
+
+
|
|
From: Willy S. <sag...@us...> - 2002-04-08 16:43:54
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- btcommon.h 1.94 1.95=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added new commands SNIFF,PARK,HOLD .... The diff of the modified file(s): --- btcommon.h 28 Feb 2002 20:09:27 -0000 1.94 +++ btcommon.h 8 Apr 2002 10:07:45 -0000 1.95 @@ -160,15 +160,23 @@ #define HCIAUTHENTICATION_REQUESTED _IOW(BT_IOC_MAGIC, 0x25, u8[6]) #define HCISETCONNECTION_ENCRYPTION _IOW(BT_IOC_MAGIC, 0x26, u8[7]) #define HCIREMOTENAME_REQUEST _IOW(BT_IOC_MAGIC, 0x27, u8[255]) +#define HCIREADCLOCKOFFSET _IOWR(BT_IOC_MAGIC, 0x53, u32) =20 /* Link Policy Commands */ #define HCISWITCHROLE _IOW(BT_IOC_MAGIC, 0x28, u8[7]) +#define HCIPARKMODE _IOW(BT_IOC_MAGIC, 0x51, u8[6]) +#define HCIEXITPARKMODE _IOW(BT_IOC_MAGIC, 0x52, u32) +#define HCISNIFFMODE _IOW(BT_IOC_MAGIC, 0x59, u8[8]) +#define HCIEXITSNIFFMODE _IOW(BT_IOC_MAGIC, 0x5a, u8[4]) +#define HCIWRITELINKPOLICYSETTINGS _IOW(BT_IOC_MAGIC, 0x5b, u8[4]) +#define HCIHOLDMODE _IOW(BT_IOC_MAGIC, 0x5c, u8[6]) =20 /* BNEP Control Commands */ -#define BNEPCONNECT _IOW(BT_IOC_MAGIC, 0x29, u8[6]) +#define BNEPCONNECT _IOWR(BT_IOC_MAGIC, 0x29, u8[6]) #define BNEPTEST _IOW(BT_IOC_MAGIC, 0x2a, u8[5]) #define BNEPADDPROTOCOLFILTER _IOW(BT_IOC_MAGIC, 0x2b, u32[2]) #define BNEPADDMULTICASTFILTER _IOW(BT_IOC_MAGIC, 0x2c, u8[12]) +#define BNEPDISCONNECT _IOWR(BT_IOC_MAGIC, 0x2d, u8[6]) =20 /* Host Controller & Baseband Commands */ #define HCIRESET _IO(BT_IOC_MAGIC, 0x30) @@ -187,7 +195,11 @@ #define HCIREAD_ENCRYPTION_MODE _IOR(BT_IOC_MAGIC, 0x3d, s32) #define HCIWRITE_ENCRYPTION_MODE _IOWR(BT_IOC_MAGIC, 0x3e, s32) #define HCISET_EVENT_FILTER _IOW(BT_IOC_MAGIC, 0x3f, u8[255]) -#define HCIREADTRANSMITPOWERLEVEL _IOWR(BT_IOC_MAGIC, 0x40, u8) +#define HCIREADTRANSMITPOWERLEVEL _IOWR(BT_IOC_MAGIC, 0x57, u8[3]) +#define HCIREADNUMBROADCASTRETRANSMISSIONS _IOWR(BT_IOC_MAGIC, 0x55, u8[2]) +#define HCIWRITENUMBROADCASTRETRANSMISSIONS _IOWR(BT_IOC_MAGIC, 0x56, u8) +#define HCIWRITEPAGETO _IOW(BT_IOC_MAGIC, 0x54, u32) +#define HCIWRITELINKSUPERVISIONTO _IOW(BT_IOC_MAGIC, 0x58, u32[2]) =20 /* Informational Parameters */ #define HCIREADCOUNTRYCODE _IOR(BT_IOC_MAGIC, 0x43, s32) |
|
From: Willy S. <sag...@us...> - 2002-04-08 16:30:05
|
The following file was modified in linux/include/linux/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bnep_internal.h 1.2 1.3=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20
The accompanying log:
Added some new messages
The diff of the modified file(s):
--- bnep_internal.h 6 Feb 2002 11:19:59 -0000 1.2
+++ bnep_internal.h 8 Apr 2002 10:04:44 -0000 1.3
@@ -47,14 +47,15 @@
#define BNEP_FLUSH_TIMEOUT 0
#define BNEP_MAX_MULTI 16
#define BNEP_MAGIC_NUMBER 0x53505254
+#define BNEP_DEFAULT_TIMEOUT 2
=20
/* Proc file cmd's */
-#define BNEP_PROC_DISCONNECT_MSG 1
-#define BNEP_PROC_CONNECT_MSG 2
-#define BNEP_PROC_DISCONNECTED_MSG 3
-#define BNEP_PROC_CONNECTED_MSG 4
-#define BNEP_PROC_SCAN_MSG 5
-
+#define BNEP_DISCONNECT_MSG 1
+#define BNEP_CONNECT_MSG 2
+#define BNEP_DISCONNECTED_MSG 3
+#define BNEP_CONNECTED_MSG 4
+#define BNEP_HANDOVER_REQ_RECEIVED_MSG 5
+#define BNEP_HANDOVER_RSP_RECEIVED_MSG 6
=20
/* BNEP session state */
#define DISCONNECTED 0
@@ -62,10 +63,6 @@
#define SETUP 2
#define CONNECTED 3
=20
-typedef struct macaddr=20
-{
- unsigned char addr[ETH_ALEN];
-} __attribute__ ((packed)) macaddr;
=20
=20
/* Information that need to be kept for each board. */
|
|
From: Willy S. <sag...@us...> - 2002-04-08 15:38:31
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bttest.c 1.25 1.26=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added new commands
The diff of the modified file(s):
--- bttest.c 7 Mar 2002 21:34:09 -0000 1.25
+++ bttest.c 8 Apr 2002 11:22:08 -0000 1.26
@@ -94,6 +94,21 @@
" force_ms <0/1>", /* force ms switch */
" role_switch <xx:xx:xx:xx:xx:xx> <role> (0=3Dmaster, 1=3Dslave)",
" stat ", /* similar to reading the /proc/bt */
+ " read_rssi <x:x>",
+ " park_mode <x:x> <x:x> <x:x> (Connection handle, Beacon Max Interval, =
Beacon Min Interval)",
+ " exit_park_mode <x:x> (Connection handle)",
+ " sniff_mode <x:x> <x:x> <x:x> (Connection handle, Sniff Max Interval, =
Sniff Min Interval, Attempt , Timeout)",
+ " exit_sniff_mode <x:x> (Connection handle)",
+ " hold_mode <x:x> <x:x> <x:x> (Connection handle, Hold Mode Max Interva=
l, Hold Mode Min Interval)",
+ " read_clk_offset <x:x> (Connection handl",
+ " read_num_broadcast_rtx",
+ " write_num_broadcast_rtx",
+ " write_page_to <x:x>",
+ " read_tx_power_level <x:x> <x> (Connection handle, Type)",
+ " write_link_supervision_to <x:x> <x:x>",
+ " write_scan_enable <x>",
+ " write_page_scan_activity <x:x> <x:x>",
+ " write_link_policy_settings <x:x> <x:x> ( Connection handle , link pol=
icy settings )",
#ifdef ECS_TEST_FUNCTIONS
" ecs_entertest <handle> (hex)",
" ecs_testctrl <par1,par2,...,par9> (hex)",
@@ -105,6 +120,8 @@
" upt <teststring>", /* e.g testcase 4.3 't 43' */
#ifdef CONFIG_BLUETOOTH_PAN
" bnep_test <param> <testcase>",
+ " bnep_conn <xx:xx:xx:xx:xx:xx>",
+ " bnep_disconnect <xx:xx:xx:xx:xx:xx>",
#endif
#endif
" quit",=20
@@ -215,7 +232,8 @@
=20=20=20
while (1)
{
- char *tmp_char, hotlist_entry;
+ char *tmp_char;
+ int hotlist_entry;
char tmp_line[200];
char *line =3D (char*) readline("> ");
add_history(line);
@@ -255,7 +273,7 @@
int
process_cmd(char *buf, int bt_cfd)
{
- unsigned int i, con_id, tmp[10], repeat, line =3D 0, profile, srv_ch;
+ unsigned int i, con_id, tmp[10], repeat, line =3D 0, srv_ch;
int retval =3D 0;
unsigned char bd[6];
=20
@@ -282,6 +300,174 @@
=20=20=20=20=20
retval =3D bt_connect(bt_cfd, bd, con_id);
}
+ else if (sscanf(buf, "bnep_conn %x:%x:%x:%x:%x:%x",
+ &tmp[0], &tmp[1], &tmp[2],
+ &tmp[3], &tmp[4], &tmp[5]) =3D=3D 6)
+ {
+ int i;
+ unsigned char tmp_bd[6];
+
+ for (i =3D 0; i < 6; i++)
+ {
+ tmp_bd[i] =3D (unsigned char)tmp[i];
+ }
+=20=20=20=20
+ bnep_connect(bt_cfd, tmp_bd);
+ }
+ else if (sscanf(buf, "bnep_disconn %x:%x:%x:%x:%x:%x",
+ &tmp[0], &tmp[1], &tmp[2],
+ &tmp[3], &tmp[4], &tmp[5]) =3D=3D 6)
+ {
+ int i;
+ unsigned char tmp_bd[6];
+
+ for (i =3D 0; i < 6; i++)
+ {
+ tmp_bd[i] =3D (unsigned char)tmp[i];
+ }
+=20=20=20=20
+ bnep_disconnect(bt_cfd, tmp_bd);
+ }
+ else if (sscanf(buf, "read_rssi %x:%x", &tmp[0], &tmp[1]) =3D=3D 2)
+ {
+ unsigned char tmp_rssi[4];
+=20=20=20=20
+ for (i =3D 0; i < 2; i++)
+ tmp_rssi[i] =3D (unsigned char)tmp[i];
+
+ bt_read_rssi(bt_cfd, tmp_rssi);
+ }
+ else if (sscanf(buf, "park_mode %x:%x %x:%x %x:%x",=20
+ &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5]) =3D=
=3D 6)
+ {
+ unsigned char tmp_park[6];
+
+ for (i =3D 0; i < 6; i++)
+ tmp_park[i] =3D (unsigned char)tmp[i];
+
+ bt_park_mode(bt_cfd, tmp_park);
+ }
+ else if (sscanf(buf, "exit_park_mode %x:%x", &tmp[0], &tmp[1]) =3D=3D 2)
+ {
+ unsigned char tmp_exit_park[4];
+
+ for (i =3D 0; i < 2; i++)
+ tmp_exit_park[i] =3D (unsigned char)tmp[i];
+
+ bt_exit_park_mode(bt_cfd, tmp_exit_park);
+ }
+ else if (sscanf(buf, "sniff_mode %x:%x %x:%x %x:%x %x:%x %x:%x",=20
+ &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5], &tm=
p[6], &tmp[7], &tmp[8],&tmp[9]) =3D=3D 10)
+ {
+ unsigned char tmp_sniff[10];
+
+ for (i =3D 0; i < 6; i++)
+ tmp_sniff[i] =3D (unsigned char)tmp[i];
+
+ bt_sniff_mode(bt_cfd, tmp_sniff);
+ }
+ else if (sscanf(buf, "exit_sniff_mode %x:%x", &tmp[0], &tmp[1]) =3D=3D 2)
+ {
+ unsigned char tmp_exit_sniff[4];
+
+ for (i =3D 0; i < 2; i++)
+ tmp_exit_sniff[i] =3D (unsigned char)tmp[i];
+
+ bt_exit_sniff_mode(bt_cfd, tmp_exit_sniff);
+ }
+ else if (sscanf(buf, "hold_mode %x:%x", &tmp[0], &tmp[1], &tmp[2], &tmp[=
3], &tmp[4], &tmp[5]) =3D=3D 6)
+ {
+ unsigned char tmp_hold[6];
+
+ for (i =3D 0; i < 6; i++)
+ tmp_hold[i] =3D (unsigned char)tmp[i];
+
+ bt_hold_mode(bt_cfd, tmp_hold);
+ }=20
+ else if (sscanf(buf, "write_link_policy_settings %x:%x %x:%x", &tmp[0], =
&tmp[1], &tmp[2], &tmp[3]) =3D=3D 4)
+ {
+ unsigned char tmp_policy[4];
+
+ for (i =3D 0; i < 4; i++)
+ tmp_policy[i] =3D (unsigned char)tmp[i];
+
+ bt_write_link_policy_settings(bt_cfd, tmp_policy);
+ }
+
+ else if (sscanf(buf, "read_clk_offset %x:%x", &tmp[0], &tmp[1]) =3D=3D 2)
+ {
+ unsigned char tmp_clk_offset[4];
+
+ for (i =3D 0; i < 2; i++)
+ tmp_clk_offset[i] =3D (unsigned char)tmp[i];
+
+ bt_read_clock_offset(bt_cfd, tmp_clk_offset);
+ }
+ else if (strcmp(buf, "read_num_broadcast_rtx") =3D=3D 0)
+ {
+ bt_read_num_broadcast_rtx(bt_cfd);
+ }
+ else if (sscanf(buf, "write_num_broadcast_rtx %x", &tmp[0]) =3D=3D 1)
+ {
+ unsigned char b_rtx;
+
+ b_rtx =3D tmp[0];
+
+ bt_write_num_broadcast_rtx(bt_cfd, &b_rtx);
+ }
+ else if (sscanf(buf, "write_page_to %x:%x", &tmp[0], &tmp[1]) =3D=3D 2)
+ {
+ unsigned char tmp_page_to[4];
+
+ for (i =3D 0; i < 2; i++)
+ tmp_page_to[i] =3D (unsigned char)tmp[i];
+
+ bt_write_page_to(bt_cfd, tmp_page_to);
+ }
+ else if (sscanf(buf, "read_tx_power_level %x:%x %x", &tmp[0], &tmp[1], &=
tmp[2
+]) =3D=3D 3)
+ {
+ unsigned char tmp_tx_power[3];
+
+ for (i =3D 0; i < 3; i++)
+ tmp_tx_power[i] =3D (unsigned char)tmp[i];
+
+ bt_read_tx_power_level(bt_cfd, tmp_tx_power);
+ }
+ else if (sscanf(buf, "write_link_supervision_to %x:%x %x:%x", &tmp[0], &=
tmp[1
+], &tmp[2], &tmp[3]) =3D=3D 4)
+ {
+ unsigned char tmp_link_to[8];
+
+ for (i =3D 0; i < 2; i++)
+ tmp_link_to[i] =3D (unsigned char)tmp[i];
+ for (i =3D 2; i < 4; i++)
+ tmp_link_to[i] =3D 0;
+ for (i =3D 4; i < 6; i++)
+ tmp_link_to[i] =3D (unsigned char)tmp[i-2];
+ for (i =3D 6; i < 8; i++)
+ tmp_link_to[i] =3D 0;
+
+ bt_write_link_supervision_to(bt_cfd, tmp_link_to);
+ }
+ else if (sscanf(buf, "write_scan_enable %x", &tmp[0]) =3D=3D 1)
+ {
+ unsigned int wrscan;
+
+ wrscan =3D tmp[0];
+ bt_write_scan_enable(bt_cfd, wrscan);
+ }
+ else if (sscanf(buf, "write_page_scan_activity %x:%x %x:%x",
+ &tmp[0], &tmp[1], &tmp[2], &tmp[3]) =3D=3D 4)
+ {
+ unsigned char wps_activity[8];
+
+ for (i =3D 0; i < 4; i++)
+ wps_activity[i+2*(i/2)] =3D tmp[i];
+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
+ bt_write_page_scan_activity(bt_cfd, wps_activity);
+ }
+
else if (sscanf(buf, "bt_wrscan %d", &tmp[0]) =3D=3D 1)
{
printf("Setting wr scan enable to %d\n", tmp[0]);
@@ -558,7 +744,7 @@
}
else if(strcmp(buf, "hotlist_show") =3D=3D 0)
{
- int i, j;
+ int i;
for(i =3D 0 ; i < 10 ; i++)
{
printf("%d: %02X:%02X:%02X:%02X:%02X:%02X\n", i,=20
@@ -574,19 +760,24 @@
return 0;
}
}=20
- else if(sscanf(buf, "remote_name %x:%x:%x:%x:%x:%x",=20=20
- &bd[0], &bd[1], &bd[2], &bd[3], &bd[4], &bd[5]) =3D=3D 6)
+ else if(sscanf(buf, "remote_name %02x:%02x:%02x:%02x:%02x:%02x",=20=20
+ &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5]) =3D=
=3D 6)
{
unsigned char remote_name[BT_NAME_LENGTH + 1];
- memcpy(&remote_name[0], &bd[0], 6);
+ int i;
=20=20=20=20=20
- if (retval =3D ioctl(bt_cfd, HCIREMOTENAME_REQUEST, &remote_name[0]))
+ for (i =3D 0; i < 6; i++)
+ {
+ remote_name[i] =3D (unsigned char)tmp[i];
+ }
+=20=20=20=20
+ if (ioctl(bt_cfd, HCIREMOTENAME_REQUEST, &remote_name[0]))
{
printf("Remote Name Request Failed (status %d)\n", retval);
return 0;
}
printf("Remote Name (%02X:%02X:%02X:%02X:%02X:%02X): %s\n",=20
- bd[0], bd[1], bd[2], bd[3], bd[4], bd[5], remote_name);
+ tmp[0], tmp[1], tmp[2], tmp[3], tmp[4], tmp[5], remote_name);
}
else if(strncmp(buf, "test_case_", 10) =3D=3D 0)
{
|
|
From: Alain P. <apa...@us...> - 2002-04-03 00:35:08
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- README_btsec.txt 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 The accompanying log: Change help for simple security manager The diff of the modified file(s): --- README_btsec.txt 18 Mar 2002 16:10:52 -0000 1.1 +++ README_btsec.txt 2 Apr 2002 13:46:42 -0000 1.2 @@ -20,7 +20,8 @@ =20 .../apps/bluetooth/experimental/btsec.c .../apps/bluetooth/experimental/btsec.h - +.../apps/bluetooth/experimental/bt_linkkey_common.c +.../apps/bluetooth/experimental/bt_linkkey_common.h =20 CONFIG TO SET IN OPENBT STACK =20 |
|
From: Alain P. <apa...@us...> - 2002-04-03 00:30:46
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- bt_linkkey_common.c 1.1 Added bt_linkkey_common.h 1.1 Added The accompanying log: Add files for compiling the simple security manager. |
|
From: Fredrik S. <fre...@us...> - 2002-03-21 15:15:11
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bnep.c 1.13 1.14=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Return correct network statistics for BNEP devices.
The diff of the modified file(s):
--- bnep.c 14 Mar 2002 13:44:07 -0000 1.13
+++ bnep.c 21 Mar 2002 15:15:06 -0000 1.14
@@ -373,7 +373,8 @@
static struct net_device_stats *
bnep_get_stats(struct net_device *dev)
{
- return (struct net_device_stats *)dev->priv;
+ struct net_local *local =3D (struct net_local *) dev->priv;
+ return &local->stats;
}
=20
/*
|
|
From: Alain P. <apa...@us...> - 2002-03-18 16:10:54
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- README_btsec.txt 1.1 Added btsec.c 1.1 Added btsec.h 1.1 Added The accompanying log: Add files that implement a simple security manager |
|
From: Peter K. <pk...@us...> - 2002-03-17 16:14:40
|
The following file was modified in linux/include/linux/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
hci.h 1.76 1.77=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
The HCI_IN_SIZE need to be at least the size of an Ethernet frame
plus some extra bytes when PAN is used.
The diff of the modified file(s):
--- hci.h 28 Feb 2002 20:09:27 -0000 1.76
+++ hci.h 17 Mar 2002 16:14:39 -0000 1.77
@@ -72,7 +72,12 @@
#ifdef CONFIG_BLUETOOTH_UNPLUG_TEST
#define HCI_IN_SIZE 16386
#else
+#ifdef CONFIG_BLUETOOTH_PAN
+/* Need to be at least the size of an Ethernet frame plus some extra bytes=
*/
+#define HCI_IN_SIZE 1600
+#else
#define HCI_IN_SIZE 800
+#endif
#endif
/* Struct defining a HCI command packet, the meaning of the type field is
decribed in part H:4 chapter 2 in the baseband core specification. The
|
|
From: Fredrik S. <fre...@us...> - 2002-03-15 14:45:36
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
hci.c 1.196 1.197=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Fixed problem with send task stopping to send data after a client has disco=
nnected ungracefully.
The diff of the modified file(s):
--- hci.c 14 Mar 2002 14:25:03 -0000 1.196
+++ hci.c 15 Mar 2002 14:45:34 -0000 1.197
@@ -949,9 +949,18 @@
hci_ctrl.hc_buf.acl_num +=3D hci_ctrl.acl_buf_count[hci_hdl];
hci_ctrl.acl_buf_count[hci_hdl] =3D 0;
=20
- /* get_bt_buf removes flushed buffers if located in=20
- queue head */
- get_bt_buf();
+#ifdef __KERNEL__
+ /* Trigger the send task to start sending data. */
+ if (buf_count()) {=09=20=20=20=20=20
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
+ queue_task(&send_data_task, &tq_scheduler);
+#else
+ queue_task(&send_data_task, &tq_immediate);
+ mark_bh(IMMEDIATE_BH);
+#endif
+ }
+#endif
+
}
=20
/* FIXME: No more NBR_OF_COMPLETE_PACKETS will arrive for this
|
|
From: Fredrik S. <fre...@us...> - 2002-03-14 14:25:06
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
hci.c 1.195 1.196=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Remove btmem buffers occupied by HCI handles that disconnects ungracefully.
The diff of the modified file(s):
--- hci.c 7 Mar 2002 21:32:29 -0000 1.195
+++ hci.c 14 Mar 2002 14:25:03 -0000 1.196
@@ -948,6 +948,10 @@
hci_ctrl.acl_buf_count[hci_hdl], hci_hdl);
hci_ctrl.hc_buf.acl_num +=3D hci_ctrl.acl_buf_count[hci_hdl];
hci_ctrl.acl_buf_count[hci_hdl] =3D 0;
+
+ /* get_bt_buf removes flushed buffers if located in=20
+ queue head */
+ get_bt_buf();
}
=20
/* FIXME: No more NBR_OF_COMPLETE_PACKETS will arrive for this
|
|
From: Anders J. <and...@us...> - 2002-03-14 13:44:10
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bnep.c 1.12 1.13=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Replaced memcmp with homemade variant as the memcmp in kernel=20
doesn't return the correct values.
The diff of the modified file(s):
--- bnep.c 13 Mar 2002 09:56:11 -0000 1.12
+++ bnep.c 14 Mar 2002 13:44:07 -0000 1.13
@@ -149,6 +149,10 @@
static void bnep_receive_packet(l2cap_con *l2cap, u8 *data, u32 len);
static int bnep_control(l2cap_con *l2cap, u8 *data, u8 bnep_control_type);
=20
+/* Misc functions */
+s32 check_filter(unsigned char *filter1, unsigned char *filter2, u16 size);
+
+
/****************** FUNCTION DEFINITION SECTION **************************=
***/
=20
/*=20
@@ -285,6 +289,7 @@
local->filter_list[1] =3D 0xffff;
=20=09
/* Accept all multicast packets */
+ memset(&local->filter_multi_addr_list[0].addr[0], 0x00, 6);
memset(&local->filter_multi_addr_list[1].addr[0], 0xff, 6);
=20=09
local->state =3D DISCONNECTED;
@@ -461,6 +466,8 @@
return 0;
}
=20=09
+
+=09
/* Check multicast filters */
if (eth->h_dest[0] & 1) {
D_XMIT(__FUNCTION__": Multicast packet, dest =3D %02x:%02x:%02x:%02x:%02=
x:%02x\n",=20
@@ -471,8 +478,9 @@
/* Step through filter range by filter range */
for (i =3D 0; (i < BNEP_MAX_MCAST_FILTER_RANGES) && (!send_packet); i++)=
{
D_MISC(__FUNCTION__": Trying multicast filter range %d\n", i);
- if (memcmp(local->filter_multi_addr_list[i*2].addr, eth->h_dest, 6) >=
=3D 0 &&
- memcmp(local->filter_multi_addr_list[i*2+1].addr, eth->h_dest, 6) <=
=3D 0) {
+
+ if (check_filter(local->filter_multi_addr_list[i*2].addr, eth->h_dest, =
6) <=3D 0 &&
+ check_filter(local->filter_multi_addr_list[i*2+1].addr, eth->h_dest=
, 6) >=3D 0) {
D_MISC(__FUNCTION__": Multicast filter range %d OK\n",i);
send_packet =3D 1;
}
@@ -1466,4 +1474,16 @@
}
=20=09
return 0;
+}
+
+s32
+check_filter(unsigned char *filter1, unsigned char *filter2, u16 size)
+{
+ int retval =3D 0;
+ const unsigned char *val1, *val2;
+
+ for( val1 =3D filter1, val2 =3D filter2 ; 0 < size; ++val1, ++val2=
, size--)
+ if ((retval =3D *val1 - *val2) !=3D 0)
+ break;
+ return retval;
}
|
|
From: Fredrik S. <fre...@us...> - 2002-03-13 09:56:12
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bnep.c 1.11 1.12=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Disabled a debug printout.
The diff of the modified file(s):
--- bnep.c 8 Mar 2002 09:41:42 -0000 1.11
+++ bnep.c 13 Mar 2002 09:56:11 -0000 1.12
@@ -339,7 +339,7 @@
{
struct sockaddr *addr =3D p;
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
- DSYS("%s: changed MAC to %02x:%02x:%02x:%02x:%02x:%02x\n", dev->name,
+ D_MISC("%s: changed MAC to %02x:%02x:%02x:%02x:%02x:%02x\n", dev->name,
dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],=20
dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
return 0;
@@ -599,7 +599,7 @@
=20
D_XMIT("buflen %i\n",buflen);
if (buf_write_room() < buflen) {
- D_ERR(__FUNCTION__": not enough room for a %d byte bt_tx_buf\n", skb->le=
n);
+ D_XMIT(__FUNCTION__": not enough room for a %d byte bt_tx_buf\n", skb->l=
en);
/* 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++;
|
|
From: Fredrik S. <fre...@us...> - 2002-03-08 13:18:19
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- .cvsignore 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added btping. The diff of the modified file(s): --- .cvsignore 27 Apr 2001 18:34:35 -0000 1.3 +++ .cvsignore 8 Mar 2002 13:18:18 -0000 1.4 @@ -7,3 +7,4 @@ btdisc bttest btconfig +btping |
|
From: Fredrik S. <fre...@us...> - 2002-03-08 09:41:42
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bluetooth.c 1.224 1.225=20=20=20=20=20=20=20=20=20=20=20
bnep.c 1.10 1.11=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
If BD address is changed also change MAC address of all BNEP interfaces.
The diff of the modified file(s):
--- bluetooth.c 28 Feb 2002 20:12:14 -0000 1.224
+++ bluetooth.c 8 Mar 2002 09:41:42 -0000 1.225
@@ -258,15 +258,6 @@
void bt_linebuf_send(s32 line);
#endif
=20
-#ifdef CONFIG_BLUETOOTH_PAN
-void bnep_init(void);
-void bnep_shutdown(void);
-u32 bnep_connect_req(u8 *bd_addr);
-u32 bnep_test(u8 *p);
-u32 bnep_set_multicast_filter(u8 *filter);
-u32 bnep_set_protocol_filter(u16 *filter);
-#endif
-
/****************** GLOBAL VARIABLE DECLARATION SECTION ******************=
***/
=20
extern hci_controller hci_ctrl;
@@ -1034,11 +1025,18 @@
}
=20=09
case HCIWRITEBDADDR:
+ {
copy_from_user(&bd_addr, (s32*)arg, size);
BT_DRIVER(__FUNCTION__ ": Setting BD_ADDR to\n");
print_data("bd:",(u8*)bd_addr,6);
hci_set_bd_addr(bd_addr);
+
+#ifdef CONFIG_BLUETOOTH_PAN
+ bnep_set_mac_address_all(bd_addr);
+#endif
+
break;
+ }
=20=09=09
/* | len (1) | hci header (4) | data (max 256)| */
case HCISENDRAWDATA:
--- bnep.c 25 Feb 2002 14:28:18 -0000 1.10
+++ bnep.c 8 Mar 2002 09:41:42 -0000 1.11
@@ -204,8 +204,8 @@
void
bnep_init(void)
{
- int i, j;
- char temp[8];
+ int i;
+ char temp[6];
=20=09
DSYS("Initializing BNEP\n");
=20=09
@@ -224,15 +224,13 @@
=20=09
/* Read BD address (converting to big endian) */
D_MISC("Read local BD addr\n");
- hci_read_local_bd(bd_addr);
+ hci_read_local_bd(temp);
for (i =3D 0; i < 6; i++) {
- temp[7-i] =3D bd_addr[i];
+ bd_addr[5-i] =3D temp[i];
}
=20=09
/* Set MAC address for all 7 interfaces. */
- for (j =3D 0; j < BNEP_INTERFACES; j++) {
- bnep_set_mac_address(&dev_bnep[j], &temp);
- }
+ bnep_set_mac_address_all(bd_addr);
=20
D_MISC("BNEP Initialized\n");
}
@@ -341,10 +339,27 @@
{
struct sockaddr *addr =3D p;
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
- D_MISC("%s: changed MAC to %02X:%02x:%02x:%02x:%02x:%02x\n", dev->name,
+ DSYS("%s: changed MAC to %02x:%02x:%02x:%02x:%02x:%02x\n", dev->name,
dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],=20
dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
return 0;
+}
+
+/*=20
+ * Set MAC address for all BNEP interfaces.
+ */
+void
+bnep_set_mac_address_all(u8 *addr)
+{
+ int j;
+ struct sockaddr saddr;
+
+ memcpy(saddr.sa_data, addr, 6);
+
+ /* Set MAC address for all 7 interfaces. */
+ for (j =3D 0; j < BNEP_INTERFACES; j++) {
+ bnep_set_mac_address(&dev_bnep[j], &saddr);
+ }
}
=20
/*
|
|
From: Fredrik S. <fre...@us...> - 2002-03-08 09:37:20
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bnep.h 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added some global function prototypes. The diff of the modified file(s): --- bnep.h 1 Mar 2002 12:47:00 -0000 1.4 +++ bnep.h 8 Mar 2002 09:37:19 -0000 1.5 @@ -258,9 +258,13 @@ int bnep_init_module(void); void bnep_exit_module(void); void bnep_init(void); +void bnep_shutdown(void); u32 bnep_connect_req(u8* bd_addr); void bnep_disconnect_req(u8 line); u32 bnep_test(u8 *p); +void bnep_set_mac_address_all(u8 *addr); +s32 bnep_set_multicast_filter(u8 *filter); +u32 bnep_set_protocol_filter(u16 *filter); =20 s32 bnep_status_create_proc_file(void); s32 bnep_status_remove_proc_file(void); |