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: Peter K. <pk...@us...> - 2001-04-26 15:58:15
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_misc.c 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20 bt_misc.h 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20 btd.c 1.10 1.11=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Renamed get_local_addr() to get_local_ip_address(), and improved the way it works. The diff of the modified file(s): --- bt_misc.c 2001/04/25 18:04:23 1.7 +++ bt_misc.c 2001/04/26 15:58:15 1.8 @@ -231,28 +231,33 @@ =20 =20 /*=20 - * Set server_name to the numerical IP of eth0 instead of using DNS or - * relying on /etc/hosts being correct. for now. + * Retrieve the numerical IP address of eth0 for now. */ -void get_local_addr(char *str) +char * get_local_ip_address(void) { - char *local_address =3D NULL; - int fd =3D socket(AF_INET, SOCK_DGRAM, 0); + int fd; struct ifreq ifr; - strcpy(ifr.ifr_name, "eth0"); - ioctl(fd, SIOCGIFADDR, (int)&ifr); - close(fd); - local_address =3D strdup(inet_ntoa(((struct sockaddr_in *) - &ifr.ifr_addr)->sin_addr)); + static char ip[20]; =20=20=20 - if (!local_address) + if ((fd =3D socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - syslog(LOG_INFO, "could not determine local IP address!\n"); + syslog(LOG_INFO, "Could not determine local IP address!"); + return "0.0.0.0"; } =20 - strcpy(str, local_address); + strcpy(ifr.ifr_name, "eth0"); + if (ioctl(fd, SIOCGIFADDR, (int)&ifr) < 0) + { + syslog(LOG_INFO, "Could not determine local IP address!"); + close(fd); + return "0.0.0.0"; + } =20 - free(local_address); + close(fd); + + strcpy(ip, inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr)); + + return ip; } =20 int=20 --- bt_misc.h 2001/04/04 10:43:04 1.4 +++ bt_misc.h 2001/04/26 15:58:15 1.5 @@ -58,7 +58,7 @@ int open_tcpsocket(char *addrstr, int role); =20 int write_pidfile(char *pidname); -void get_local_addr(char *str); +char *get_local_ip_address(void); const char* bd2str(const unsigned char *bd); #ifndef BT_USERSTACK void print_data(const char *message, unsigned char *buf, int len); --- btd.c 2001/04/25 17:58:24 1.10 +++ btd.c 2001/04/26 15:58:15 1.11 @@ -480,7 +480,7 @@ opts[i++] =3D "ktune"; /* enables ip_forwarding */ }=20=20 =20=20=20=20=20 - get_local_addr(local_ip); + strcpy(local_ip, get_local_ip_address()); /* local/remote ip */ sprintf(ip_addresses, "%s:%s", local_ip, inet_ntoa(ipset->ip)); =20=20=20=20=20 @@ -527,7 +527,7 @@ } else {=20=20=20=20 - get_local_addr(local_ip); + strcpy(local_ip, get_local_ip_address()); =20=20=20=20=20 /* local IP */ sprintf(ip_addresses, "%s:", local_ip); |
From: Ulf H. <ul...@us...> - 2001-04-26 14:07:12
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.h 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Corrected definition HCIREADSTOREDLINKKEY Added definition BT_GETCACHEDLINKKEY The diff of the modified file(s): --- bt_if.h 2001/04/26 10:53:17 1.6 +++ bt_if.h 2001/04/26 14:07:10 1.7 @@ -148,7 +148,7 @@ #define BTRESETPHYSICALHW _IO(BT_IOC_MAGIC, 0x08) #define BTISINITIATED _IOR(BT_IOC_MAGIC, 0x09, int) #define BTHWVENDOR _IOR(BT_IOC_MAGIC, 0x0A, char[20]) - +#define BT_GETCACHEDLINKKEY _IOWR(BT_IOC_MAGIC, 0x0e, unsigned char[22]) /* =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 */ /* Ioctls for executing HCI commands */ =20 @@ -171,7 +171,7 @@ #define HCIRESET _IO(BT_IOC_MAGIC, 0x30) #define HCIFLUSH _IO(BT_IOC_MAGIC, 0x31) #define HCICREATE_NEW_UNIT_KEY _IO(BT_IOC_MAGIC, 0x32) -#define HCIREADSTOREDLINKKEY _IOWR(BT_IOC_MAGIC, 0x33, unsigned char[6]) +#define HCIREADSTOREDLINKKEY _IOWR(BT_IOC_MAGIC, 0x33, unsigned char[7]) #define HCIWRITESTOREDLINKKEY _IOWR(BT_IOC_MAGIC, 0x34, unsigned char[22]) #define HCIDELETESTOREDLINKKEY _IOWR(BT_IOC_MAGIC, 0x35, unsigned char[7]) #define HCISETLOCALNAME _IOW(BT_IOC_MAGIC, 0x36, unsigned char[248]) |
From: Ulf H. <ul...@us...> - 2001-04-26 14:02:18
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- btd.h 1.36 1.37=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Corrected HCIREADSTOREDLINKKEY definition Added definition for BT_GETCACHEDLINKKEY The diff of the modified file(s): --- btd.h 2001/04/20 16:12:14 1.36 +++ btd.h 2001/04/26 14:02:18 1.37 @@ -65,6 +65,8 @@ #define BTISINITIATED _IOR(BT_IOC_MAGIC, 0x09, int) #define BTHWVENDOR _IOR(BT_IOC_MAGIC, 0x0A, char[20]) =20 +#define BT_GETCACHEDLINKKEY _IOWR(BT_IOC_MAGIC, 0x0e, unsigned char[22]) + /* ioctls executing HCI commands */ =20 /* Link Control Command */ @@ -83,7 +85,7 @@ #define HCIRESET _IO(BT_IOC_MAGIC, 0x30) #define HCIFLUSH _IO(BT_IOC_MAGIC, 0x31) #define HCICREATE_NEW_UNIT_KEY _IO(BT_IOC_MAGIC, 0x32) -#define HCIREADSTOREDLINKKEY _IOWR(BT_IOC_MAGIC, 0x33, unsigned char[6]) +#define HCIREADSTOREDLINKKEY _IOWR(BT_IOC_MAGIC, 0x33, unsigned char[7]) #define HCIWRITESTOREDLINKKEY _IOWR(BT_IOC_MAGIC, 0x34, unsigned char[22]) #define HCIDELETESTOREDLINKKEY _IOWR(BT_IOC_MAGIC, 0x35, unsigned char[7]) #define HCISETLOCALNAME _IOW(BT_IOC_MAGIC, 0x36, unsigned char[248]) @@ -126,7 +128,6 @@ =20 #define INQUIRY_SCAN_ENABLE 1 #define PAGE_SCAN_ENABLE 2 - #define SDP_LAYER 1 #define RFCOMM_LAYER 3 #define TCS_LAYER 5 |
From: Ulf H. <ul...@us...> - 2001-04-26 13:58:18
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- sec_client.c 1.17 1.18=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added sec_man_get_cached_link_key, list handling for cached link keys. Removed "magic" numbers The diff of the modified file(s): --- sec_client.c 2001/03/19 12:43:11 1.17 +++ sec_client.c 2001/04/26 13:58:18 1.18 @@ -96,10 +96,48 @@ #define SEC_MAN_SRV_SOCK "/tmp/sec_sock" #endif =20 +#define HCI_VALUE_RETURN_LINK_KEYS 0x15 +#define BD_ADDRESS_SIZE 6 +#define LINK_KEY_SIZE 16 +#define BUFFER_SIZE 256 #define MAX_EVENT_DATA_LENGTH 16 +#define MAX_LINKKEYLISTSIZE 255 /* for now */ =20 /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 +typedef struct link_key_information_type { + unsigned char bd_addr[BD_ADDRESS_SIZE]; + unsigned char link_key[LINK_KEY_SIZE]; +=09 + struct link_key_information_type *prev; + struct link_key_information_type *next; +} link_key_information_type; + +typedef struct link_key_list_type { + link_key_information_type *first; + link_key_information_type *last; + link_key_information_type *cur; + u32 count; +} link_key_list_type; + +enum originator_types { + BT_SEC_MAN, + SEC_CLIENT, + KERNEL +};=20 + +struct security_query { + u16 request_type; /* out */ + u32 request_value; /* out */ + u8 remote_bd[BD_ADDRESS_SIZE]; + /* out */ + u8 event_param[MAX_EVENT_DATA_LENGTH]; + /* out */ + u8 originator; /* out/in BT_SEC_MAN, SEC_CLIENT or KERNEL*/ + u32 originator_data; /* out/in con or rfcomm struct pointer */ + u16 request_result; /* in */=09 +} security_query; + /****************** LOCAL FUNCTION DECLARATION SECTION *******************= ***/ =20 #ifdef __KERNEL__ @@ -122,10 +160,22 @@ static s32 sec_man_doquery(s32 fd, u8 *request); #endif =20 + +void init_link_key_list(void); +void free_link_key_list(void); +link_key_information_type* create_link_key(unsigned char *bd_addr, + unsigned char *link_key_str); +link_key_information_type* get_first_link_key(void); +link_key_information_type* get_next_link_key(link_key_information_type* li= nk_key); +void insert_link_key(link_key_information_type *new_link_key); +s32 delete_link_key(link_key_information_type *link_key); + /****************** GLOBAL VARIABLE DECLARATION SECTION ******************= ***/ =20 /****************** LOCAL VARIABLE DECLARATION SECTION *******************= ***/ =20 +static link_key_list_type link_key_list; + #ifdef __KERNEL__ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) static struct wait_queue *sec_man_wq =3D NULL; @@ -231,23 +281,6 @@ =20 #endif /* __KERNEL__ */ =20 -enum originator_types { - BT_SEC_MAN, - SEC_CLIENT, - KERNEL -};=20 - -struct security_query { - u16 request_type; /* out */ - u32 request_value; /* out */ - u8 remote_bd[6]; /* out */ - u8 event_param[MAX_EVENT_DATA_LENGTH]; - /* out */ - u8 originator; /* out/in BT_SEC_MAN, SEC_CLIENT or KERNEL*/ - u32 originator_data; /* out/in con or rfcomm struct pointer */ - u16 request_result; /* in */=09 -} security_query; - #ifndef __KERNEL__ static s32 sec_man_sock; #endif @@ -270,11 +303,135 @@ #ifndef __KERNEL__ sec_man_sock =3D open_socket(SEC_MAN_SRV_SOCK); #endif + init_link_key_list(); =20 /* To indicate that nothing is ready */ security_query.originator =3D SEC_CLIENT;=20 } =20 +void +init_link_key_list(void) +{ + /* Init list */ + link_key_list.first =3D NULL; + link_key_list.last =3D NULL; + link_key_list.cur =3D NULL; + link_key_list.count =3D 0;=09 +} + +void=20 +free_link_key_list(void) +{ + while (link_key_list.count) + delete_link_key(link_key_list.first); +}=20 + +link_key_information_type*=20 +create_link_key(unsigned char *bd_addr, unsigned char *link_key_str) +{=20 + link_key_information_type *link_key; + + if (link_key_list.count =3D=3D MAX_LINKKEYLISTSIZE) { + D_ERR("Connection list full!\n"); + return NULL; + } + /* Add check if already in list ?? or rely on that otherwhere ?*/ +=20=20 + /* Allocate new element */ + if ((link_key =3D kmalloc(sizeof *link_key, GFP_ATOMIC)) < 0) { + D_ERR(__FUNCTION__ ": could not allocate new link key element\n"); + return NULL; + } +=09 + memcpy(link_key->bd_addr, bd_addr, BD_ADDRESS_SIZE); + memcpy(link_key->link_key, link_key_str, LINK_KEY_SIZE); + + link_key->next =3D link_key; + link_key->prev =3D link_key; + + return link_key; +} + +link_key_information_type* get_first_link_key(void) +{ + return link_key_list.first; +} + +link_key_information_type* get_next_link_key(link_key_information_type* li= nk_key) +{ + if (link_key->next =3D=3D link_key_list.first) + return NULL; + else + return link_key->next; +} + +void=20 +insert_link_key(link_key_information_type *new_link_key) +{ + link_key_information_type *old_link_key; + + if (!link_key_list.count) { + /* Empty list */ + D_PROC("Inserting into empty list\n"); + link_key_list.first =3D new_link_key;=20 + link_key_list.cur =3D new_link_key; + link_key_list.last =3D new_link_key; + link_key_list.count++; + + new_link_key->next =3D link_key_list.first; /* Pos32 at itself */ + new_link_key->prev =3D link_key_list.first; + + return; + } +=20=20 + /* Not empty */ + D_PROC("Inserting into list\n"); +=09 + old_link_key =3D link_key_list.first; /* mark oldlink_key first */ + new_link_key->next =3D old_link_key; + link_key_list.last->next =3D new_link_key; + old_link_key->prev =3D new_link_key; + new_link_key->prev =3D link_key_list.last; +=20=20 + link_key_list.cur =3D new_link_key; /* Set current to new element */ + link_key_list.first =3D new_link_key; /* Set first to new element */ + link_key_list.count++; +} + +s32=20 +delete_link_key(link_key_information_type *link_key) +{=20=20 + if (link_key_list.count =3D=3D 1) { + /* Last element */ + D_PROC("Deleting last element\n"); +=09=09 + link_key_list.count--; + link_key_list.first =3D NULL; + link_key_list.cur =3D NULL; + link_key_list.last =3D NULL; + kfree(link_key); + + return 0; + } + + D_PROC("Deleting element in list\n"); + link_key->prev->next =3D link_key->next; /* Take it out */ + link_key->next->prev =3D link_key->prev; +=20=20 + if (link_key_list.first =3D=3D link_key) /* Update first pointer */ + link_key_list.first =3D link_key->next; +=20=20 + if (link_key_list.last =3D=3D link_key) /* Update last pointer */ + link_key_list.last =3D link_key->prev; +=20=20 + link_key_list.cur =3D link_key->next; /* Update cur pointer */ + link_key_list.count--; +=20=20 + kfree(link_key);=20 + + return 0;=20=20 +} + #ifdef __KERNEL__ s32 sec_man_create_proc_file(void) @@ -357,7 +514,7 @@ =20 security_query.request_type =3D user; security_query.request_value =3D service_data; - memcpy(security_query.remote_bd, bd_addr, 6); + 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; @@ -379,16 +536,29 @@ { #define FNC "sec_man_event: " =20 + if (event =3D=3D HCI_VALUE_RETURN_LINK_KEYS) + { + /* Ok, link key has to be stored locally */ + link_key_information_type *link_key; + unsigned char link_key_str[LINK_KEY_SIZE]; +=09=09 + memcpy(link_key_str, param, LINK_KEY_SIZE); + 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); +=09=09 + } + else + { #ifndef __KERNEL__ if (sec_man_sock < 0) { /* What to do if no security manager present?? */ } #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; - memcpy(security_query.remote_bd, bd_addr, 6); + memcpy(security_query.remote_bd, bd_addr, BD_ADDRESS_SIZE); security_query.originator =3D BT_SEC_MAN; =20 if (param_len > MAX_EVENT_DATA_LENGTH) { @@ -407,10 +577,40 @@ #else sec_man_doquery(sec_man_sock, (u8*) &security_query); #endif -=09 + } #undef FNC=09 } =20 +void sec_man_get_cached_link_key(u8 *param) +{ + link_key_information_type *link_key; + + link_key =3D get_first_link_key(); +=09=09=09 + D_PROC("sec_man_get_cached_link_key: \n"); +=09=09=09 + if (link_key !=3D NULL) + { + memcpy(param, link_key->bd_addr, BD_ADDRESS_SIZE); + memcpy(param + BD_ADDRESS_SIZE, + link_key->link_key, + LINK_KEY_SIZE); + + D_PROC("Returning bd address %02x:%02x:%02x:%02x:%02x:%02x", + link_key->bd_addr[0], + link_key->bd_addr[1], + link_key->bd_addr[2], + link_key->bd_addr[3], + link_key->bd_addr[4], + link_key->bd_addr[5]); +=09=09 + delete_link_key(link_key); +=09=09 + } else { + memset(param, 0, BD_ADDRESS_SIZE + LINK_KEY_SIZE); + } +} + /* -------------------- Local functions --------------------------- */ #ifndef __KERNEL__ int open_socket(char *name) @@ -545,7 +745,7 @@ s32 sec_man_doquery(s32 fd, u8 *request) { s32 n; - u8 tmpbuf[256]; + u8 tmpbuf[BUFFER_SIZE]; struct security_query *sec_hdl; =20 sec_hdl =3D (struct security_query*) (request); @@ -553,7 +753,7 @@ syslog(LOG_INFO, "sec_man_doquery : sending request\n"); write(fd, request, sizeof(struct security_query)); =20=09 - n =3D read(fd, tmpbuf, 256); + n =3D read(fd, tmpbuf, BUFFER_SIZE); =20=09 /* what if not all is written once */ =20 |
From: Ulf H. <ul...@us...> - 2001-04-26 13:56:17
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- sec_client.h 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added sec_man_get_cached_link_key The diff of the modified file(s): --- sec_client.h 2001/03/19 17:06:00 1.8 +++ sec_client.h 2001/04/26 13:56:17 1.9 @@ -91,5 +91,7 @@ void sec_man_event(enum security_requests user, BD_ADDR bd_addr, u8 event, u8 *param, u8 param_len); =20=20 +void sec_man_get_cached_link_key(u8 *param); + #endif /****************** END OF FILE sec_client.h *****************************= ****/ |
From: Ulf H. <ul...@us...> - 2001-04-26 13:33:27
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- l2cap.c 1.106 1.107=20=20=20=20=20=20=20=20=20=20=20 l2cap_con.c 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Moved functions from l2cap_con to l2cap The diff of the modified file(s): --- l2cap.c 2001/04/25 17:12:48 1.106 +++ l2cap.c 2001/04/26 13:33:26 1.107 @@ -1847,6 +1847,43 @@ return result;=20=20=20=20 } =20 +/* only supports one call at a time */ +void +l2ca_wait(const char *str, l2cap_con *con) +{ + if (!(con->c_flags & FLAG_WAKEMEUP)) { + if (con->c_flags & FLAG_DONTSLEEP) { + printk("l2ca_wait : don't sleep flag set\n"); + return; + } + + con->c_flags |=3D FLAG_WAKEMEUP; + printk("%s, sleep on wq 0x%x\n", str, (int)&con->wq); + interruptible_sleep_on(&con->wq); + printk("%s, woke up !\n", str); + } else { + printk("%s, wq already in use\n", str); + } +} + +void=20 +l2ca_wakeup(const char *str, l2cap_con *con) +{ + if (con->c_flags & FLAG_WAKEMEUP) { + if (con->c_flags & FLAG_DONTSLEEP) { + printk("l2ca_wakeup : don't sleep flag set\n"); + con->c_flags &=3D ~FLAG_DONTSLEEP; + return; + } + + con->c_flags &=3D ~FLAG_WAKEMEUP; + printk("%s, wake up wq 0x%x\n", str,(int)&con->wq); + wake_up_interruptible(&con->wq); + } else { + printk("%s, wake up flag not set\n", str); + } +} + /*******************************************************************/ /* (E5) Timer events */ /********************/ --- l2cap_con.c 2001/04/19 10:31:34 1.9 +++ l2cap_con.c 2001/04/26 13:33:26 1.10 @@ -479,43 +479,6 @@ return sum; } =20 -/* only supports one call at a time */ -void -l2ca_wait(const char *str, l2cap_con *con) -{ - if (!(con->c_flags & FLAG_WAKEMEUP)) { - if (con->c_flags & FLAG_DONTSLEEP) { - printk("l2ca_wait : don't sleep flag set\n"); - return; - } - - con->c_flags |=3D FLAG_WAKEMEUP; - printk("%s, sleep on wq 0x%x\n", str, (int)&con->wq); - interruptible_sleep_on(&con->wq); - printk("%s, woke up !\n", str); - } else { - printk("%s, wq already in use\n", str); - } -} - -void=20 -l2ca_wakeup(const char *str, l2cap_con *con) -{ - if (con->c_flags & FLAG_WAKEMEUP) { - if (con->c_flags & FLAG_DONTSLEEP) { - printk("l2ca_wakeup : don't sleep flag set\n"); - con->c_flags &=3D ~FLAG_DONTSLEEP; - return; - } - - con->c_flags &=3D ~FLAG_WAKEMEUP; - printk("%s, wake up wq 0x%x\n", str,(int)&con->wq); - wake_up_interruptible(&con->wq); - } else { - printk("%s, wake up flag not set\n", str); - } -} - #if L2CAP_SELFTEST s32=20 remove_rcid(CID rcid) /* Searches for remote_cid */ |
From: Ulf H. <ul...@us...> - 2001-04-26 13:27:21
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.172 1.173=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added function to read cached link key The diff of the modified file(s): --- bluetooth.c 2001/04/25 17:39:13 1.172 +++ bluetooth.c 2001/04/26 13:27:21 1.173 @@ -539,7 +539,22 @@ =20 return returnValue; } +#ifdef CONFIG_BLUETOOTH_USE_SECURITY_MANAGER=20=20 + case BT_GETCACHEDLINKKEY: + { + unsigned char link_key_info[6 + 16]; =20 + /* Now execute the request */ + BT_DRIVER(FNC"Executing sec_man_get_cached_link_key\n"); + + sec_man_get_cached_link_key(link_key_info); + + BT_DRIVER(FNC"Copying data back to user space\n"); + copy_to_user((s32*)arg, link_key_info, 6 + 16); + + return 0; + } +#endif=20=20=20=20=20=20=20=20 case BTCONNECT:=20 { /* argument is an object with all info to start a remote=20 |
From: Ulf H. <ul...@us...> - 2001-04-26 13:23:29
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btcommon.h 1.73 1.74=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added function to read the cached link key via ioctl The diff of the modified file(s): --- btcommon.h 2001/04/25 17:52:02 1.73 +++ btcommon.h 2001/04/26 13:23:28 1.74 @@ -132,7 +132,7 @@ #define BTWAITNEWCONNECTIONS _IO(BT_IOC_MAGIC, 0x0b) #define BTISLOWERCONNECTED _IOW(BT_IOC_MAGIC, 0x0c, s32) #define BT_SDP_REQUEST _IOW(BT_IOC_MAGIC, 0x0d, bt_sdp_request) - +#define BT_GETCACHEDLINKKEY _IOWR(BT_IOC_MAGIC, 0x0e, u8[22]) =20 /* Ioctls executing HCI commands */ =20 |
From: Mattias A. <mat...@us...> - 2001-04-26 10:53:17
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.h 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * changed inparam to bt_set_event_filter The diff of the modified file(s): --- bt_if.h 2001/04/20 15:29:21 1.5 +++ bt_if.h 2001/04/26 10:53:17 1.6 @@ -310,7 +310,7 @@ void read_remote_bd(int bt_cfd, unsigned char *bd_addr); void role_switch(int bt_cfd, unsigned char *bd_addr, int role); =20 -int bt_set_event_filter(int bt_cfd, unsigned int filter); +int bt_set_event_filter(int bt_cfd, unsigned char filter[3]); int bt_write_scan_enable(int bt_cfd, unsigned int flags); void bt_write_pagescan_activity(int bt_cfd, unsigned int interval,=20 unsigned int wind); |
From: Mattias A. <mat...@us...> - 2001-04-26 10:52:31
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.c 1.11 1.12=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * now use inparam in bt_set_event_filter The diff of the modified file(s): --- bt_if.c 2001/04/25 18:05:52 1.11 +++ bt_if.c 2001/04/26 10:52:30 1.12 @@ -698,24 +698,18 @@ #endif } =20 -/* fixme<3> get filter from somewhere */ -int bt_set_event_filter(int bt_cfd, unsigned int filter) +int bt_set_event_filter(int bt_cfd, unsigned char filter[3]) { - unsigned char evfilter[3]; int result; =20 - evfilter[0] =3D 0x02; /* Connection setup */ - evfilter[1] =3D 0x00; /* All devices */ - evfilter[2] =3D 0x01; /* No auto accept */=20=20 - syslog(LOG_INFO, "Setting event filter [0x%1x 0x%1x 0x%1x]\n",=20 - evfilter[0], evfilter[1], evfilter[2]); + filter[0], filter[1], filter[2]); =20 #ifdef BT_USERSTACK - result =3D hci_set_event_filter((u8*)&evfilter); + result =3D hci_set_event_filter((u8*)&filter); #else =20 - if ((result =3D ioctl(bt_cfd, HCISET_EVENT_FILTER, &evfilter)) < 0) + if ((result =3D ioctl(bt_cfd, HCISET_EVENT_FILTER, &filter)) < 0) {=20 perror(__FUNCTION__); exit(1); |
From: Mattias A. <mat...@us...> - 2001-04-26 10:51:29
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_vendor.c 1.10 1.11=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * now use inparam in bt_set_event_filter * fixed default values when setting page scan activity * added include to string.h * use syslog for debug The diff of the modified file(s): --- bt_vendor.c 2001/04/25 18:01:57 1.10 +++ bt_vendor.c 2001/04/26 10:51:28 1.11 @@ -45,6 +45,7 @@ #include <termios.h> #include <syslog.h> #include <sys/ioctl.h> +#include <string.h> =20 #include "bt_misc.h" #include "bt_vendor.h" @@ -192,6 +193,8 @@ void ericsson_init_hw(int bt_cfd, int phys_fd, int spd) { + /* Connection setup, all devices, no auto accept */ + unsigned char filter[3] =3D { 0x02, 0x00, 0x01 }; unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE); =20 bt_write_scan_enable(bt_cfd, wrscan); @@ -199,7 +202,7 @@ sleep(1); =20 /* set_event_filter must be called for m/s switch on IrmaC! */ - bt_set_event_filter(bt_cfd, 0 /* inpars not used */); + bt_set_event_filter(bt_cfd, filter); =20 sleep(1); // wait for HW... =20 @@ -228,20 +231,22 @@ void csr_init_hw(int bt_cfd, int phys_fd, int spd) { + /* Connection setup, all devices, no auto accept */ + unsigned char filter[3] =3D { 0x02, 0x00, 0x01 }; unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE); =20 - printf("Setting write_scan_enable in CSR module!\n"); + syslog(LOG_INFO, "Setting write_scan_enable in CSR module!\n"); =20 bt_write_scan_enable(bt_cfd, wrscan); =20=20=20 /* improves reliability when doing a connect */ - printf("Setting write_pagescan_activity in CSR module!\n"); + syslog(LOG_INFO, "Setting write_pagescan_activity in CSR module!\n"); =20 - bt_write_pagescan_activity(bt_cfd, 0x50, 0x20); + bt_write_pagescan_activity(bt_cfd, 0x0800, 0x12); =20 sleep(1); =20 - bt_set_event_filter(bt_cfd, 0 /* inpars not used */); + bt_set_event_filter(bt_cfd, filter); =20 syslog(LOG_INFO, "Setting baudrate in CSR module!\n");=20=20 =20 @@ -268,7 +273,10 @@ void digianswer_init_hw(int bt_cfd, int phys_fd, int spd) { - printf("Setting baudrate in Digianswer PC card\n"); + /* Connection setup, all devices, no auto accept */ + unsigned char filter[3] =3D { 0x02, 0x00, 0x01 }; + + syslog(LOG_INFO, "Setting baudrate in Digianswer PC card\n"); =20 bt_set_baudrate(bt_cfd, spd); =20=20=20 @@ -277,7 +285,7 @@ printf("WARNING : Does this HW really support speeds > 115200 ?\n"); } =20=20=20 - bt_set_event_filter(bt_cfd, 0 /* inpars not used */); + bt_set_event_filter(bt_cfd, filter); =20 /* Now set phys device speed to whatever HW was set to use */ fd_setup(phys_fd, spd, USE_FLOW_CTRL);=20=20 @@ -298,20 +306,22 @@ void usb_init_hw(int bt_cfd, int phys_fd, int spd) { + /* Connection setup, all devices, no auto accept */ + unsigned char filter[3] =3D { 0x02, 0x00, 0x01 }; unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE); =20 - printf("Setting write_scan_enable in USB module!\n"); + syslog(LOG_INFO, "Setting write_scan_enable in USB module!\n"); =20 bt_write_scan_enable(bt_cfd, wrscan); =20=20=20 /* improves reliability when doing a connect */ - printf("Setting write_pagescan_activity in CSR module!\n"); + syslog(LOG_INFO, "Setting write_pagescan_activity in USB module!\n"); =20 - bt_write_pagescan_activity(bt_cfd, 0x8000, 0x12); + bt_write_pagescan_activity(bt_cfd, 0x0800, 0x12); =20 sleep(1); =20 - bt_set_event_filter(bt_cfd, 0 /* inpars not used */); + bt_set_event_filter(bt_cfd, filter); } =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*/ @@ -327,12 +337,14 @@ void generic_init_hw(int bt_cfd, int phys_fd, int spd) { + /* Connection setup, all devices, no auto accept */ + unsigned char filter[3] =3D { 0x02, 0x00, 0x01 }; unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE); =20 - printf("Setting write_scan_enable in generic module!\n"); + syslog(LOG_INFO, "Setting write_scan_enable in generic module!\n"); =20=20=20 bt_write_scan_enable(bt_cfd, wrscan); - bt_set_event_filter(bt_cfd, 0 /* inpars not used */); + bt_set_event_filter(bt_cfd, filter); } =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*/ |
From: Peter K. <pk...@us...> - 2001-04-26 08:32:39
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_vendor.c 1.28 1.29=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Corrected retun value from bt_hw_vendor() for USB and noinit. The diff of the modified file(s): --- hci_vendor.c 2001/04/25 17:42:10 1.28 +++ hci_vendor.c 2001/04/26 08:32:39 1.29 @@ -742,31 +742,30 @@ case CSR_CH_ID_HQ: switch (cmd->var_id)=20 { -=09=09=09 case CSR_VARID_RSSI_REPORT: { csr_rssi_rep *rep; rep =3D (csr_rssi_rep *)cmd->payload; DSYS("RSSI report, rssi : %d\n", rep->rssi); - } break; + } =20=09=09 case CSR_VARID_PACKET_STAT_REPORT: { csr_packstat_rep *rep; rep =3D (struct csr_packstat_rep*)cmd->payload; DSYS("Packet status report : n_pkts %d, n_good %d, n_corr %d, rssi %d, = rssi_valid %d\n", rep->n_pkts, rep->n_good, rep->n_corr, rep->rssi, rep->rs= si_valid); - } break; + } =20=09=09 case CSR_VARID_BITERR_REPORT: { csr_biterr_rep *rep; rep =3D (struct csr_biterr_rep*)cmd->payload; DSYS("Biterror report : index %d, val_last %d, val_tot %d\n", rep->inde= x, rep->val_last, rep->val_tot); + break; } } -=09=09 break; =20=09=09 default: @@ -905,10 +904,12 @@ char* bt_hw_vendor(void) { -#if defined(CONFIG_BLUETOOTH_USB) +#if defined(CONFIG_BLUETOOTH_USBMODULE) return "USB"; #elif defined(CONFIG_BLUETOOTH_GENERIC) return "Generic"; +#elif defined(CONFIG_BLUETOOTH_NOINIT) + return "No Init"; #else return "Unknown"; #endif |
From: Gordon M. <gm...@us...> - 2001-04-25 23:35:51
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- README 1.27 1.28=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: --Fixed a cut & paste error. The diff of the modified file(s): --- README 2001/04/25 23:32:00 1.27 +++ README 2001/04/25 23:35:50 1.28 @@ -400,7 +400,6 @@ Q: What is the difference between kernel mode and user mode? A: bt.o is the kernel mode driver. When you insmod bt.o you are inserting = it into the kernel, where it can cause bad things to happen if it screws u= p. - The user mode driver runs like an application. =20 btduser is the user mode driver. It runs as an application in user spac= e, where usually the worse thing that can happen is a segfault. You don't = have |
From: Gordon M. <gm...@us...> - 2001-04-25 23:32:01
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- README 1.26 1.27=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: --Added a FAQ The diff of the modified file(s): --- README 2001/03/04 17:54:54 1.26 +++ README 2001/04/25 23:32:00 1.27 @@ -395,7 +395,16 @@ 8) It does not work, what am I doing wrong?=20 -------------------------------------------- =20 -FIXME -- add FAQ=20 +FAQ=20 + +Q: What is the difference between kernel mode and user mode? +A: bt.o is the kernel mode driver. When you insmod bt.o you are inserting = it + into the kernel, where it can cause bad things to happen if it screws u= p. + The user mode driver runs like an application. + + btduser is the user mode driver. It runs as an application in user spac= e, + where usually the worse thing that can happen is a segfault. You don't = have + to insmod anything for user mode. You just run the application. =20 o If you are having troubles with trashed data on the UART please look=20 at http://developer.axis.com/download/bluetooth/uart_problems |
From: Mattias A. <mat...@us...> - 2001-04-25 18:13:05
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.94 1.95=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * re-added 10 ms sleep * changed write page scan activity values to default The diff of the modified file(s): --- btd.c 2001/04/20 16:12:14 1.94 +++ btd.c 2001/04/25 18:13:05 1.95 @@ -3347,6 +3347,7 @@ =20 printf("Setting baudrate in Ericsson module!\n");=20=20 hci_set_baudrate(spd);=20=20 + usleep(10000); /* needed for some reason... */ #endif } =20 @@ -3369,8 +3370,8 @@ unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE); unsigned char evfilter[3];=20 unsigned int tmp[2]; - tmp[0] =3D 0x50; - tmp[1] =3D 0x20; + tmp[0]=3D0x800; + tmp[1]=3D0x12; =20=20=20 sleep(1); printf("Setting write_scan_enable in CSR module!\n"); |
From: Mattias A. <mat...@us...> - 2001-04-25 18:05:52
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.c 1.10 1.11=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * use inpars when setting write scan enable The diff of the modified file(s): --- bt_if.c 2001/04/20 15:29:21 1.10 +++ bt_if.c 2001/04/25 18:05:52 1.11 @@ -502,7 +502,6 @@ int bt_force_msswitch_as_server(int bt_cfd, int enable) { int ret_val; - syslog(LOG_INFO, __FUNCTION__ ": %d", enable); #ifndef BT_USERSTACK=20 if ((ret_val =3D ioctl(bt_cfd, BTSETMSSWITCH, &enable)) !=3D 0) @@ -656,19 +655,16 @@ #endif } =20 -/* fixme<3> - get flags from somewhere */ int bt_write_scan_enable(int bt_cfd, unsigned int flags) { - unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE); int result; -=20=20 - syslog(LOG_INFO, "Setting write_scan_enable [0x%x]", wrscan); + syslog(LOG_INFO, "Setting write_scan_enable [0x%x]\n", flags); =20 #ifdef BT_USERSTACK - result =3D hci_write_scan_enable(wrscan); + result =3D hci_write_scan_enable(flags); #else =20 - if ((result =3D ioctl(bt_cfd, HCIWRITESCANENABLE, &wrscan)) < 0) + if ((result =3D ioctl(bt_cfd, HCIWRITESCANENABLE, &flags)) < 0) {=20 perror(__FUNCTION__); exit(1); @@ -727,6 +723,8 @@ #endif return result; } + + =20 void bt_set_classofdevice(int bt_cfd, unsigned short service_class, |
From: Mattias A. <mat...@us...> - 2001-04-25 18:04:24
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_misc.c 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * only use print_data when not running usermode stack The diff of the modified file(s): --- bt_misc.c 2001/04/11 12:24:22 1.6 +++ bt_misc.c 2001/04/25 18:04:23 1.7 @@ -342,6 +342,7 @@ return buf; } =20 +#ifndef BT_USERSTACK void=20 print_data(const char *message, unsigned char *buf, int len) {=20 @@ -356,6 +357,7 @@ } printf("\n"); } +#endif =20 /* Sets pin code to string pin, disabled if using 'disable' as pin */ void set_pin_code(char *pin) |
From: Mattias A. <mat...@us...> - 2001-04-25 18:01:59
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_vendor.c 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * readded 10 ms sleep after setting baud rate for ericsson * fixed using the inpar when setting write scan enable * added bt_write_pagescan_activity for CSR HW (using default values) * minor changes The diff of the modified file(s): --- bt_vendor.c 2001/04/20 16:11:35 1.9 +++ bt_vendor.c 2001/04/25 18:01:57 1.10 @@ -192,7 +192,9 @@ void ericsson_init_hw(int bt_cfd, int phys_fd, int spd) { - bt_write_scan_enable(bt_cfd, 0 /* inpars not used */); + unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE); + + bt_write_scan_enable(bt_cfd, wrscan); =20 sleep(1); =20 @@ -201,8 +203,9 @@ =20 sleep(1); // wait for HW... =20 - printf("Setting baudrate in Ericsson module!\n");=20=20 + syslog(LOG_INFO, "Setting baudrate in Ericsson module!\n");=20=20 bt_set_baudrate(bt_cfd, spd); + usleep(10000); =20=20=20 /* Now set phys device speed to whatever HW was set to use */ fd_setup(phys_fd, spd, USE_FLOW_CTRL); @@ -300,6 +303,14 @@ printf("Setting write_scan_enable in USB module!\n"); =20 bt_write_scan_enable(bt_cfd, wrscan); +=20=20 + /* improves reliability when doing a connect */ + printf("Setting write_pagescan_activity in CSR module!\n"); + + bt_write_pagescan_activity(bt_cfd, 0x8000, 0x12); + + sleep(1); + bt_set_event_filter(bt_cfd, 0 /* inpars not used */); } =20 |
From: Mattias A. <mat...@us...> - 2001-04-25 17:58:25
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added close of ipa_fd when shutting down * minor changes The diff of the modified file(s): --- btd.c 2001/04/18 14:02:24 1.9 +++ btd.c 2001/04/25 17:58:24 1.10 @@ -270,6 +270,7 @@ if (setjmp(jmpbuffer) !=3D 0) { syslog(LOG_INFO, "restart...\n\n\n\n"); + sleep(1); } =20=20=20 init(); @@ -781,7 +782,7 @@ static void btd_cleanup(void) { - printf("btd_cleanup\n"); + syslog(LOG_INFO, "btd_cleanup\n"); btd_killchilds(); =20=20=20 printf("shutdown_stack\n"); @@ -803,6 +804,15 @@ phys_fd =3D -1; } =20=20=20 +#ifdef USE_IPASSIGN + if (ipa_fd !=3D -1) + { + syslog(LOG_INFO, "closing IPA"); + tcflush(ipa_fd, TCIOFLUSH); + close(ipa_fd); + ipa_fd =3D -1; + } +#endif=20 /* pid_fd is set if we created the pid file when we started */ if (btd_pid !=3D -1) { |
From: Mattias A. <mat...@us...> - 2001-04-25 17:56:55
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bttest.c 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added command bt_wrscan which sets write scan enable * added force_ms which sets whether force m/s switch should be done The diff of the modified file(s): --- bttest.c 2001/04/04 10:43:04 1.6 +++ bttest.c 2001/04/25 17:56:54 1.7 @@ -90,6 +90,8 @@ " setbd <xx:xx:xx:xx:xx:xx>", /* only ericsson HW */ " readbd", /* read module bd address */ " reset", /* reset board */ + " bt_wrscan <mode>", + " 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 */ " testcmd <test string>", @@ -209,6 +211,11 @@ =20=20=20=20=20 bt_connect(bt_cfd, tmp_bd, con_id); } + else if (sscanf(buf, "bt_wrscan %d", &tmp[0]) =3D=3D 1) + { + printf("Setting wr scan enable to %d\n", tmp[0]); + bt_write_scan_enable(bt_cfd, tmp[0]); + } else if (sscanf(buf, "rf_disc %d", &line) =3D=3D 1) { unsigned int con_id; @@ -263,6 +270,11 @@ } =20=20=20 role_switch(bt_cfd, &tmp_bd[0], tmp[6]); + } + else if (sscanf(buf, "force_ms %d", &tmp[0]) =3D=3D 1) + { + printf("Setting force m/s switch to %d\n", tmp[0]); + bt_force_msswitch_as_server(bt_cfd, tmp[0]); } #ifdef ECS_TEST_FUNCTIONS else if (sscanf(buf, "ecs_testctrl %x,%x,%x,%x,%x,%x,%x,%x,%x", |
From: Mattias A. <mat...@us...> - 2001-04-25 17:54:07
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btconfig.h 1.24 1.25=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added CONFIG_BLUETOOTH_ENABLE_MSSWITCH and CONFIG_BLUETOOTH_FORCE_MSSWITCH The diff of the modified file(s): --- btconfig.h 2001/04/10 12:26:41 1.24 +++ btconfig.h 2001/04/25 17:54:07 1.25 @@ -69,6 +69,10 @@ #undef CONFIG_BLUETOOTH_USE_SECURITY_MANAGER #endif =20 +#undef CONFIG_BLUETOOTH_ENABLE_MSSWITCH + +#undef CONFIG_BLUETOOTH_FORCE_MSSWITCH + /* Bluetooth HW defines used to setup different HW and to cope with=20 limitations in HW */ =20 |
From: Mattias A. <mat...@us...> - 2001-04-25 17:52:03
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btcommon.h 1.72 1.73=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added pid in bt_session struct * added ioctl define for reading transmit power level * cleanup The diff of the modified file(s): --- btcommon.h 2001/04/20 14:33:07 1.72 +++ btcommon.h 2001/04/25 17:52:02 1.73 @@ -134,7 +134,7 @@ #define BT_SDP_REQUEST _IOW(BT_IOC_MAGIC, 0x0d, bt_sdp_request) =20 =20 -/* ioctls executing HCI commands */ +/* Ioctls executing HCI commands */ =20 /* Link Control Command */ #define HCIINQUIRY _IOWR(BT_IOC_MAGIC, 0x10, inquiry_results) @@ -148,7 +148,7 @@ /* Link Policy Commands */ #define HCISWITCHROLE _IOW(BT_IOC_MAGIC, 0x20, u8[7]) =20 -/* Host Controler & Basband Commands */ +/* Host Controller & Baseband Commands */ #define HCIRESET _IO(BT_IOC_MAGIC, 0x30) #define HCIFLUSH _IO(BT_IOC_MAGIC, 0x31) #define HCICREATE_NEW_UNIT_KEY _IOR(BT_IOC_MAGIC, 0x32, s32) @@ -165,6 +165,7 @@ #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[3]) +#define HCIREADTRANSMITPOWERLEVEL _IOWR(BT_IOC_MAGIC, 0x40, u8) =20 /* Informational Parameters */ #define HCIREADLOCALBDADDR _IOR(BT_IOC_MAGIC, 0x45, u8[6]) @@ -462,6 +463,7 @@ { /* general */ struct tty_struct *upper_tty; + unsigned int pid; volatile s32 connect_status; volatile s32 disconnect_status; /* hci link */ |
From: Mattias A. <mat...@us...> - 2001-04-25 17:46:11
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.h 1.53 1.54=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added hci_read_transmit_power_level The diff of the modified file(s): --- hci.h 2001/04/18 14:46:17 1.53 +++ hci.h 2001/04/25 17:46:11 1.54 @@ -62,7 +62,6 @@ /* check in l2cap that MTU doesn't exceed this value */ #define HCI_IN_SIZE 800 =20 - /* 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 other fields are described in section H:1 chapter 4.4.1 in the baseband @@ -135,6 +134,7 @@ s32 hci_write_link_supervision_to(u32 hdl, u32 link_to); s32 hci_write_class_of_device(u8 *class_of_device); s32 hci_set_event_filter(u8 *data); +s32 hci_read_power_transmit_level(u32 con_hdl, unsigned char type); =20 /* Informational Parameters */ s32 hci_read_local_bd(u8 *bd); |
From: Mattias A. <mat...@us...> - 2001-04-25 17:44:53
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- rfcomm.h 1.36 1.37=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * changed return type for rfcomm_connect_req *=A0added return code in rfcomm_disconnect_req The diff of the modified file(s): --- rfcomm.h 2001/04/10 12:26:41 1.36 +++ rfcomm.h 2001/04/25 17:44:53 1.37 @@ -191,7 +191,7 @@ =20 void rfcomm_init(void); void rfcomm_close(void); -u32 rfcomm_connect_req(u8* bd_addr, u8 server_chan, u8 line); +s32 rfcomm_connect_req(u8* bd_addr, u8 server_chan, u8 line); void rfcomm_connect_ind(l2cap_con *l2cap); void rfcomm_connect_pnd(l2cap_con *l2cap, int status); void rfcomm_connect_cfm(l2cap_con *l2cap, s32 status); @@ -201,7 +201,7 @@ void rfcomm_disconnect_cfm(l2cap_con *l2cap); void rfcomm_receive_data(l2cap_con *l2cap, u8 *data, u32 len); s32 rfcomm_send_data(u32 con_id, u8 *data, u32 count); -void rfcomm_disconnect_req(u8 line); +s32 rfcomm_disconnect_req(u8 line); void rfcomm_send_testdata(u32 count, u8 line); void rfcomm_print_status(void); s32 rfcomm_sprint_status(u8 *buf); |
From: Mattias A. <mat...@us...> - 2001-04-25 17:42:19
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_vendor.c 1.27 1.28=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added parsing of biterror/rssi/packet_stat reports (HQ message) The diff of the modified file(s): --- hci_vendor.c 2001/04/20 11:45:05 1.27 +++ hci_vendor.c 2001/04/25 17:42:10 1.28 @@ -262,7 +262,7 @@ void process_vendor_event(u8 *buf, u32 len, u32 event_code) { - D_ERR(__FUNCTION__ VENDOR " Vendor specicic event not recognized.\n"); + D_ERR(__FUNCTION__ VENDOR " Vendor specific event not recognized.\n"); } =20 char* @@ -328,6 +328,7 @@ return tmp; } =20 + u8* get_digi_err_code(u8 code) { @@ -455,6 +456,11 @@ #define CSR_UART_ODD_PARITY 0x4000 #define CSR_UART_EVEN_PARITY 0xc000 =20 +#define CSR_VARID_RSSI_REPORT 0x0801 +#define CSR_VARID_PACKET_STAT_REPORT 0x1001 +#define CSR_VARID_BITERR_REPORT 0x1006 + + typedef struct payload_descr { u8 ch_id:6; @@ -486,6 +492,27 @@ u16 ps_val[0]; } csr_bccmd_ps; =20 +typedef struct csr_rssi_rep +{=20=20 + u16 rssi; +} csr_rssi_rep; + +typedef struct csr_packstat_rep +{=20=20 + u16 n_pkts; + u16 n_good; + u16 n_corr; + u16 rssi; + u16 rssi_valid; +} csr_packstat_rep; + +typedef struct csr_biterr_rep +{=20=20 + u16 index; + u16 val_last; + u16 val_tot; +} csr_biterr_rep; + static u16 csr_count =3D 0; =20 s32=20 @@ -686,6 +713,7 @@ if (cmd->type =3D=3D CSR_MSGTYPE_GETRESP && cmd->status =3D=3D CSR_STATUS_OK) { switch (cmd->var_id) { + case CSR_CMD_CONFIG_UART: break; =20 @@ -712,9 +740,37 @@ break; =20 case CSR_CH_ID_HQ: + switch (cmd->var_id)=20 + { +=09=09=09 + case CSR_VARID_RSSI_REPORT: + { + csr_rssi_rep *rep; + rep =3D (csr_rssi_rep *)cmd->payload; + DSYS("RSSI report, rssi : %d\n", rep->rssi); + } break; =20 + case CSR_VARID_PACKET_STAT_REPORT: + { + csr_packstat_rep *rep; + rep =3D (struct csr_packstat_rep*)cmd->payload; + DSYS("Packet status report : n_pkts %d, n_good %d, n_corr %d, rssi %d, = rssi_valid %d\n", rep->n_pkts, rep->n_good, rep->n_corr, rep->rssi, rep->rs= si_valid); + } + break; +=09=09 + case CSR_VARID_BITERR_REPORT: + { + csr_biterr_rep *rep; + rep =3D (struct csr_biterr_rep*)cmd->payload; + DSYS("Biterror report : index %d, val_last %d, val_tot %d\n", rep->inde= x, rep->val_last, rep->val_tot); + } + } +=09=09 + break; +=09=09 default: + D_ERR("Unknown varid [0x%x]!\n", cmd->var_id); break; } =20 @@ -806,6 +862,7 @@ } =20 #else + /*************************************************************************= ****/ /************************* HW_NOINIT and HW_GENERIC **********************= ****/ /*************************************************************************= ****/ |