From: Peter K. <pk...@us...> - 2001-03-05 15:37:35
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- Config.in 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20 bluetooth.c 1.134 1.135=20=20=20=20=20=20=20=20=20=20=20 hci_vendor.c 1.14 1.15=20=20=20=20=20=20=20=20=20=20=20=20 l2cap.c 1.87 1.88=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Renamed CONFIG_BLUETOOTH_USEINBUFFER to CONFIG_BLUETOOTH_USE_INBUFFER, CONFIG_BLUETOOTH_L2CAP_USETIMERS to CONFIG_BLUETOOTH_L2CAP_USE_TIMERS, and CONFIG_BLUETOOTH_ERICSSON_P9A to CONFIG_BLUETOOTH_SET_BAUDRATE_BLOCKING (inverted meaning). The diff of the modified file(s): --- Config.in 2001/03/05 15:12:21 1.3 +++ Config.in 2001/03/05 15:39:07 1.4 @@ -8,21 +8,21 @@ =20 if [ "$CONFIG_BLUETOOTH" !=3D "n" ]; then =20 - bool 'Bluetooth proc entry' CONFIG_BLUETOOTH_PROC - bool 'Input buffering' CONFIG_BLUETOOTH_USEINBUFFER + bool ' Bluetooth proc entries' CONFIG_BLUETOOTH_PROC + bool ' Input buffering' CONFIG_BLUETOOTH_USE_INBUFFER + bool ' Use L2CAP timers' CONFIG_BLUETOOTH_L2CAP_USE_TIMERS bool 'Allow connectionless L2CAP' CONFIG_BLUETOOTH_L2CAP_CONNECTIONLESS - bool 'Use L2CAP timers' CONFIG_BLUETOOTH_L2CAP_USETIMERS =20 choice 'Bluetooth hardware type' \ - "CSR CONFIG_BLUETOOTH_CSR \ - None CONFIG_BLUETOOTH_NOINIT \ + "None CONFIG_BLUETOOTH_NOINIT \ + CSR CONFIG_BLUETOOTH_CSR \ Digianswer CONFIG_BLUETOOTH_DIGIANSWER \ - USB CONFIG_BLUETOOTH_USBMODULE \ + Ericsson CONFIG_BLUETOOTH_ERICSSON \ Generic CONFIG_BLUETOOTH_GENERIC \ - Ericsson CONFIG_BLUETOOTH_ERICSSON" Ericsson + USB CONFIG_BLUETOOTH_USBMODULE" Ericsson =20 if [ "$CONFIG_BLUETOOTH_ERICSSON" =3D "y" ]; then - bool 'Ericsson P9A firmware' CONFIG_BLUETOOTH_ERICSSON_P9A + bool ' Block when setting baudrate' CONFIG_BLUETOOTH_SET_BAUDRATE_BLO= CKING fi fi =20 --- bluetooth.c 2001/03/04 17:54:54 1.134 +++ bluetooth.c 2001/03/05 15:39:07 1.135 @@ -120,7 +120,7 @@ =20 /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 -#ifdef CONFIG_BLUETOOTH_USEINBUFFER +#ifdef CONFIG_BLUETOOTH_USE_INBUFFER =20 /* This buffer is used decrease overruns on serial port. Copies data in interrupt context and schedules a task which consumes data at 'safe' ti= me */ @@ -147,7 +147,7 @@ #endif static void bt_flash_led(void); =20 -#ifdef CONFIG_BLUETOOTH_USEINBUFFER +#ifdef CONFIG_BLUETOOTH_USE_INBUFFER struct tq_struct bt_receive_task; bt_inbuffer hci_data; static void hci_receive_data_task(void); @@ -1243,13 +1243,13 @@ =20 bt_flash_led();=20=20 =20 -#ifdef CONFIG_BLUETOOTH_USEINBUFFER +#ifdef CONFIG_BLUETOOTH_USE_INBUFFER /* store in bt inbuffer and schedule a hci receive task if none is starte= d */ bt_handle_indata(data, count); #else /* process data right away */ hci_receive_data((u8*)data, count); -#endif /* CONFIG_BLUETOOTH_USEINBUFFER */ +#endif /* CONFIG_BLUETOOTH_USE_INBUFFER */ } =20 =20 @@ -1410,7 +1410,7 @@ #undef FNC } =20 -#ifdef CONFIG_BLUETOOTH_USEINBUFFER +#ifdef CONFIG_BLUETOOTH_USE_INBUFFER static void bt_handle_indata(const __u8 *data, s32 count) { s32 free; @@ -1501,7 +1501,7 @@ hci_receive_data(getTemp, size_end); } } -#endif /* CONFIG_BLUETOOTH_USEINBUFFER */ +#endif /* CONFIG_BLUETOOTH_USE_INBUFFER */ =20 /* Opens a connection to the selected PSM, layer specific is the same as t= he * lowest part on the connection ID, in RFCOMM this is line | dlci, each o= ne @@ -2097,7 +2097,7 @@ DSYS("Bluetooth Driver Using ttyBT[0-%d] (data), ttyBTC (ctrl [%d])\n", BT_NBR_DATAPORTS-1, BT_NBR_PORTS-1); =20 -#ifdef CONFIG_BLUETOOTH_USEINBUFFER +#ifdef CONFIG_BLUETOOTH_USE_INBUFFER DSYS("Using BT Inbuffers [%d]\n", BT_INBUFFER_SIZE); /* Init hci inbuffer */ hci_data.head =3D &hci_data.data[0]; --- hci_vendor.c 2001/03/05 15:12:21 1.14 +++ hci_vendor.c 2001/03/05 15:39:07 1.15 @@ -66,7 +66,7 @@ =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 -#if defined(CONFIG_BLUETOOTH_ERICSSON) +#ifdef CONFIG_BLUETOOTH_ERICSSON /* Ericsson defines */ #define ERICSSON_SET_UART_BAUD_RATE 0x9 #define ERICSSON_WRITE_BD_ADDR 0xd @@ -77,7 +77,7 @@ #define ERICSSON_TX_TEST 0x19 #endif =20 -#if defined(CONFIG_BLUETOOTH_DIGIANSWER) +#ifdef CONFIG_BLUETOOTH_DIGIANSWER /* Digianswer defines */ #endif =20 @@ -102,7 +102,7 @@ =20 /****************** FUNCTION DEFINITION SECTION **************************= ***/ =20 -#if defined(CONFIG_BLUETOOTH_ERICSSON) +#ifdef CONFIG_BLUETOOTH_ERICSSON /*************************************************************************= ****/ /********************** Ericsson functions *******************************= ****/ /*************************************************************************= ****/ @@ -168,7 +168,7 @@ D_ERR(__FUNCTION__": Baudrate not supported\n"); break;=09 } -#ifndef CONFIG_BLUETOOTH_ERICSSON_P9A +#ifdef CONFIG_BLUETOOTH_SET_BAUDRATE_BLOCKING tmp =3D send_cmd_block((u8*) &c_pkt ,c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); #else if (hci_ctrl.hc_buf.cmd_num < 1) { @@ -195,8 +195,7 @@ =20=20=20=20=20 case ERICSSON_SET_UART_BAUD_RATE: D_CMD(__FUNCTION__" Ericsson baudrate set\n"); -#ifndef CONFIG_BLUETOOTH_ERICSSON_P9A - // no wake up, since hci_set_baudrate() is non-blocking +#ifdef CONFIG_BLUETOOTH_SET_BAUDRATE_BLOCKING release_cmd_timer(); wake_up_interruptible(&hci_wq); #endif --- l2cap.c 2001/03/04 17:54:54 1.87 +++ l2cap.c 2001/03/05 15:39:07 1.88 @@ -223,7 +223,7 @@ #endif /* LINUX_VERSION_CODE */ #endif /* __KERNEL__ */ =20 -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS #define MAX_NO_RTX 0 #define RTX_TIMEOUT 5 /* sec */ #define ERTX_TIMEOUT 60 /* sec */ @@ -315,7 +315,7 @@ #if L2CAP_SELFTEST test_conlist(); #endif -#ifdef BLUETOOTH_CONFIG_L2CAP_CONNECTIONLESS +#ifdef CONFIG_BLUETOOTH_L2CAP_CONNECTIONLESS l2cap->allow_conless =3D 1; #else l2cap->allow_conless =3D 0; @@ -982,7 +982,7 @@ return; } =20=20=20=20=20=20=20=20=20=20 -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS disable_rtx(con); #endif =20 @@ -996,7 +996,7 @@ =20=20=20=20=20=20=20=20=20=20=20=20 case RES_PENDING: l2ca_connect_pnd(con, conrsp->status); -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS /* Disable RTX timer and start ERTX */ //start_ertx(); #endif @@ -1034,7 +1034,7 @@ Disable RTX/ERTX timers (New state : CLOSED) */ -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS disable_rtx(con); //disable_ertx(con); #endif @@ -1075,7 +1075,7 @@ =20=09 case CONF_SUCCESS: =20=20=20=20=20=20=20=20=20=20 -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS disable_rtx(con); #endif =20 @@ -1125,7 +1125,7 @@ =20 /* If we end up here, config failed */ =20 -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS disable_rtx(con); #endif =20 @@ -1170,7 +1170,7 @@ return; } =20 -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS disable_rtx(con); #endif=09 =20 @@ -1372,7 +1372,7 @@ sleep(3); #endif =20 -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS do_cmd_backup(con, SIG_CONREQ, 0, NULL, 0, 0, 0); #endif /* baseband is up, now initiate l2cap */ @@ -1426,7 +1426,7 @@ /* flag phys link as down */ con->link_up =3D FALSE; =20 -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS /* cancel any outstanding timers */ disable_rtx(con); //disable_ertx(con); @@ -1565,7 +1565,7 @@ con->link_up =3D 1; ENTERSTATE(con, W4_L2CAP_CONNECT_RSP); PRINTSTATE(con); -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS do_cmd_backup(con, SIG_CONREQ, 0, NULL, 0, 0, 0); #endif l2cap_connect_req(con, psm); @@ -1598,7 +1598,7 @@ =20 /* local mtu is set in l2cap_config_req */ =20 -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS do_cmd_backup(con, SIG_CONFREQ, in_mtu, outflow,=20 flush_timeout, link_to, 0); #endif=09=09 @@ -1624,7 +1624,7 @@ =20 con->conf_req_ready =3D FALSE; con->conf_rsp_ready =3D FALSE; -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS=09=09 +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS=09=09 do_cmd_backup(con, SIG_CONFREQ, in_mtu, outflow,=20 flush_timeout, link_to, 0); #endif @@ -1653,7 +1653,7 @@ =20 if (con->current_state =3D=3D OPEN || con->current_state =3D=3D CONFIG) { =20 -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS do_cmd_backup(con, SIG_DISCREQ, 0, NULL,0, 0, 0); #endif result =3D l2cap_disconnect_req(con); @@ -1903,7 +1903,7 @@ tx->cur_len =3D L2CAP_HDRSIZE + payload_len; /* Increased as lower layers= =20 add header data */=20=20 =20=09 -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS /* start retransmission timer */ start_rtx(con, RTX_TIMEOUT); #endif @@ -2025,7 +2025,7 @@ SIGCMD_HDRSIZE + CONF_REQSIZE); =20=09 print_data("l2cap options : ", (char*)opt , opt_len); -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS /* start retransmission timer */ start_rtx(con, RTX_TIMEOUT); #endif @@ -2069,7 +2069,7 @@ tx->bc_flag =3D NO_BROADCAST; tx->cur_len =3D L2CAP_HDRSIZE + payload_len; =20 -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS /* start retransmission timer */ start_rtx(con, RTX_TIMEOUT); #endif @@ -2117,7 +2117,7 @@ tx->bc_flag =3D NO_BROADCAST; tx->cur_len =3D L2CAP_HDRSIZE + payload_len; /* Increased when lower layers add header data */ -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS start_rtx(con, RTX_TIMEOUT); #endif return hci_send_data(tx); @@ -2204,7 +2204,7 @@ tx->bc_flag =3D NO_BROADCAST; tx->cur_len =3D L2CAP_HDRSIZE + payload_len; /* Increased when lower layers add header data */ -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS start_rtx(con, RTX_TIMEOUT); #endif return hci_send_data(tx); @@ -2670,7 +2670,7 @@ /* use existing handle */ D_STATE("l2ca_ping : using existing handle\n"); con->ping_sent=3D1; -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS=09=09 +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS=09=09 do_cmd_backup(con, SIG_ECHOREQ, 0, NULL, 0, 0, 0); #endif l2cap_echo_req(con, NULL, 0); @@ -2725,7 +2725,7 @@ con->inforeq_sent =3D 1; con->initiator =3D 1; insert_con(con); -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS=09=09 +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS=09=09 do_cmd_backup(con, SIG_INFOREQ, 0, NULL, 0, 0, infotype); #endif /* l2cap_echo_req is called in lp_connect_cfm */ @@ -2736,7 +2736,7 @@ /* use existing handle */ D_STATE("l2ca_getinfo : using existing handle\n"); con->inforeq_sent =3D 1; -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS=09=09 +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS=09=09 do_cmd_backup(con, SIG_INFOREQ, 0, NULL, 0, 0, infotype); #endif l2cap_info_req(con, infotype); @@ -2808,7 +2808,7 @@ =20=20=20 /* FIXME -- send l2ca_timeoutind() */ =20 -#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS +#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS if (MAX_NO_RTX =3D=3D 0) { /* no retransmissions, shutdown connection */ |
From: Gordon M. <gm...@us...> - 2001-03-12 15:52:39
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.17 1.18=20=20=20=20=20=20=20=20=20=20=20=20 hci.c 1.124 1.125=20=20=20=20=20=20=20=20=20=20=20 l2cap.c 1.91 1.92=20=20=20=20=20=20=20=20=20=20=20=20 rfcomm.c 1.94 1.95=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: --Part of Matthias Fuchs big-endian patch The diff of the modified file(s): --- Makefile 2001/03/10 13:00:15 1.17 +++ Makefile 2001/03/12 15:54:35 1.18 @@ -2,6 +2,9 @@ # Makefile for the Bluetooth device driver. # =20 +CC=3D$(CROSSCOMPILE)gcc +LD=3D$(CROSSCOMPILE)ld + # This would have worked had it not been for test.c which is not to be # included by default #OBJS =3D $(patsubst %.c, %.o, $(wildcard *.c)) --- hci.c 2001/03/05 16:56:45 1.124 +++ hci.c 2001/03/12 15:54:35 1.125 @@ -32,10 +32,10 @@ * General Public License. Your use of that executable is in no way * restricted on account of using the AXIS OpenBT Stack code with it. * - * This exception does not however invalidate any other reasons why + * This exception does not however invalidate any other reasons wh * the executable file might be covered by the provisions of the GNU * General Public License. - * +=20 * $Id$ * */ @@ -69,6 +69,7 @@ #include "include/btmem.h" #include "include/tcs.h" #include "include/sec_client.h" +#include "include/local.h" #endif =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ @@ -85,10 +86,10 @@ (((x2)&1)<<1) + ((x1)&1)) =20 =20 -#define MAKE_ACL_HDR(hci_hdl,pb,bc,len) (((len & 0xffff) << 16) + \ +#define MAKE_ACL_HDR(hci_hdl,pb,bc,len) (cpu_to_le32(((len & 0xffff) << 16= ) + \ ((bc & 0x3) << 14) + \ ((pb & 0x3) << 12) + \ - (hci_hdl & 0xfff)) + (hci_hdl & 0xfff))) =20 #define ACL_LINK 1 #define SCO_LINK 0 @@ -1791,7 +1792,8 @@ c_pkt.type =3D CMD_PKT; c_pkt.opcode =3D hci_put_opcode(DISCONNECT, HCI_LC) ; =20 - memcpy(c_pkt.data, &hdl, 2); + c_pkt.data[0] =3D hdl & 0xff; + c_pkt.data[1] =3D hdl >> 8; c_pkt.data[2] =3D reason; c_pkt.len =3D 3; =20 @@ -2529,11 +2531,13 @@ c_pkt.type =3D CMD_PKT; c_pkt.opcode =3D hci_put_opcode(HOST_BUFFER_SIZE, HCI_HC) ; =20=20=20 - memcpy(c_pkt.data + c, &acl_len, 2); - c_pkt.data[(c+=3D 2)] =3D sco_len; - memcpy(c_pkt.data + (c+=3D 1), & acl_num, 2); - memcpy(c_pkt.data + (c+=3D 2), & sco_num, 2); - c_pkt.len =3D (c+=3D 2); + c_pkt.data[c++] =3D acl_len & 0xff; + c_pkt.data[c++] =3D (acl_len >> 8) & 0xff; + c_pkt.data[c++] =3D sco_len; + c_pkt.data[c++] =3D acl_num & 0xff; + c_pkt.data[c++] =3D (acl_num >> 8) & 0xff; + c_pkt.data[c++] =3D sco_num & 0xff; + c_pkt.data[c++] =3D (sco_num >> 8) & 0xff; =20 return send_cmd_block((u8*) &c_pkt, c + CMD_HDR_LEN + HCI_HDR_LEN); #else --- l2cap.c 2001/03/05 16:41:45 1.91 +++ l2cap.c 2001/03/12 15:54:35 1.92 @@ -70,6 +70,7 @@ #include "include/sdp.h" #include "include/test.h" #include "include/btmem.h" +#include "include/local.h" #endif =20 /****************** DEBUG CONSTANT AND MACRO SECTION *********************= ***/ @@ -507,8 +508,10 @@ /*u8 bc_flag,*/ u32 *l2cap_len) { #define FNC "l2cap_receive_data : " - l2cap_packet *pkt; + l2cap_packet *pkt =3D NULL; l2cap_con *con; + u16 pkt_len; + CID pkt_cid; =20 D_RCV(FNC" got %d bytes on hci_handle : %d\n", len, hci_handle); PRINTPKT("l2cap_receive_data : ", data, len); @@ -524,14 +527,17 @@ =20 pkt =3D (l2cap_packet *)data; =20 + pkt_len =3D le16_to_cpu(pkt->len); + pkt_cid =3D le16_to_cpu(pkt->cid); + /* l2cap_len is checked in hci, when l2cap_len bytes=20 has been received in hci this function is called again */ - *l2cap_len =3D pkt->len + L2CAP_HDRSIZE; + *l2cap_len =3D pkt_len + L2CAP_HDRSIZE; =20=20=20=20=20 - D_RCV(FNC"New frame len:%d cid:%d\n", pkt->len, pkt->cid); + D_RCV(FNC"New frame len:%d cid:%d\n", pkt_len, pkt_cid); =20 /* check length */ - if (!(pkt->len =3D=3D (len - L2CAP_HDRSIZE))) + if (!(pkt_len =3D=3D (len - L2CAP_HDRSIZE))) return; } else if (len !=3D *l2cap_len) { /* Not recieved full frame yet or BIG packet */ @@ -545,8 +551,10 @@ =20 /* A whole frame is received */ pkt =3D (l2cap_packet *)data; + pkt_len =3D le16_to_cpu(pkt->len); + pkt_cid =3D le16_to_cpu(pkt->cid); =20 - switch (pkt->cid) { + switch (pkt_cid) { case CIDSIG: /* Signalling channel */ D_RCV("l2cap_receive_data : Signal data !\n"); @@ -568,18 +576,18 @@ con =3D get_con_hcihdl(hci_handle); =20=09=09 get_upper(CHAR2INT16(pkt->data[1], pkt->data[0]))-> - receive_data(con, pkt->data + 2, pkt->len - 2); + receive_data(con, pkt->data + 2, pkt_len - 2); break; =20=20=20=20=20 default: /* Data channel */ - con =3D get_lcon(pkt->cid); + con =3D get_lcon(pkt_cid); =20=20=20=20=20 if (con =3D=3D NULL) return; =20 if (con->current_state =3D=3D OPEN ) {=20=20=20=20=20=20 - process_frame(con, pkt->data, pkt->len); + process_frame(con, pkt->data, pkt_len); } else { D_ERR("l2cap_receive_data : not OPEN yet, discard data\n"); } @@ -603,6 +611,8 @@ =20 cmd =3D (struct sig_cmd *)(data + pos); =20=20=20 + cmd->len =3D le16_to_cpu(cmd->len); + D_RCV(FNC"received %d bytes\n", len); PRINTPKT(FNC"data", data, len); =20 @@ -630,6 +640,7 @@ /* parse next command header if more cmds left in packet */ if (pos < len){ cmd =3D (struct sig_cmd *)(data + pos); + cmd->len =3D le16_to_cpu(cmd->len); printk("pos %d, len %d\n", pos, len); DSYS("another command in same packet...(%d bytes)\n", cmd->len); @@ -656,6 +667,8 @@ case SIG_CONREQ: /* Request for connection */ conreq =3D (sig_conreq *)req->data; + conreq->psm =3D le16_to_cpu(conreq->psm); + conreq->src_cid =3D le16_to_cpu(conreq->src_cid); =20=09=09 D_STATE(FNC"Connection request\n"); D_STATE(FNC"id:%d len:%d PSM 0x%x src_cid:%d\n", @@ -712,6 +725,8 @@ case SIG_CONFREQ: /* Request for configuration */ confreq =3D (sig_confreq *)req->data; + confreq->dst_cid =3D le16_to_cpu(confreq->dst_cid); + confreq->flags =3D le16_to_cpu(confreq->flags); =20=09=09 D_STATE(FNC"config request cid:%d flags: 0x%x\n",=20 confreq->dst_cid, confreq->flags); @@ -809,6 +824,8 @@ =20=09=09=09 case SIG_DISCREQ: discreq =3D (sig_discreq *)req->data; + discreq->dst_cid =3D le16_to_cpu(discreq->dst_cid); + discreq->src_cid =3D le16_to_cpu(discreq->src_cid); =20 D_STATE(FNC"disconnection request id %d\n",=20 req->id); @@ -853,6 +870,7 @@ D_STATE(FNC"info request\n"); =20=09=09 info =3D (sig_info_req*)(req->data); + info->type =3D le16_to_cpu(info->type); =20=09=09 switch(info->type) { case INFO_CONNLESS_MTU: @@ -909,6 +927,7 @@ D_STATE(FNC"Command reject - \n"); =20=20=20=20=20=20=20=20=20=20 cmdreject =3D (sig_cmdreject*)rsp->data; + cmdreject->reason =3D le16_to_cpu(cmdreject->reason); opt_len =3D rsp->len - sizeof(sig_cmdreject); switch (cmdreject->reason) { case 0: @@ -937,6 +956,10 @@ /* client */ D_STATE(FNC"Got connection response\n"); conrsp =3D (sig_conrsp *)rsp->data; + conrsp->src_cid =3D le16_to_cpu(conrsp->src_cid); + conrsp->dst_cid =3D le16_to_cpu(conrsp->dst_cid); + conrsp->result =3D le16_to_cpu(conrsp->result); + conrsp->status =3D le16_to_cpu(conrsp->status); =20 /* find connection */ if ((con =3D get_lcon(conrsp->src_cid)) =3D=3D NULL) { @@ -1017,6 +1040,9 @@ case SIG_CONFRSP: D_STATE(FNC"Got configuration response\n"); confrsp =3D (sig_confrsp *)rsp->data; + confrsp->src_cid =3D le16_to_cpu(confrsp->src_cid); + confrsp->flags =3D le16_to_cpu(confrsp->flags); + confrsp->result =3D le16_to_cpu(confrsp->result); opt_len =3D rsp->len - sizeof(sig_confrsp); =20 PRINTPKT(FNC"config response", rsp->data, rsp->len); @@ -1109,6 +1135,8 @@ case SIG_DISCRSP: D_STATE(FNC"Got disconnect response\n"); discrsp =3D (sig_discrsp *)rsp->data; + discrsp->dst_cid =3D le16_to_cpu(discrsp->dst_cid); + discrsp->src_cid =3D le16_to_cpu(discrsp->src_cid); PRINTPKT(FNC"disconnect response", rsp->data, rsp->len); =20 /* find connection */ @@ -1167,6 +1195,8 @@ =20=20=20=20=20=20=20=20 case SIG_INFORSP: info =3D (sig_info_rsp *)(rsp->data); + info->type =3D le16_to_cpu(info->type); + info->result =3D le16_to_cpu(info->result); D_STATE(FNC"Got info response : result %d\n", info->result); break; =20=20=20=20=20=20=20=20 @@ -1795,7 +1825,7 @@ l2cap_tx_buf *l2cap_buf; /* Entire l2cap frame + lower layer hdrs */ sig_cmd *cmd; sig_conreq *req; - s32 payload_len; + u16 payload_len; =20 D_XMIT("l2cap_connect_req: Connecting %s (rcid:%d)\n",psm2str(psm)= ,=20 con->remote_cid); @@ -1805,7 +1835,7 @@ return -1; } =20 - payload_len =3D SIGCMD_HDRSIZE + CON_REQSIZE;=20=20 + payload_len =3D SIGCMD_HDRSIZE + CON_REQSIZE; /*2 x 4*/ =20 tx =3D subscribe_bt_buf(sizeof(l2cap_tx_buf) + L2CAP_HDRSIZE+payload_len); if (!tx) { @@ -1819,12 +1849,12 @@ req =3D (sig_conreq*)(l2cap_buf->frame + L2CAP_HDRSIZE + SIGCMD_HDRSIZE); =20 /* Now fill in header fields */=20=20 - req->psm =3D con->psm; - req->src_cid =3D con->local_cid; + req->psm =3D cpu_to_le16(con->psm); + req->src_cid =3D cpu_to_le16(con->local_cid); =20=20=20 cmd->code =3D SIG_CONREQ; cmd->id =3D set_id(con); /* Sets sig_id_sent in l2cap_con */ - cmd->len =3D CON_REQSIZE; + cmd->len =3D cpu_to_le16(CON_REQSIZE); =20 SET_L2CAP_HDR(l2cap_buf->frame, payload_len, CIDSIG); =20 @@ -1850,7 +1880,7 @@ l2cap_tx_buf *l2cap_buf; /* Entire l2cap frame + lower layer hdrs */ sig_cmd *cmd; sig_confreq *req; - s32 payload_len; + u16 payload_len; s32 opt_len=3D0; struct l2cap_option *opt; =20 @@ -1935,13 +1965,13 @@ } =20 /* Request header */ - req->dst_cid =3D con->remote_cid; /* Sending end */ + req->dst_cid =3D cpu_to_le16(con->remote_cid); /* Sending end */ req->flags =3D 0; /* Negotiate same as remote */ =20 /* Signalling header */ cmd->code =3D SIG_CONFREQ; cmd->id =3D set_id(con); /* Sets sig_id_sent in l2cap_con */ - cmd->len =3D CONF_REQSIZE + opt_len; + cmd->len =3D cpu_to_le16(CONF_REQSIZE + opt_len); =20 SET_L2CAP_HDR(l2cap_buf->frame, payload_len, CIDSIG); =20 @@ -1969,7 +1999,7 @@ l2cap_tx_buf *l2cap_buf; /* Entire l2cap frame + lower layer hdrs */ sig_cmd *cmd; sig_discreq *req; - s32 payload_len; + u16 payload_len; =20=20 D_XMIT("l2cap_disconnect_req : rcid %d\n", con->remote_cid); =20 @@ -1987,12 +2017,12 @@ req =3D (sig_discreq*)(l2cap_buf->frame + L2CAP_HDRSIZE + SIGCMD_HDRSIZE); =20 /* Now fill in header fields */=20=20 - req->dst_cid =3D con->remote_cid; - req->src_cid =3D con->local_cid; + req->dst_cid =3D cpu_to_le16(con->remote_cid); + req->src_cid =3D cpu_to_le16(con->local_cid); =20=20=20 cmd->code =3D SIG_DISCREQ; cmd->id =3D set_id(con); /* Sets sig_id_sent in l2cap_con */ - cmd->len =3D DISC_REQSIZE; + cmd->len =3D cpu_to_le16(DISC_REQSIZE); =20 SET_L2CAP_HDR(l2cap_buf->frame, payload_len, CIDSIG); tx->hci_hdl =3D con->hci_hdl; @@ -2013,7 +2043,7 @@ l2cap_tx_buf *l2cap_buf; /* Entire l2cap frame + lower layer hdrs */ sig_cmd *cmd; sig_echo_pkt *req; - s32 payload_len; + u16 payload_len; u16 hci_hdl =3D con->hci_hdl; =20 payload_len =3D SIGCMD_HDRSIZE + sizeof(sig_echo_pkt) + opt_len; @@ -2037,7 +2067,7 @@ cmd->code =3D SIG_ECHOREQ; cmd->id =3D get_id(); =20=20=20 - cmd->len =3D opt_len; + cmd->len =3D cpu_to_le16(opt_len); =20 SET_L2CAP_HDR(l2cap_buf->frame, payload_len, CIDSIG); =20 @@ -2059,7 +2089,7 @@ l2cap_tx_buf *l2cap_buf; /* Entire l2cap frame + lower layer hdrs */ sig_cmd *cmd; sig_echo_pkt *rsp; - s32 payload_len; + u16 payload_len; =20 D_XMIT("l2cap_echo_rsp\n"); =20 @@ -2082,7 +2112,7 @@ =20=20=20 cmd->code =3D SIG_ECHORSP; cmd->id =3D id; - cmd->len =3D opt_len; + cmd->len =3D cpu_to_le16(opt_len); =20 SET_L2CAP_HDR(l2cap_buf->frame, payload_len, CIDSIG); =20 @@ -2118,11 +2148,11 @@ =20=20=20 cmd =3D (sig_cmd*)(l2cap_buf->frame + L2CAP_HDRSIZE); req =3D (sig_info_req*)(l2cap_buf->frame + L2CAP_HDRSIZE +SIGCMD_HDRSIZE); - req->type =3D info_type; + req->type =3D cpu_to_le16(info_type); =20=20=20=20=20 cmd->code =3D SIG_INFOREQ; cmd->id =3D get_id(); - cmd->len =3D sizeof(sig_info_req); + cmd->len =3D cpu_to_le16(sizeof(sig_info_req)); =20 SET_L2CAP_HDR(l2cap_buf->frame, payload_len, CIDSIG); =20 @@ -2162,8 +2192,8 @@ cmd =3D (sig_cmd*)(l2cap_buf->frame + L2CAP_HDRSIZE); rsp =3D (sig_info_rsp*)(l2cap_buf->frame + L2CAP_HDRSIZE +SIGCMD_HDRSIZE); =20 - rsp->type =3D info_type; - rsp->result =3D result;=09 + rsp->type =3D cpu_to_le16(info_type); + rsp->result =3D cpu_to_le16(result);=09 =20 /* Now fill in header fields */ if (info_len) { @@ -2172,7 +2202,7 @@ =20 cmd->code =3D SIG_INFORSP; cmd->id =3D id; - cmd->len =3D sizeof(sig_info_rsp) + info_len; + cmd->len =3D cpu_to_le16(sizeof(sig_info_rsp) + info_len); =20 SET_L2CAP_HDR(l2cap_buf->frame, payload_len, CIDSIG); =20 @@ -2191,7 +2221,7 @@ l2cap_tx_buf *l2cap_buf; /* Entire l2cap frame + lower layer hdrs */ sig_cmd *cmd; sig_cmdreject *cmdrej; - s32 payload_len; + u16 payload_len; =20 payload_len =3D SIGCMD_HDRSIZE + sizeof(sig_cmdreject) + opt_len; =20 @@ -2215,10 +2245,11 @@ =20=20=20 cmd->code =3D SIG_CMDREJECT; cmd->id =3D get_id(); - cmd->len =3D sizeof(sig_cmdreject) + opt_len; + cmd->len =3D cpu_to_le16(sizeof(sig_cmdreject) + opt_len); =20 /* FIXME: set the reason parameter */ - + /* Ok. Does this work? (gjm) */ + cmdrej->reason =3D cpu_to_le16((u16)reason); SET_L2CAP_HDR(l2cap_buf->frame, payload_len, CIDSIG); =20 /* pb_flag is set from hci_send_data */ @@ -2240,7 +2271,7 @@ l2cap_tx_buf *l2cap_buf; /* Entire l2cap frame + lower layer hdrs */ sig_cmd *cmd; sig_conrsp *rsp; - s32 payload_len; + u16 payload_len; =20=20=20 D_XMIT("l2cap_connect_rsp : rcid:%d lcid:%d result:%d status:%d \n", con->remote_cid, con->local_cid, response, status); @@ -2259,19 +2290,19 @@ rsp =3D (sig_conrsp*)(l2cap_buf->frame + L2CAP_HDRSIZE + SIGCMD_HDRSIZE); =20=20=20 /* Now fill in header fields */ - rsp->dst_cid =3D con->local_cid; /* sending end */ - rsp->src_cid =3D con->remote_cid; /* receiving end */ + rsp->dst_cid =3D cpu_to_le16(con->local_cid); /* sending end */ + rsp->src_cid =3D cpu_to_le16(con->remote_cid); /* receiving end */ =20 - if ((rsp->result =3D response) =3D=3D RES_PENDING) - rsp->status =3D status; + if ((rsp->result =3D cpu_to_le16(response)) =3D=3D RES_PENDING) + rsp->status =3D cpu_to_le16(status); else { printk("Result not pending, force status =3D no further info\n"); - rsp->status =3D STAT_NOINFO; + rsp->status =3D cpu_to_le16(STAT_NOINFO); } =20=09 cmd->code =3D SIG_CONRSP; cmd->id =3D con->sig_id_rcv; /* Send back same id as received on req */ - cmd->len =3D CON_RSPSIZE; + cmd->len =3D cpu_to_le16(CON_RSPSIZE); =20 SET_L2CAP_HDR(l2cap_buf->frame, payload_len, CIDSIG); =20 @@ -2290,7 +2321,7 @@ l2cap_tx_buf *l2cap_buf; /* Entire l2cap frame + lower layer hdrs */ sig_cmd *cmd; sig_confrsp *rsp; - s32 payload_len; + u16 payload_len; =20 D_XMIT("l2cap_config_rsp : rcid : %d, out_mtu: %d \n",=20 con->remote_cid, out_mtu); @@ -2315,16 +2346,16 @@ rsp =3D (sig_confrsp*)(l2cap_buf->frame + L2CAP_HDRSIZE + SIGCMD_HDRSIZE); =20=20=20 /* Now fill in header fields */=20=20 - rsp->src_cid =3D con->remote_cid; + rsp->src_cid =3D cpu_to_le16(con->remote_cid); =20 /* FIXME - WHERE ARE THIS DETERMINED ??? */ rsp->flags =3D 0; /* No more config responses to follow */ =20 - rsp->result =3D CONF_SUCCESS; + rsp->result =3D cpu_to_le16(CONF_SUCCESS); =20=20=20 cmd->code =3D SIG_CONFRSP; cmd->id =3D con->sig_id_rcv; /* Send back same id as received on request = */ - cmd->len =3D CONF_RSPSIZE; + cmd->len =3D cpu_to_le16(CONF_RSPSIZE); =20 =20 SET_L2CAP_HDR(l2cap_buf->frame, payload_len, CIDSIG); @@ -2345,7 +2376,7 @@ l2cap_tx_buf *l2cap_buf; /* Entire l2cap frame + lower layer hdrs */ sig_cmd *cmd; sig_discrsp *rsp; - s32 payload_len; + u16 payload_len; =20=20 payload_len =3D SIGCMD_HDRSIZE + sizeof(sig_discrsp); =20 @@ -2362,12 +2393,12 @@ rsp =3D (sig_discrsp*)(l2cap_buf->frame + L2CAP_HDRSIZE + SIGCMD_HDRSIZE); =20=20=20=20=20 /* Now fill in header fields */ - rsp->dst_cid =3D con->local_cid; - rsp->src_cid =3D con->remote_cid; + rsp->dst_cid =3D cpu_to_le16(con->local_cid); + rsp->src_cid =3D cpu_to_le16(con->remote_cid); =20=20=20 cmd->code =3D SIG_DISCRSP; cmd->id =3D con->sig_id_rcv; /* Send back same id as received on req */ - cmd->len =3D sizeof(sig_discrsp); + cmd->len =3D cpu_to_le16(sizeof(sig_discrsp)); =20 SET_L2CAP_HDR(l2cap_buf->frame, payload_len, CIDSIG); =20 @@ -2895,7 +2926,8 @@ opt =3D (l2cap_option*)(data + pos); switch (opt->type) { case OPT_MTU: - con->remote_mtu =3D *((u16*)opt->option_data); + con->remote_mtu =3D *(opt->option_data) |=20 + (*(opt->option_data + 1) << 8); =20 if ((con->remote_mtu < MTU_MIN) &&=20 ((con->remote_mtu + L2CAP_HDRSIZE) > HCI_IN_SIZE)) { @@ -2915,7 +2947,8 @@ break; =20=20=20=20=20=20=20 case OPT_FLUSH: - con->flush_timeout =3D *((u16*)opt->option_data); + con->flush_timeout =3D *(opt->option_data) |=20 + (*(opt->option_data + 1) << 8); =20 /* FIXME -- return error code if not accepted */ =20=09=09=09 --- rfcomm.c 2001/03/08 15:22:45 1.94 +++ rfcomm.c 2001/03/12 15:54:35 1.95 @@ -65,6 +65,7 @@ #include "include/btmem.h" #include "include/l2cap.h" #include "include/bluetooth.h" +#include "include/local.h" #endif =20 /****************** DEBUG CONSTANT AND MACRO SECTION *********************= ***/ @@ -162,29 +163,6 @@ #define swap_long_frame(x) ((x)->h.length.val =3D le16_to_cpu((x)->h.lengt= h.val)) #define swap_mcc_long_frame(x) (swap_long_frame(x)) #define swap_pn_msg(x) ((x)->frame_size =3D le16_to_cpu((x)->frame_size)) - -#ifdef BTD_USERSTACK - -# include <asm/byteorder.h> -# ifdef __LITTLE_ENDIAN -# define cpu_to_le16(x) (x) -# define cpu_to_le32(x) (x) -# define cpu_to_be16(x) htons((x)) -# define cpu_to_be32(x) htonl((x)) -# else -# define cpu_to_be16(x) (x) -# define cpu_to_be32(x) (x) - extern inline __u16 cpu_to_le16(__u16 x) { return (x<<8) | (x>>8);} - extern inline __u32 cpu_to_le32(__u32 x) { return((x>>24) | - ((x>>8)&0xff00) | ((x<<8)&0xff0000) | (x<<24));} -# endif - -# define le16_to_cpu(x) cpu_to_le16(x) -# define le32_to_cpu(x) cpu_to_le32(x) -# define be16_to_cpu(x) cpu_to_be16(x) -# define be32_to_cpu(x) cpu_to_be32(x) - -#endif =20 /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 |
From: Peter K. <pk...@us...> - 2001-04-10 12:27:11
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.135 1.136=20=20=20=20=20=20=20=20=20=20=20 hci_vendor.c 1.19 1.20=20=20=20=20=20=20=20=20=20=20=20=20 l2cap.c 1.96 1.97=20=20=20=20=20=20=20=20=20=20=20=20 rfcomm.c 1.97 1.98=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Include linux/config.h where required to keep 'make dep' happy. The diff of the modified file(s): --- hci.c 2001/03/30 11:30:44 1.135 +++ hci.c 2001/04/10 12:27:10 1.136 @@ -45,6 +45,7 @@ #define __NO_VERSION__ /* don't define kernel_version in module.h */ =20 #ifdef __KERNEL__ +#include <linux/config.h> #include <linux/bluetooth/sysdep-2.1.h> #include <linux/malloc.h> #include <linux/timer.h> --- hci_vendor.c 2001/03/31 15:49:02 1.19 +++ hci_vendor.c 2001/04/10 12:27:10 1.20 @@ -44,6 +44,7 @@ #define __NO_VERSION__ /* don't define kernel_version in module.h */ =20 #ifdef __KERNEL__ +#include <linux/config.h> #include <linux/bluetooth/sysdep-2.1.h> #include <linux/malloc.h> #include <linux/timer.h> --- l2cap.c 2001/03/31 16:35:58 1.96 +++ l2cap.c 2001/04/10 12:27:10 1.97 @@ -45,9 +45,9 @@ #define __NO_VERSION__ /* don't define kernel_version in module.h */ =20 #ifdef __KERNEL__ -#include <linux/malloc.h> - +#include <linux/config.h> #include <linux/bluetooth/sysdep-2.1.h> +#include <linux/malloc.h> #include <linux/bluetooth/l2cap.h> #include <linux/bluetooth/hci.h> #include <linux/bluetooth/rfcomm.h> --- rfcomm.c 2001/04/10 10:50:39 1.97 +++ rfcomm.c 2001/04/10 12:27:10 1.98 @@ -45,6 +45,7 @@ #define __NO_VERSION__ /* don't define kernel_version in module.h */ =20 #ifdef __KERNEL__=20 +#include <linux/config.h> #include <linux/bluetooth/sysdep-2.1.h> #include <linux/malloc.h> #include <linux/types.h> |
From: liu j. <ljk...@ya...> - 2001-04-10 15:07:54
|
hi all: If I have established 1 rfcomm connection between a and b,can I establish another rfcomm connection between the same 2 devices on the same line,or on the same BTn, use another dlci. thanks for any reply. __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ |
From: Peter K. <pk...@us...> - 2001-04-18 15:47:16
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.140 1.141=20=20=20=20=20=20=20=20=20=20=20 hci_vendor.c 1.25 1.26=20=20=20=20=20=20=20=20=20=20=20=20 l2cap_con.c 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20 rfcomm.c 1.104 1.105=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Replaced -=3D1 and +=3D1 with -- and ++. The diff of the modified file(s): --- hci.c 2001/04/18 00:53:37 1.140 +++ hci.c 2001/04/18 15:47:13 1.141 @@ -391,8 +391,8 @@ */ return; } - buf +=3D 1; - count -=3D 1; + buf++; + count--; break; =20 /* If it is an event packet we wait for the next byte @@ -401,16 +401,16 @@ D_STATE(__FUNCTION__", WAIT_FOR_EVENT_TYPE\n"); event_type =3D *buf; state =3D WAIT_FOR_EVENT_LENGTH; - buf +=3D 1; - count -=3D 1;=20=20 + buf++; + count--; break; =20 /* If it is an event the length-field is one byte */ case WAIT_FOR_EVENT_LENGTH: D_STATE(__FUNCTION__", WAIT_FOR_EVENT_LENGTH\n"); event_len =3D *buf; - buf +=3D 1; - count -=3D 1; + buf++; + count--; =20 /* If we don't check this and the lower level driver gives us some trashed values then we might write @@ -492,7 +492,7 @@ D_REC(__FUNCTION__", cont frame\n"); in_buf =3D get_inbuffer(hci_hdl); if (in_buf) { - in_buf->nbr_of_hci_pkt +=3D 1; + in_buf->nbr_of_hci_pkt++; } } =20 @@ -679,7 +679,7 @@ if (j >=3D inq_res->nbr_of_units) { memcpy(inq_res->bd_addr +=20 inq_res->nbr_of_units * 6, tmp_bd, 6); - inq_res->nbr_of_units +=3D 1; + inq_res->nbr_of_units++; } } break; @@ -692,7 +692,7 @@ D_CMD(__FUNCTION__", CONNECTION_COMPLETE: %s\n", get_err_msg(buf[0])); =20 - hci_ctrl.nbr_of_connections +=3D 1; + hci_ctrl.nbr_of_connections++; =20 link_type =3D buf[9]; hci_hdl =3D CHAR2INT12(buf[2], buf[1]); @@ -706,7 +706,7 @@ /* remove hci handle if connection failed */ DSYS(__FUNCTION__", CONNECTION_COMPLETE %s\n",=20 get_err_msg(buf[0])); - hci_ctrl.nbr_of_connections -=3D 1; + hci_ctrl.nbr_of_connections--; reset_hci_con_bd(hci_hdl); } else { DSYS(__FUNCTION__", ACL link is up\n"); @@ -757,7 +757,7 @@ connection handle, if we only support point-to-point connections we can acl_num by reading the buffersizes again, but this will not work in a multipoint connection. */ - hci_ctrl.nbr_of_connections -=3D 1; + hci_ctrl.nbr_of_connections--; =20 reset_hci_con_bd(CHAR2INT12(buf[2], buf[1])); =20=09=09 @@ -1898,8 +1898,7 @@ =20 memcpy(c_pkt.data, bd, 6); c +=3D 6; - c_pkt.data[c] =3D reason; - c +=3D 1; + c_pkt.data[c++] =3D reason; c_pkt.len =3D c; =20 return send_cmd((u8*) &c_pkt ,c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN); @@ -1971,8 +1970,7 @@ =20 memcpy(c_pkt.data, bd, 6); c +=3D 6; - c_pkt.data[c] =3D pin_len; - c +=3D 1; + c_pkt.data[c++] =3D pin_len; memcpy(c_pkt.data + c, pin, 16); c +=3D 16; =20 @@ -3132,15 +3130,15 @@ {=09 if (*data =3D=3D SCO_PKT) { bt_write_lower_driver(data,len); - hci_ctrl.hc_buf.sco_num +=3D 1; + hci_ctrl.hc_buf.sco_num++; } else if (*data =3D=3D ACL_PKT) { /* forward everything to other side */ bt_write_lower_driver(data,len); - hci_ctrl.hc_buf.acl_num +=3D 1; + hci_ctrl.hc_buf.acl_num++; } else if (*data =3D=3D CMD_PKT) { /* convert command to event */ command_handler(data); - hci_ctrl.hc_buf.cmd_num +=3D 1; + hci_ctrl.hc_buf.cmd_num++; } } =20 @@ -3344,7 +3342,7 @@ cmd_buf.next_to_send =3D 0; D_CTRL(__FUNCTION__", next_to_send WRAP\n"); } else { - cmd_buf.next_to_send +=3D 1; + cmd_buf.next_to_send++; } } else { /* no cmd:s in buffer */ @@ -3377,7 +3375,7 @@ cmd_buf.first_free =3D 0; /* wrap */ D_CTRL(__FUNCTION__", WRAP\n"); } else { - cmd_buf.first_free +=3D 1; + cmd_buf.first_free++; } sti(); return 0; @@ -3465,7 +3463,7 @@ tmp->data =3D NULL; =20 cli(); - hci_ctrl.hc_buf.cmd_num -=3D 1; + hci_ctrl.hc_buf.cmd_num--; } sti(); =20=09 --- hci_vendor.c 2001/04/18 14:45:21 1.25 +++ hci_vendor.c 2001/04/18 15:47:13 1.26 @@ -183,7 +183,7 @@ } bt_write_lower_driver((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); =20=20=20 - hci_ctrl.hc_buf.cmd_num -=3D 1;=20=20 + hci_ctrl.hc_buf.cmd_num--; #endif /* We don't really know if the card accepted the change, but we did succeed in trying to send it. --gmcnutt */ --- l2cap_con.c 2001/04/12 15:10:49 1.6 +++ l2cap_con.c 2001/04/18 15:47:13 1.7 @@ -486,7 +486,7 @@ =20=20=20 while (i < con_list.count) {=20 if (con_list.cur->hci_hdl =3D=3D hci_hdl) { - sum +=3D 1; + sum++; } con_list.cur =3D con_list.cur->next; i++; --- rfcomm.c 2001/04/18 15:24:23 1.104 +++ rfcomm.c 2001/04/18 15:47:13 1.105 @@ -1314,7 +1314,7 @@ u32 con_id =3D CREATE_RFCOMM_ID(rfcomm->line, tmp_dlci); =20 if (rfcomm->credit_flow) { - rfcomm->dlci[tmp_dlci].remote_credits -=3D 1; + rfcomm->dlci[tmp_dlci].remote_credits--; if (rfcomm->dlci[tmp_dlci].remote_credits <=3D 1) { /* FIXME -- possible race ? */ =20=09=09=09=09=09 @@ -1408,7 +1408,7 @@ return total; } else { if (rfcomm->credit_flow) { - rfcomm->dlci[dlci].local_credits -=3D 1; + rfcomm->dlci[dlci].local_credits--; D_CTRL(FNC"%d credits left\n", rfcomm->dlci[dlci].local_credits); } =20 @@ -2401,7 +2401,7 @@ =20 tmp =3D 61; while ((rfcomm->dlci[tmp].state =3D=3D DISCONNECTED) && (tmp > 0)) { - tmp -=3D 1; + tmp--; } =20 return tmp; |
From: Peter K. <pk...@us...> - 2001-05-22 09:46:24
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.c 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20 bluetooth.c 1.175 1.176=20=20=20=20=20=20=20=20=20=20=20 hci.c 1.147 1.148=20=20=20=20=20=20=20=20=20=20=20 hci_vendor.c 1.39 1.40=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: BCSP can now be turned on/off in run-time if it is enabled. The diff of the modified file(s): --- bcsp.c 2001/05/18 16:03:51 1.8 +++ bcsp.c 2001/05/22 09:45:53 1.9 @@ -218,7 +218,7 @@ D(__FUNCTION__ ": Outgoing data:\n"); PRINTPKT(data, len); =20 - return bt_write_lower_driver(data, len); + return bt_write_lower_driver_real(data, len); } =20 void --- bluetooth.c 2001/05/18 09:14:20 1.175 +++ bluetooth.c 2001/05/22 09:45:53 1.176 @@ -82,6 +82,9 @@ #include <linux/bluetooth/sdp.h> #include <linux/bluetooth/sec_client.h> #include <linux/bluetooth/bt_errno.h> +#ifdef CONFIG_BLUETOOTH_USE_BCSP +#include <linux/bluetooth/bcsp.h> +#endif =20 #ifdef CONFIG_BLUETOOTH_USE_TCI #include <linux/bluetooth/tci.h> @@ -91,10 +94,6 @@ #include <linux/bluetooth/bt_proc.h> #endif =20 -#ifdef CONFIG_BLUETOOTH_USE_BCSP -#define hci_receive_data(data, len) bcsp_receive_lower(data, len) -#endif - #ifdef __CRIS__ #include <asm/io.h> #endif @@ -188,6 +187,8 @@ static void bt_handle_indata(const __u8 *data, s32 count); #endif =20 +static void bt_receive_data(u8* data, u32 count); + static void bt_show_version(void); static void bt_init_stack(void); static s32 bt_ctrl_init(void); @@ -1327,6 +1328,17 @@ =20 s32 bt_write_lower_driver(u8 *data, s32 len) +#ifdef CONFIG_BLUETOOTH_USE_BCSP +{ + if (bt_use_bcsp(-1)) + return bcsp_write_top(data, len); + else + return bt_write_lower_driver_real(data, len); +} + +s32 +bt_write_lower_driver_real(u8 *data, s32 len) +#endif { #define FNC "bt_write_lower_driver: " =20 @@ -1388,7 +1400,7 @@ bt_handle_indata(data, count); #else /* process data right away */ - hci_receive_data((u8*)data, count); + bt_receive_data((u8*)data, count); #endif /* CONFIG_BLUETOOTH_USE_INBUFFER */ } =20 @@ -1632,8 +1644,8 @@ hci_data.get =3D hci_data.put; sti(); =20 - hci_receive_data(getTemp, size_end); - hci_receive_data(hci_data.head, size_start); + bt_receive_data(getTemp, size_end); + bt_receive_data(hci_data.head, size_start); } else { /* no wrapped buffer */ @@ -1644,11 +1656,22 @@ hci_data.get =3D hci_data.put; sti(); =20 - hci_receive_data(getTemp, size_end); + bt_receive_data(getTemp, size_end); } } #endif /* CONFIG_BLUETOOTH_USE_INBUFFER */ =20 +static void +bt_receive_data(u8* data, u32 count) +{ +#ifdef CONFIG_BLUETOOTH_USE_BCSP + if (bt_use_bcsp(-1)) + bcsp_receive_lower(data, count); + else +#endif + hci_receive_data(data, count); +} + /* Opens a connection to the selected PSM, layer specific is the same as t= he * lowest part on the connection ID, in RFCOMM this is line | dlci, each o= ne * is 8-bits=20 @@ -2277,13 +2300,33 @@ } =20 s32 -bt_initiated() +bt_initiated(void) { return bt_stack_initiated; } =20 +s32 +bt_use_bcsp(s32 new_use_bcsp) +{ +#ifdef CONFIG_BLUETOOTH_USE_BCSP + static s32 use_bcsp =3D 1; +#else + static s32 use_bcsp =3D 0; +#endif + s32 old =3D use_bcsp; + + if (new_use_bcsp >=3D 0) + { +#ifdef CONFIG_BLUETOOTH_USE_BCSP + use_bcsp =3D new_use_bcsp; +#endif + } + + return old; +} + void -bt_init_stack() +bt_init_stack(void) { unsigned long page; =20=09 @@ -2393,7 +2436,7 @@ #endif /* BT_USELINEBUF */ =20 s32 -bt_ctrl_init() +bt_ctrl_init(void) { s32 i; BT_DRIVER("Initiating bt ctrl struct\n"); @@ -2598,7 +2641,7 @@ { s32 line =3D GET_TTYLINE(tty); =20=20 - BT_DRIVER("Registering tty on line %d\n", line); + BT_DRIVER("Registering tty on line %d (%s)\n", line, current->comm); =20=09 /* Allow multiple open for ttyBTC */ if (line =3D=3D BT_NBR_PORTS-BT_NBR_CTRLPORTS) { --- hci.c 2001/05/15 15:00:55 1.147 +++ hci.c 2001/05/22 09:45:53 1.148 @@ -140,10 +140,6 @@ #define USE_NCPTIMER=20 #define NCP_TIMEOUT (3*HZ) =20 -#ifdef CONFIG_BLUETOOTH_USE_BCSP -#define bt_write_lower_driver(data, len) bcsp_write_top(data, len) -#endif - /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 /* cmd_t and cmd_buf are structures used to handle the queue of commands --- hci_vendor.c 2001/05/18 13:50:07 1.39 +++ hci_vendor.c 2001/05/22 09:45:53 1.40 @@ -86,10 +86,6 @@ =20 #define BT_HW_INFO_MAX 255 =20 -#ifdef CONFIG_BLUETOOTH_USE_BCSP -#define bt_write_lower_driver(data, len) bcsp_write_top(data, len) -#endif - /****************** LOCAL VARIABLE DECLARATION SECTION *******************= ***/ =20 /* These are declared in hci.c */ |
From: Peter K. <pk...@us...> - 2001-09-07 12:53:26
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.c 1.18 1.19=20=20=20=20=20=20=20=20=20=20=20=20 bluetooth.c 1.191 1.192=20=20=20=20=20=20=20=20=20=20=20 hci.c 1.174 1.175=20=20=20=20=20=20=20=20=20=20=20 hci_vendor.c 1.51 1.52=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added BCSP DFU support. The diff of the modified file(s): --- bcsp.c 2001/09/06 15:56:56 1.18 +++ bcsp.c 2001/09/07 12:53:24 1.19 @@ -165,7 +165,7 @@ /* notify bt driver that sync failed */ if (!bcsp_sync) { return -1; - } else { + } else if (!bt_dfu_mode(-1)) { csr_waitcmdnum(); /* Wait for command status */ } return 0;=09 @@ -224,6 +224,9 @@ break; case BCSP_ACL_CHN: hci_receive_acl(data, (s32)len); + break; + case BCSP_DFU_CHN: + hci_receive_dfu(data, len); break; default: D_ERR(__FUNCTION__ ": Unknown channel: %d\n", chn); --- bluetooth.c 2001/08/29 09:35:07 1.191 +++ bluetooth.c 2001/09/07 12:53:24 1.192 @@ -503,6 +503,9 @@ s32 size =3D _IOC_SIZE(cmd); bt_connection btcon; u8 bd_addr[6]; +#ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP + static u8 dfu_data[2044]; +#endif =20 /* The direction is a bitmask, and VERIFY_WRITE catches R/W transfer. The ioctl direction is user-oriented, while verify_area is kernel- @@ -1104,18 +1107,71 @@ copy_to_user((s32*)arg, msg, u16_size*sizeof(u16)); return 0; } +#endif /* CONFIG_BLUETOOTH_CSR */ =20 #ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP case BTINITBCSP: { BT_DRIVER("BTINITBCSP\n"); - if (bcsp_init() < 0) + if (bcsp_init() < 0) { printk("Sync failed\n"); + return -ETIMEDOUT; + } return 0; } -#endif -#endif /* CONFIG_BLUETOOTH_CSR */ =20 + case BT_SET_DFU_MODE: + { + GET_USER(tmp, (s32*)arg); + + BT_DRIVER("BT_SET_DFU_MODE: %d\n", tmp); + + tmp =3D bt_dfu_mode(tmp); + put_user(tmp, (s32*)arg); + + return 0; + } + + case BT_SEND_DFU_COMMAND: + { + int ret; + s32 dfu_len; + + if (!bt_use_bcsp(-1)) + return -EPERM; + + GET_USER(dfu_len, (s32*)arg); + if (dfu_len > sizeof dfu_data) + return -EINVAL; + + copy_from_user(dfu_data, (s32*)arg + 1, dfu_len); + + ret =3D bcsp_sequence_send(dfu_data, dfu_len, BCSP_DFU_CHN= ); + if (ret < 0) + return ret; + return 0; + } + + case BT_RETRIEVE_DFU_RESPONSE: + { + s32 dfu_len; + + if (!bt_use_bcsp(-1)) + return -EPERM; + + GET_USER(dfu_len, (s32*)arg); + if (dfu_len > sizeof dfu_data) + return -EINVAL; +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 + dfu_len =3D hci_read_dfu((u8*)((s32*)arg + 1), dfu_len); + if (dfu_len < 0) + return dfu_len; + + put_user(dfu_len, (s32*)arg); + return 0; + } +#endif /* CONFIG_BLUETOOTH_SUPPORT_BCSP */ + default:=09=09 return -ENOIOCTLCMD; =20 @@ -1129,6 +1185,7 @@ u32 cmd, unsigned long arg) { s32 tmp; + //printk(__FUNCTION__"[%s:%x] lock !\n", current->comm, cmd); down(&ioctl_sem); //printk(__FUNCTION__"[%s:%x] running...\n", current->comm, cmd); @@ -2255,7 +2312,7 @@ (bt_connections && active =3D=3D NO_BLUETOOTH_ACTIVITY)); =20 if (light_leds) { - LED_ACTIVE_SET(LED_GREEN); + LED_ACTIVE_SET(bt_dfu_mode(-1) ? LED_ORANGE : LED_GREEN); } else { LED_ACTIVE_SET(LED_OFF); @@ -2520,6 +2577,21 @@ } =20 s32 +bt_dfu_mode(s32 new_dfu_mode) +{=20=20 + static s32 dfu_mode =3D 0; + s32 old =3D dfu_mode; + + if (new_dfu_mode >=3D 0) + { +#ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP + dfu_mode =3D new_dfu_mode; +#endif + } + return old; +} + +s32 bt_init_stack(void) { unsigned long page;=09 @@ -2561,6 +2633,7 @@ } #endif =20 + if (!bt_dfu_mode(-1)) { /* Always check if hci succeeded */ if (hci_init() < 0){ D_ERR("HCI failed to initialize\n"); @@ -2577,6 +2650,7 @@ tcs_init(); test_init(); #endif + } =20 bt_stack_initiated =3D 1; bt_stat.bytes_received =3D 0; @@ -2587,6 +2661,7 @@ =20 #ifdef __CRIS__ /* start led timer */ + bt_set_leds(NO_BLUETOOTH_ACTIVITY); init_timer(&bt_clear_led_timer); bt_clear_led_timer.function =3D &bt_clear_led; bt_clear_led_timer.expires =3D jiffies + HZ/10; @@ -2948,11 +3023,8 @@ struct bt_session *bt; DSYS("Shutting down bluetooth stack\n"); =20 - if (!bt_stack_initiated) { - D_WARN("Bluetooth stack not initiated\n"); - return; - } - + if (bt_stack_initiated) { + if (!bt_dfu_mode(-1)) { /* disconnect all active connections */ for (i =3D 0; i < BT_NBR_DATAPORTS;i++) { bt =3D &bt_ctrl.session[i]; @@ -2975,23 +3047,30 @@ tcs_shutdown(); l2cap_shutdown(); hci_shutdown(); + } + } =20 + bt_dfu_mode(0); + #ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP - if (bt_use_bcsp(-1)) bcsp_shutdown(); #endif =20 btmem_shutdown(); =20 +#ifdef __CRIS__ + if (bt_stack_initiated) { + del_timer(&bt_clear_led_timer); + } + bt_set_leds(NO_BLUETOOTH_ACTIVITY); +#endif + bt_stack_initiated =3D 0; =20=09 if (tmp_bt_buf) { free_page((unsigned long) tmp_bt_buf); tmp_bt_buf =3D NULL; } -#ifdef __CRIS__ - del_timer(&bt_clear_led_timer); -#endif } =20 static inline s32 --- hci.c 2001/08/06 15:52:05 1.174 +++ hci.c 2001/09/07 12:53:24 1.175 @@ -1848,6 +1848,10 @@ #endif /* LINUX_VERSION_CODE */ #endif /* __KERNEL__ */ =20 +#ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP + hci_init_dfu(); +#endif + DSYS("Initialising HCI inbuffers [%d]\n", HCI_IN_SIZE); =20=09 /* Initiate the hci inbuffers */ @@ -1936,6 +1940,10 @@ =20 #ifdef USE_NCPTIMER release_ncp_timer(); +#endif + +#ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP + hci_shutdown_dfu(); #endif } =20 --- hci_vendor.c 2001/08/29 10:08:42 1.51 +++ hci_vendor.c 2001/09/07 12:53:24 1.52 @@ -655,7 +655,100 @@ wake_up_interruptible(&hci_wq);=09 } =20 +static struct dfu_response +{ + struct dfu_response *next; + u32 length; + u8 data[0]; +} *dfu_responses =3D NULL; + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) +static struct wait_queue *dfu_wq =3D NULL; +#else +static wait_queue_head_t dfu_wq; +#endif /* LINUX_VERSION_CODE */ + +void +hci_init_dfu(void) +{ +#ifdef __KERNEL__ +#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,4,0) + init_waitqueue_head(&dfu_wq); +#endif /* LINUX_VERSION_CODE */ +#endif /* __KERNEL__ */ +} + +void +hci_shutdown_dfu(void) +{ + struct dfu_response *response; + + while (dfu_responses) { + cli(); + response =3D dfu_responses; + dfu_responses =3D response->next; + sti(); + + kfree(response); + } +} + +void +hci_receive_dfu(u8 *data, u32 count) +{ + struct dfu_response *response; + + if ((response =3D kmalloc(sizeof(*response) + count, GFP_ATOMIC))) { + response->length =3D count; + memcpy(response->data, data, count); + + cli(); + response->next =3D dfu_responses; + dfu_responses =3D response; + sti(); + + wake_up_interruptible(&dfu_wq); + } +} + s32 +hci_read_dfu(u8* data, u32 count) +{ + struct dfu_response *response; + u32 length; + + if (!dfu_responses) + interruptible_sleep_on(&dfu_wq); + + cli(); + response =3D dfu_responses; + dfu_responses =3D response->next; + sti(); + + if (!response) + return -EINTR; +=20=20=20=20=20=20=20=20 + length =3D response->length; + + if (count < length) { + cli(); + response->next =3D dfu_responses; + dfu_responses =3D response; + sti(); + + printk(__FUNCTION__ ": DFU response was too big!\n"); + + return -E2BIG; + } + + copy_from_user(data, response->data, length); + + kfree(response); + + return (s32)length; +} + +s32 csr_send_general_hq(csr_bccmd *cmd) { csr_msg *msg; @@ -700,7 +793,7 @@ } } =20 -#endif +#endif /* CONFIG_BLUETOOTH_SUPPORT_BCSP */ =20 s32=20 csr_pskey(u16 ps_key, u16 rw_mode, u16 *retb, u16 n_pars) |
From: Peter K. <pk...@us...> - 2001-10-05 12:07:13
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.200 1.201=20=20=20=20=20=20=20=20=20=20=20 hci.c 1.183 1.184=20=20=20=20=20=20=20=20=20=20=20 hci_vendor.c 1.56 1.57=20=20=20=20=20=20=20=20=20=20=20=20 rfcomm.c 1.121 1.122=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Some initialization needs to be done at module start time, not when the stack is initialized. * Initialize (part of) hci even when in DFU mode. The diff of the modified file(s): --- bluetooth.c 2001/10/02 13:44:49 1.200 +++ bluetooth.c 2001/10/05 12:06:43 1.201 @@ -2495,6 +2495,9 @@ #endif /* LINUX_VERSION_CODE */ #endif /* __KERNEL__ */ =20 + hci_module_init(); + rfcomm_module_init(); +=20=20=20=20=20=20=20=20 return 0; /*success*/ } =20 @@ -2596,13 +2599,13 @@ } #endif =20 - if (!bt_dfu_mode(-1)) { /* Always check if hci succeeded */ if (hci_init() < 0){ D_ERR("HCI failed to initialise\n"); goto init_failed_exit1; } =20=09 + if (!bt_dfu_mode(-1)) { l2cap_init(); =20 #ifdef CONFIG_BLUETOOTH_USE_TCI @@ -2626,6 +2629,9 @@ =20 init_failed_exit1:=20 hci_shutdown(); +#ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP + bcsp_shutdown(); +#endif init_failed_exit0: btmem_shutdown(); if (tmp_bt_buf) { @@ -3000,8 +3006,9 @@ sdp_shutdown(); tcs_shutdown(); l2cap_shutdown(); - hci_shutdown(); } + + hci_shutdown(); } =20 bt_dfu_mode(0); --- hci.c 2001/10/02 13:40:56 1.183 +++ hci.c 2001/10/05 12:06:43 1.184 @@ -1824,18 +1824,8 @@ } =20 s32 -hci_init(void) +hci_module_init(void) { - u32 i; - - DSYS("Initialising HCI\n"); - -#ifdef HCI_EMULATION - DSYS("*** HCI emulator on ***\n"); -#else - DSYS("HCI emulator off\n"); -#endif -=09 #ifdef __KERNEL__ #if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,4,0) init_waitqueue_head(&hci_wq); @@ -1848,7 +1838,23 @@ #endif /* __KERNEL__ */ =20 #ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP - hci_init_dfu(); + hci_dfu_module_init(); +#endif + + return 0; +} + +s32 +hci_init(void) +{ + u32 i; + + DSYS("Initialising HCI\n"); + +#ifdef HCI_EMULATION + DSYS("*** HCI emulator on ***\n"); +#else + DSYS("HCI emulator off\n"); #endif =20 DSYS("Initialising HCI inbuffers [%d]\n", HCI_IN_SIZE); @@ -1867,9 +1873,8 @@ hci_ctrl.con[i].con_hdl =3D -1; } =20 -/* Here we set the buffer sizes to zero, just to avoid that they should get - undefined values if the initiating read buffersize fails */ - + /* Here we set the buffer sizes to zero, just to avoid that they + get undefined values if we fail to read the buffer sizes below = */ hci_ctrl.hc_buf.acl_len =3D 0; hci_ctrl.hc_buf.sco_len =3D 0; hci_ctrl.hc_buf.acl_num =3D 0; @@ -1894,6 +1899,9 @@ send_data_task.data =3D NULL; #endif =20 + if (bt_dfu_mode(-1)) + return 0; +=20=20=20=20=20=20=20=20 DSYS("Reading buffer sizes in HW module\n"); hci_read_buffer_size(HCI_BLOCK); =20 @@ -1932,7 +1940,6 @@ void=20 hci_shutdown(void) { -=20=20 /* take down any open acl links */ =20 hci_ctrl.nbr_of_connections =3D 0; @@ -3969,6 +3976,7 @@ release_ncp_timer(void) { #ifdef __KERNEL__ + if (hci_ncp_timer.function) del_timer(&hci_ncp_timer); #endif } --- hci_vendor.c 2001/10/03 17:19:10 1.56 +++ hci_vendor.c 2001/10/05 12:06:43 1.57 @@ -671,7 +671,7 @@ #endif /* LINUX_VERSION_CODE */ =20 void -hci_init_dfu(void) +hci_dfu_module_init(void) { #ifdef __KERNEL__ #if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,4,0) @@ -693,6 +693,8 @@ =20 kfree(response); } + + wake_up_interruptible(&dfu_wq); } =20 void --- rfcomm.c 2001/10/04 14:52:59 1.121 +++ rfcomm.c 2001/10/05 12:06:43 1.122 @@ -544,17 +544,23 @@ rfcomm_con_list[line].l2cap =3D NULL; } =20 -void=20 -rfcomm_init(void) +s32 +rfcomm_module_init(void) { - s32 i; - protocol_layer this_layer; - #ifdef __KERNEL__ #if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,4,0) init_waitqueue_head(&rfcomm_disconnect_wq); #endif /* LINUX_VERSION_CODE */ #endif /* __KERNEL__ */ + + return 0; +} + +void +rfcomm_init(void) +{ + s32 i; + protocol_layer this_layer; =20 DSYS("Initialising RFCOMM\n"); create_crctable(crctable); |
From: Anders J. <and...@us...> - 2001-10-10 14:58:19
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.202 1.203=20=20=20=20=20=20=20=20=20=20=20 l2cap.c 1.120 1.121=20=20=20=20=20=20=20=20=20=20=20 rfcomm.c 1.122 1.123=20=20=20=20=20=20=20=20=20=20=20 test.c 1.28 1.29=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Added usable errorvalues instead of just returning -1. * GET_RFCOMMLINE and GET_SDPLINE -> GET_LINE, code cleanup. The diff of the modified file(s): --- bluetooth.c 2001/10/05 12:25:46 1.202 +++ bluetooth.c 2001/10/10 14:58:18 1.203 @@ -1562,7 +1562,7 @@ struct tty_struct *upper_tty; u32 line; =20 - line =3D GET_RFCOMMLINE(con_id); + line =3D GET_LINE(con_id); =20=09 /* get upper tty and call its ldisc->receive_buf */ =20 @@ -1840,7 +1840,16 @@ s32 bt_connect(u8 *bd_addr, u32 con_id) { - u8 line;=09=09=09=09 + u8 line =3D GET_LINE(con_id);=09=09=09=09 + s32 retval =3D 0; + + /* Check if we already got a connection on the line */ + if ((SESSIONSTATE(line) =3D=3D BT_LOWERCONNECTED)|| + (SESSIONSTATE(line) =3D=3D BT_ACTIVE)) { + D_WARN(__FUNCTION__ ": Already got connection on line %d\n",=20 + line);=20 + return -MSGCODE(MSG_BT_INTERFACE, BT_LINE_BUSY); + } =20 switch (GET_PSM(con_id)) { case RFCOMM_LAYER: @@ -1849,16 +1858,7 @@ =20 CHECK_RFCOMM(con_id); srv_ch =3D GET_RFCOMMSRVCH(con_id); - line =3D GET_RFCOMMLINE(con_id); =20=09=09 - /* check if we already have a connection otherwise wait... */ - if ((SESSIONSTATE(line) =3D=3D BT_LOWERCONNECTED)|| - (SESSIONSTATE(line) =3D=3D BT_ACTIVE)) { - D_WARN(__FUNCTION__ ": Already got connection on line %d\n",=20 - GET_RFCOMMLINE(con_id));=20 - return -1; - }=20 - bt_ctrl.session[line].connect_status =3D -1; =20 BT_DRIVER(__FUNCTION__ ": Connecting srv ch %d on line %d\n", @@ -1885,19 +1885,6 @@ int sdp_connection_id =3D -1; int return_value; =20 - /* Get the line to use for SDP communication */ - - line =3D GET_SDPLINE(con_id); - - /* Check the line to assure no other connections on it */ - - if ((SESSIONSTATE(line) =3D=3D BT_LOWERCONNECTED) || - (SESSIONSTATE(line) =3D=3D BT_ACTIVE)) { - D_WARN(__FUNCTION__ ": Already got connection on line %d\n", - GET_SDPLINE(con_id));=20 - return -1; - } - /* Initiate the connection */ =20 BT_DRIVER(__FUNCTION__ ": Connecting SDP on line %d\n", line); @@ -1960,24 +1947,14 @@ case L2CAP_TEST_LAYER: case L2CAP_TEST2_LAYER: case L2CAP_TEST3_LAYER: - line =3D (con_id & 0x0000ffff); BT_DRIVER(__FUNCTION__ ": Connecting TEST_LAYER (psm %02X) on line %d\n"= , GET_PSM(con_id), line); - - /* Check the line to assure no other connections on it */ - - if ((SESSIONSTATE(line) =3D=3D BT_LOWERCONNECTED) || - (SESSIONSTATE(line) =3D=3D BT_ACTIVE)) { - D_WARN(__FUNCTION__ ": Already got connection on line %d\n", - line);=20 - return -1; - } =20 - if(test_connect_psmreq(bd_addr, GET_PSM(con_id)) < 0) { + if((retval =3D test_connect_psmreq(bd_addr, GET_PSM(con_id))) < 0) { BT_DRIVER(__FUNCTION__ ": Failed\n"); - return bt_ctrl.session[line].connect_status; + return retval; } =20=20=20=20=20 - return bt_ctrl.session[line].connect_status; + return retval; =20 case TCS_LAYER: return tcs_connect_req(bd_addr); @@ -1992,7 +1969,7 @@ =20 static s32 bt_execute_sdp_request(bt_sdp_request *sdpRequest) { - int line =3D GET_SDPLINE(sdpRequest->conID); + int line =3D GET_LINE(sdpRequest->conID); int sdpIndex =3D GET_SDPINDEX(sdpRequest->conID); =20 if (SESSIONSTATE(line) !=3D BT_ACTIVE) { @@ -2050,25 +2027,21 @@ bt_connect_cfm(u32 con_id, s32 status) { u16 psm; - s32 line; -=09 + s32 line =3D GET_LINE(con_id); psm =3D GET_PSM(con_id); =20 - switch (psm) { - case RFCOMM_LAYER: - line =3D GET_RFCOMMLINE(con_id); - CHECK_RFCOMM(con_id); - if ((line < 0) || (line > BT_NBR_DATAPORTS)) { -=09=09=20=20 D_ERR(__FUNCTION__ ": Invalid line (%d)\n", line); return; } =20 + switch (psm) { + case RFCOMM_LAYER: + CHECK_RFCOMM(con_id); bt_ctrl.session[line].connect_status =3D status; =20 BT_DRIVER(__FUNCTION__ ": Line %d [%s]\n", - GET_RFCOMMLINE(con_id), psmname(psm)); + line, psmname(psm)); =20 release_wq_timer(&bt_timer); wake_up_interruptible(&bt_ctrl.connect_wq[line]); @@ -2076,18 +2049,9 @@ break; =20=09 case SDP_LAYER: - line =3D GET_SDPLINE(con_id); - - /* Check incoming line for validity */ - if ((line < 0) || (line > BT_NBR_DATAPORTS)) { - D_ERR(__FUNCTION__ ": Invalid line (%d)\n", line); - return; - } - /* Record the connection status for bt_connect() to process. */ - bt_ctrl.session[line].connect_status =3D status; - BT_DRIVER(__FUNCTION__ ": Line %d [%s]\n", GET_SDPLINE(con_id), psmname(= psm)); + BT_DRIVER(__FUNCTION__ ": Line %d [%s]\n", line, psmname(psm)); BT_DRIVER(__FUNCTION__ ": Wake up line %d\n", line); release_wq_timer(&bt_timer); wake_up_interruptible(&bt_ctrl.connect_wq[line]); @@ -2135,12 +2099,19 @@ static s32=20 bt_disconnect(u32 con_id) { - int line; + int line =3D GET_LINE(con_id); + s32 retval =3D 0; =20 + if ((SESSIONSTATE(line) !=3D BT_LOWERCONNECTED) &&=20 + (SESSIONSTATE(line) !=3D BT_ACTIVE)) { + D_ERR(__FUNCTION__ ": Line not connected\n"); + return -MSGCODE(MSG_BT_INTERFACE, BT_NOTCONNECTED); + } +=09 + switch(GET_PSM(con_id)) { case RFCOMM_LAYER: - line =3D GET_RFCOMMLINE(con_id); BT_DRIVER(__FUNCTION__ ": Disconnecting line %d (ONLY RFCOMM)\n",=20 line); =20 @@ -2148,45 +2119,39 @@ =20 bt_ctrl.session[line].disconnect_status =3D -1; =20 - /* check if we have a connection */ - if ((SESSIONSTATE(line) =3D=3D BT_LOWERCONNECTED) ||=20 - (SESSIONSTATE(line) =3D=3D BT_ACTIVE)) { - if (rfcomm_disconnect_req(line) < 0) { + if ((retval =3D rfcomm_disconnect_req(line)) < 0) { BT_DRIVER(__FUNCTION__ ": Failed\n"); - return bt_ctrl.session[line].disconnect_status; + return retval; } =20 /* fixme -- remove timers, useless when rfcomm blocks ? */ =20 /* Sleep if not yet disconnected */ 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_INTERFACE, BT_NOTCONNECTED); - } +=09=09 return bt_ctrl.session[line].disconnect_status; =20=09=20=20 case L2CAP_TEST_LAYER: - test_disconnect_req(testcon); /* extern l2cap_con set in test.c */ + retval =3D test_disconnect_req(testcon); /* extern l2cap_con set in test= .c */ return bt_ctrl.session[line].disconnect_status; =20 case L2CAP_TEST2_LAYER: - test_disconnect_req(testcon2); + retval =3D test_disconnect_req(testcon2); return bt_ctrl.session[line].disconnect_status; =20 case L2CAP_TEST3_LAYER: - test_disconnect_req(testcon3); + retval =3D test_disconnect_req(testcon3); return bt_ctrl.session[line].disconnect_status; =20 default: BT_DRIVER(__FUNCTION__ ": Can't disconnect this layer (PSM %x)\n", GET_P= SM(con_id)); return -EINVAL; } + return retval; } =20 /* This function is currently not used in OpenBT for any useful stuff, @@ -2204,7 +2169,7 @@ void bt_disconnect_cfm(u32 con_id, s32 status)=20 { - u32 line =3D GET_RFCOMMLINE(con_id); + u32 line =3D GET_LINE(con_id); =20 BT_DRIVER(__FUNCTION__ ": PSM %d, status %d\n",=20 GET_PSM(con_id), status); --- l2cap.c 2001/10/03 12:12:35 1.120 +++ l2cap.c 2001/10/10 14:58:18 1.121 @@ -1385,6 +1385,7 @@ } =20 con->c_status =3D status; + con->c_result =3D status; =20=09 if (status =3D=3D 0) { /* pos cfm */ @@ -1536,7 +1537,7 @@ { l2cap_con *con; l2cap_con *tmpcon; - s32 i; + s32 i, retval =3D 0; u8 rev_bd[6]; =20 D_RCV(__FUNCTION__ "\n"); @@ -1601,24 +1602,22 @@ con->link_up =3D 1; ENTERSTATE(con, W4_L2CAP_CONNECT_RSP); PRINTSTATE(con); - - l2cap_connect_req(con, psm); - - l2ca_wait(__FUNCTION__ ": wait rsp", con); - - /* fixme -- use con->c_status */ - return 0; } else { D_STATE(__FUNCTION__ ": create new baseband link\n"); - lp_connect_req(con->remote_bd);=20=20 + retval =3D lp_connect_req(con->remote_bd); + if(retval < 0) { + D_ERR(__FUNCTION__ ": failed (status %d)\n", retval); + return retval; + } =20 /* wait here until we received a lp_connect_cfm */ l2ca_wait(__FUNCTION__ ": wait baseband", con); =20=09=09 if (con->c_status !=3D RES_SUCCESS) { - D_ERR(__FUNCTION__ ": failed !\n"); + D_ERR(__FUNCTION__ ": lp_connect_req failed, no connection (status %d)\= n", con->c_status); + retval =3D -MSGCODE(MSG_LAYER_HCI, con->c_status); delete_con(con); - return -1; + return retval; } }=09 =20 @@ -1628,13 +1627,18 @@ /* Leave loop when either status failed or success */ while (con->c_status =3D=3D CSTATUS_RTX_TIMEOUT) { /* baseband is up, now initiate send connect req */ - l2cap_connect_req(con, con->psm); - + retval =3D l2cap_connect_req(con, con->psm); + if(retval < 0) { + D_ERR(__FUNCTION__ ": failed (status %d)\n", retval); + } /* wait until we received a response or after timeout */ l2ca_wait(__FUNCTION__ ": wait rsp", con); } =20 - return con->c_result; + if (con->c_status =3D=3D CSTATUS_MAX_NO_RTX && !retval) { + retval =3D -MSGCODE(MSG_LAYER_L2CAP, L2CAP_RTX_TIMEOUT); + } + return retval; } =20 /* params determines how we would like to receive data */ @@ -1662,7 +1666,7 @@ =20 } else if (con->current_state =3D=3D CLOSED) { l2ca_config_cfm(con, CONF_REJ); - return -1; + return -MSGCODE(MSG_LAYER_L2CAP, L2CAP_NO_CONNECTION); } else if (con->current_state =3D=3D OPEN) { DSYS("l2ca_config_req: state OPEN, reconfiguration !\n"); =20 @@ -1683,14 +1687,14 @@ } else { D_ERR(__FUNCTION__ ": invalid state\n"); PRINTSTATE(con); - return -1; + return -MSGCODE(MSG_LAYER_L2CAP, L2CAP_INVALID_STATE); } } =20 s32=20 l2ca_disconnect_req(l2cap_con *con) { - s32 result =3D -1; + s32 retval =3D 0; u16 tmp_hdl =3D con->hci_hdl; =20 if (PARANOIA_CHECKCON(con)) { @@ -1704,7 +1708,14 @@ ENTERSTATE(con, W4_L2CAP_DISCONNECT_RSP); PRINTSTATE(con); do { - result =3D l2cap_disconnect_req(con); + retval =3D l2cap_disconnect_req(con); + if(retval < 0) { + /* This will result in a timeout and we need to try again + as the error is a result of insufficent space in our + memorypool and we try again after a timeout */ + D_ERR(__FUNCTION__ ": Failed (status %d)\n", retval); + } +=09=09=09 l2ca_wait(__FUNCTION__, con); PRINTSTATE(con); =20=09=09=09 @@ -1712,18 +1723,18 @@ } else { D_ERR(__FUNCTION__ ": Invalid state!\n"); PRINTSTATE(con); - return -1;=20=20=20=20 + return -MSGCODE(MSG_LAYER_L2CAP, L2CAP_INVALID_STATE);=20=20=20=20 } =20 - result =3D con->c_result; -=09 if(con->c_status !=3D CSTATUS_MAX_NO_RTX) { if (con->current_state =3D=3D CLOSED) {=09 /* remove l2cap connection */ delete_con(con); } else { - D_ERR("L2CAP Disconnect failed\n"); + /* FIXME: If we reach here, should we delete the connection? */ + D_ERR(__FUNCTION__ ": Failed (Connection not closed)"); PRINTSTATE(con); + retval =3D -MSGCODE(MSG_LAYER_L2CAP, L2CAP_FAILED); } } =20=09 @@ -1738,7 +1749,7 @@ lp_disconnect(tmp_hdl); } =20 - return result; + return retval; } =20 =20 @@ -2060,8 +2071,8 @@ con->remote_cid); =20=09 if (con->current_state !=3D W4_L2CAP_CONNECT_RSP) { - D_ERR(__FUNCTION__ ": Invalid state !!!\n"); - return -1; + D_ERR(__FUNCTION__ ": Invalid state\n"); + return -MSGCODE(MSG_LAYER_L2CAP, L2CAP_INVALID_STATE); } =20 payload_len =3D SIGCMD_HDRSIZE + CON_REQSIZE; /*2 x 4*/ @@ -2085,7 +2096,8 @@ =20 /* Don't increment ID if retransmission */ if (con->timer.rtx_no =3D=3D 0) - cmd->id =3D set_id(con); /* Sets sig_id_sent in l2cap_con = */ + cmd->id =3D set_id(con); /* S +ets sig_id_sent in l2cap_con */ else DSYS("RTX, use same ID\n"); =20 @@ -2722,7 +2734,7 @@ psm2str(con->psm)); D_ERR(__FUNCTION__ ": Flushing this buffer\n"); tx->flushed =3D 1; - return -1; + return -MSGCODE(MSG_LAYER_L2CAP, L2CAP_EXCEED_REMOTE_MTU); } =20 /* Only send on an OPEN channel */ @@ -2730,7 +2742,7 @@ D_ERR(__FUNCTION__ ": not in open state\n"); D_ERR(__FUNCTION__ ": Flushing this buffer\n"); tx->flushed =3D 1; - return -1; + return -MSGCODE(MSG_LAYER_L2CAP, L2CAP_INVALID_STATE); } =20 l2cap_buf =3D (l2cap_tx_buf *)(tx->data); @@ -2846,7 +2858,7 @@ s32 l2ca_ping(BD_ADDR bd, u8 *opt_data, u16 len) { l2cap_con *con; - s32 i ; + s32 i, retval =3D 0; u8 rev_bd[6]; =20 D_XMIT("Sending ping\n"); @@ -2877,7 +2889,11 @@ lp_connect_cfm arrives */ con->c_flags |=3D FLAG_RETURNNOW; =20 - lp_connect_req(con->remote_bd); + retval =3D lp_connect_req(con->remote_bd); + if(retval < 0) { + D_ERR(__FUNCTION__ ": lp_connect_req failed (status %d)\n", retval); + return retval; + } =20 /* wait here until we received a lp_connect_cfm */ l2ca_wait(__FUNCTION__ ": wait baseband", con); @@ -2886,9 +2902,10 @@ /* check status */ D_XMIT("Now we got baseband, send echo req !\n"); } else { - D_ERR(__FUNCTION__ ": Ping failed !\n"); + D_ERR(__FUNCTION__ ": lp_connect_req failed, no connection (status %d)\= n", con->c_status); + retval =3D -MSGCODE(MSG_LAYER_HCI, con->c_status); delete_con(con); - return -1; + return retval; } } =20 @@ -2910,10 +2927,10 @@ =20 if (con->c_status =3D=3D CSTATUS_MAX_NO_RTX) { /* max number reached, try to disconnect */ - l2ca_disconnect_req(con); + retval =3D l2ca_disconnect_req(con); } =20 - return con->c_result; + return retval; } =20 s32 l2ca_getinfo(BD_ADDR bd, u16 infotype) @@ -2921,6 +2938,7 @@ l2cap_con *con; s32 i ; u8 rev_bd[6]; + s32 retval =3D 0; =20=09 D_XMIT("Sending GetInfo : type 0x%x\n", infotype); =20 @@ -2949,7 +2967,12 @@ lp_connect_cfm arrives */ con->c_flags |=3D FLAG_RETURNNOW; =20 - lp_connect_req(con->remote_bd); + retval =3D lp_connect_req(con->remote_bd); + if(retval < 0) { + D_ERR(__FUNCTION__, ": lp_connect_req failed (status %d)\n", retval); + delete_con(con); + return retval; + } =20 /* wait here until we received a lp_connect_cfm */ l2ca_wait(__FUNCTION__ ": wait baseband", con); @@ -2958,10 +2981,9 @@ /* check status */ D_XMIT("Now we got baseband, send info req !\n"); } else { - D_ERR(__FUNCTION__": GetInfo failed ! [cstatus %d]\n",=20 - con->c_status); + D_ERR(__FUNCTION__ ": lp_connect_req failed, no connection (status %d)\= n", con->c_status); delete_con(con); - return -1; + return -MSGCODE(MSG_LAYER_HCI, con->c_status); } } =20 @@ -2972,13 +2994,21 @@ /* leave loop when either status failed or success */ while (con->c_status =3D=3D CSTATUS_RTX_TIMEOUT) { D_XMIT("Sending info req...\n"); - l2cap_info_req(con, infotype);=09 + retval =3D l2cap_info_req(con, infotype); + if(retval < 0) { + D_ERR(__FUNCTION__ ": l2cap_info_req failed (status %d)\n", retval); + /* Timeout and then try again */ + } =20 /* wait until we received a response or after timeout */ l2ca_wait(__FUNCTION__ ": wait echo resp", con); } =20 - return con->c_result; + if (con->c_status =3D=3D CSTATUS_MAX_NO_RTX && !retval) { + retval =3D -MSGCODE(MSG_LAYER_L2CAP, L2CAP_RTX_TIMEOUT); + } + + return retval; } =20 /*******************************************************************/ --- rfcomm.c 2001/10/05 12:06:43 1.122 +++ rfcomm.c 2001/10/10 14:58:18 1.123 @@ -1325,7 +1325,7 @@ u8 dlci; rfcomm_con *rfcomm; =20 - line =3D GET_RFCOMMLINE(con_id); + line =3D GET_LINE(con_id); dlci =3D GET_RFCOMMDLCI(con_id); =20=09 if (dlci =3D=3D 0) { --- test.c 2001/09/28 14:35:38 1.28 +++ test.c 2001/10/10 14:58:18 1.29 @@ -184,12 +184,7 @@ test_connect_psmreq(BD_ADDR bd, u16 psm) { D_STATE("test_connect_req on psm 0x%x\n", psm); - - if (l2ca_connect_req(bd, psm)) { - D_ERR(" tcs_connect_req: l2ca_connect_req failed\n"); - return -1;=20 - } - return 0; + return l2ca_connect_req(bd, psm); } =20 static void |
From: Anders J. <and...@us...> - 2002-03-07 21:32:30
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.194 1.195=20=20=20=20=20=20=20=20=20=20=20 sdp.c 1.86 1.87=20=20=20=20=20=20=20=20=20=20=20=20 test.c 1.33 1.34=20=20=20=20=20=20=20=20=20=20=20=20 unplug_test.c 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Added some testcases to test.c * Added complete SDP-tests according to latest test-specifications. To be u= sed with the sdp-test database located in the sdp_server directory. * Temporarily disabled the connect_cfm message which originally was intende= d to let the user know that we got at connection cfm. * Make sure we don't wait for additional ACL-data forever. If we receive a = second packet when we expect continious data from a previous packet we should di= scard the previous data or else a new buffer will be allocated and after a coup= le of thoose we run out of inbuffers. The diff of the modified file(s): --- hci.c 28 Feb 2002 20:12:15 -0000 1.194 +++ hci.c 7 Mar 2002 21:32:29 -0000 1.195 @@ -486,6 +486,21 @@ =20 if (pb_flag =3D=3D L2CAP_FRAME_START) { D_REC(__FUNCTION__ ": New frame\n"); +=09=09=09=09=09 + /* BT Specification Part D 2.4.1: All segments associated + with and L2CAP packet must be passed through to the=20 + baseband before any other L2CAP packet destined to=20 + the same unit may be sent. This means if we got a=20 + new L2CAP packet while we expecting another segment + of the previous packet something is wrong. This may + be a result of wrong length-indicator in the l2cap + header and we silently discard the previous packet */ + + if(get_inbuffer(hci_hdl)) { + D_ERR(__FUNCTION__ ": Discarding data in previous buffer\n"); + hci_clear_buffer(hci_hdl); + } +=09=09=09=09=09 in_buf =3D get_free_inbuffer(); if (in_buf) { in_buf->nbr_of_hci_pkt =3D 1; @@ -1805,6 +1820,7 @@ in_buf->l2cap_len =3D 0; in_buf->empty =3D TRUE; in_buf->nbr_of_hci_pkt =3D 0; + in_buf->hci_hdl =3D 0; } =20 /* Finds the in buffer for a given connection handler */ @@ -1821,7 +1837,6 @@ } =20 if (i >=3D NBR_OF_HCI_INBUFFERS) { - D_ERR(__FUNCTION__ ": WARNING! No inbuffer with hci_hdl %d\n", hci_hdl); return NULL; } =20=09 @@ -1898,6 +1913,7 @@ hci_ctrl.hci_in_buf[i].l2cap_len =3D 0; hci_ctrl.hci_in_buf[i].empty =3D TRUE; hci_ctrl.hci_in_buf[i].nbr_of_hci_pkt =3D 0; + hci_ctrl.hci_in_buf[i].hci_hdl =3D 0; } =20=09 for (i =3D 0; i < MAX_NBR_OF_CONNECTIONS; i ++) { --- sdp.c 25 Feb 2002 14:28:19 -0000 1.86 +++ sdp.c 7 Mar 2002 21:32:29 -0000 1.87 @@ -521,7 +521,7 @@ =20=20=20 if (status) { DSYS(__FUNCTION__ " Connection failed\n"); - bt_connect_cfm(CREATE_SDP_ID(sdp->line, 0), -1); + //bt_connect_cfm(CREATE_SDP_ID(sdp->line, 0), -1); return; } =20 --- test.c 25 Feb 2002 14:08:37 -0000 1.33 +++ test.c 7 Mar 2002 21:32:28 -0000 1.34 @@ -134,8 +134,15 @@ s32 use_multiple_conf_params =3D 0; s32 disable_testpsm =3D 0; s32 dont_send_disconnect_rsp =3D 0; +s32 dont_accept_mtu =3D 0; +s32 use_contflag =3D 0; +s32 send_null_config =3D 0; +s32 add_value =3D 0; +s32 dont_send_connect_response =3D 0; + =20 u8 testdata[UPTEST_DATA_LEN]; +u16 contflag=3D0; =20 #ifdef __KERNEL__ #define strtoul simple_strtoul @@ -225,6 +232,7 @@ } =20 /* start 5 sec timer */=09=09 + if(!dont_send_connect_response) { #ifdef __KERNEL__ init_timer(&test_timer); test_timer.function =3D test_timeout; @@ -236,6 +244,12 @@ sleep(5); #endif } + } + + if(dont_send_connect_response) { + return; + } +=09 =20=09 if (disable_testpsm =3D=3D 1) { @@ -302,11 +316,21 @@ if (use_multiple_conf_params) { if (l2ca_config_req(con, 1280, NULL, 0x1234, 0)) { D_ERR("test_config_cfm : Configuration request failed\n"); } - } else { + } else if(use_contflag) { + contflag =3D 1; + if (l2ca_config_req(con, 1280, NULL, 0, 0)) { + D_ERR("test_config_cfm : Configuration request failed\n"); } + } else if(send_null_config) { + send_null_config =3D 0; if (l2ca_config_req(con, 0, NULL, 0, 0)) { D_ERR("test_config_cfm : Configuration request failed\n"); } + } else { + if (l2ca_config_req(con, 1280, NULL, 0, 0)) { + D_ERR("test_config_cfm : Configuration request failed\n"); } } =20=09=09 +=09=09 +=09=09 /* store connection */ if (con->psm =3D=3D L2CAP_TEST_LAYER) testcon =3D con; @@ -326,7 +350,14 @@ D_STATE("test_config_ind : remote cid : %d remote_mtu : %d\n",=20 con->remote_cid, con->remote_mtu); =20 - if (l2ca_config_rsp(con, 0, NULL, CONF_SUCCESS)) { + if(dont_accept_mtu) { + if (l2ca_config_rsp(con, 640, NULL, CONF_FAILURE)) { + D_ERR("test_config_ind : Configuration response failed\n"); +=09=09=09 + } + dont_accept_mtu =3D 0; + } + else if (l2ca_config_rsp(con, 0, NULL, CONF_SUCCESS)) { D_ERR("test_config_ind : Configuration response failed\n"); =20=09=09=09 } @@ -369,6 +400,19 @@ void test_config_cfm(l2cap_con *con, s32 status) { D_STATE("test_config_cfm : remote cid : %d\n", con->remote_cid); + if(status) { + if(l2ca_config_req(con, con->remote_mtu, &con->remote_qos, con->flush_ti= meout, 0)) { + D_ERR("test_config_cfm : Configuration request failed\n");=20 + } + return; + }=09 + + if(contflag) { + contflag =3D 0; + if (l2ca_config_req(con, 0, NULL, 0x1234, 0)) { + D_ERR("test_config_cfm : Configuration request failed\n");=20 + } + } =20=09 if(con->current_state =3D=3D OPEN) { D_STATE("Now we have an open l2cap channel\n"); @@ -509,6 +553,16 @@ } =20 return test_send_data(con, testdata, len); + } else if(!strncmp(cmd, "set_error ", 10)) { + int pos =3D 10, n =3D 0; + if(*(cmd + 10) =3D=3D '-') { + n =3D -(strtoul(cmd + 11, NULL, 0)); + } else { + n =3D strtoul(cmd + 10, NULL, 0); + } + printk("Setting l2cap size error value =3D %d\n", n); +=09=09 + add_value =3D n; } else if(!strncmp(cmd, "sdptest ", 8)) { int n =3D strtoul(cmd+8, NULL, 0);=09 return do_sdp_test(n); @@ -517,6 +571,15 @@ return 0; } else if(!strcmp(cmd, "test_case_enable_disconnect")) { dont_send_disconnect_rsp =3D 0; + return 0; + } else if(!strcmp(cmd, "test_case_dont_accept_mtu")) { + dont_accept_mtu =3D 1; + return 0; + } else if(!strcmp(cmd, "test_case_send_null_config")) { + send_null_config =3D 1; + return 0; + } else if(!strncmp(cmd, "dont_send_connect_response ", 27)) { + dont_send_connect_response =3D strtoul(cmd+27, NULL, 0); return 0; } else { printk("Unknown test cmd!\n"); --- unplug_test.c 9 Jan 2002 10:55:58 -0000 1.9 +++ unplug_test.c 7 Mar 2002 21:32:28 -0000 1.10 @@ -165,48 +165,204 @@ =20 /* UUID 16 */ unsigned char sdp_data_52111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, - 0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0xff, + 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff, 0x00 }; =20 /* UUID 32 */ unsigned char sdp_data_52111_2[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a, - 0x35, 0x05, 0x1a, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x00, 0x00, 0xff, 0x00 }; =20 /* UUID 128 */ unsigned char sdp_data_52111_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16, 0x35, 0x11,=20 0x1c,=20 - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, 0x00, 0xff, 0x00 }; =20 =20 -unsigned char sdp_data_52113_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, - 0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0x01, +unsigned char sdp_data_52112_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x29, + 0x35, 0x24,=20 + 0x19, 0x10, 0x00,=20 + 0x19, 0x10, 0x02,=20 + 0x19, 0x11, 0x03, + 0x19, 0x11, 0x05, + 0x19, 0x13, 0x00, + 0x19, 0x13, 0x01, + 0x19, 0x13, 0x02, + 0x19, 0x13, 0x03, + 0x19, 0x13, 0x04, + 0x19, 0x13, 0x05, + 0x19, 0x13, 0x06, + 0x19, 0x13, 0x07, + 0x00, 0xff, 0x00 }; =20 -unsigned char sdp_data_52113_2[] =3D { 0x02, 0x77, 0x77, 0x00, 0x09, - 0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0x01, +unsigned char sdp_data_52112_2[] =3D { 0x02, 0x77, 0x78, 0x00, 0x2a, + 0x35, 0x24,=20 + 0x19, 0x10, 0x00,=20 + 0x19, 0x10, 0x02,=20 + 0x19, 0x11, 0x03, + 0x19, 0x11, 0x05, + 0x19, 0x13, 0x00, + 0x19, 0x13, 0x01, + 0x19, 0x13, 0x02, + 0x19, 0x13, 0x03, + 0x19, 0x13, 0x04, + 0x19, 0x13, 0x05, + 0x19, 0x13, 0x06, + 0x19, 0x13, 0x07, + 0x00, 0xff, 0x01, 0x00 }; =20 -unsigned char sdp_data_52114[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, +unsigned char sdp_data_52112_3[] =3D { 0x02, 0x77, 0x79, 0x00, 0x41, + 0x35, 0x3c,=20 + 0x1a, 0x00, 0x00, 0x10, 0x00,=20 + 0x1a, 0x00, 0x00, 0x10, 0x02,=20 + 0x1a, 0x00, 0x00, 0x11, 0x03, + 0x1a, 0x00, 0x00, 0x11, 0x05, + 0x1a, 0x00, 0x00, 0x13, 0x00, + 0x1a, 0x00, 0x00, 0x13, 0x01, + 0x1a, 0x00, 0x00, 0x13, 0x02, + 0x1a, 0x00, 0x00, 0x13, 0x03, + 0x1a, 0x00, 0x00, 0x13, 0x04, + 0x1a, 0x00, 0x00, 0x13, 0x05, + 0x1a, 0x00, 0x00, 0x13, 0x06, + 0x1a, 0x00, 0x00, 0x13, 0x07, + 0x00, 0xff, + 0x00 }; + +unsigned char sdp_data_52112_4[] =3D { 0x02, 0x77, 0x80, 0x00, 0x42, + 0x35, 0x3c,=20 + 0x1a, 0x00, 0x00, 0x10, 0x00,=20 + 0x1a, 0x00, 0x00, 0x10, 0x02,=20 + 0x1a, 0x00, 0x00, 0x11, 0x03, + 0x1a, 0x00, 0x00, 0x11, 0x05, + 0x1a, 0x00, 0x00, 0x13, 0x00, + 0x1a, 0x00, 0x00, 0x13, 0x01, + 0x1a, 0x00, 0x00, 0x13, 0x02, + 0x1a, 0x00, 0x00, 0x13, 0x03, + 0x1a, 0x00, 0x00, 0x13, 0x04, + 0x1a, 0x00, 0x00, 0x13, 0x05, + 0x1a, 0x00, 0x00, 0x13, 0x06, + 0x1a, 0x00, 0x00, 0x13, 0x07, + 0x00, 0xff, + 0x01, 0x00 }; + + + +unsigned char sdp_data_52112_5[] =3D { 0x02, 0x77, 0x81, 0x00, 0xd1, + 0x35, 0xcc,=20 + 0x1c,=20 + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c, + 0x00, 0x00, 0x11, 0x03, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x02, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x03, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x04, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x05, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x06, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x07, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0xff, + 0x00 }; + +unsigned char sdp_data_52112_6[] =3D { 0x02, 0x77, 0x82, 0x00, 0xd2, + 0x35, 0xcc,=20 + 0x1c,=20 + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c, + 0x00, 0x00, 0x11, 0x03, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x02, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x03, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x04, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x05, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x06, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x1c,=20 + 0x00, 0x00, 0x13, 0x07, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0xff, + 0x01, 0x00 }; + +unsigned char sdp_data_52113_1[] =3D { 0x02, 0x77, 0x83, 0x00, 0x08, 0x35, 0x03, 0x19, 0x12, 0x34, 0x00, 0xff, 0x00 }; =20 +unsigned char sdp_data_52113_2[] =3D { 0x02, 0x77, 0x84, 0x00, 0x0a, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x12, 0x34, 0x00, 0xff, + 0x00 }; + +unsigned char sdp_data_52113_3[] =3D { 0x02, 0x77, 0x85, 0x00, 0x16, + 0x35, 0x11,=20 + 0x1c,=20 + 0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0xff, + 0x00 }; + /* UUID 16 */ -unsigned char sdp_data_52121_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a, +unsigned char sdp_data_52121_1[] =3D { 0x02, 0x77, 0x86, 0x00, 0x0a, 0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0xff, 0x00 }; =20 /* UUID 32 */ -unsigned char sdp_data_52121_2[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0c, +unsigned char sdp_data_52121_2[] =3D { 0x02, 0x77, 0x87, 0x00, 0x0c, 0x35, 0x05, 0x1a, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, 0x00 }; =20 /* UUID 128 */ -unsigned char sdp_data_52121_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x18, +unsigned char sdp_data_52121_3[] =3D { 0x02, 0x77, 0x88, 0x00, 0x18, 0x35, 0x11,=20 0x1c,=20 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, @@ -214,48 +370,90 @@ 0x00, 0xff, 0x00 }; =20 -unsigned char sdp_data_52122[] =3D { 0x02, 0x77, 0x77, 0x00, 0x06, - 0x19, 0x00, 0x01, 0x00, 0xff, 0x00 }; =20=20=20 -unsigned char sdp_data_53111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, +unsigned char sdp_data_52122_1[] =3D { 0x02, 0x77, 0x89, 0x00, 0x06, + 0x19, 0x00, 0x01,=20 + 0x00, 0xff, 0x00 }; + +unsigned char sdp_data_52122_2[] =3D { 0x02, 0x77, 0x89, 0x00, 0x08, + 0x1a, 0x00, 0x00, 0x00, 0x01,=20 + 0x00, 0xff, 0x00 }; + +unsigned char sdp_data_52122_3[] =3D { 0x02, 0x77, 0x89, 0x00, 0x14, + 0x1c,=20 + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,=20 + 0x00, 0xff, 0x00 }; + + +=20=20 +unsigned char sdp_data_53111_1[] =3D { 0x02, 0x77, 0x90, 0x00, 0x08, 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff, 0x00 }; =20 -unsigned char sdp_data_53111_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, +unsigned char sdp_data_53111_2[] =3D { 0x04, 0x88, 0x91, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 }; =20 =20 +unsigned char sdp_data_53112_1[] =3D { 0x02, 0x77, 0x90, 0x00, 0x08, + 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff, + 0x00 }; =20 -unsigned char sdp_data_53113_1[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x35, +unsigned char sdp_data_53112_2[] =3D { 0x04, 0x88, 0x92, 0x00, 0x0c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 }; =20 +unsigned char sdp_data_53112_3[] =3D { 0x04, 0x88, 0x92, 0x00, 0x0d, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x35, + 0x03, 0x09, 0x00, 0x01, 0x01, 0x00 }; + +unsigned char sdp_data_53113_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, + 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff, + 0x00 }; + unsigned char sdp_data_53113_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x35, - 0x03, 0x09, 0x00, 0x01, 0x01 }; + 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x35, + 0x03, 0x09, 0x00, 0x03, 0x00 }; =20 -unsigned char sdp_data_53114[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, - 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35, - 0x03, 0x09, 0x00, 0x01, 0x00 }; +unsigned char sdp_data_53114_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, + 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff, + 0x00 }; =20 -unsigned char sdp_data_53115[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, +unsigned char sdp_data_53114_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35, 0x03, 0x09, 0x00, 0x04, 0x00 }; =20 -unsigned char sdp_data_53118[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, +unsigned char sdp_data_53117_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, + 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff, + 0x00 }; + +unsigned char sdp_data_53117_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35, 0x03, 0x09, 0x00, 0x05, 0x00 }; =20 -unsigned char sdp_data_531110[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, + +unsigned char sdp_data_53119_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, + 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff, + 0x00 }; + +unsigned char sdp_data_53119_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35, 0x03, 0x09, 0x00, 0x08, 0x00 }; =20 -unsigned char sdp_data_531117[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, +unsigned char sdp_data_531116_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, + 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff, + 0x00 }; + +unsigned char sdp_data_531116_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35, 0x03, 0x09, 0x00, 0x09, 0x00 }; =20 -unsigned char sdp_data_531120[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, +unsigned char sdp_data_531119_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, + 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff, + 0x00 }; + +unsigned char sdp_data_531119_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35, 0x03, 0x09, 0x01, 0xff, 0x00 }; =20 @@ -284,133 +482,221 @@ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0= x34, 0xfb, 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0= x01, 0x00}; =20 - -unsigned char sdp_data_54112[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, +unsigned char sdp_data_54112_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, 0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0xff, 0x35, 0x03, 0x09, 0x01, 0xff, 0x00 }; =20 -unsigned char sdp_data_54113[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, +unsigned char sdp_data_54112_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, + 0x35, 0x03, 0x09, 0x01, 0xff, 0x00 }; + +unsigned char sdp_data_54112_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35,= 0x11, 0x1c, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0= x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0= x34, 0xfb, + 0x00, 0xff ,0x35, 0x03, 0x09, 0x01, 0= xff, 0x00}; + +unsigned char sdp_data_54113_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, 0x35, 0x03, 0x19, 0x12, 0x34, 0x00, 0xff, 0x35, 0x03, 0x09, 0x01, 0xff, 0x00 }; =20 -unsigned char sdp_data_54114[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, +unsigned char sdp_data_54113_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x12, 0x34, 0x00, 0xff, + 0x35, 0x03, 0x09, 0x01, 0xff, 0x00 }; + +unsigned char sdp_data_54113_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35,= 0x11, 0x1c, + 0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0= x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0= x34, 0xfb, + 0x00, 0xff ,0x35, 0x03, 0x09, 0x01, 0= xff, 0x00}; + + + +unsigned char sdp_data_54114_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff, 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 }; =20 -unsigned char sdp_data_54116_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, - 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0x06, +unsigned char sdp_data_54114_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x00, 0x00, 0xff, 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 }; =20 -unsigned char sdp_data_54116_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0e, - 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0x06, +unsigned char sdp_data_54114_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35,= 0x11, 0x1c, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0= x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0= x34, 0xfb, + 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0= x01, 0x00}; + + +unsigned char sdp_data_54115_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, + 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0x07, + 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 }; + +unsigned char sdp_data_54115_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0e, + 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0x07, 0x35, 0x03, 0x09, 0x00, 0x01, 0x01, 0x00 }; =20 -unsigned char sdp_data_541110[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, - 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff, +unsigned char sdp_data_54115_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x00, 0x00, 0x07, 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 }; =20 -unsigned char sdp_data_541111[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, +unsigned char sdp_data_54115_4[] =3D { 0x06, 0x88, 0x88, 0x00, 0x10, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x00, 0x00, 0x07, + 0x35, 0x03, 0x09, 0x00, 0x01, 0x01, 0x00 }; + +unsigned char sdp_data_54115_5[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35,= 0x11, 0x1c, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0= x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0= x34, 0xfb, + 0x00, 0x07 ,0x35, 0x03, 0x09, 0x00, 0= x01, 0x00}; + +unsigned char sdp_data_54115_6[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1c, 0x35,= 0x11, 0x1c, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0= x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0= x34, 0xfb, + 0x00, 0x07 ,0x35, 0x03, 0x09, 0x00, 0= x01, 0x01, 0x00}; + +unsigned char sdp_data_54119_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff, + 0x35, 0x03, 0x09, 0x00, 0x03, 0x00 }; + +unsigned char sdp_data_54119_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x00, 0x00, 0xff, + 0x35, 0x03, 0x09, 0x00, 0x03, 0x00 }; + +unsigned char sdp_data_54119_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35,= 0x11, 0x1c, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0= x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0= x34, 0xfb, + 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0= x03, 0x00}; + +unsigned char sdp_data_541110_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, + 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff, 0x35, 0x03, 0x09, 0x00, 0x04, 0x00 }; =20 -unsigned char sdp_data_541112[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, - 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff, +unsigned char sdp_data_541110_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x11, 0x03, 0x00, 0xff, + 0x35, 0x03, 0x09, 0x00, 0x04, 0x00 }; + +unsigned char sdp_data_541110_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35= , 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x03, 0x00, 0x00, 0= x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0= x34, 0xfb, + 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0= x04, 0x00}; + +unsigned char sdp_data_541111_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, + 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff, 0x35, 0x03, 0x09, 0x00, 0x05, 0x00 }; =20 -unsigned char sdp_data_541120[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, - 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff, +unsigned char sdp_data_541111_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x11, 0x03, 0x00, 0xff, + 0x35, 0x03, 0x09, 0x00, 0x05, 0x00 }; + +unsigned char sdp_data_541111_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35= , 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x03, 0x00, 0x00, 0= x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0= x34, 0xfb, + 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0= x05, 0x00}; + +unsigned char sdp_data_541119_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, + 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff, + 0x35, 0x03, 0x09, 0x00, 0x09, 0x00 }; + +unsigned char sdp_data_541119_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x11, 0x03, 0x00, 0xff, 0x35, 0x03, 0x09, 0x00, 0x09, 0x00 }; =20 +unsigned char sdp_data_541119_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35= , 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x03, 0x00, 0x00, 0= x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0= x34, 0xfb, + 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0= x09, 0x00}; + unsigned char sdp_data_54121_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0b, 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff, 0x09, 0x00, 0x09, 0x00 }; + unsigned char sdp_data_54121_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x00, 0x00, 0xff, 0x09, 0x00, 0x09, 0x00 }; + unsigned char sdp_data_54121_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x19, 0x35,= 0x11, 0x1c, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0= x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0= x34, 0xfb,=20 0x00, 0xff, 0x09, 0x00, 0x09, 0x00 }; =20 -unsigned char sdp_data_54122[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f, - 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff, - 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 }; =20 =20 -#if 0 + + +unsigned char sdp_data_54122_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f, + 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff, + 0x35, 0x03, 0x09, 0x00, 0x05, 0x00 }; + +unsigned char sdp_data_54122_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x11, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x11, 0x03, 0x00, 0xff, + 0x35, 0x03, 0x09, 0x00, 0x05, 0x00 }; + +unsigned char sdp_data_54122_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1d, 0x35,= 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x03, 0x00, 0x00, 0= x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0= x34, 0xfb, + 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0= x05, 0x00}; + /* UUID 16 */ -unsigned char sdp_data_55111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, +unsigned char sdp_data_55111_1_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, 0x35, 0x03, 0x19, 0x10, 0x02, 0x00, 0xff, 0x00 }; =20 -unsigned char sdp_data_55111_2_1[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x35, - 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 }; +unsigned char sdp_data_55111_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, + 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35, + 0x03, 0x09, 0x00, 0x01,=20 + 0x00 }; =20 -unsigned char sdp_data_55111_2_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e, - 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35, - 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 }; +unsigned char sdp_data_55111_3[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, + 0x00, 0x01, 0x00, 0x01, 0x00, 0xff, 0x35, + 0x03, 0x09, 0x00, 0x01,=20 + 0x00 }; =20 -unsigned char sdp_data_55111_2_3[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e, - 0x00, 0x10, 0xff, 0xff, 0x00, 0xff, 0x35, - 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 }; +unsigned char sdp_data_55111_4[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, + 0x00, 0x01, 0x00, 0x02, 0x00, 0xff, 0x35, + 0x03, 0x09, 0x00, 0x01,=20 + 0x00 }; =20 =20 -unsigned char sdp_data_55111_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, +unsigned char sdp_data_55111_5_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, 0x35, 0x03, 0x19, 0x10, 0x01, 0x00, 0xff, 0x00 }; =20 -unsigned char sdp_data_55111_4[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, - 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35, +unsigned char sdp_data_55111_6[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, + 0x00, 0x01, 0x15, 0x08, 0x00, 0xff, 0x35, 0x03, 0x09, 0x02, 0x00, 0x00 }; =20 -unsigned char sdp_data_55111_5[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, - 0x35, 0x03, 0x19, 0x10, 0x01, 0x00, 0xff, +unsigned char sdp_data_55111_7_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, + 0x35, 0x03, 0x19, 0x15, 0x09, 0x00, 0xff, 0x00 }; =20 -unsigned char sdp_data_55111_6[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, - 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35, +unsigned char sdp_data_55111_8[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, + 0x00, 0x01, 0x15, 0x07, 0x00, 0xff, 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 }; -#endif -#if 0 + /* UUID 32 */ -unsigned char sdp_data_55111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a, - 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x02, 0x00, 0xff, - 0x00 }; =20 -unsigned char sdp_data_55111_2_1[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x35, - 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 }; =20 -unsigned char sdp_data_55111_2_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e, - 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35, - 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 }; =20 -unsigned char sdp_data_55111_2_3[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e, - 0x00, 0x10, 0xff, 0xff, 0x00, 0xff, 0x35, - 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 }; =20 =20 -unsigned char sdp_data_55111_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a, +unsigned char sdp_data_55111_1_2[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x02, 0x00, 0xff, + 0x00 }; + +unsigned char sdp_data_55111_5_2[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a, 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x01, 0x00, 0xff, 0x00 }; =20 -unsigned char sdp_data_55111_4[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, - 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35, - 0x03, 0x09, 0x02, 0x00, 0x00 }; =20 -unsigned char sdp_data_55111_5[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a, - 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x01, 0x00, 0xff, +unsigned char sdp_data_55111_7_2[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x15, 0x09, 0x00, 0xff, 0x00 }; =20 -unsigned char sdp_data_55111_6[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, - 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35, - 0x03, 0x09, 0x00, 0x01, 0x00 }; -#endif =20 -#if 1 + + + + + + /* UUID 128 */ -unsigned char sdp_data_55111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16, +unsigned char sdp_data_55111_1_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16, 0x35, 0x11,=20 0x1c,=20 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x10, 0x00, @@ -418,20 +704,9 @@ 0x00, 0xff, 0x00 }; =20 -unsigned char sdp_data_55111_2_1[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x35, - 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 }; =20 -unsigned char sdp_data_55111_2_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e, - 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35, - 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 }; - -unsigned char sdp_data_55111_2_3[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e, - 0x00, 0x10, 0xff, 0xff, 0x00, 0xff, 0x35, - 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 }; =20 - -unsigned char sdp_data_55111_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16, +unsigned char sdp_data_55111_5_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16, 0x35, 0x11,=20 0x1c,=20 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x10, 0x00, @@ -439,23 +714,54 @@ 0x00, 0xff, 0x00 }; =20 -unsigned char sdp_data_55111_4[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, - 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35, - 0x03, 0x09, 0x02, 0x00, 0x00 }; - -unsigned char sdp_data_55111_5[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16, +unsigned char sdp_data_55111_7_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16, 0x35, 0x11,=20 0x1c,=20 - 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x15, 0x09, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, 0x00, 0xff, 0x00 }; =20 -unsigned char sdp_data_55111_6[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c, - 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35, - 0x03, 0x09, 0x00, 0x01, 0x00 }; =20 -#endif +unsigned char sdp_data_55112_1_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, + 0x35, 0x03, 0x19, 0x10, 0x02, 0x00, 0xff, + 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 }; + +unsigned char sdp_data_55112_1_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x02, 0x00, 0xff, + 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 }; + +unsigned char sdp_data_55112_1_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x3= 5, 0x11, 0x1c, + 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0= x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0= x34, 0xfb, + 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0= x05, 0x00}; + +unsigned char sdp_data_55112_2_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, + 0x35, 0x03, 0x19, 0x10, 0x01, 0x00, 0xff, + 0x35, 0x03, 0x09, 0x02, 0x00, 0x00 }; + +unsigned char sdp_data_55112_2_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x01, 0x00, 0xff, + 0x35, 0x03, 0x09, 0x02, 0x00, 0x00 }; + +unsigned char sdp_data_55112_2_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x3= 5, 0x11, 0x1c, + 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0= x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0= x34, 0xfb, + 0x00, 0xff ,0x35, 0x03, 0x09, 0x02, 0= x00, 0x00}; + +unsigned char sdp_data_55112_3_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d, + 0x35, 0x03, 0x19, 0x15, 0x09, 0x00, 0xff, + 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 }; + +unsigned char sdp_data_55112_3_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f, + 0x35, 0x05, 0x1a, 0x00, 0x00, 0x15, 0x09, 0x00, 0xff, + 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 }; + +unsigned char sdp_data_55112_3_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x3= 5, 0x11, 0x1c, + 0x00, 0x00, 0x15, 0x09, 0x00, 0x00, 0= x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0= x34, 0xfb, + 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0= x01, 0x00}; + =20 =20 extern u8 testdata[]; @@ -581,8 +887,8 @@ * Data Transferred (L2CAP Test 5) */ =20 -#define OPTION_MTU1 4096 -#define OPTION_MTU2 8192 +#define OPTION_MTU1 48 +#define OPTION_MTU2 48 =20 static s32 test_2_5_1(void) { @@ -809,25 +1115,67 @@ } } =20 -static s32 sdp_test_52113(void) +static s32 sdp_test_52112(void) { static int t =3D 0; s32 retval =3D 0; -=09 - if (!t) { - retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52113_1, sdp_data_52= 113_1[4] + 5); + switch(t)=20 + { + case 0: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52112_1, sdp_data_52= 112_1[4] + 5); t =3D 1; - } else { - retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52113_2, sdp_data_52= 113_2[4] + 5); + break; + case 1: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52112_2, sdp_data_52= 112_2[4] + 5); + t =3D 2; + break; +=09=09 + case 2: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52112_3, sdp_data_52= 112_3[4] + 5); + t =3D 3; + break; +=09=09 + case 3: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52112_4, sdp_data_52= 112_4[4] + 5); + t =3D 4; + break; +=09=09 + case 4: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52112_5, sdp_data_52= 112_5[4] + 5); + t =3D 5; + break; +=09=09 + case 5: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52112_6, sdp_data_52= 112_6[4] + 5); t =3D 0; + break; } return retval; } =20 =20 -static s32 sdp_test_52114(void) +static s32 sdp_test_52113(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_52114, sdp_data_52114[4] = + 5); + static int t =3D 0; + s32 retval =3D 0; + switch(t)=20 + { + case 0: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52113_1, sdp_data_52= 113_1[4] + 5); + t =3D 1; + break; + case 1: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52113_2, sdp_data_52= 113_2[4] + 5); + t =3D 2; + break; +=09=09 + case 2: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52113_3, sdp_data_52= 113_3[4] + 5); + t =3D 3; + break; + } +=09 + return retval; } =20 static s32 sdp_test_52121(void) @@ -847,7 +1195,17 @@ =20 static s32 sdp_test_52122(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_52122, sdp_data_52122[4] = + 5); + static int t =3D 0; + if(t =3D=3D 0) { + t =3D 1; + return sdp_send_data(&sdp_con_list[0], sdp_data_52122_1, sdp_data_52122_= 1[4] + 5); + } else if(t =3D=3D 1) { + t =3D 2; + return sdp_send_data(&sdp_con_list[0], sdp_data_52122_2, sdp_data_52122_= 2[4] + 5); + } else { + t =3D 0; + return sdp_send_data(&sdp_con_list[0], sdp_data_52122_3, sdp_data_52122_= 3[4] + 5); + } } =20 static s32 sdp_test_53111(void) @@ -864,49 +1222,142 @@ =20=09 } =20 -static s32 sdp_test_53113(void) +static s32 sdp_test_53112(void) { static int t =3D 0; - s32 retval; + s32 retval =3D 0; + switch(t)=20 + { + case 0: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53112_1, sdp_data_53= 112_1[4] + 5); + t =3D 1; + break; + case 1: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53112_2, sdp_data_53= 112_2[4] + 5); + t =3D 2; + break; =20=09 - if (!t) { - retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53113_1, sdp_data_53= 113_2[4] + 5); + case 2: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53112_3, sdp_data_53= 112_3[4] + 5); + t =3D 0; + break; + } +=09 + return retval; +} + +static s32 sdp_test_53113(void) +{ + static int t =3D 0; + s32 retval =3D 0; + switch(t)=20 + { + case 0: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53113_1, sdp_data_53= 113_1[4] + 5); t =3D 1; - } else { + break; + case 1: retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53113_2, sdp_data_53= 113_2[4] + 5); t =3D 0; + break; } +=09 return retval; } =20 static s32 sdp_test_53114(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_53114, sdp_data_53114[4] = + 5); + static int t =3D 0; + s32 retval =3D 0; + switch(t)=20 + { + case 0: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53114_1, sdp_data_53= 114_1[4] + 5); + t =3D 1; + break; + case 1: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53114_2, sdp_data_53= 114_2[4] + 5); + t =3D 0; + break; } =20 -static s32 sdp_test_53115(void) -{ - return sdp_send_data(&sdp_con_list[0], sdp_data_53115, sdp_data_53115[4] = + 5); + return retval; } =20 -static s32 sdp_test_53118(void) +static s32 sdp_test_53117(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_53118, sdp_data_53118[4] = + 5); + static int t =3D 0; + s32 retval =3D 0; + switch(t)=20 + { + case 0: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53117_1, sdp_data_53= 117_1[4] + 5); + t =3D 1; + break; + case 1: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53117_2, sdp_data_53= 117_2[4] + 5); + t =3D 0; + break; } =20 -static s32 sdp_test_531110(void) + return retval; +} + +static s32 sdp_test_53119(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_531110, sdp_data_531110[4= ] + 5); + static int t =3D 0; + s32 retval =3D 0; + switch(t)=20 + { + case 0: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53119_1, sdp_data_53= 119_1[4] + 5); + t =3D 1; + break; + case 1: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53119_2, sdp_data_53= 119_2[4] + 5); + t =3D 0; + break; } =20 -static s32 sdp_test_531117(void) + return retval; +} + +static s32 sdp_test_531116(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_531117, sdp_data_531117[4= ] + 5); + static int t =3D 0; + s32 retval =3D 0; + switch(t)=20 + { + case 0: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_531116_1, sdp_data_5= 31116_1[4] + 5); + t =3D 1; + break; + case 1: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_531116_2, sdp_data_5= 31116_2[4] + 5); + t =3D 0; + break; } =20 -static s32 sdp_test_531120(void) + return retval; +} + +static s32 sdp_test_531119(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_531120, sdp_data_531120[4= ] + 5); + static int t =3D 0; + s32 retval =3D 0; + switch(t)=20 + { + case 0: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_531119_1, sdp_data_5= 31119_1[4] + 5); + t =3D 1; + break; + case 1: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_531119_2, sdp_data_5= 31119_2[4] + 5); + t =3D 0; + break; + } +=09 + return retval; } =20 static s32 sdp_test_53121(void) @@ -921,7 +1372,7 @@ =20 static s32 sdp_test_53123(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_53123, sdp_data_53123[4] = + 5); + return sdp_send_data(&sdp_con_list[0], sdp_data_53123, sdp_data_53123[4] = + 5 + 2); } =20 static s32 sdp_test_54111(void) @@ -941,51 +1392,177 @@ =20 static s32 sdp_test_54112(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_54112, sdp_data_54112[4] = + 5); + static int t =3D 0; + if(t =3D=3D 0) { + t =3D 1; + return sdp_send_data(&sdp_con_list[0], sdp_data_54112_1, sdp_data_54112_= 1[4] + 5); + } else if(t =3D=3D 1) { + t =3D 2; + return sdp_send_data(&sdp_con_list[0], sdp_data_54112_2, sdp_data_54112_= 2[4] + 5); + } else { + t =3D 0; + return sdp_send_data(&sdp_con_list[0], sdp_data_54112_3, sdp_data_54112_= 3[4] + 5); + } } =20 static s32 sdp_test_54113(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_54113, sdp_data_54113[4] = + 5); + static int t =3D 0; + if(t =3D=3D 0) { + t =3D 1; + return sdp_send_data(&sdp_con_list[0], sdp_data_54113_1, sdp_data_54113_= 1[4] + 5); + } else if(t =3D=3D 1) { + t =3D 2; + return sdp_send_data(&sdp_con_list[0], sdp_data_54113_2, sdp_data_54113_= 2[4] + 5); + } else { + t =3D 0; + return sdp_send_data(&sdp_con_list[0], sdp_data_54113_3, sdp_data_54113_= 3[4] + 5); + } } =20 static s32 sdp_test_54114(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_54114, sdp_data_54114[4] = + 5); + static int t =3D 0; + if(t =3D=3D 0) { + t =3D 1; + return sdp_send_data(&sdp_con_list[0], sdp_data_54114_1, sdp_data_54114_= 1[4] + 5); + } else if(t =3D=3D 1) { + t =3D 2; + return sdp_send_data(&sdp_con_list[0], sdp_data_54114_2, sdp_data_54114_= 2[4] + 5); + } else { + t =3D 0; + return sdp_send_data(&sdp_con_list[0], sdp_data_54114_3, sdp_data_54114_= 3[4] + 5); + } } =20 -static s32 sdp_test_54116(void) +static s32 sdp_test_54115(void) { static int t =3D 0; - s32 retval; - if (!t) { - retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54116_1, sdp_data_54= 116_1[4] + 5); + s32 retval =3D 0; + switch(t)=20 + { + case 0: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54115_1, sdp_data_54= 115_1[4] + 5); t =3D 1; - } else { - retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54116_2, sdp_data_54= 116_2[4] + 5); + break; + case 1: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54115_2, sdp_data_54= 115_2[4] + 5); + t =3D 2; + break; +=09=09 + case 2: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54115_3, sdp_data_54= 115_3[4] + 5); + t =3D 3; + break; +=09=09 + case 3: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54115_4, sdp_data_54= 115_4[4] + 5); + t =3D 4; + break; +=09=09 + case 4: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54115_5, sdp_data_54= 115_5[4] + 5); + t =3D 5; + break; +=09=09 + case 5: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54115_6, sdp_data_54= 115_6[4] + 5); t =3D 0; + break; }=20 return retval; } =20 -static s32 sdp_test_541110(void) +static s32 sdp_test_54119(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_541110, sdp_data_541110[4= ] + 5); + static int t =3D 0; + s32 retval =3D 0; + switch(t)=20 + { + case 0: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54119_1, sdp_data_54= 119_1[4] + 5); + t =3D 1; + break; + case 1: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54119_2, sdp_data_54= 119_2[4] + 5); + t =3D 2; + break; +=09=09 + case 2: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54119_3, sdp_data_54= 119_3[4] + 5); + t =3D 0; + break; + } + return retval; } =20 -static s32 sdp_test_541111(void) +static s32 sdp_test_541110(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_541111, sdp_data_541111[4= ] + 5); + static int t =3D 0; + s32 retval =3D 0; + switch(t)=20 + { + case 0: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541110_1, sdp_data_5= 41110_1[4] + 5); + t =3D 1; + break; + case 1: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541110_2, sdp_data_5= 41110_2[4] + 5); + t =3D 2; + break; +=09=09 + case 2: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541110_3, sdp_data_5= 41110_3[4] + 5); + t =3D 0; + break; + } + return retval; } =20 -static s32 sdp_test_541112(void) +static s32 sdp_test_541111(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_541112, sdp_data_541112[4= ] + 5); + static int t =3D 0; + s32 retval =3D 0; + switch(t)=20 + { + case 0: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541111_1, sdp_data_5= 41111_1[4] + 5); + t =3D 1; + break; + case 1: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541111_2, sdp_data_5= 41111_2[4] + 5); + t =3D 2; + break; +=09=09 + case 2: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541111_3, sdp_data_5= 41111_3[4] + 5); + t =3D 0; + break; + } + return retval; } =20 -static s32 sdp_test_541120(void) +static s32 sdp_test_541119(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_541120, sdp_data_541120[4= ] + 5); + static int t =3D 0; + s32 retval =3D 0; + switch(t)=20 + { + case 0: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541119_1, sdp_data_5= 41119_1[4] + 5); + t =3D 1; + break; + case 1: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541119_2, sdp_data_5= 41119_2[4] + 5); + t =3D 2; + break; +=09=09 + case 2: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541119_3, sdp_data_5= 41119_3[4] + 5); + t =3D 0; + break; + } + return retval; } =20 static s32 sdp_test_54121(void) @@ -1005,7 +1582,17 @@ =20 static s32 sdp_test_54122(void) { - return sdp_send_data(&sdp_con_list[0], sdp_data_54122, sdp_data_54122[4] = + 5); + static int t =3D 0; + if(t =3D=3D 0) { + t =3D 1; + return sdp_send_data(&sdp_con_list[0], sdp_data_54122_1, sdp_data_54122_= 1[4] + 5 - 2); + } else if(t =3D=3D 1) { + t =3D 2; + return sdp_send_data(&sdp_con_list[0], sdp_data_54122_2, sdp_data_54122_= 2[4] + 5 - 2); + } else { + t =3D 0; + return sdp_send_data(&sdp_con_list[0], sdp_data_54122_3, sdp_data_54122_= 3[4] + 5 - 2); + } } =20 static s32 sdp_test_55111(void) @@ -1017,37 +1604,104 @@ =20 switch (t) { case 0: - retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_1, sdp_data_5= 5111_1[4] + 5); + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_1_1, sdp_data_= 55111_1_1[4] + 5); t =3D 1; break; =20=09=20=20 case 1: - retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2_1, sdp_data= _55111_2_1[4] + 5); + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2, sdp_data_55= 111_2[4] + 5); t =3D 2; break; case 2: - retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2_2, sdp_data= _55111_2_2[4] + 5); + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_3, sdp_data_55= 111_3[4] + 5); t =3D 3; break; case 3: - retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2_3, sdp_data= _55111_2_3[4] + 5); + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_4, sdp_data_55= 111_4[4] + 5); t =3D 4; break; =20=09=20=20 case 4: - retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_3, sdp_data_5= 5111_3[4] + 5); + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_5_1, sdp_data_= 55111_5_1[4] + 5); t =3D 5; break; case 5: - retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_4, sdp_data_5= 5111_4[4] + 5); + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_6, sdp_data_55= 111_6[4] + 5); t =3D 6; break; case 6: - retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_5, sdp_data_5= 5111_5[4] + 5); + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_7_1, sdp_data_= 55111_7_1[4] + 5); t =3D 7; break; case 7: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_8, sdp_data_55= 111_8[4] + 5); + t =3D 8; + break; +=20=20=20=20=20=20=20=20 + case 8: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_1_2, sdp_data_= 55111_1_2[4] + 5); + t =3D 9; + break;=20 + case 9: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2, sdp_data_55= 111_2[4] + 5); + t =3D 10; + break; + case 10: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_3, sdp_data_55= 111_3[4] + 5); + t =3D 11; + break; + case 11: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_4, sdp_data_55= 111_4[4] + 5); + t =3D 12; + break; +=09=09 + case 12: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_5_2, sdp_data_= 55111_5_2[4] + 5); + t =3D 13; + break; + case 13: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_6, sdp_data_55= 111_6[4] + 5); + t =3D 14; + break; + case 14: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_7_2, sdp_data_= 55111_7_2[4] + 5); + t =3D 15; + break; + case 15: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_8, sdp_data_55= 111_8[4] + 5); + t =3D 16; + break; + case 16: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_1_3, sdp_data_= 55111_1_3[4] + 5); + t =3D 17; + break;=20 + case 17: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2, sdp_data_55= 111_2[4] + 5); + t =3D 18; + break; + case 18: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_3, sdp_data_55= 111_3[4] + 5); + t =3D 19; + break; + case 19: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_4, sdp_data_55= 111_4[4] + 5); + t =3D 20; + break; +=09=09 + case 20: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_5_3, sdp_data_= 55111_5_3[4] + 5); + t =3D 21; + break; + case 21: retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_6, sdp_data_5= 5111_6[4] + 5); + t =3D 22; + break; + case 22: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_7_3, sdp_data_= 55111_7_3[4] + 5); + t =3D 23; + break; + case 23: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_8, sdp_data_55= 111_8[4] + 5); t =3D 0; break; =20=09=20=20 @@ -1060,18 +1714,56 @@ =20=20=20 static int t =3D 0; s32 retval =3D 0; - /* + + printk("NOW RUNNING TESTCASE 55112, case %d\n", t); + switch (t) { case 0: - retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_1, sdp_data_55= 112_1[4] + 5); + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_1_1, sdp_data_= 55112_1_1[4] + 5); t =3D 1; break; =20 case 1: - retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_2, sdp_data_55= 112_2[4] + 5); + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_2_1, sdp_data_= 55112_2_1[4] + 5); + t =3D 2; + break; + + case 2: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_3_1, sdp_data_= 55112_3_1[4] + 5); + t =3D 3; + break; + + case 3: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_1_2, sdp_data_= 55112_1_2[4] + 5); + t =3D 4; + break; + + case 4: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_2_2, sdp_data_= 55112_2_2[4] + 5); + t =3D 5; + break; + + case 5: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_3_2, sdp_data_= 55112_3_2[4] + 5); + t =3D 6; + break; + + case 6: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_1_3, sdp_data_= 55112_1_3[4] + 5); + t =3D 7; + break; + + case 7: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_2_3, sdp_data_= 55112_2_3[4] + 5); + t =3D 8; + break; + + case 8: + retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_3_3, sdp_data_= 55112_3_3[4] + 5); t =3D 0; break; - }*/ + + } return retval; } =20 @@ -1761,18 +2453,18 @@ case 2135 : return test_2_13_5(); =20 case 52111: return sdp_test_52111(); + case 52112: return sdp_test_52112(); case 52113: return sdp_test_52113(); - case 52114: return sdp_test_52114(); case 52121: return sdp_test_52121(); case 52122: return sdp_test_52122(); case 53111: return sdp_test_53111(); + case 53112: return sdp_test_53112(); case 53113: return sdp_test_53113(); case 53114: return sdp_test_53114(); - case 53115: return sdp_test_53115(); - case 53118: return sdp_test_53118(); - case 531110: return sdp_test_531110(); - case 531117: return sdp_test_531117(); - case 531120: return sdp_test_531120(); + case 53117: return sdp_test_53117(); + case 53119: return sdp_test_53119(); + case 531116: return sdp_test_531116(); + case 531119: return sdp_test_531119(); case 53121: return sdp_test_53121(); case 53122: return sdp_test_53122(); case 53123: return sdp_test_53123(); @@ -1780,11 +2472,11 @@ case 54112: return sdp_test_54112(); case 54113: return sdp_test_54113(); case 54114: return sdp_test_54114(); - case 54116: return sdp_test_54116(); + case 54115: return sdp_test_54115(); + case 54119: return sdp_test_54119(); case 541110: return sdp_test_541110(); case 541111: return sdp_test_541111(); - case 541112: return sdp_test_541112(); - case 541120: return sdp_test_541120(); + case 541119: return sdp_test_541119(); case 54121: return sdp_test_54121(); case 54122: return sdp_test_54122(); case 55111: return sdp_test_55111(); |