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: Mattias A. <mat...@us...> - 2001-08-02 15:45:36
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- rfcomm.c 1.116 1.117=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * fixed auto shutdown of all rfcomm connections if stack is taken=20 down during active sessions. * fixed bug in get_connected_dlci, now returns -1 if no connected=20 dlci was found. * added some fixme:s ... * cleanup The diff of the modified file(s): --- rfcomm.c 2001/07/09 09:48:37 1.116 +++ rfcomm.c 2001/08/02 15:45:15 1.117 @@ -690,16 +690,19 @@ =20=20=20 DSYS("Shutting down RFCOMM\n"); =20 -#if 0 /* First try disconnecting */ for (i =3D 0; i < BT_NBR_DATAPORTS; i++) { rfcomm_con *rfcomm =3D get_rfcomm_con(i); - if (get_connected_dlci(rfcomm) !=3D -1) { + + /* fixme -- handle the case where only the control=20 + channel is left on a rfcomm session */ + + if (get_connected_dlci(rfcomm) > 0) { DSYS(FNC"Now disconnecting rfcomm line %d\n", i); rfcomm_disconnect_req(i); }=09=09 } -#endif + /* If still connections left, terminate them */ for (i =3D 0; i < BT_NBR_DATAPORTS; i++) { rfcomm_reset_con(i); @@ -749,9 +752,10 @@ /* we have an l2cap channel (server ch) */ D_CTRL(FNC"we already have an l2cap channel)\n"); =20 + /* fixme -- strange case ... */ if (rfcomm->dlci[0].state !=3D DISCONNECTED) { D_ERR(FNC"DLCI:0 neither CONNECTED nor DISCONNECTED\n"); - return 0; + return -1; } else { rfcomm->dlci[0].state =3D CONNECTING; /* Establish the control channel */ @@ -771,11 +775,12 @@ tmp_dlci, TRUE); } =20 - /* ? never used ? */ - return line; - + return 0; } =20 + +/* fixme -- this should be on dlci/rfcomm con basis not line ... */ + s32 rfcomm_disconnect_req(u8 line) { @@ -805,8 +810,8 @@ =20 /* FIXME -- check that we haven't already received=20 disconnect 'acknowledge' */ - interruptible_sleep_on(&rfcomm_disconnect_wq); + /* Check that rfcomm session really disconnected */ /* FIXME -- add timer obj with status in rfcomm obj */ =20 @@ -844,6 +849,9 @@ D_CTRL("rfcomm_connect_ind\n");=20=20 if (!(rfcomm =3D get_new_rfcomm_con())) { D_ERR("rfcomm_connect_ind: error: couldn't find free tty\n"); +=09=09 + /* fixme -- respond neg ! */ + return; } else { =20=20=20=20=20=20=20=20=20=20=20 @@ -1127,6 +1135,9 @@ #ifdef CONFIG_BLUETOOTH_USE_SECURITY_MANAGER rfcomm_check_allowed_security(rfcomm->l2cap->remot= e_bd, tmp_dlci, rfcomm); + + /* fixme -- check result and send neg response if not allowed */ +=09=09=09 #else bt_connect_ind(CREATE_RFCOMM_ID(rfcomm->line, tmp_dlci)); rfcomm->dlci[tmp_dlci].state =3D CONNECTED; @@ -1152,12 +1163,15 @@ break; =20=20=20=20=20 case UA: - D_CTRL(FNC"UA packet received\n");=20 rfcomm =3D ((rfcomm_con*) l2cap->upper_con); + if (rfcomm->magic !=3D RFCOMM_MAGIC) { D_ERR(FNC"Invalid magic number\n"); break; } +=09=09 + D_CTRL(FNC"UA packet received on line %d\n", rfcomm->line); + if (rfcomm->dlci[0].state =3D=3D CONNECTING) { /* Now we are the initiating side and we have got a respons to our SABM command. We then send a PN @@ -1190,22 +1204,31 @@ rfcomm->dlci[tmp_dlci].initiator =3D TRUE; =20 } else if (rfcomm->dlci[tmp_dlci].state =3D=3D DISCONNECTING) { +=09=09=20=20 if (tmp_dlci =3D=3D 0) { + /* Control channel */ #ifdef __KERNEL__=09=09=09 release_wq_timer(&rfcomm_timer); #endif - printk(FNC"RFCOMM disconnected ctrl ch (local)\n"); + DSYS(FNC"RFCOMM disconnected ctrl ch (local) on line [%d]\n", rfcomm->= line); rfcomm->dlci[0].state =3D DISCONNECTED; =20=09=09=09=09 /* this will take down l2cap aswell */ wake_up_interruptible(&rfcomm_disconnect_wq); =20=09=09=09=09 } else { + /* Data channel */ s32 tmp; rfcomm->dlci[tmp_dlci].state =3D DISCONNECTED; tmp =3D get_connected_dlci(rfcomm); + + if (tmp >=3D 0) { rfcomm->dlci[tmp].state =3D DISCONNECTING; send_disc(rfcomm, tmp); + } else { + D_ERR("Could not find connected DLCI\n"); + } +=09=09=09=09 } } else if (rfcomm->dlci[tmp_dlci].state =3D=3D DISCONNECTED) { rfcomm->dlci[tmp_dlci].state =3D CONNECTED; @@ -1219,6 +1242,10 @@ D_CTRL(FNC"DM packet received\n"); rfcomm =3D ((rfcomm_con*) l2cap->upper_con); rfcomm->dlci[tmp_dlci].state =3D DISCONNECTED; + + /* Notify upper tty */ + /* bt_disconnect_ind() ? */ + break; =20=20=20=20=20 case DISC: @@ -1233,8 +1260,7 @@ send_dm(rfcomm, tmp_dlci); } else if ((short_pkt->h.addr.server_chn) =3D=3D 0) { rfcomm->dlci[0].state =3D DISCONNECTED; - /* FIXME: - Tell the tty that the link is down */ + printk("RFCOMM control ch disconnected (remotely)\n"); send_ua(rfcomm, 0); #ifdef __KERNEL__ @@ -1247,8 +1273,6 @@ bt_disconnect_ind(CREATE_RFCOMM_ID(rfcomm->line,=20 tmp_dlci)); } - D_CTRL(FNC"DISC, sending back UA\n"); -=20=20=20=20 break; =20=20=20=20=20 case UIH: @@ -1610,6 +1634,7 @@ nbrof_credits =3D pn_pkt->credits;=09=09=09 if (credit) { DSYS(FNC"Using credit flow control, initiating credits are %d on dlci = %d\n", nbrof_credits, tmp_dlci); + rfcomm->credit_flow =3D TRUE; rfcomm->dlci[tmp_dlci].local_credits =3D nbrof_credits; D_CTRL(FNC"Local credits:%d\n", rfcomm->dlci[tmp_dlci].local_credits);= =20 @@ -2394,6 +2419,7 @@ =20 } =20 + rfcomm_con*=20 get_new_rfcomm_con(void) { @@ -2428,15 +2454,18 @@ } } =20 +/* fetches the 'last' non DISCONNECTED dlci number in this session,=20 + returns -1 if no connected dlci was found */ + s32 get_connected_dlci(rfcomm_con *rfcomm) { s32 tmp; =20 tmp =3D 61; - while ((tmp > 0) && (rfcomm->dlci[tmp].state =3D=3D DISCONNECTED)) { + while ((tmp >=3D 0) && (rfcomm !=3D NULL) &&=20 + (rfcomm->dlci[tmp].state =3D=3D DISCONNECTED)) { tmp--; } - return tmp; } =20 |
From: Mattias A. <mat...@us...> - 2001-08-02 15:13:50
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.189 1.190=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added ioctl HCIREADCOUNTRYCODE * added some comments The diff of the modified file(s): --- bluetooth.c 2001/07/31 18:47:41 1.189 +++ bluetooth.c 2001/08/02 15:13:20 1.190 @@ -973,6 +973,13 @@ } break; =20=09=09 + case HCIREADCOUNTRYCODE: + BT_DRIVER(FNC"HCIREADCOUNTRYCODEn"); +=09=09 + tmp =3D hci_read_country_code(); + put_user(tmp, (s32*) arg); + break; +=09=09 /* Status Parameters */ =20 /* Testing Commands */ @@ -2171,6 +2178,8 @@ } } =20 +/* This function is currently not used in OpenBT for any useful stuff, + however other ports of OpenBT uses this to notify applications */ void bt_disconnect_ind(u32 con_id)=20 { @@ -2306,10 +2315,11 @@ bt_driver.refcount =3D &bluetooth_refcount; bt_driver.table =3D bt_table;=20 =20 - /* temp setting, should point to serial drivers termios */ bt_driver.termios =3D bt_termios; bt_driver.termios_locked =3D bt_termios_locked; =20=20 + /* Register the interface against usermode applications */ + bt_driver.open =3D bt_open; bt_driver.close =3D bt_close; bt_driver.write =3D bt_write_top; @@ -2333,6 +2343,7 @@ =20 /* * Register the tty discipline + * (Interface against lower hardware driver) */ =20=09 memset(&bt_ldisc, 0, sizeof(bt_ldisc)); @@ -2793,7 +2804,6 @@ } =20 s32 - bt_unregister_rfcomm(s32 line) { BT_DRIVER("bt_unregister_rfcomm : line %d\n", line);=09 |
From: Mattias A. <mat...@us...> - 2001-08-02 13:03:01
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.c 1.26 1.27=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * removed some debug The diff of the modified file(s): --- bt_if.c 2001/08/01 10:26:17 1.26 +++ bt_if.c 2001/08/02 13:02:40 1.27 @@ -512,20 +512,17 @@ int ret_val =3D 0; unsigned char len =3D strlen(cmd); unsigned char tmp[261]; - syslog(LOG_INFO, "bt_testcmd : len %d", len); - syslog(LOG_INFO, "cmddata:_%s_", cmd); + tmp[0]=3D len; memcpy(tmp+1, cmd, len+1); /* don't forget nullterminate... */ =20=20=20=20=20 - print_data("usermode data :", tmp, len+2); + //printf("bt_testcmd : [%d] '%s'", len, cmd); =20 #ifndef BT_USERSTACK=20 if ((ret_val =3D ioctl(bt_cfd, BTTESTCOMMAND, tmp)) < 0) { printf("Error : %s\n", error_msg(ret_val)); } - else - printf("Success!\n"); #else test_process_cmd(&tmp[1], tmp[0]); #endif |
From: Mattias A. <mat...@us...> - 2001-08-02 13:02:06
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bttest.c 1.14 1.15=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * forgot the menu... The diff of the modified file(s): --- bttest.c 2001/08/02 12:59:58 1.14 +++ bttest.c 2001/08/02 13:01:36 1.15 @@ -93,7 +93,6 @@ " 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>", #ifdef ECS_TEST_FUNCTIONS " ecs_entertest <handle> (hex)", " ecs_testctrl <par1,par2,...,par9> (hex)", |
From: Mattias A. <mat...@us...> - 2001-08-02 13:00:19
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bttest.c 1.13 1.14=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * fixed bug, used wrong file descr when sending data * removed redundant code The diff of the modified file(s): --- bttest.c 2001/08/01 10:28:16 1.13 +++ bttest.c 2001/08/02 12:59:58 1.14 @@ -240,7 +240,15 @@ char dev[20]; sprintf(dev, "/dev/ttyBT%d", line); btfd =3D open(dev, O_RDWR | O_NOCTTY); - bt_send(bt_cfd, i, repeat); + + if (btfd > 0) + bt_send(btfd, i, repeat); + else + { + perror("bt_send"); + return -1; + } +=20=20=20=20 close(btfd); } else if (sscanf(buf, "setbd %x:%x:%x:%x:%x:%x", @@ -344,11 +352,6 @@ =20 bt_getinfo(bt_cfd, bd, type); } - else if (strncmp(buf, "testcmd", 7) =3D=3D 0) - { - bt_testcmd(bt_cfd, buf+7); - } - #ifdef CONFIG_BLUETOOTH_UNPLUG_TEST else if (strncmp(buf, "upt", 3) =3D=3D 0) { |
From: Anders J. <and...@us...> - 2001-08-01 10:28:17
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bttest.c 1.12 1.13=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Made bb_conn, bb_disc work. * Added lcid_disconnect command to allow disconnection based on the lcid. The diff of the modified file(s): --- bttest.c 2001/07/31 09:02:21 1.12 +++ bttest.c 2001/08/01 10:28:16 1.13 @@ -112,11 +112,12 @@ " tcs_conn <xx:xx:xx:xx:xx:xx>", " ", " test_conn <xx:xx:xx:xx:xx:xx> <psm> <line>", /* l2cap test using PSM= psm */ - " test_disc <psm>", /* disconnect one of the test connections */ + " test_disc <psm>", /* disconnect the connection with psm=3Dpsm */ " test_case_reject <xx:xx:xx:xx:xx:xx>",=20 " ", " bb_conn <xx:xx:xx:xx:xx:xx>", /* connect only baseband */ " bb_disc <hci handle>", /* disconnect baseband */ + " lcid_disconnect <lcid>", /* Disconnects a connection with lcid =3D lc= id */ " ", "", =20 @@ -377,14 +378,6 @@ bd[3], bd[4], bd[5], tmp[6]); bt_getinfo(bt_cfd, bd, tmp[6]); } -#if 0 - else if (sscanf(buf, "t %d", &i) =3D=3D 1) - { - /* unplug test cases, if you don't know what it is, don't use it !!! := ) */ - process_test_cmd(i); - } -#endif - else if(sscanf(buf, "tcs_conn %x:%x:%x:%x:%x:%x", &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5]) =3D=3D 6) {=20=20=20=20 @@ -401,7 +394,6 @@ } =20 /* FIXME so that we can specify which line to connect */ - else if(sscanf(buf, "rf_conn %x:%x:%x:%x:%x:%x %d", &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5], &srv_ch) =3D=3D 7) @@ -441,54 +433,38 @@ bd[i] =3D (unsigned char)tmp[i]; } =20 - printf("Connecting test layer (psm 0x%x, line %d) to bd : %02X:%02X:%0= 2X:%02X:%02X:%02X\n", tmp[6], tmp[7], bd[0], bd[1], bd[2], bd[3], bd[4], bd= [5]); + printf("Connecting test layer (psm 0x%x, line %d) to bd : %02X:%02X:%0= 2X:%02X:%02X:%02X\n",=20 + tmp[6], tmp[7], bd[0], bd[1], bd[2], bd[3], bd[4], bd[5]); =20 bt_connect(bt_cfd, bd, ((tmp[6] << 16) & 0xffff0000) | tmp[7]); } -#if 0 else if (sscanf(buf, "test_case_reject %x:%x:%x:%x:%x:%x", &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5]) = =3D=3D 6) { - unsigned short fake_psm =3D 0x4561; - for (i =3D 0; i < 6; i++) - { - bd[i] =3D (unsigned char)tmp[i]; - } - printf("test_case_reject, client tries to connect psm %d\n", fake_psm)= ;=20=20 - l2ca_connect_req(bd, fake_psm); + sprintf(buf, "test_case_reject %03d%03d%03d%03d%03d%03d\0", tmp[0], tm= p[1], tmp[2], tmp[3], tmp[4], tmp[5]);=20 + bt_testcmd(bt_cfd, buf); } -#endif else if (sscanf(buf, "test_disc %x", &tmp[0]) =3D=3D 1) { - printf("Disconnecting TEST layer\n"); + printf("Disconnecting layer (PSM: %x)\n", tmp[0]); bt_disconnect(bt_cfd, (tmp[0] << 16) & 0xffff0000); } - - /* FIXME, make a testcase of this */ -#if 0 else if(sscanf(buf, "bb_conn %x:%x:%x:%x:%x:%x", - &tmp[5], &tmp[4], &tmp[3], &tmp[2], &tmp[1], &tmp[0]) =3D=3D 6) - { - for (i =3D 0; i < 6; i++) + &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5]) =3D=3D 6) { - bd[i] =3D (unsigned char)tmp[i]; - } - - printf("Connecting baseband to bd : %x:%x:%x:%x:%x:%x\n", - bd[5], bd[4], bd[3], bd[2], bd[1], bd[0]); - - /* we must store bd address in l2cap con to keep track of peer */ - - l2cap_create_con(bd); - lp_connect_req(bd); + sprintf(buf, "bb_conn %03d%03d%03d%03d%03d%03d\0", tmp[5], tmp[4], tmp= [3], tmp[2], tmp[1], tmp[0]);=20 + bt_testcmd(bt_cfd, buf); } else if(sscanf(buf, "bb_disc %d", &i) =3D=3D 1) { printf("Disconnecting hci handle %d\n", i); - lp_disconnect((unsigned short)i); + bt_testcmd(bt_cfd, buf); } -#endif -=20=20 + else if(sscanf(buf, "lcid_disconnect %d", &i) =3D=3D 1) + { + printf("Disconnecting lcid %d", i); + bt_testcmd(bt_cfd, buf); + } else { printf("> error: command not recognized or wrong syntax\n"); |
From: Anders J. <and...@us...> - 2001-08-01 10:26:18
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.c 1.25 1.26=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Made bt_testcmd work with userstack. The diff of the modified file(s): --- bt_if.c 2001/08/01 09:37:46 1.25 +++ bt_if.c 2001/08/01 10:26:17 1.26 @@ -527,7 +527,7 @@ else printf("Success!\n"); #else - fprintf(stderr, __FUNCTION__ ": not yet implemented...\n"); + test_process_cmd(&tmp[1], tmp[0]); #endif return ret_val; } |
From: Anders J. <and...@us...> - 2001-08-01 10:20:08
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- test.c 1.20 1.21=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added commands to test_process_cmd.=20 The diff of the modified file(s): --- test.c 2001/07/31 18:35:07 1.20 +++ test.c 2001/08/01 10:20:07 1.21 @@ -444,18 +444,59 @@ test_process_cmd(unsigned char *cmd, s32 size) { #ifdef CONFIG_BLUETOOTH_UNPLUG_TEST=20 - int testcase =3D my_atoi(cmd+2); + int testcase, tmp[10], i; + unsigned char bd[6], char_buf[4]; + char_buf[3] =3D 0; + if(strncmp(cmd, "t ", 2) =3D=3D 0) { + testcase =3D my_atoi(cmd+2); =20 if (testcase > 0) { - print_data("Going to send: ", cmd, size); process_test_cmd(testcase); - } else { - /* other stuff */ } + else { + printk("test_process_cmd: Couldn't parse testcase\n"); + } + } + else if(!strncmp(cmd, "bb_conn ", 8)) { + for (i =3D 0; i < 6; i++) { + bd[i] =3D (unsigned char *)my_atoi(strncpy(&char_buf[0], cmd + 8 + (i*3= ), 3)); + } +=09=09 + printk("Connecting BB to bd : %02X:%02X:%02X:%02X:%02X:%02X\n", + bd[5], bd[4], bd[3], + bd[2], bd[1], bd[0]); +=09=09 + l2cap_create_con(bd); + lp_connect_req(bd); + } + else if(!strncmp(cmd, "bb_disc ", 8)) { + int i =3D my_atoi(&cmd[8]); + lp_disconnect((unsigned short)i); + } + else if(!strncmp(cmd, "lcid_disconnect ", 16)) { + l2cap_con *con =3D NULL; + int i =3D my_atoi(&cmd[16]); + if(con =3D get_lcon(i)) { + l2ca_disconnect_req(con); + } + else { + printk("Didn't find lcid %d\n", i); + } + } + else if(!strncmp(cmd, "test_case_reject ", 17)) { + unsigned short fake_psm =3D 0x4561; + for (i =3D 0; i < 6; i++) { + bd[i] =3D (unsigned char)my_atoi(strncpy(&char_buf[0], cmd + 17 + i*3, = 3)); + }=20=20 + l2ca_connect_req(bd, fake_psm); + } + else { + printk("Unknown test cmd!\n"); + } +=09 #else printk("test_process_cmd: Not available\n"); #endif - } =20 /****************** END OF FILE sdp.c ************************************= ***/ |
From: Mattias A. <mat...@us...> - 2001-08-01 09:50:16
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btcommon.h 1.79 1.80=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added comment * added ioctl for HCIREADCOUNTRYCODE The diff of the modified file(s): --- btcommon.h 2001/07/10 12:57:45 1.79 +++ btcommon.h 2001/08/01 09:50:15 1.80 @@ -169,6 +169,7 @@ #define HCIREADTRANSMITPOWERLEVEL _IOWR(BT_IOC_MAGIC, 0x40, u8) =20 /* Informational Parameters */ +#define HCIREADCOUNTRYCODE _IOR(BT_IOC_MAGIC, 0x43, s32) #define HCIREADLOCALBDADDR _IOR(BT_IOC_MAGIC, 0x45, u8[6]) =20 /* Status Parameters */ @@ -186,7 +187,10 @@ /* other ioctls used for testing */ #define BTSENDTESTDATA _IOW(BT_IOC_MAGIC, 0xf0, s32[2]) #define HCITESTCONNECTREQ _IOW(BT_IOC_MAGIC, 0xf1, u8[6]) + +/* | len (1) | test string | -- used for unplug tests */ #define BTTESTCOMMAND _IOW(BT_IOC_MAGIC, 0xf2, u8[261]) + #define BTSETMSSWITCH _IOW(BT_IOC_MAGIC, 0xf3, u8) =20 #define BTSETBCSPMODE _IOW(BT_IOC_MAGIC, 0xf4, u8) |
From: Mattias A. <mat...@us...> - 2001-08-01 09:49:20
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.h 1.64 1.65=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added hci_read_country_code The diff of the modified file(s): --- hci.h 2001/07/31 17:52:18 1.64 +++ hci.h 2001/08/01 09:49:19 1.65 @@ -169,6 +169,7 @@ /* Informational Parameters */ s32 hci_read_local_bd(u8 *bd); s32 hci_read_local_version_info(s32 block); +s32 hci_read_country_code(void); =20 /* Internal */ /* FIXME -- add parameter to choose from different devices */ |
From: Mattias A. <mat...@us...> - 2001-08-01 09:48:38
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.169 1.170=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added read country code The diff of the modified file(s): --- hci.c 2001/07/31 18:36:29 1.169 +++ hci.c 2001/08/01 09:48:36 1.170 @@ -841,6 +841,7 @@ reset_hci_con_bd(hci_hdl); } else { DSYS(__FUNCTION__ ": ACL link is up\n"); + #ifdef CONFIG_BLUETOOTH_ERICSSON change_connection_packet_type(hci_hdl,=20 DM3|DH3|DM5|DH5); @@ -2121,6 +2122,8 @@ } } =20 + +/* fixme -- does this really need to be non blocking ? */ s32 hci_pin_code_request_reply(u8 *bd, u8 *pin, u8 pin_len) { @@ -2957,6 +2960,24 @@ } #endif =20 +s32 hci_read_country_code(void) +{ + s32 tmp; + D_CMD(__FUNCTION__"\n"); + c_pkt.type =3D CMD_PKT; + c_pkt.opcode =3D hci_put_opcode(HCIREADCOUNTRYCODE, HCI_IP); + c_pkt.len =3D 0; +=09 + tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N, + DEFAULT_TIMEOUT); + + if (tmp < 0) { + return tmp; + } else { + return result_param; + } +} + /* * This command will read the value for the BD_ADDR parameter of the local * unit, returns bd in little endian @@ -3632,6 +3653,21 @@ =20 case HCI_IP: /* Informational parameters */ switch (hci_get_ocf(cmd->opcode)) { +=09=09=09 + case HCIREADCOUNTRYCODE: + + if (r_val[0]) { + D_ERR(__FUNCTION__": READ_COUNTRY_CODE : %s\n",=20 + get_err_msg(r_val[0])); + result_param =3D -r_val[0]; + } else { + result_param =3D r_val[1]; + D_CMD(__FUNCTION__": READ_COUNTRY_CODE : %d\n",=20 + result_param); + } + break; +=09=09=09 + case READ_BUFFER_SIZE: D_CMD(__FUNCTION__ ": READ_BUFFER_SIZE->setting buffer size\n"); hci_ctrl.hc_buf.acl_num =3D ACL_NUM; |
From: Mattias A. <mat...@us...> - 2001-08-01 09:39:25
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.h 1.17 1.18=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added ioctl for HCIREADCOUNTRYCODE * added comment * added bt_read_country_code The diff of the modified file(s): --- bt_if.h 2001/07/30 10:18:53 1.17 +++ bt_if.h 2001/08/01 09:39:24 1.18 @@ -194,6 +194,7 @@ =20 /* Informational Parameters */ =20 +#define HCIREADCOUNTRYCODE _IOR(BT_IOC_MAGIC, 0x43, int) #define HCIREADLOCALBDADDR _IOR(BT_IOC_MAGIC, 0x45, unsigned char[6]) =20 /* Status Parameters */ @@ -242,7 +243,10 @@ =20 #define BTSENDTESTDATA _IOW(BT_IOC_MAGIC, 0xf0, int[2]) #define HCITESTCONNECTREQ _IOW(BT_IOC_MAGIC, 0xf1, unsigned char[6]) + +/* | len (1) | test string | -- used for unplug tests */ #define BTTESTCOMMAND _IOW(BT_IOC_MAGIC, 0xf2, unsigned char[261]) + #define BTSETMSSWITCH _IOW(BT_IOC_MAGIC, 0xf3, unsigned char) #define BTSETBCSPMODE _IOW(BT_IOC_MAGIC, 0xf4, unsigned char) =20 @@ -340,6 +344,8 @@ unsigned char minor_class,=20 unsigned char format); =20 +int bt_read_country_code(int bt_cfd, unsigned char *result); + void enable_dut(int bt_cfd); =20 =20 @@ -348,6 +354,7 @@ =20 /* Sets friendly name to name */ void bt_set_local_name(int bt_cfd, const unsigned char *name); + /*=20 * Misc functions=20 */ |
From: Mattias A. <mat...@us...> - 2001-08-01 09:37:47
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.c 1.24 1.25=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added bt_read_country_code * fixed bt_showstatus for non userstack The diff of the modified file(s): --- bt_if.c 2001/07/30 10:18:42 1.24 +++ bt_if.c 2001/08/01 09:37:46 1.25 @@ -319,8 +319,7 @@ tmp[len] =3D 0; printf(tmp); #else - /*FIXME -- read /proc/bt_internal and print it on the console */ - fprintf(stderr, __FUNCTION__ ": not yet implemented...\n"); + system("cat /proc/bt_internal"); #endif=20 } =20 @@ -939,6 +938,19 @@ } #else hci_change_local_name(buffer); +#endif +} + +int bt_read_country_code(int bt_cfd, unsigned char *result) +{ +#ifndef BT_USERSTACK=20=20 + if (ioctl(bt_cfd, HCIREADCOUNTRYCODE, result) < 0) + { + perror(__FUNCTION__); + exit(1); + } +#else + return hci_read_country_code(); #endif } =20 |
From: Peter K. <pk...@us...> - 2001-07-31 20:02:34
|
The following file was modified in apps/bluetooth/userstack: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.23 1.24=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: 'make unplugtest' should work as expected now. The diff of the modified file(s): --- Makefile 2001/07/31 09:02:53 1.23 +++ Makefile 2001/07/31 20:02:33 1.24 @@ -7,6 +7,9 @@ =20 PROGS =3D btduser =20 +# Use 'make INCLUDE_UNPLUG_TEST=3D1' to enable the unplug testcases. +INCLUDE_UNPLUG_TEST =3D 0 + # Define HAVE_READLINE_READLINE if you have readline support, with the inc= lude # files in $(include_dir)/readline. Define HAVE_READLINE if you have the # include files in $(include_dir). Define neither if you do not want to use @@ -60,14 +63,15 @@ =20 CFLAGS +=3D -DBTD_USERSTACK =20 -ifeq ($@, $("unplugtest")) +ifeq ($(INCLUDE_UNPLUG_TEST),1) OBJS +=3D unplug_test.o CFLAGS +=3D -DCONFIG_BLUETOOTH_UNPLUG_TEST endif =20 all: links $(PROGS) =20 -unplugtest: all +unplugtest: + @$(MAKE) --no-print-directory INCLUDE_UNPLUG_TEST=3D1 =20 btduser: $(OBJS) $(CC) -pthread $(LDFLAGS) $^ $(LDLIBS) -o $@ |
From: Peter K. <pk...@us...> - 2001-07-31 19:43:10
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.25 1.26=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Made it easier to build with support for BCSP and/or the unplug tests. The diff of the modified file(s): --- Makefile 2001/07/31 18:59:23 1.25 +++ Makefile 2001/07/31 19:43:08 1.26 @@ -43,13 +43,11 @@ # Standalone makefile rules #--------------------------------------------------------------------- =20 -# Uncomment this line to enable support for BCSP. -# If you do not know what this is, just leave it commented. -#INCLUDE_BCSP_SUPPORT =3D 1 +# Use 'make INCLUDE_BCSP_SUPPORT=3D1' to enable support for BCSP. +INCLUDE_BCSP_SUPPORT =3D 0 =20 -# Uncomment this line to enable the unplug testcases. -# If you do not know what this is, just leave it commented. -#INCLUDE_UNPLUG_TEST =3D 1 +# Use 'make INCLUDE_UNPLUG_TEST=3D1' to enable the unplug testcases. +INCLUDE_UNPLUG_TEST =3D 0 =20 # The INCLUDEDIR variable allows LSB compliant distros to be able to compi= le # the module correctly. Use 'make INCLUDEDIR=3D/usr/src/linux/include' whe= re @@ -64,12 +62,12 @@ MODFLAGS =3D -DMODVERSIONS -include $(INCLUDEDIR)/linux/modversions.h CFLAGS =3D -D__KERNEL__ -DMODULE -I../../../include -I$(INCLUDEDIR) -Wa= ll -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strength-reduce $(MODF= LAGS) -MD =20 -ifdef INCLUDE_UNPLUG_TEST +ifeq ($(INCLUDE_UNPLUG_TEST),1) OBJS +=3D $(TOBJS) CFLAGS +=3D -DCONFIG_BLUETOOTH_UNPLUG_TEST endif =20 -ifdef INCLUDE_BCSP_SUPPORT +ifeq ($(INCLUDE_BCSP_SUPPORT),1) OBJS +=3D $(BOBJS) CFLAGS +=3D -DCONFIG_BLUETOOTH_SUPPORT_BCSP endif |
From: Peter K. <pk...@us...> - 2001-07-31 19:28:57
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- unplug_test.c 1.2 1.3=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Corrected includes. * Made all local functions static. * Corrected indentation. The diff of the modified file(s): --- unplug_test.c 2001/07/30 16:53:43 1.2 +++ unplug_test.c 2001/07/31 19:28:55 1.3 @@ -41,34 +41,26 @@ =20 #define __NO_VERSION__ /* don't define kernel_version in module.h */ =20 -#ifndef UNPLUG_TEST_C=20 -#define UNPLUG_TEST_C +#ifdef __KERNEL__ +#include <linux/malloc.h> =20 +#include <linux/bluetooth/hci.h> +#include <linux/bluetooth/l2cap_con.h> +#include <linux/bluetooth/sdp.h> +#include <linux/bluetooth/tcs.h> +#include <linux/bluetooth/test.h> +#include <linux/bluetooth/rfcomm.h> +#include <linux/bluetooth/btcommon.h> +#else #include <string.h> =20 -#ifdef BTD_USERSTACK -#include "include/btmem.h" #include "include/hci.h" -#include "include/l2cap.h" #include "include/l2cap_con.h" #include "include/sdp.h" #include "include/tcs.h" #include "include/test.h" #include "include/rfcomm.h" -#include "include/btdebug.h" #include "include/btcommon.h" -#else -#include <linux/bluetooth/btmem.h> -#include <linux/bluetooth/hci.h> -#include <linux/bluetooth/l2cap.h> -#include <linux/bluetooth/l2cap_con.h> -#include <linux/bluetooth/sdp.h> -#include <linux/bluetooth/tcs.h> -#include <linux/bluetooth/test.h> -#include <linux/bluetooth/rfcomm.h> -#include <linux/bluetooth/btdebug.h> -#include <linux/bluetooth/btcommon.h> -#define printf printk #endif =20 =20 @@ -251,10 +243,10 @@ =20 #define UPDATA_MAXLEN 16384 static u8 tmpdata[UPDATA_MAXLEN]; -static u8 isInitialized =3D 0; +static u8 test_is_initialized =3D 0; =20 -void -unplug_test_init() +static void +unplug_test_init(void) { /* initializes temp data */ s32 i; @@ -264,21 +256,21 @@ for (i =3D 0; i < UPDATA_MAXLEN; i++) { *(tmpdata+i) =3D (u8) i%0x100; } - isInitialized =3D 1; + test_is_initialized =3D 1; } =20 #define SERVER 0 #define CLIENT 1 =20 -void test_server(void) +static void test_server(void) { - printf("Now we are test server (device A)\n"); + printk("Now we are test server (device A)\n"); test_role =3D SERVER; } =20 -void test_client(void) +static void test_client(void) { - printf("Now we are test client (device B)\n"); + printk("Now we are test client (device B)\n"); test_role =3D CLIENT; } =20 @@ -310,42 +302,42 @@ * Test case : Data transfer via Open L2CAP Channel (L2CAP Test 3) */ =20 -void test_2_2_1(void) +static void test_2_2_1(void) { /* client sends 10 bytes */ printk("test_2_2_1, client sends 10 bytes\n");=20 test_send_data(testcon, tmpdata, 10); } =20 -void test_2_2_2(void) +static void test_2_2_2(void) { /* client sends 350 bytes */ printk("test_2_2_2, client sends 350 bytes\n");=20 test_send_data(testcon, tmpdata, 350); } =20 -void test_2_2_3(void) +static void test_2_2_3(void) { /* client sends 672 bytes */ printk("test_2_2_3, client sends 672 bytes\n");=20 test_send_data(testcon, tmpdata, 672); } =20 -void test_2_2_4(void) +static void test_2_2_4(void) { /* server sends 10 bytes */ printk("test_2_2_4, server sends 10 bytes\n");=20 test_send_data(testcon, tmpdata, 10); } =20 -void test_2_2_5(void) +static void test_2_2_5(void) { /* server sends 350 bytes */ printk("test_2_2_5, server sends 350 bytes\n");=20 test_send_data(testcon, tmpdata, 350); } =20 -void test_2_2_6(void) +static void test_2_2_6(void) { /* server sends 672 bytes */ printk("test_2_2_6, server sends 672 bytes\n");=20 @@ -373,7 +365,7 @@ */ =20 =20 -void test_2_5_1(void) +static void test_2_5_1(void) { /* FIXME - Client sends configure request with MTU 4096 */ if(l2ca_config_req(testcon, 48, NULL, 0, 0)){ @@ -381,7 +373,7 @@ } } =20 -void test_2_5_3(void) +static void test_2_5_3(void) { /* FIXME - Server sends configure request with MTU 16384 */ if(l2ca_config_req(testcon, 16384, NULL, 0xffff, 0)){ @@ -389,21 +381,19 @@ } } =20 -void test_2_5_4(void) +static void test_2_5_4(void) { -=20 /* FIXME - Client responds success in configure response */ -=20 } =20 -void test_2_5_5(void) +static void test_2_5_5(void) { /* Client sends 8192 bytes of data */ printk("test_2_5_6, client sends 8192 bytes\n"); test_send_data(testcon, tmpdata, 8192); } =20 -void test_2_5_6(void) +static void test_2_5_6(void) { printk("test_2_5_6, server sends 4096 bytes\n"); /* Server sends 4096 bytes of data */ @@ -414,7 +404,7 @@ * Test case : Connection reject on psm 0x4561 */ =20 -void test_2_6_1(void) +static void test_2_6_1(void) { printk("Now disabling test psm\n"); disable_testpsm =3D 1; @@ -431,37 +421,37 @@ */ =20 =20 -void test_2_7_2() +static void test_2_7_2(void) { printk("Emulating authorization pending...\n"); emulate_pending =3D 1; } =20 -void test_2_8_1() +static void test_2_8_1(void) { printk("Client sends 350 bytes on testcon 1\n"); test_send_data(testcon, tmpdata, 350); } =20 -void test_2_8_2() +static void test_2_8_2(void) { printk("Server sends 350 bytes on testcon 1\n"); test_send_data(testcon, tmpdata, 350); } =20 -void test_2_8_3() +static void test_2_8_3(void) { printk("Client sends 350 bytes on testcon 2\n"); test_send_data(testcon2, tmpdata, 350); } =20 -void test_2_8_4() +static void test_2_8_4(void) { printk("Server sends 350 bytes on testcon 2\n"); test_send_data(testcon2, tmpdata, 350); } =20 -void test_2_9_1() +static void test_2_9_1(void) { printk("Now testing timeout in reconfigure state\n"); printk("Client tries to reconfigure mtu 4096\n"); @@ -471,14 +461,14 @@ } } =20 -void test_2_9_2() +static void test_2_9_2(void) { printk("Server won't send a config req back...\n"); dont_send_config_req =3D 1; } =20 =20 -void test_2_10() +static void test_2_10(void) { /* set to use mutiple config parameters */ printk("Using multiple config parameters\n"); @@ -499,7 +489,7 @@ } flow; #endif =20 -void test_2_13_1() +static void test_2_13_1(void) { flow qos; init_flow(&qos); @@ -515,15 +505,15 @@ =20 =20 =20 -void test_2_13_5(void) +static void test_2_13_5(void) { printk("test_2_13_5, client sending 672 bytes\n");=20 test_send_data(testcon, tmpdata, 672);=09 } =20 -void test_2_13_6(void) +static void test_2_13_6(void) { - printk("test_2_13_5, server sending 672 bytes\n");=20 + printk("test_2_13_6, server sending 672 bytes\n");=20 test_send_data(testcon, tmpdata, 672);=09 } =20 @@ -532,185 +522,176 @@ * SDP Stuff */ =20 -void sdp_test_52111(void) +static void sdp_test_52111(void) { sdp_send_data(&sdp_con_list[0], sdp_data_52111, sdp_data_52111[4] + 5); } =20 -void sdp_test_52113(void) +static void sdp_test_52113(void) { static int t =3D 0; =20 - if (!t) - { + if (!t) { sdp_send_data(&sdp_con_list[0], sdp_data_52113_1, sdp_data_52113_1[4] = + 5); t =3D 1; - } - else - { + } else { sdp_send_data(&sdp_con_list[0], sdp_data_52113_2, sdp_data_52113_2[4] = + 5); t =3D 0; } } =20 =20 -void sdp_test_52114(void) +static void sdp_test_52114(void) { sdp_send_data(&sdp_con_list[0], sdp_data_52114, sdp_data_52114[4] + 5); } =20 -void sdp_test_52121(void) +static void sdp_test_52121(void) { sdp_send_data(&sdp_con_list[0], sdp_data_52121, sdp_data_52121[4] + 5); } =20 -void sdp_test_52122(void) +static void sdp_test_52122(void) { sdp_send_data(&sdp_con_list[0], sdp_data_52122, sdp_data_52122[4] + 5); } =20 -void sdp_test_53111(void) +static void sdp_test_53111(void) { sdp_send_data(&sdp_con_list[0], sdp_data_53111, sdp_data_53111[4] + 5); } =20 -void sdp_test_53113(void) +static void sdp_test_53113(void) { static int t =3D 0; =20=20=20 - if (!t) - { + if (!t) { sdp_send_data(&sdp_con_list[0], sdp_data_53113_1, sdp_data_53113_2[4] = + 5); t =3D 1; - } - else - { + } else { sdp_send_data(&sdp_con_list[0], sdp_data_53113_2, sdp_data_53113_2[4] = + 5); t =3D 0; } } =20 -void sdp_test_53114(void) +static void sdp_test_53114(void) { sdp_send_data(&sdp_con_list[0], sdp_data_53114, sdp_data_53114[4] + 5); } =20 -void sdp_test_53115(void) +static void sdp_test_53115(void) { sdp_send_data(&sdp_con_list[0], sdp_data_53115, sdp_data_53115[4] + 5); } =20 -void sdp_test_53118(void) +static void sdp_test_53118(void) { sdp_send_data(&sdp_con_list[0], sdp_data_53118, sdp_data_53118[4] + 5); } =20 -void sdp_test_531110(void) +static void sdp_test_531110(void) { sdp_send_data(&sdp_con_list[0], sdp_data_531110, sdp_data_531110[4] + 5); } =20 -void sdp_test_531117(void) +static void sdp_test_531117(void) { sdp_send_data(&sdp_con_list[0], sdp_data_531117, sdp_data_531117[4] + 5); } =20 -void sdp_test_531120(void) +static void sdp_test_531120(void) { sdp_send_data(&sdp_con_list[0], sdp_data_531120, sdp_data_531120[4] + 5); } =20 -void sdp_test_53121(void) +static void sdp_test_53121(void) { sdp_send_data(&sdp_con_list[0], sdp_data_53121, sdp_data_53121[4] + 5); } =20 -void sdp_test_53122(void) +static void sdp_test_53122(void) { sdp_send_data(&sdp_con_list[0], sdp_data_53122, sdp_data_53122[4] + 5); } =20 -void sdp_test_53123(void) +static void sdp_test_53123(void) { sdp_send_data(&sdp_con_list[0], sdp_data_53123, sdp_data_53123[4] + 5); } =20 -void sdp_test_54111(void) +static void sdp_test_54111(void) { sdp_send_data(&sdp_con_list[0], sdp_data_54111, sdp_data_54111[4] + 5); } =20 -void sdp_test_54112(void) +static void sdp_test_54112(void) { sdp_send_data(&sdp_con_list[0], sdp_data_54112, sdp_data_54112[4] + 5); } =20 -void sdp_test_54113(void) +static void sdp_test_54113(void) { sdp_send_data(&sdp_con_list[0], sdp_data_54113, sdp_data_54113[4] + 5); } =20 -void sdp_test_54114(void) +static void sdp_test_54114(void) { sdp_send_data(&sdp_con_list[0], sdp_data_54114, sdp_data_54114[4] + 5); } =20 -void sdp_test_54116(void) +static void sdp_test_54116(void) { static int t =3D 0; =20 - if(!t) - { + if (!t) { sdp_send_data(&sdp_con_list[0], sdp_data_54116_1, sdp_data_54116_1[4] = + 5); t =3D 1; - } - else - { + } else { sdp_send_data(&sdp_con_list[0], sdp_data_54116_2, sdp_data_54116_2[4] = + 5); t =3D 0; }=20 } =20 -void sdp_test_541110(void) +static void sdp_test_541110(void) { sdp_send_data(&sdp_con_list[0], sdp_data_541110, sdp_data_541110[4] + 5); } =20 -void sdp_test_541111(void) +static void sdp_test_541111(void) { sdp_send_data(&sdp_con_list[0], sdp_data_541111, sdp_data_541111[4] + 5); } =20 -void sdp_test_541112(void) +static void sdp_test_541112(void) { sdp_send_data(&sdp_con_list[0], sdp_data_541112, sdp_data_541112[4] + 5); } =20 -void sdp_test_541120(void) +static void sdp_test_541120(void) { sdp_send_data(&sdp_con_list[0], sdp_data_541120, sdp_data_541120[4] + 5); } =20 -void sdp_test_54121(void) +static void sdp_test_54121(void) { sdp_send_data(&sdp_con_list[0], sdp_data_54121, sdp_data_54121[4] + 5); } =20 -void sdp_test_54122(void) +static void sdp_test_54122(void) { sdp_send_data(&sdp_con_list[0], sdp_data_54122, sdp_data_54122[4] + 5); } =20 -void sdp_test_55111(void) +static void sdp_test_55111(void) { static int t =3D 0; =20 - switch(t) - { + switch (t) { case 0: sdp_send_data(&sdp_con_list[0], sdp_data_55111_1, sdp_data_55111_1[4] = + 5); t =3D 1; break; + case 1: sdp_send_data(&sdp_con_list[0], sdp_data_55111_2, sdp_data_55111_2[4] = + 5); t =3D 2; @@ -742,16 +723,16 @@ }=20 } =20 -void sdp_test_55112(void) +static void sdp_test_55112(void) { static int t =3D 0; =20 - switch(t) - { + switch (t) { case 0: sdp_send_data(&sdp_con_list[0], sdp_data_55112_1, sdp_data_55112_1[4] = + 5); t =3D 1; break; + case 1: sdp_send_data(&sdp_con_list[0], sdp_data_55112_2, sdp_data_55112_2[4] = + 5); t =3D 0; @@ -764,7 +745,7 @@ * Serial Port Profile Stuff */ =20 -void spp_test_52211(void) +static void spp_test_52211(void) { static int t =3D 0; =20=20=20 @@ -777,17 +758,20 @@ sdp_send_data(&sdp_con_list[0], sdp_query, sdp_query[4] + 5); t++; break; + case 1: - printf(__FUNCTION__": Establish RFCOMM on channel 0\n"); + printk(__FUNCTION__": Establish RFCOMM on channel 0\n"); t++; break; - printf(__FUNCTION__": Establish RFCOMM on channel 2\n"); + + case 2: + printk(__FUNCTION__": Establish RFCOMM on channel 2\n"); t =3D 0; break; } } =20 -void spp_test_52311(void) +static void spp_test_52311(void) { static int t =3D 0; =20 @@ -796,6 +780,7 @@ hci_sniff_mode(rfcomm_con_list[0].l2cap->hci_hdl, 0xff, 0xf0, 0x10, 0x= 05); t =3D 1; break; + case 1: hci_exit_sniff_mode(rfcomm_con_list[0].l2cap->hci_hdl); t =3D 0; @@ -803,7 +788,7 @@ } } =20 -void spp_test_52312(void) +static void spp_test_52312(void) { static int t =3D 0; =20 @@ -812,6 +797,7 @@ hci_park_mode(rfcomm_con_list[0].l2cap->hci_hdl, 0xfff, 0xf0); t =3D 1; break; + case 1: hci_exit_park_mode(rfcomm_con_list[0].l2cap->hci_hdl); t =3D 0; @@ -819,76 +805,77 @@ } } =20 -void spp_test_52313(void) +static void spp_test_52313(void) { hci_hold_mode(rfcomm_con_list[0].l2cap->hci_hdl, 0xfff, 0xf0); } =20 -void spp_test_52314(void) +static void spp_test_52314(void) { - printf(__FUNCTION__": Do test 52211, then do a M/S switch\n"); + printk(__FUNCTION__": Do test 52211, then do a M/S switch\n"); } =20 =20 -void spp_test_53112(void) +static void spp_test_53112(void) { /* Establish a L2CAP channel in PSM 3 (RFCOMM), before doing this test */ =20 rfcomm_sabm_msg(&rfcomm_con_list[0], 0); } =20 -void spp_test_53211(void) -{ /* This test has to be done rigth after test 53112 */ +static void spp_test_53211(void) +{ + /* This test has to be done rigth after test 53112 */ =20 rfcomm_disc_msg(&rfcomm_con_list[0], 0); } =20 -void spp_test_53312(void) +static void spp_test_53312(void) { - /* Establish a L2CAP channel in PSM 3 (RFCOMM), and establish DLCI 0 bef= ore - doing this test */ + /* Establish a L2CAP channel in PSM 3 (RFCOMM), and establish DLCI 0 + before doing this test */ =20 rfcomm_sabm_msg(&rfcomm_con_list[0], 2); } =20 -void spp_test_53411(void) +static void spp_test_53411(void) { - /* Establish a L2CAP channel in PSM 3 (RFCOMM), and establish DLCI 0 and= 2 - before doing this test */ - - /* Here the BAP should send the disc command so we just have to wait for - that, rf_disc should probably work in the BAP */ + /* Establish a L2CAP channel in PSM 3 (RFCOMM), and establish DLCI 0 + and 2 before doing this test */ =20=09 + /* Here the BAP should send the disc command so we just have to wait + for that, rf_disc should probably work in the BAP */ } =20 -void spp_test_53412(void) -{ /* This test has to be done rigth after test 53116 */ +static void spp_test_53412(void) +{ + /* This test has to be done rigth after test 53116 */ =20 rfcomm_disc_msg(&rfcomm_con_list[0], 2); } =20 -void spp_test_53511(void) +static void spp_test_53511(void) { - /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have= to - verify so both sides have sent a MSC command with flow on */ + /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also + have to verify so both sides have sent a MSC command with flow on */ =20 /* Send data from the BAp with the rf_send command */ =20=20=20 rfcomm_msc_msg(&rfcomm_con_list[0], 0x85 ,MCC_CMD, 2); } =20 -void spp_test_53611(void) +static void spp_test_53611(void) { - /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have= to - verify so both sides have sent a MSC command with flow on */ + /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also + have to verify so both sides have sent a MSC command with flow on */ =20=20=20 /* Then send data from the BAP with the rf_send command */ } =20 -void spp_test_53711(void) +static void spp_test_53711(void) { - /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have= to - verify so both sides have sent a MSC command with flow on */ + /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also + have to verify so both sides have sent a MSC command with flow on */ =20 unsigned char data[] =3D {0,1,2,3,4,5,6,7,9}; =20=20=20 @@ -896,39 +883,40 @@ rfcomm_test_msg(&rfcomm_con_list[0], data, 10, MCC_CMD); } =20 -void spp_test_53811(void) +static void spp_test_53811(void) { - /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have= to - verify so both sides have sent a MSC command with flow on */ + /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also + have to verify so both sides have sent a MSC command with flow on */ =20 static int t =3D 0; =20 switch (t) { case 0: rfcomm_fcoff_msg(&rfcomm_con_list[0], MCC_CMD); - printf(__FUNCTION__": Flow is set to OFF\n"); + printk(__FUNCTION__": Flow is set to OFF\n"); t++; break; + case 1: rfcomm_fcon_msg(&rfcomm_con_list[0], MCC_CMD); - printf(__FUNCTION__": Flow is set to ON\n"); + printk(__FUNCTION__": Flow is set to ON\n"); t =3D 0; break; } } =20 -void spp_test_53911(void) +static void spp_test_53911(void) { - /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have= to - verify so both sides have sent a MSC command with flow on */ + /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also + have to verify so both sides have sent a MSC command with flow on */ =20 rfcomm_rls_msg(&rfcomm_con_list[0], MCC_CMD, 2, 0x05); } =20 -void spp_test_531011(void) +static void spp_test_531011(void) { - /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have= to - verify so both sides have sent a MSC command with flow on */ + /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also + have to verify so both sides have sent a MSC command with flow on */ =20 static int t =3D 0; =20=20=20 @@ -937,29 +925,30 @@ rfcomm_pn_msg(&rfcomm_con_list[0], 2, 0, 1000); t++; break; + case 1: rfcomm_pn_msg(&rfcomm_con_list[0], 2, 0, 667); break; } } =20 -void spp_test_531111(void) +static void spp_test_531111(void) { - /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have= to - verify so both sides have sent a MSC command with flow on */ + /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also + have to verify so both sides have sent a MSC command with flow on */ =20 rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 4, 0); } =20 -void spp_test_531112(void) +static void spp_test_531112(void) { - /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have= to - verify so both sides have sent a MSC command with flow on */ + /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also + have to verify so both sides have sent a MSC command with flow on */ =20 rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 4, 1); } =20 -void spp_test_55111(void) +static void spp_test_55111(void) { /* Establish a L2CAP channel on PSM 1 (SDP) before doing this test */ =20 @@ -969,7 +958,7 @@ sdp_send_data(&sdp_con_list[0], sdp_query, sdp_query[4] + 5); } =20 -void spp_test_55112(void) +static void spp_test_55112(void) { /* Establish a L2CAP channel on PSM 1 (SDP) before doing this test */ =20 @@ -978,11 +967,10 @@ 0x09, 0x00, 0x01, 0x09, 0x00, 0x04, 0x09, 0x01, 0x00, 0x00}; =20 - sdp_send_data(&sdp_con_list[0], sdp_query, sdp_query[4] + 5); } =20 -void spp_test_55113(void) +static void spp_test_55113(void) { /* Establish a L2CAP channel on PSM 1 (SDP) before doing this test */ =20 @@ -991,12 +979,11 @@ 0x09, 0x09, 0x00, 0x01, 0x09, 0x00, 0x04, 0x09, 0x01, 0x00, 0x00}; =20 - sdp_send_data(&sdp_con_list[0], sdp_query, sdp_query[4] + 5); } =20 =20 -void spp_test_56211(void) +static void spp_test_56211(void) { /* Run the hci_write_encryption_mode(1) in hci_init */ } @@ -1005,41 +992,41 @@ * RFCOMM stuff=20 */ =20 -void test_4_1(void) +static void test_4_1(void) { /* Create a connection */ printk("Please use rf_conn server channel 2\n"); } =20 -void test_4_2_1(void) +static void test_4_2_1(void) { /* Send stop flow command on dlci 4*/ printk("test_4_2\n"); rfcomm_msc_msg(&rfcomm_con_list[0], 0x87 ,MCC_CMD, 4); } =20 -void test_4_2_2(void) +static void test_4_2_2(void) { /* Send start flow command on dlci 4 */ printk("test_4_2\n"); rfcomm_msc_msg(&rfcomm_con_list[0], 0x85 ,MCC_CMD, 4); } =20 -void test_4_2_3(void) +static void test_4_2_3(void) { /* Send start flow command on dlci 4 */ printk("test_4_2\n"); rfcomm_msc_msg(&rfcomm_con_list[0], 0x85 ,MCC_CMD, 3); } =20 -void test_4_2_4(void) +static void test_4_2_4(void) { /* Send start flow command on dlci 4 */ printk("test_4_2\n"); rfcomm_msc_msg(&rfcomm_con_list[0], 0x85 ,MCC_CMD, 2); } =20 -void test_4_3(void) +static void test_4_3(void) { /* Here we should send data after we received a flow stop command */ printk("test_4_3\n"); @@ -1049,20 +1036,20 @@ } } =20 -void test_4_4(void) +static void test_4_4(void) { /* If we should initiate the disconnection we do this */ printk("test_4_4\n"); rfcomm_disconnect_req(0); } =20 -void test_4_5_1(void) +static void test_4_5_1(void) { printk("test_4_5_1\n"); rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 4, 1); } =20 -void test_4_5_2(void) +static void test_4_5_2(void) { printk("test_4_5_2\n"); rpn_val.rtr_input =3D 1; @@ -1074,7 +1061,7 @@ rpn_val.pm.rtr_output =3D 0; } =20 -void test_4_6(void) +static void test_4_6(void) { u8 data[1]; =20 @@ -1084,54 +1071,53 @@ rfcomm_test_msg(&rfcomm_con_list[0], data, 1, MCC_CMD); } =20 -void test_4_7(void) +static void test_4_7(void) { -=09 printk("test_4_7\n"); rfcomm_rls_msg(&rfcomm_con_list[0], MCC_CMD, 4, 0x03); } =20 -void test_4_8_1(void) +static void test_4_8_1(void) { /* Here we send a fcoff command */ printk("test_4_8\n"); rfcomm_fcoff_msg(&rfcomm_con_list[0], MCC_CMD); } =20 -void test_4_8_2(void) +static void test_4_8_2(void) { /* Here we send a fcon command */ printk("test_4_8\n"); rfcomm_fcon_msg(&rfcomm_con_list[0], MCC_CMD); } =20 -void test_4_9(void) +static void test_4_9(void) { /* Test to send data after received fcoff command */ printk("test_4_9\n"); test_4_3(); } =20 -void test_4_10(void) +static void test_4_10(void) { /* Create a connection on serverchannel one */ printk("Please use rfcomm_connect server channel 1, line 0 instead\n"); } =20 -void test_4_11(void) +static void test_4_11(void) { /* Same as test 4.10, but here we should be the responder */ printk("test_4_11\n"); test_4_10(); } =20 -void test_4_12(void) +static void test_4_12(void) { printk("test_4_12\n"); test_4_4(); } =20 -void test_4_13(void) +static void test_4_13(void) {=09 printk("test_4_13\n"); rfcomm_set_mtu(&rfcomm_con_list[0], 4, 500); @@ -1139,31 +1125,31 @@ printk("Please use rfcomm_connect server channel 2, line 0 to connect\n"= ); } =20 -void test_4_14(void) +static void test_4_14(void) { printk("test_4_14\n"); printk("PLease use rfcomm_conn on serverchannel 4\n"); } =20 -void test_4_15(void) +static void test_4_15(void) { printk("test_4_15\n"); rfcomm_crap_msg(&rfcomm_con_list[0]); } =20 -void test_4_16(void) +static void test_4_16(void) { printk("test_4_16\n"); rfcomm_msc_msg(&rfcomm_con_list[0], 0x8d ,MCC_CMD, 8); } =20 -void test_4_21_1(void) +static void test_4_21_1(void) { printk("test_4_21_1\n"); rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 2, 1); } =20 -void test_4_21_2(void) +static void test_4_21_2(void) { printk("test_4_21_2\n"); rpn_val.rtr_input =3D 1; @@ -1175,7 +1161,7 @@ rpn_val.pm.rtr_output =3D 0; } =20 -void test_4_22_1(void) +static void test_4_22_1(void) { printk("test_4_22_1\n"); rpn_val.rtr_input =3D 1; @@ -1187,98 +1173,97 @@ rpn_val.pm.rtr_output =3D 0; } =20 -void test_4_22_2(void) +static void test_4_22_2(void) { printk("test_4_22_2\n"); rfcomm_sabm_msg(&rfcomm_con_list[0], 2);; } =20 -void test_4_22_3(void) +static void test_4_22_3(void) { printk("test_4_21_1\n"); rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 2, 1); } =20 -void test_4_23_1(void) +static void test_4_23_1(void) { printk("test_4_23_1\n"); test_4_22_1(); } =20 -void test_4_23_2(void) +static void test_4_23_2(void) { printk("test_4_23_2\n"); rfcomm_pn_msg(&rfcomm_con_list[0], 2, 0, 127); } =20 -void test_4_23_3(void) +static void test_4_23_3(void) { printk("test_4_23_2\n"); rfcomm_sabm_msg(&rfcomm_con_list[0], 2); } =20 -void test_4_23_4(void) +static void test_4_23_4(void) { printk("test_4_23_1\n"); test_4_22_3(); } =20 -void test_4_24_1(void) +static void test_4_24_1(void) { printk("test_4_23_1\n"); test_4_23_2(); } =20 -void test_4_24_2(void) +static void test_4_24_2(void) { printk("test_4_23_2\n"); test_4_23_1(); } =20 -void test_4_24_3(void) +static void test_4_24_3(void) { printk("test_4_23_2\n"); rfcomm_sabm_msg(&rfcomm_con_list[0], 2); -=20=20 } =20 -void test_4_24_4(void) +static void test_4_24_4(void) { printk("test_4_23_1\n"); rfcomm_sabm_msg(&rfcomm_con_list[0], 2); } =20 -void test_4_25_1(void) +static void test_4_25_1(void) { printk("test_4_25_1\n"); rfcomm_pn_msg(&rfcomm_con_list[0], 2, 0, 500); } =20 -void test_4_25_2(void) +static void test_4_25_2(void) { printk("test_4_25_2\n"); rfcomm_con_list[0].l2cap->local_mtu =3D 65; } =20 -void test_4_25_3(void) +static void test_4_25_3(void) { printk("test_4_25_3\n"); rfcomm_sabm_msg(&rfcomm_con_list[0] ,2);=20 } =20 -void test_4_26(void) +static void test_4_26(void) { printk("test_4_26\n"); rfcomm_pn_msg(&rfcomm_con_list[0], 4, 0, 127); } =20 -void test_4_27(void) +static void test_4_27(void) { printk("test_4_27\n"); rfcomm_pn_msg(&rfcomm_con_list[0], 4, 10, 127); } =20 -void test_4_28(void) +static void test_4_28(void) { printk("test_4_28\n"); rfcomm_send_credits(&rfcomm_con_list[0], 4, 10); @@ -1290,7 +1275,7 @@ * TCS stuff */ =20 -void test_5_1(void) +static void test_5_1(void) { if (!tcs[0].l2cap) { printk("Please connect TCS first with tcs_connect bd_addr\n"); @@ -1299,7 +1284,7 @@ tcs_setup(tcs[0].l2cap, NULL, 0); } =20 -void test_5_1_1(void) +static void test_5_1_1(void) { u8 nbr[2]; =20 @@ -1325,7 +1310,7 @@ } =20 =20 -void test_5_2(void) +static void test_5_2(void) { if (!tcs[0].l2cap) { printk("Please connect TCS first with tcs_connect bd_addr\n"); @@ -1334,7 +1319,7 @@ tcs_connect(tcs[0].l2cap); } =20 -void test_5_3(void) +static void test_5_3(void) { if (!tcs[0].l2cap) { printk("Please connect TCS first with tcs_connect bd_addr\n"); @@ -1343,22 +1328,22 @@ tcs_disconnect(tcs[0].l2cap); } =20 -void test_5_4(void) +static void test_5_4(void) { test_5_1(); } =20 -void test_5_5(void) +static void test_5_5(void) { test_5_2(); } =20 -void test_5_6(void) +static void test_5_6(void) { test_5_3(); } =20 -void test_5_7(void) +static void test_5_7(void) { if (!tcs[0].l2cap) { printk("Please connect TCS first with tcs_connect bd_addr\n"); @@ -1367,9 +1352,10 @@ tcs_send_information(tcs[0].l2cap, '1'); } =20 -void test_gateway_call() +static void test_gateway_call(void) { unsigned char *atd =3D "ATD4257272353\r\n"; + printk("test_gateway_call, sending %s\n", atd); rfcomm_send_data(CREATE_RFCOMM_ID(0,2), atd, strlen(atd)); } @@ -1379,16 +1365,14 @@ */ =20 void process_test_cmd(s32 test_case) -{ - if(!isInitialized) { + if (!test_is_initialized) { unplug_test_init(); } =20=20=20=20=20 - printf("test_case %d\n",test_case); + printk("test_case %d\n",test_case); =20 switch(test_case){ -=20=20=20=20 case 0: test_server(); break; case 1: test_client(); @@ -1641,9 +1625,7 @@ break; =20 default: - printf("Unknown test case\n"); + printk("Unknown test case\n"); break; } } - -#endif /* UNPLUG_TEST_C */ |
From: Peter K. <pk...@us...> - 2001-07-31 19:00:28
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btconfig.h 1.31 1.32=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Do not define CONFIG_BLUETOOTH_SUPPORT_BCSP and CONFIG_BLUETOOTH_UNPLUG_TEST here as it is done from the Makefile. The diff of the modified file(s): --- btconfig.h 2001/07/31 09:05:03 1.31 +++ btconfig.h 2001/07/31 19:00:28 1.32 @@ -54,8 +54,6 @@ * General * ******************/ =20 -/* Use testcode or not -//define #CONFIG_BLUETOOTH_UNPLUG_TEST /* Bluetooth HW defines used to setup different HW and to cope with=20 limitations in HW */ =20 @@ -87,9 +85,14 @@ #undef CONFIG_BLUETOOTH_EARLY_MSSWITCH =20 #ifdef CONFIG_BLUETOOTH_CSR -#define CONFIG_BLUETOOTH_SUPPORT_BCSP +/* This is set from the Makefile, so do not set it here */ +//#define CONFIG_BLUETOOTH_SUPPORT_BCSP #undef CONFIG_BLUETOOTH_USE_BCSP #endif + +/* Use testcode or not */ +/* This is set from the Makefile if appropriate, so do not set it here */ +//#undef CONFIG_BLUETOOTH_UNPLUG_TEST =20 /*************** * HCI * |
From: Peter K. <pk...@us...> - 2001-07-31 18:59:24
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.24 1.25=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Added INCLUDE_BCSP_SUPPORT to be used if BCSP support is wanted. * Build correctly with INCLUDE_UNPLUG_TEST defined when building for linux 2.4.x The diff of the modified file(s): --- Makefile 2001/07/31 09:04:13 1.24 +++ Makefile 2001/07/31 18:59:23 1.25 @@ -6,13 +6,11 @@ l2cap.o l2cap_con.o l2cap_sec.o rfcomm.o rfcomm_sec.o \ sec_client.o sdp.o tcs.o test.o =20 +TOBJS =3D unplug_test.o + BOBJS =3D bcsp.o bcsp_datagram.o bcsp_integrity.o bcsp_mux.o \ bcsp_sequence.o bcsp_slip.o =20 -# Uncomment this line to enable the unplugged testcases. If you -# don't know what this is just leave it commented. -INCLUDE_UNPLUG_TEST =3D 1 - ifeq ($(TOPDIR)/Rules.make,$(wildcard $(TOPDIR)/Rules.make)) =20 #--------------------------------------------------------------------- @@ -24,19 +22,19 @@ =20 # For 2.4.x obj-$(CONFIG_BLUETOOTH) +=3D $(OBJS) +obj-$(CONFIG_BLUETOOTH_UNPLUG_TEST) +=3D $(TOBJS) obj-$(CONFIG_BLUETOOTH_SUPPORT_BCSP) +=3D $(BOBJS) =20 # For 2.0.x and 2.2.x O_OBJS =3D $(OBJS) +ifdef CONFIG_BLUETOOTH_UNPLUG_TEST +O_OBJS +=3D $(TOBJS) +endif ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP O_OBJS +=3D $(BOBJS) endif M_OBJS =3D $(O_TARGET) =20 -ifdef INCLUDE_UNPLUG_TEST -O_OBJS +=3D unplug_test.o -endif - include $(TOPDIR)/Rules.make =20 else @@ -45,6 +43,14 @@ # Standalone makefile rules #--------------------------------------------------------------------- =20 +# Uncomment this line to enable support for BCSP. +# If you do not know what this is, just leave it commented. +#INCLUDE_BCSP_SUPPORT =3D 1 + +# Uncomment this line to enable the unplug testcases. +# If you do not know what this is, just leave it commented. +#INCLUDE_UNPLUG_TEST =3D 1 + # The INCLUDEDIR variable allows LSB compliant distros to be able to compi= le # the module correctly. Use 'make INCLUDEDIR=3D/usr/src/linux/include' whe= re # /usr/src/linux/include is the directory that was used to build the kerne= l. @@ -59,13 +65,18 @@ CFLAGS =3D -D__KERNEL__ -DMODULE -I../../../include -I$(INCLUDEDIR) -Wa= ll -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strength-reduce $(MODF= LAGS) -MD =20 ifdef INCLUDE_UNPLUG_TEST -OBJS +=3D unplug_test.o +OBJS +=3D $(TOBJS) CFLAGS +=3D -DCONFIG_BLUETOOTH_UNPLUG_TEST endif =20 +ifdef INCLUDE_BCSP_SUPPORT +OBJS +=3D $(BOBJS) +CFLAGS +=3D -DCONFIG_BLUETOOTH_SUPPORT_BCSP +endif + all: $(O_TARGET) =20 -$(O_TARGET): $(OBJS) $(BOBJS) +$(O_TARGET): $(OBJS) $(LD) -r -o $@ $^ =20 install: all |
From: Peter K. <pk...@us...> - 2001-07-31 18:47:42
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.188 1.189=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Fixed a couple of compiler warnings. * Corrected indentation. The diff of the modified file(s): --- bluetooth.c 2001/07/30 10:15:51 1.188 +++ bluetooth.c 2001/07/31 18:47:41 1.189 @@ -82,6 +82,7 @@ #include <linux/bluetooth/sdp.h> #include <linux/bluetooth/sec_client.h> #include <linux/bluetooth/bt_errno.h> +#include <linux/bluetooth/test.h> #ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP #include <linux/bluetooth/bcsp.h> #endif @@ -675,7 +676,6 @@ /* First byte is length */=20 case BTTESTCOMMAND: { - extern void test_process_cmd(unsigned char *cmd, s32 size); u8 cmd[261]; =20 copy_from_user(cmd, (u8*)arg, 260); @@ -1546,7 +1546,7 @@ struct tty_struct *upper_tty; u32 line; =20 - line =3D (con_id >> 8) & 0xff; + line =3D GET_RFCOMMLINE(con_id); =20=09 /* get upper tty and call its ldisc->receive_buf */ =20 @@ -1769,7 +1769,6 @@ */ int bt_catch_ncp(u8* data, u32 count) { - int ncp_len; int index =3D 0; =20 /* fixme -- do this for BCSP as well */ @@ -1939,36 +1938,28 @@ case L2CAP_TEST_LAYER: case L2CAP_TEST2_LAYER: case L2CAP_TEST3_LAYER: - { line =3D (con_id & 0x0000ffff); BT_DRIVER(FNC"Connecting TEST_LAYER (psm %02X) on line %d\n", GET_PSM(c= on_id), line); =20 /* Check the line to assure no other connections on it */ =20 if ((SESSIONSTATE(line) =3D=3D BT_LOWERCONNECTED) || - (SESSIONSTATE(line) =3D=3D BT_ACTIVE))=20 - { + (SESSIONSTATE(line) =3D=3D BT_ACTIVE)) { D_WARN("already got connection on line %d\n", line);=20 return -1; } =20=09=20=20 - if(test_connect_psmreq(bd_addr, GET_PSM(con_id)) < 0) - { + if(test_connect_psmreq(bd_addr, GET_PSM(con_id)) < 0) { BT_DRIVER("bt_connect failed\n"); return bt_ctrl.session[line].connect_status; } =20=20=20=20=20 return bt_ctrl.session[line].connect_status; - } - break; + case TCS_LAYER: - { return tcs_connect_req(bd_addr); - } - break; =20=09=20=20 -=09=20=20=20=20 default:=20=20=20=20 BT_DRIVER(FNC"PSM %d not supported as client\n", GET_PSM(con_id)); break; @@ -2127,13 +2118,13 @@ bt_disconnect(u32 con_id) { int line; + switch(GET_PSM(con_id)) { case RFCOMM_LAYER: - { line =3D GET_RFCOMMLINE(con_id); - BT_DRIVER("bt_disconnect : Disconnecting line %d (ONLY RFCOMM)\n",=20 - GET_RFCOMMLINE(con_id)); + BT_DRIVER(__FUNCTION__ ": Disconnecting line %d (ONLY RFCOMM)\n",=20 + line); =20 CHECK_RFCOMM(con_id); =20=09=20=20=20=20 @@ -2141,57 +2132,42 @@ =20=09=20=20=20=20 /* check if we have a connection */ if ((SESSIONSTATE(line) =3D=3D BT_LOWERCONNECTED) ||=20 - (SESSIONSTATE(line) =3D=3D BT_ACTIVE)) - {=20=20=20=20=20=20=20=20=20=20 - if (rfcomm_disconnect_req(GET_RFCOMMLINE(con_id)) < 0)=20 - { - BT_DRIVER("bt_disconnect failed\n"); + (SESSIONSTATE(line) =3D=3D BT_ACTIVE)) { + if (rfcomm_disconnect_req(line) < 0) { + BT_DRIVER(__FUNCTION__ ": Failed\n"); return bt_ctrl.session[line].disconnect_status; } =20 /* fixme -- remove timers, useless when rfcomm blocks ? */ =20=20=20=20=20=20=20=20=20=20=20 /* Sleep if not yet disconnected */ - if (bt_ctrl.session[line].disconnect_status =3D=3D -1)=20 - { + if (bt_ctrl.session[line].disconnect_status =3D=3D -1) { /* use connect wq for dusconnect aswell */ start_wq_timer(&bt_timer, BT_CON_TIMEOUT,=20 &bt_ctrl.connect_wq[line]); interruptible_sleep_on(&bt_ctrl.connect_wq[line]); } - } - else - { - bt_ctrl.session[line].disconnect_status =3D MSGCODE(MSG_BT_INTERFAC= E,=20 - BT_NOTCONNECTED); + } else { + bt_ctrl.session[line].disconnect_status =3D + MSGCODE(MSG_BT_INTERFACE, BT_NOTCONNECTED); } return bt_ctrl.session[line].disconnect_status; - break; - } =20=09=20=20 case L2CAP_TEST_LAYER: - { - extern l2cap_con *testcon; test_disconnect_req(testcon); /* extern l2cap_con set in test.c */ return bt_ctrl.session[line].disconnect_status; - break; - } + case L2CAP_TEST2_LAYER: - { - extern l2cap_con *testcon2; test_disconnect_req(testcon2); return bt_ctrl.session[line].disconnect_status; - break; - } + case L2CAP_TEST3_LAYER: - { - extern l2cap_con *testcon3; test_disconnect_req(testcon3); return bt_ctrl.session[line].disconnect_status; - break; - } + default: - BT_DRIVER("bt_disconnect: Can't disconnect this layer (PSM %x)\n", GE= T_PSM(con_id)); + BT_DRIVER(__FUNCTION__ ": Can't disconnect this layer (PSM %x)\n", GET_P= SM(con_id)); + return -EINVAL; } } =20 |
From: Peter K. <pk...@us...> - 2001-07-31 18:36:30
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.168 1.169=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Cosmetic change. The diff of the modified file(s): --- hci.c 2001/07/31 17:05:49 1.168 +++ hci.c 2001/07/31 18:36:29 1.169 @@ -2692,18 +2692,18 @@ } =20 =20 -void hci_set_max_connections(u8 max_connections) +void +hci_set_max_connections(u8 max_connections) { bt_max_connections =3D (int)max_connections; - DSYS("Setting max BT connections to %x\n", bt_max_connections); + DSYS("Setting max BT connections to %d\n", bt_max_connections); hci_update_load_factor(); - } =20 =20 /* Change the 3-bit load factor (all bits set is max load, all zero is min= load). - * Renew load factor if: Any client is connected, disconnected or if the m= aximum - * amount of simultanious connections is altered.=20 + * Renew load factor if: Any client is connected, disconnected or if the + * maximum amount of simultanious connections is altered.=20 */=20 s32 hci_update_load_factor(void) @@ -2711,7 +2711,8 @@ static unsigned char load; =20 /* Makes a rough calculation of the current load */=20 - if ((bt_max_connections =3D=3D hci_ctrl.nbr_of_connections) || (bt_max_co= nnections =3D=3D 0)) + if ((bt_max_connections =3D=3D hci_ctrl.nbr_of_connections) || + (bt_max_connections =3D=3D 0)) load =3D 0x07; else if (bt_max_connections >=3D 4) load =3D hci_ctrl.nbr_of_connections; |
From: Peter K. <pk...@us...> - 2001-07-31 18:35:08
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- test.c 1.19 1.20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Fixed a couple of compiler warnings. * Corrected indentation. The diff of the modified file(s): --- test.c 2001/07/31 17:28:05 1.19 +++ test.c 2001/07/31 18:35:07 1.20 @@ -155,7 +155,6 @@ l2cap_register_upper(L2CAP_TEST2_LAYER, &this_layer); l2cap_register_upper(L2CAP_TEST3_LAYER, &this_layer); //l2cap_register_upper(7, &this_layer); -=20 } =20 void test_shutdown(void) @@ -187,15 +186,12 @@ return 0; } =20 -static s32 t_init =3D -1; - -#ifdef __KERNEL__ -struct tq_struct test_task; -#endif - void test_connect_ind(l2cap_con *l2cap)=20 { #ifdef __KERNEL__ + struct tq_struct test_task; + static s32 t_init =3D -1; + if (t_init < 0) t_init =3D jiffies; #endif @@ -223,9 +219,8 @@ mark_bh(IMMEDIATE_BH); #endif } -=09=09 - #endif + printk("Shutting off authorization pending.\n"); emulate_pending =3D 0; printk("Sending connect rsp with result =3D success back\n"); @@ -258,7 +253,6 @@ testcon3 =3D l2cap; // else // testcon =3D l2cap; - } =20 /* only client receives connect pnd */ @@ -283,8 +277,7 @@ D_STATE("test_connect_cfm\n"); PRINTPSM(l2cap); =20=09 - if ( !l2ca_local_conf_done(l2cap) ) - { + if (!l2ca_local_conf_done(l2cap)) { if (dont_send_config_req){ printk("Don't send back config_req...\n"); printk("Now waiting for initator to shutdown link...\n"); @@ -296,12 +289,10 @@ if(l2ca_config_req(l2cap, 1280, NULL, 0x1234, 0)) { D_ERR("test_config_cfm : Configuration request failed\n"); } } else { -=09=09=09 if(l2ca_config_req(l2cap, 0, NULL, 0, 0)){ D_ERR("test_config_cfm : Configuration request failed\n"); } } =20=09=09 - /* store connection */ =20 if (l2cap->psm =3D=3D L2CAP_TEST_LAYER) @@ -317,7 +308,6 @@ } =20 =20 - /* someone wants to configure l2cap... */ void=20 test_config_ind(l2cap_con* l2cap) @@ -336,8 +326,7 @@ printk("test_config_ind : already have sent back a pos response\n"); =20 /* check if we received a pos response on a previous config req */=20 - if (!l2ca_local_conf_done(l2cap)) - { + if (!l2ca_local_conf_done(l2cap)) { u16 tmp_mtu; =20 /* still haven't sent config request yet */ @@ -432,37 +421,35 @@ } =20 /* assumes int at end of string */ -int my_atoi(u8 *str) +int +my_atoi(u8 *str) { int i =3D 0, mult =3D 1; int len =3D strlen(str); int res=3D0; =20=20=20 - for (i=3Dlen-1; i>=3D0; i--) - { + for (i =3D len-1; i >=3D 0; i--) { if ((str[i] <=3D '9') && (str[i] >=3D '0' )) { res +=3D mult*(str[i]-'0'); mult*=3D10; } else=20 return -1; -=09=20=20 }=20=20 + return res; } =20 -void test_process_cmd(unsigned char *cmd, s32 size) +void +test_process_cmd(unsigned char *cmd, s32 size) { #ifdef CONFIG_BLUETOOTH_UNPLUG_TEST=20 int testcase =3D my_atoi(cmd+2); =20 - if (testcase > 0) - { + if (testcase > 0) { print_data("Going to send: ", cmd, size); process_test_cmd(testcase); - } - else - { + } else { /* other stuff */ } #else @@ -470,6 +457,5 @@ #endif =20 } - =20 /****************** END OF FILE sdp.c ************************************= ***/ |
From: Peter K. <pk...@us...> - 2001-07-31 18:27:42
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- test.h 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Added test_process_cmd(). * Removed test2_* function declarations. The diff of the modified file(s): --- test.h 2001/02/15 16:28:47 1.8 +++ test.h 2001/07/31 18:27:41 1.9 @@ -74,21 +74,7 @@ void test_disconnect_cfm(l2cap_con *l2cap); void test_receive_data(l2cap_con *l2cap, u8 *data, u32 len); s32 test_send_data(l2cap_con *con, u8 *testdata, s32 len); - -void test2_init(void); -void test2_shutdown(void); -s32 test2_connect_req(BD_ADDR bd); -s32 test2_connect_psmreq(BD_ADDR bd, u16 psm); -void test2_connect_ind(l2cap_con *l2cap); -void test2_connect_cfm(l2cap_con *l2cap, s32 status); -void test2_connect_pnd(l2cap_con *l2cap, s32 status); -void test2_config_ind(l2cap_con* l2cap); -void test2_config_cfm(l2cap_con *l2cap, s32 status); -s32 test2_disconnect_req(l2cap_con *con); -void test2_disconnect_ind(l2cap_con *l2cap); -void test2_disconnect_cfm(l2cap_con *l2cap); -void test2_receive_data(l2cap_con *l2cap, u8 *data, u32 len); -s32 test2_send_data(l2cap_con *con, u8 *testdata, s32 len); +void test_process_cmd(u8 *cmd, s32 size); =20 #endif /****************** END OF FILE sdp.h ************************************= ***/ |
From: Peter K. <pk...@us...> - 2001-07-31 18:06:42
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp_datagram.c 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Fixed a couple of compiler warnings. The diff of the modified file(s): --- bcsp_datagram.c 2001/06/06 14:55:53 1.7 +++ bcsp_datagram.c 2001/07/31 18:06:40 1.8 @@ -69,16 +69,13 @@ /****************** LOCAL FUNCTION DECLARATION SECTION *******************= ***/ =20 static s32 handle_sync_pkt(struct bcsp *bcsp); -static s32 send_sync_rsp(void); -static s32 send_conf_rsp(void); -static s32 send_sync_pkt(u32 type); - -static s32 bcsp_datagram_initiated =3D 0; =20 /****************** GLOBAL VARIABLE DECLARATION SECTION ******************= ***/ =20 /****************** LOCAL VARIABLE DECLARATION SECTION *******************= ***/ =20 +static s32 bcsp_datagram_initiated =3D 0; + /****************** FUNCTION DEFINITION SECTION **************************= ***/ =20 void=20 @@ -97,7 +94,7 @@ bcsp_datagram_receive(struct bcsp *bcsp) { if (!bcsp_datagram_initiated) - return; + return 0; /* FIXME: Should this be an error code? */ =20 if (handle_sync_pkt(bcsp)) { return 0; |
From: Peter K. <pk...@us...> - 2001-07-31 17:59:27
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp_sequence.c 1.15 1.16=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Fixed a couple of compiler warnings. The diff of the modified file(s): --- bcsp_sequence.c 2001/07/20 06:43:16 1.15 +++ bcsp_sequence.c 2001/07/31 17:59:25 1.16 @@ -50,6 +50,8 @@ #include <linux/timer.h> =20 #include <linux/bluetooth/sysdep-2.1.h> +#include <linux/bluetooth/btmem.h> +#include <linux/bluetooth/hci.h> #include <linux/bluetooth/bcsp.h> #include <linux/bluetooth/bcsp_debug.h> =20 @@ -106,8 +108,6 @@ =20 static u8 rtx_count =3D BCSP_RTX_MAX; =20 -static u32 got_packet =3D FALSE; - static struct timer_list resend_timer; =20 static u8 resend_timer_active =3D FALSE; @@ -175,7 +175,6 @@ expected_rxseq, BCSP_GET_SEQ(bcsp)); =20 } else { - s32 i; printk("seq out-of-order [exp:%d, got:%d], send ack\n", expected_rxseq, BCSP_GET_SEQ(bcsp)); send_ack(); |
From: Peter K. <pk...@us...> - 2001-07-31 17:52:19
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.h 1.63 1.64=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added declaration of hci_set_max_connections(). The diff of the modified file(s): --- hci.h 2001/07/31 17:50:55 1.63 +++ hci.h 2001/07/31 17:52:18 1.64 @@ -97,6 +97,8 @@ void hci_receive_data(u8* data, u32 count); s32 hci_send_data(bt_tx_buf *tx_buf); =20 +void hci_set_max_connections(u8 max_connections); + #ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP void hci_receive_event(u8 *data, s32 count); void hci_receive_acl(u8 *data, s32 count); |