You can subscribe to this list here.
2001 |
Jan
|
Feb
(44) |
Mar
(202) |
Apr
(134) |
May
(89) |
Jun
(94) |
Jul
(58) |
Aug
(58) |
Sep
(56) |
Oct
(75) |
Nov
(26) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(24) |
Feb
(30) |
Mar
(15) |
Apr
(49) |
May
(12) |
Jun
(6) |
Jul
(11) |
Aug
(20) |
Sep
(19) |
Oct
(3) |
Nov
(13) |
Dec
(1) |
2003 |
Jan
(7) |
Feb
(4) |
Mar
(7) |
Apr
(5) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(51) |
Dec
(1) |
2004 |
Jan
(11) |
Feb
(5) |
Mar
|
Apr
(5) |
May
(2) |
Jun
|
Jul
(21) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Mats F. <ma...@us...> - 2001-05-25 14:23:39
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.h 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added defines for the SYNC and CONF packets The diff of the modified file(s): --- bcsp.h 2001/05/18 16:04:16 1.5 +++ bcsp.h 2001/05/25 14:23:38 1.6 @@ -56,6 +56,11 @@ #define TRUE 1 #endif =20 +#define SYNC 0xEDEDDCDA +#define SYNC_RSP 0xEEEFAFAC +#define CONF 0xEDACEFAD +#define CONF_RSP 0xD0D0ADDE + #define BCSP_FLAG_SEQ 0x07 #define BCSP_FLAG_ACK 0x38 #define BCSP_FLAG_CRC 0x40 @@ -143,7 +148,7 @@ =20 s32 bcsp_datagram_receive(struct bcsp *bcsp); s32 bcsp_datagram_send(u8 *data, u32 len, u8 chn); -s32 bcsp_send_sync(void); +s32 bcsp_send_sync(u32 type); =20 #endif /****************** END OF FILE bcsp.h ***********************************= ***/ |
From: Mats F. <ma...@us...> - 2001-05-25 14:21:09
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.148 1.149=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Added function for trigging hci send data * Check status of send_acl_pkt before decreasing acl_num The diff of the modified file(s): --- hci.c 2001/05/22 09:45:53 1.148 +++ hci.c 2001/05/25 14:21:09 1.149 @@ -678,6 +678,23 @@ } #endif =20 +s32 +hci_trig_send(void) +{ +=09 + if (buf_count()) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) + queue_task(&send_data_task, &tq_scheduler); +#else + queue_task(&send_data_task, &tq_immediate); + mark_bh(IMMEDIATE_BH); +#endif + return TRUE; + } else { + return FALSE; + } +} + void update_ncp(u8 nbr_of_hdl, u8 *pkt) { @@ -694,6 +711,9 @@ tmp =3D CHAR2INT16(pkt[i+3], pkt[i+2]); hci_ctrl.hc_buf.acl_num +=3D CHAR2INT16(pkt[i+3], pkt[i+2]); } +=09 + D_QUEUE("<NCP:%d>\n",hci_ctrl.hc_buf.acl_num); + D_REC(__FUNCTION__", acl_num after : %d\n", hci_ctrl.hc_buf.acl_num); =20 /* We've just been notified that the hardware has free buffers. @@ -804,13 +824,13 @@ reset_hci_con_bd(hci_hdl); } else { DSYS(__FUNCTION__", ACL link is up\n"); - change_connection_packet_type(hci_hdl,=20 - DM3|DH3|DM5|DH5); + change_connection_packet_type(hci_hdl,DM1|DH1|=20 + DM3|DH3); set_hci_con(buf + 3, hci_hdl); remote_name_request(buf + 3); =20 /* enable m/s switch */=20 - write_link_policy_settings(hci_hdl, 0x01); + write_link_policy_settings(hci_hdl, 0x04); =20 /* we demand role switch as server */ if (force_msswitch && !i_am_initiator) { @@ -993,8 +1013,6 @@ =20 update_ncp(buf[0], buf + 1); =20 - D_QUEUE("<NCP:%d>\n",hci_ctrl.hc_buf.acl_num); - break; =20 case MODE_CHANGE: @@ -2804,13 +2822,26 @@ c_pkt.opcode =3D hci_put_opcode(READ_BUFFER_SIZE, HCI_IP); c_pkt.len =3D 0; =20 - if (block) - return send_cmd_block((u8*) &c_pkt ,c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + if (block) { + int ret =3D send_cmd_block((u8*) &c_pkt ,c_pkt.len + CMD_HDR_LEN + HCI_H= DR_LEN); +#if 0 + if (ret >=3D 0 && + hci_ctrl.hc_buf.acl_len =3D=3D 256 && + hci_ctrl.hc_buf.acl_num =3D=3D 4 && + hci_set_buffer_sizes(hci_ctrl.hc_buf.acl_len / 2, + hci_ctrl.hc_buf.acl_num * 2) >=3D= 0) { + c_pkt.type =3D CMD_PKT; + c_pkt.opcode =3D hci_put_opcode(READ_BUFFER_SIZE, = HCI_IP); + c_pkt.len =3D 0; + ret =3D send_cmd_block((u8*) &c_pkt ,c_pkt.len + C= MD_HDR_LEN + HCI_HDR_LEN); + } +#endif + return ret; + } else return send_cmd((u8*) &c_pkt ,c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN); } =20 - #if 0 s32 hci_read_local_version_info(s32 block) @@ -3226,6 +3257,7 @@ send_acl_data_task(void) { s32 bytes2send =3D 0;=09 + s32 sent_bytes =3D 0; bt_tx_buf *tx_buf; =20=09 /* get pointer to next unsent transmission chunk */ @@ -3245,13 +3277,22 @@ interrupt can change hci_ctrl.hc_buf.acl_num. */ cli(); while ((hci_ctrl.hc_buf.acl_num > 0) && bytes2send) { - hci_ctrl.hc_buf.acl_num--; sti(); =20=09=09 /* FIXME -- what if send_acl_packet fails ???=20 Then acl_num will decrease anyway ... */=20 =20 - bytes2send -=3D send_acl_packet(tx_buf); + sent_bytes =3D send_acl_packet(tx_buf); + + if (sent_bytes !=3D 0) { + bytes2send -=3D sent_bytes; + cli(); + hci_ctrl.hc_buf.acl_num--; + sti(); + } else { + break; + } + =20=09=09 D_QUEUE("<--%d (%d)\n", buf_byte_count(),=20 hci_ctrl.hc_buf.acl_num); |
From: Mats F. <ma...@us...> - 2001-05-25 14:12:51
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp_sequence.c 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Rewrote resending procedures The diff of the modified file(s): --- bcsp_sequence.c 2001/05/18 16:03:51 1.8 +++ bcsp_sequence.c 2001/05/25 14:12:50 1.9 @@ -58,7 +58,7 @@ #define D(fmt...) #endif =20 -#define WINSIZE 7 +#define WINSIZE 4 #define SEQUENCE_TIMEOUT HZ =20 /****************** TYPE DEFINITION SECTION ******************************= ***/ @@ -126,25 +126,32 @@ bcsp_syncronized(); } =20=09 + printk(__FUNCTION__": txack:%d, expected_rxseq:%d, BCSP_GET_SEQ(bcsp):%d\= n", txack, expected_rxseq, BCSP_GET_SEQ(bcsp)); +=09 if (expected_rxseq =3D=3D BCSP_GET_SEQ(bcsp)) { cli(); txack =3D (BCSP_GET_SEQ(bcsp) + 1) % 8; expected_rxseq =3D (expected_rxseq + 1) % 8; sti(); =20 - bcsp_receive_top(bcsp->payload, bcsp->payload_length, bcsp->identifier); + if ((winspace > 0) && (hci_trig_send())) { + printk("*\n"); + } else { + printk(" -\n"); + send_ack(); } =20 -/* FIXME: Do we need a task_queue for sending the ack packets ? */ -#if 0 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) - queue_task(&send_ack_task, &tq_immediate); -#else - queue_task(&send_ack_task, &tq_immediate); - mark_bh(IMMEDIATE_BH); -#endif -#endif=09=09 + bcsp_receive_top(bcsp->payload, bcsp->payload_length, + bcsp->identifier); + } else { /* out of order rx seq nbr */=20 + if ((winspace > 0) && (hci_trig_send())) { + print_data(__FUNCTION__, bcsp->payload, bcsp->payload_length); + printk("**\n"); + } else { + printk(" --\n"); send_ack(); + } + } =20=09 return 0; } @@ -154,6 +161,8 @@ { struct bcsp bcsp; =20=09 + //printk(__FUNCTION__": rxack:%d, txack:%d, txseq:%d, winspace:%d\n", rxa= ck, txack, txseq, winspace); +=09 if (winspace > 0) { bcsp_init_packet(&bcsp); =20 @@ -161,8 +170,8 @@ =20 BCSP_SET_PROTOCOL_TYPE(&bcsp, BCSP_RELIABLE); =20 + cli(); BCSP_SET_SEQ(&bcsp, txseq); - BCSP_SET_ACK(&bcsp, txack); =20 bcsp.payload =3D data; @@ -174,12 +183,11 @@ =20 txseq =3D (txseq + 1) % 8; winspace--; + sti(); =20 D(__FUNCTION__": winspace:%d, txreq:%d\n", winspace, txseq); =20 - if (resend_timer_active) { - release_resend_timer(); - } + /* restart timer */ start_resend_timer(); } else { printk(__FUNCTION__": winspace =3D 0\n"); @@ -192,40 +200,42 @@ void bcsp_signal_rxack(u8 new_ack) { - D(__FUNCTION__": Got rxack:%d\n", new_ack); + s32 trig_send =3D FALSE; + printk(__FUNCTION__": Got new ack:%d, rxack is:%d, txseq:%d, winspace:%d\= n", new_ack, rxack, txseq, winspace); =20=09 - if (rxack =3D=3D new_ack) { - if (!(rxack =3D=3D txseq)) { - printk(__FUNCTION__": Got incorrect new_ack:%d, seq_nbr:%d\n", new_ack= , txseq); =20=09=09 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) - queue_task(&resend_data_task, &tq_scheduler); -#else - queue_task(&resend_data_task, &tq_immediate); - mark_bh(IMMEDIATE_BH); -#endif - } else { - printk(__FUNCTION__": Got repeted ack%d\n", new_ack); + if (rxack =3D=3D new_ack) { /* Same ack again... */ + return; } - } else if (rxack < new_ack) { + + cli(); + if (winspace =3D=3D 0) { + trig_send =3D TRUE; + } + D(__FUNCTION__": winspace before:%d\n", winspace); - winspace +=3D new_ack - rxack; - D(__FUNCTION__": winspace after:%d\n", winspace); + if (new_ack > rxack) { + winspace +=3D (new_ack - rxack); } else { - D(__FUNCTION__": winspace before:%d\n", winspace); - winspace +=3D (WINSIZE - rxack) + new_ack + 1; - D(__FUNCTION__": winspace after:%d\n", winspace); + winspace +=3D (WINSIZE - (rxack - new_ack) + 1); } + D(__FUNCTION__": winspace after:%d\n", winspace); =20 rxack =3D new_ack; + sti(); =20 if (winspace =3D=3D WINSIZE) { release_resend_timer(); } else if (winspace > WINSIZE) { - printk(__FUNCTION__": Somthing has gone wrong winspace > WINSIZE\n"); + printk(__FUNCTION__": Something has gone wrong winspace > WINSIZE\n"); release_resend_timer(); winspace =3D WINSIZE; } +=09 + if (trig_send) { + printk(__FUNCTION__": Trying to trig send\n"); + hci_trig_send(); + } } =20 void @@ -233,8 +243,9 @@ { struct bcsp bcsp; u8 resend_cnt =3D rxack; -=09 + cli(); while (resend_cnt !=3D txseq) { + sti(); printk(__FUNCTION__": Resending with seq_nbr:%d, last ack was %d, cur se= q_nbr:%d\n", resend_cnt, rxack, txseq); =20 bcsp_init_packet(&bcsp); @@ -244,28 +255,36 @@ BCSP_SET_PROTOCOL_TYPE(&bcsp, BCSP_RELIABLE); =20 BCSP_SET_SEQ(&bcsp, resend_cnt); - + cli(); BCSP_SET_ACK(&bcsp, txack); - + sti(); bcsp.payload =3D resend_buffer[resend_cnt].data; bcsp.payload_length =3D resend_buffer[resend_cnt].len; =20 bcsp_mux_send(&bcsp); resend_cnt =3D (resend_cnt + 1) % 8; } - + sti(); start_resend_timer(); } =20 void send_ack(void) { - bcsp_send_txack(txack); + u8 tmp; + cli(); + tmp =3D txack; + sti(); + bcsp_send_txack(tmp); } =20 void start_resend_timer(void) { + if (resend_timer_active) { + release_resend_timer(); + } +=09 init_timer(&resend_timer); resend_timer.function =3D (void*)sequence_resend; resend_timer.data =3D 0; @@ -279,8 +298,10 @@ void release_resend_timer(void) { + if (resend_timer_active) { resend_timer_active =3D FALSE; del_timer(&resend_timer); + } } =20 /****************** END OF FILE sequence.c *******************************= ***/ |
From: Mats F. <ma...@us...> - 2001-05-25 14:10:26
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp_mux.c 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Signal rxack when receiving data packets too The diff of the modified file(s): --- bcsp_mux.c 2001/05/18 16:03:51 1.5 +++ bcsp_mux.c 2001/05/25 14:10:26 1.6 @@ -69,9 +69,11 @@ { /* If we received an ack packet, we discard the packet, sice the ack has already been handled by signal_rxack */ + + bcsp_signal_rxack(BCSP_GET_ACK(bcsp)); +=09 if (bcsp->identifier =3D=3D 0) { D(__FUNCTION__ ": Received ack, returning\n"); - bcsp_signal_rxack(BCSP_GET_ACK(bcsp)); return 0; } =20=09 |
From: Mats F. <ma...@us...> - 2001-05-25 14:09:18
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp_datagram.c 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Use one function for all sync-msg The diff of the modified file(s): --- bcsp_datagram.c 2001/05/18 16:03:51 1.4 +++ bcsp_datagram.c 2001/05/25 14:09:17 1.5 @@ -53,11 +53,6 @@ =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 -#define SYNC 0xEDEDDCDA -#define SYNC_RSP 0xEEEFAFAC -#define CONF 0xEDACEFAD -#define CONF_RSP 0xD0D0ADDE - #if DATAGRAM_DEBUG #define D(fmt...) printk("DATAGRAM: " fmt) #define PRINTPKT(data, len) print_data(NULL, data, len) @@ -121,39 +116,29 @@ =20=09 sync_string =3D le32_to_cpu(get_unaligned((u32 *)bcsp->payload)); =20 - if (sync_string =3D=3D SYNC) { + switch (sync_string) { + case SYNC:=09 D(__FUNCTION__ ": Found SYNC\n"); - send_sync_rsp();=09=09 + bcsp_send_sync(SYNC_RSP);=09=09 return TRUE; - } else if (sync_string =3D=3D CONF) { + case SYNC_RSP: + D(__FUNCTION__": Found SYNC_RSP\n"); + bcsp_send_sync(CONF); + break; + case CONF: D(__FUNCTION__ ": Found CONF\n"); - send_conf_rsp(); + bcsp_send_sync(CONF_RSP); return TRUE; - } else { + case CONF_RSP: + D(__FUNCTION__": Found CONF_RSP\n"); + break; + default: return FALSE; } } =20 s32 -bcsp_send_sync(void) -{ - return send_sync_pkt(SYNC); -} - -s32 -send_sync_rsp(void) -{ - return send_sync_pkt(SYNC_RSP); -} - -s32 -send_conf_rsp(void) -{ - return send_sync_pkt(CONF_RSP); -} - -s32 -send_sync_pkt(u32 type) +bcsp_send_sync(u32 type) { struct bcsp bcsp; u32 payload =3D cpu_to_le32(type); |
From: Mats F. <ma...@us...> - 2001-05-25 14:07:58
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.c 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Corrected spelling * Use one function for all sync-msg The diff of the modified file(s): --- bcsp.c 2001/05/22 09:45:53 1.9 +++ bcsp.c 2001/05/25 14:07:56 1.10 @@ -114,7 +114,7 @@ { BCSP_SYS(__FUNCTION__ ": Initializing BCSP\n"); bcsp_sequence_init(); - bcsp_send_sync(); + bcsp_send_sync(SYNC); cli(); if (!bcsp_sync) { interruptible_sleep_on(&bcsp_sync_wq); @@ -125,7 +125,7 @@ void bcsp_shutdown(void) { - BCSP_SYS(__FUNCTION__": Shuting down BCSP\n"); + BCSP_SYS(__FUNCTION__": Shutting down BCSP\n"); bcsp_sequence_shutdown(); } =20 |
From: Peter K. <pk...@us...> - 2001-05-23 15:17:56
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- rfcomm.c 1.110 1.111=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Made it compile for user mode too. The diff of the modified file(s): --- rfcomm.c 2001/05/23 15:09:18 1.110 +++ rfcomm.c 2001/05/23 15:17:55 1.111 @@ -61,6 +61,7 @@ #else #include <stdlib.h> #include <string.h> +#include <errno.h> #include "include/rfcomm.h" #include "include/rfcomm_sec.h" #include "include/btmem.h" |
From: Peter K. <pk...@us...> - 2001-05-23 15:10:48
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btdebug.c 1.20 1.21=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Corrected print_data() to not write lines loger than 80 characters. * Only need one version of print_data() (printk is defined to printf in btdebug.h for user mode). The diff of the modified file(s): --- btdebug.c 2001/05/17 15:16:55 1.20 +++ btdebug.c 2001/05/23 15:10:48 1.21 @@ -92,48 +92,32 @@ return buf; } =20 -void=20 -print_data(const u8 *message, u8 *buf, s32 len) -{=20 - s32 t; - - if (message) - printk("\n%s (%d)\n", message, len); - printk(" "); - for (t =3D 0; t < len; t++) - { - if (!((t+1) % 16)) - printk("\n "); - printk("0x%02x ", buf[t]); - } - printk("\n"); -} - #else + /* No timestamps in usermode yet */ char* print_time(int use_stdout) { printf("No timestamps in usermode stack yet\n"); return "No timestamps in usermode stack yet\n"; } +#endif =20 void=20 print_data(const u8 *message, u8 *buf, s32 len) {=20 - s32 t; + s32 t =3D 0; =20 if (message) - printf("\n%s (%d)\n", message, len); - printf(" "); - for (t =3D 0; t < len; t++) + printk("\n%s (%d):\n", message, len); + while (t < len) { - if(!((t+1) % 16)) - printf("\n "); - printf("0x%02x ", buf[t]); + printk("0x%02x ", buf[t++]); + if (!(t % 16)) + printk("\n"); } - printf("\n"); + if (t % 16) + printk("\n"); } -#endif =20 const char* bd2str(const unsigned char *bd) { |
From: Peter K. <pk...@us...> - 2001-05-23 15:09:19
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- rfcomm.c 1.109 1.110=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Return errorvalue in rfcomm_disconnect_req() if connection is found. The diff of the modified file(s): --- rfcomm.c 2001/05/02 15:50:50 1.109 +++ rfcomm.c 2001/05/23 15:09:18 1.110 @@ -776,11 +776,12 @@ { rfcomm_con *rfcomm; s32 tmp; + D_CTRL("rfcomm_disconnect_req %d\n", line); if (!(rfcomm =3D &rfcomm_con_list[line])) { D_ERR("rfcomm_disconnect_req : no rfcomm con\n"); - return; + return -EINVAL; } =20 tmp =3D get_connected_dlci(rfcomm); |
From: Ulf H. <ul...@us...> - 2001-05-23 14:03:44
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.15 1.16=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added missing pppd options The diff of the modified file(s): --- btd.c 2001/05/23 11:42:59 1.15 +++ btd.c 2001/05/23 14:03:43 1.16 @@ -135,8 +135,8 @@ static unsigned char ms_wins1[35]; static unsigned char ms_wins2[35]; static unsigned char netmask[35]; -static char bd_str[18]; - +static char remote_bd_str[18]; +static char local_bd_str[18]; =20 static fd_set rfd; static struct timeval tv; @@ -436,6 +436,7 @@ struct ip_set *ipset =3D PEER(line).ipset; char local_ip[20]; =20 +=20=20 if (ipa_available) show_ipset(ipset, line); =20=20=20 @@ -463,12 +464,29 @@ /* Use radius ? */ if (ipset->useradius) { + unsigned char local_bd[6]; +=20=20=20=20=20=20 opts[i++] =3D "useradius"; opts[i++] =3D "auth"; opts[i++] =3D "login"; +=20=20=20=20=20=20 + opts[i++] =3D "localbdaddr"; + + read_local_bd(bt_cfd, local_bd); +=20=20=20=20=20=20=20=20 + sprintf(local_bd_str, "%02x:%02x:%02x:%02x:%02x:%02x",=20 + local_bd[0],=20 + local_bd[1],=20 + local_bd[2],=20 + local_bd[3],=20 + local_bd[4],=20 + local_bd[5]); +=20=20=20=20=20=20 + opts[i++] =3D local_bd_str; + opts[i++] =3D "remotebdaddr"; =20 - sprintf(bd_str, "%02x:%02x:%02x:%02x:%02x:%02x",=20 + sprintf(remote_bd_str, "%02x:%02x:%02x:%02x:%02x:%02x",=20 PEER(line).remote_bd[0],=20 PEER(line).remote_bd[1],=20 PEER(line).remote_bd[2],=20 @@ -476,7 +494,7 @@ PEER(line).remote_bd[4],=20 PEER(line).remote_bd[5]); =20=20=20=20=20=20=20 - opts[i++] =3D bd_str; + opts[i++] =3D remote_bd_str; =20=20=20=20=20=20=20 if (ipset->useradiusip) { @@ -495,6 +513,12 @@ /* similar as doing ' echo 1 > /proc/sys/net/ipv4/ip_forward */ opts[i++] =3D "ktune"; /* enables ip_forwarding */ }=20=20 + + if (ipset->usingmasq) + { + pppd_options[i++] =3D "usingmasq"; + } + =20=20=20=20=20 strcpy(local_ip, get_local_ip_address()); /* local/remote ip */ |
From: Olov H. <ol...@us...> - 2001-05-23 11:43:01
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.14 1.15=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added remote_bd as option to pppd The diff of the modified file(s): --- btd.c 2001/05/17 10:23:01 1.14 +++ btd.c 2001/05/23 11:42:59 1.15 @@ -135,6 +135,8 @@ static unsigned char ms_wins1[35]; static unsigned char ms_wins2[35]; static unsigned char netmask[35]; +static char bd_str[18]; + =20 static fd_set rfd; static struct timeval tv; @@ -361,6 +363,8 @@ /* IPA response */ if (FD_ISSET(ipa_fd, &rfd)) { +=09=20=20=20=20 +=09=20=20=20=20 msg =3D (struct ipa_msg*) ipa_buf; /* Got response from IPA, if ok then start pppd or modem emul = */ ipa_read(ipa_fd, msg); @@ -462,6 +466,17 @@ opts[i++] =3D "useradius"; opts[i++] =3D "auth"; opts[i++] =3D "login"; + opts[i++] =3D "remotebdaddr"; + + sprintf(bd_str, "%02x:%02x:%02x:%02x:%02x:%02x",=20 + PEER(line).remote_bd[0],=20 + PEER(line).remote_bd[1],=20 + PEER(line).remote_bd[2],=20 + PEER(line).remote_bd[3],=20 + PEER(line).remote_bd[4],=20 + PEER(line).remote_bd[5]); +=20=20=20=20=20=20 + opts[i++] =3D bd_str; =20=20=20=20=20=20=20 if (ipset->useradiusip) { |
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-05-22 09:45:58
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.h 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): --- bluetooth.h 2001/04/17 16:06:49 1.39 +++ bluetooth.h 2001/05/22 09:45:53 1.40 @@ -50,6 +50,9 @@ =20 /* glue functions */ s32 bt_write_lower_driver(u8 *data, s32 len); +#ifdef CONFIG_BLUETOOTH_USE_BCSP +s32 bt_write_lower_driver_real(u8 *data, s32 len); +#endif s32 bt_receive_top(u32 con_id, u8 *data, s32 len); =20 void parse_event(u8 *event); @@ -85,6 +88,7 @@ /******************/ =20 s32 bt_initiated(void); +s32 bt_use_bcsp(s32 new_use_bcsp); void bt_connect_cfm(u32 con_id, s32 status); s32 bt_sprint_status(u8 *buf); void bt_send_sdp_data_received(u8 line, u8 *data, int len); |
From: Mattias A. <mat...@us...> - 2001-05-21 09:08:15
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- btsend.c 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * removed some debug The diff of the modified file(s): --- btsend.c 2001/05/14 11:37:06 1.5 +++ btsend.c 2001/05/21 09:08:14 1.6 @@ -94,12 +94,10 @@ =20=20=20=20=20=20=20 case 's': len =3D atoi(optarg); - printf("len %d\n", len); break; =20=20=20=20=20=20=20 case 'r': repeat =3D atoi(optarg); - printf("repeat %d\n", repeat); break; =20 default: |
From: Mattias A. <mat...@us...> - 2001-05-21 09:07:45
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- btcon.c 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added sanity check for inparams The diff of the modified file(s): --- btcon.c 2001/05/14 11:29:36 1.6 +++ btcon.c 2001/05/21 09:07:45 1.7 @@ -179,6 +179,13 @@ =20=20 printf("Connecting to %s on line %d\n", bd2str(bd), line); =20 + /* Some sanity checks */ + if ((srvch <=3D 0) || (srvch > 62) || (line < 0) || (line > 6)) + { + printf("Invalid parameters, srvch [1-62] , line [0-6]\n"); + exit(1); + } + con_id =3D CREATE_RFCOMM_ID(line, srvch << 1); =20 result =3D bt_connect(bt_cfd, bd, con_id); |
From: Mattias A. <mat...@us...> - 2001-05-21 07:32:51
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- l2cap.c 1.107 1.108=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added sanity checks in l2cap_receive_data * corrected flow option length in config req The diff of the modified file(s): --- l2cap.c 2001/04/26 13:33:26 1.107 +++ l2cap.c 2001/05/21 07:32:50 1.108 @@ -532,6 +532,25 @@ pkt_len =3D le16_to_cpu(pkt->len); pkt_cid =3D le16_to_cpu(pkt->cid); =20 + /* Do some sanity checks */ + if (pkt_len > HCI_IN_SIZE) + { + /* Packet won't fit in inbuffers */ + D_ERR(__FUNCTION__": packet too big [%d], discard packet= \n",=20 + pkt_len); + hci_clear_buffer(hci_handle); + return; + } + + if ((pkt_cid !=3D 1) && (pkt_cid !=3D 2) && + ((pkt_cid < 0x0040) || (pkt_cid > 0xffff))) + { + D_ERR(__FUNCTION__": invalid CID [%d], discard packet\n"= ,=20 + pkt_cid); + hci_clear_buffer(hci_handle); + return; + } + /* 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; @@ -2117,7 +2136,7 @@ =20=09 if (outflow !=3D NULL) { /* We inform peer about our QOS settings */ - opt_len +=3D sizeof *outflow; + opt_len +=3D sizeof *outflow + 2; /* include type/len */ } =20=09 payload_len =3D SIGCMD_HDRSIZE + CONF_REQSIZE + opt_len;=20=20 @@ -2680,15 +2699,15 @@ { l2cap_tx_buf *l2cap_buf; =20 - D_XMIT(__FUNCTION__ ": hdl : %d, rcid : %d, len:%d \n", - con->hci_hdl, con->remote_cid, tx->cur_len); - if (PARANOIA_CHECKCON(con)) { D_ERR(__FUNCTION__ ": Paranoia check failed\n"); tx->flushed =3D 1; /* flush this buffer */ return -EINVAL; } =20 + D_XMIT(__FUNCTION__ ": hdl : %d, rcid : %d, len:%d \n", + con->hci_hdl, con->remote_cid, tx->cur_len); + if (tx->cur_len > con->remote_mtu) { D_ERR("%s tries to send more than remote mtu, ignore\n",=20 psm2str(con->psm)); @@ -2803,8 +2822,6 @@ void l2ca_disconnect_cfm(l2cap_con *con) { - s32 tmp_hdl; - D_STATE(__FUNCTION__ ": remote cid : %d\n", con->remote_cid); =20 /* tell upper layers that connection is down */ |
From: Peter K. <pk...@us...> - 2001-05-18 16:04:17
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.h 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Made all global function names start with bcsp_. The diff of the modified file(s): --- bcsp.h 2001/05/18 09:14:21 1.4 +++ bcsp.h 2001/05/18 16:04:16 1.5 @@ -112,38 +112,38 @@ s32 bcsp_write_lower(u8 *data, u32 len); s32 bcsp_receive_top(u8 *data, u32 len, u8 chn); s32 bcsp_receive_lower(u8 *data, u32 len); -void init_bcsp_packet(struct bcsp *bcsp); +void bcsp_init_packet(struct bcsp *bcsp); =20 /************************* functions in slip.c ***************************= ***/ =20 -s32 slip_send(struct bcsp* bcsp); -s32 slip_receive(struct bcsp* bcsp, const u8* packet, u32 len); +s32 bcsp_slip_send(struct bcsp* bcsp); +s32 bcsp_slip_receive(struct bcsp* bcsp, const u8* packet, u32 len); =20 /************************* functions in integrity.c **********************= ****/ =20 -s32 integrity_send(struct bcsp *bcsp); -s32 integrity_receive(struct bcsp *bcsp); +s32 bcsp_integrity_send(struct bcsp *bcsp); +s32 bcsp_integrity_receive(struct bcsp *bcsp); =20 /************************* functions in mux.c ****************************= ***/ =20 -s32 mux_send(struct bcsp *bcsp); -s32 mux_receive(struct bcsp *bcsp); -s32 mux_send(struct bcsp *bcsp); -s32 send_txack(u8 txack); +s32 bcsp_mux_send(struct bcsp *bcsp); +s32 bcsp_mux_receive(struct bcsp *bcsp); +s32 bcsp_mux_send(struct bcsp *bcsp); +s32 bcsp_send_txack(u8 txack); =20 /************************* functions in sequence.c ***********************= ***/ =20 -void sequence_init(void); -void sequence_shutdown(void); -s32 sequence_receive(struct bcsp *bcsp); -s32 sequence_send(u8 *data, u32 len, u8 chn); -void signal_rxack(u8 ack); +void bcsp_sequence_init(void); +void bcsp_sequence_shutdown(void); +s32 bcsp_sequence_receive(struct bcsp *bcsp); +s32 bcsp_sequence_send(u8 *data, u32 len, u8 chn); +void bcsp_signal_rxack(u8 ack); =20 /************************* functions in datagram.c ***********************= ****/ =20 -s32 datagram_receive(struct bcsp *bcsp); -s32 datagram_send(u8 *data, u32 len, u8 chn); -s32 send_sync(void); +s32 bcsp_datagram_receive(struct bcsp *bcsp); +s32 bcsp_datagram_send(u8 *data, u32 len, u8 chn); +s32 bcsp_send_sync(void); =20 #endif /****************** END OF FILE bcsp.h ***********************************= ***/ |
From: Peter K. <pk...@us...> - 2001-05-18 16:03:52
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.c 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_datagram.c 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_integrity.c 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_mux.c 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_sequence.c 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_slip.c 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Made all global function names start with bcsp_. The diff of the modified file(s): --- bcsp.c 2001/05/18 15:38:01 1.7 +++ bcsp.c 2001/05/18 16:03:51 1.8 @@ -113,8 +113,8 @@ bcsp_init(void) { BCSP_SYS(__FUNCTION__ ": Initializing BCSP\n"); - sequence_init(); - send_sync(); + bcsp_sequence_init(); + bcsp_send_sync(); cli(); if (!bcsp_sync) { interruptible_sleep_on(&bcsp_sync_wq); @@ -126,7 +126,7 @@ bcsp_shutdown(void) { BCSP_SYS(__FUNCTION__": Shuting down BCSP\n"); - sequence_shutdown(); + bcsp_sequence_shutdown(); } =20 void @@ -172,11 +172,11 @@ PRINTPKT(data, len); =20 while (handled < len) { - init_bcsp_packet(&bcsp); - handled +=3D slip_receive(&bcsp, data + handled, len - handled); + bcsp_init_packet(&bcsp); + handled +=3D bcsp_slip_receive(&bcsp, data + handled, len - handled); D(__FUNCTION__ ": So far handled: %d bytes\n", handled); if (bcsp.packet) { - integrity_receive(&bcsp); + bcsp_integrity_receive(&bcsp); kfree(bcsp.packet); } } @@ -193,16 +193,16 @@ case CMD_PKT: opcode =3D le16_to_cpu(get_unaligned((u16 *)&data[1])); if (hci_get_ocf(opcode) =3D=3D BCSP_OCF) { - ret =3D sequence_send(data + 5, len - 5, data[4] & 0x3f); + ret =3D bcsp_sequence_send(data + 5, len - 5, data[4] & 0x3f); } else { - ret =3D sequence_send(data + 1, len - 1, BCSP_CMD_CHN); + ret =3D bcsp_sequence_send(data + 1, len - 1, BCSP_CMD_CHN); } break; case ACL_PKT: - ret =3D sequence_send(data + 1, len - 1, BCSP_ACL_CHN); + ret =3D bcsp_sequence_send(data + 1, len - 1, BCSP_ACL_CHN); break; case SCO_PKT: - ret =3D sequence_send(data + 1, len - 1, BCSP_SCO_CHN); + ret =3D bcsp_sequence_send(data + 1, len - 1, BCSP_SCO_CHN); break; default: D_ERR(__FUNCTION__ ": Unknown packet type: 0x%x\n", data[0]); @@ -222,7 +222,7 @@ } =20 void -init_bcsp_packet(struct bcsp *bcsp) +bcsp_init_packet(struct bcsp *bcsp) { memset(bcsp, 0, sizeof *bcsp); }; --- bcsp_datagram.c 2001/05/18 15:42:13 1.3 +++ bcsp_datagram.c 2001/05/18 16:03:51 1.4 @@ -82,7 +82,7 @@ /****************** FUNCTION DEFINITION SECTION **************************= ***/ =20 s32 -datagram_receive(struct bcsp *bcsp) +bcsp_datagram_receive(struct bcsp *bcsp) { if (handle_sync_pkt(bcsp)) { D(__FUNCTION__ ": Sync packet received, sending respose\n"); @@ -96,18 +96,18 @@ } =20 s32 -datagram_send(u8 *data, u32 len, u8 chn) +bcsp_datagram_send(u8 *data, u32 len, u8 chn) { struct bcsp bcsp; =20=09 - init_bcsp_packet(&bcsp); + bcsp_init_packet(&bcsp); =20 BCSP_SET_PROTOCOL_TYPE(&bcsp, BCSP_UNRELIABLE); =20=09 bcsp.payload =3D data; bcsp.payload_length =3D len; =20=09 - return mux_send(&bcsp); + return bcsp_mux_send(&bcsp); } =20 s32 @@ -135,7 +135,7 @@ } =20 s32 -send_sync(void) +bcsp_send_sync(void) { return send_sync_pkt(SYNC); } @@ -160,13 +160,13 @@ =20=09 D(__FUNCTION__ "\n"); =20 - init_bcsp_packet(&bcsp); + bcsp_init_packet(&bcsp); =20=09 bcsp.identifier =3D 1;=20 bcsp.payload =3D (u8 *)&payload; bcsp.payload_length =3D sizeof(u32); =20 - return mux_send(&bcsp); + return bcsp_mux_send(&bcsp); } =20 /****************** END OF FILE sequence.c *******************************= ***/ --- bcsp_integrity.c 2001/05/18 15:39:45 1.4 +++ bcsp_integrity.c 2001/05/18 16:03:51 1.5 @@ -89,7 +89,7 @@ /****************** FUNCTION DEFINITION SECTION **************************= ***/ =20 s32 -integrity_receive(struct bcsp* bcsp) +bcsp_integrity_receive(struct bcsp* bcsp) { bcsp->flags =3D BCSP_GET_FLAGS(bcsp); bcsp->identifier =3D BCSP_GET_IDENTIFIER(bcsp); @@ -118,11 +118,11 @@ bcsp->payload =3D bcsp->packet + BCSP_HDR_SIZE; PRINTPKT(bcsp->payload, bcsp->payload_length); =20 - return mux_receive(bcsp); + return bcsp_mux_receive(bcsp); } =20 s32 -integrity_send(struct bcsp* bcsp) +bcsp_integrity_send(struct bcsp* bcsp) { bcsp->checksum =3D calc_checksum(bcsp->flags, bcsp->identifier, bcsp->pay= load_length); =20 @@ -130,7 +130,7 @@ bcsp->crc =3D calc_crc(bcsp); } =20 - return slip_send(bcsp); + return bcsp_slip_send(bcsp); } =20 s32 --- bcsp_mux.c 2001/05/18 15:18:17 1.4 +++ bcsp_mux.c 2001/05/18 16:03:51 1.5 @@ -65,22 +65,22 @@ /****************** FUNCTION DEFINITION SECTION **************************= ***/ =20 s32 -mux_receive(struct bcsp *bcsp) +bcsp_mux_receive(struct bcsp *bcsp) { /* If we received an ack packet, we discard the packet, sice the ack has already been handled by signal_rxack */ if (bcsp->identifier =3D=3D 0) { D(__FUNCTION__ ": Received ack, returning\n"); - signal_rxack(BCSP_GET_ACK(bcsp)); + bcsp_signal_rxack(BCSP_GET_ACK(bcsp)); return 0; } =20=09 if (BCSP_GET_PROTOCOL_TYPE(bcsp) =3D=3D BCSP_RELIABLE) { D(__FUNCTION__ ": Sending to sequencing layer\n"); - return sequence_receive(bcsp); + return bcsp_sequence_receive(bcsp); } else if (BCSP_GET_PROTOCOL_TYPE(bcsp) =3D=3D BCSP_UNRELIABLE) { D(__FUNCTION__ ": Sending to datagram layer\n"); - return datagram_receive(bcsp); + return bcsp_datagram_receive(bcsp); } else { /* This shouldn't be possible */ BCSP_SYS(__FUNCTION__ ": Packet is neither reliable nor unreliable\n"); @@ -89,26 +89,26 @@ } =20 s32 -mux_send(struct bcsp *bcsp) +bcsp_mux_send(struct bcsp *bcsp) { D(__FUNCTION__ "\n"); - return integrity_send(bcsp); + return bcsp_integrity_send(bcsp); } =20 -s32 send_txack(u8 txack) +s32 bcsp_send_txack(u8 txack) { struct bcsp bcsp; =20 D(__FUNCTION__ ": txack: 0x%x\n", txack); =20 - init_bcsp_packet(&bcsp); + bcsp_init_packet(&bcsp); =20=09 BCSP_SET_ACK(&bcsp, txack); BCSP_SET_SEQ(&bcsp, 0); bcsp.identifier =3D 0; /* According to AN004.pdf page 20 */ bcsp.payload_length =3D 0; =20 - return integrity_send(&bcsp); + return bcsp_integrity_send(&bcsp); } =20 /****************** END OF FILE mux.c ************************************= ***/ --- bcsp_sequence.c 2001/05/18 13:58:17 1.7 +++ bcsp_sequence.c 2001/05/18 16:03:51 1.8 @@ -103,7 +103,7 @@ /****************** FUNCTION DEFINITION SECTION **************************= ***/ =20 void -sequence_init(void) +bcsp_sequence_init(void) { resend_data_task.routine =3D (void*)sequence_resend; resend_data_task.data =3D NULL; @@ -113,13 +113,13 @@ } =20 void -sequence_shutdown(void) +bcsp_sequence_shutdown(void) { release_resend_timer(); } =20 s32 -sequence_receive(struct bcsp *bcsp) +bcsp_sequence_receive(struct bcsp *bcsp) { if (!got_packet) { got_packet =3D TRUE; @@ -149,14 +149,13 @@ return 0; } =20 - s32 -sequence_send(u8 *data, u32 len, u8 chn) +bcsp_sequence_send(u8 *data, u32 len, u8 chn) { struct bcsp bcsp; =20=09 if (winspace > 0) { - init_bcsp_packet(&bcsp); + bcsp_init_packet(&bcsp); =20=09=09 bcsp.identifier =3D chn; =20=09=09 @@ -187,13 +186,12 @@ return 0; } =20=09=09 - return mux_send(&bcsp); + return bcsp_mux_send(&bcsp); } =20 void -signal_rxack(u8 new_ack) +bcsp_signal_rxack(u8 new_ack) { - D(__FUNCTION__": Got rxack:%d\n", new_ack); =20=09 if (rxack =3D=3D new_ack) { @@ -239,7 +237,7 @@ while (resend_cnt !=3D txseq) { printk(__FUNCTION__": Resending with seq_nbr:%d, last ack was %d, cur se= q_nbr:%d\n", resend_cnt, rxack, txseq); =20=09=09 - init_bcsp_packet(&bcsp); + bcsp_init_packet(&bcsp); =20=09=09 bcsp.identifier =3D resend_buffer[resend_cnt].chn; =20=09=09 @@ -252,7 +250,7 @@ bcsp.payload =3D resend_buffer[resend_cnt].data; bcsp.payload_length =3D resend_buffer[resend_cnt].len; =20=09=09 - mux_send(&bcsp); + bcsp_mux_send(&bcsp); resend_cnt =3D (resend_cnt + 1) % 8; } =20 @@ -262,7 +260,7 @@ void send_ack(void) { - send_txack(txack); + bcsp_send_txack(txack); } =20 void --- bcsp_slip.c 2001/05/18 13:48:46 1.3 +++ bcsp_slip.c 2001/05/18 16:03:51 1.4 @@ -59,38 +59,20 @@ =20 /****************** LOCAL FUNCTION DECLARATION SECTION *******************= ***/ =20 +static void slip_send_add_byte(struct bcsp* bcsp, u8 data); + /****************** GLOBAL VARIABLE DECLARATION SECTION ******************= ***/ =20 /****************** LOCAL VARIABLE DECLARATION SECTION *******************= ***/ =20 /****************** FUNCTION DEFINITION SECTION **************************= ***/ =20 -static void -slip_send_add_byte(struct bcsp* bcsp, u8 data) -{ - switch (data) { - case 0xC0: - bcsp->packet[bcsp->packet_length++] =3D 0xDB; - bcsp->packet[bcsp->packet_length++] =3D 0xDC; - break; - - case 0xDB: - bcsp->packet[bcsp->packet_length++] =3D 0xDB; - bcsp->packet[bcsp->packet_length++] =3D 0xDD; - break; - - default: - bcsp->packet[bcsp->packet_length++] =3D data; - break; - } -} - s32 -slip_send(struct bcsp* bcsp) +bcsp_slip_send(struct bcsp* bcsp) { s32 i; =20 - D(__FUNCTION__ "\n"); + D(__FUNCTION__ ":\n"); PRINTPKT(bcsp->payload, bcsp->payload_length); =20 if (!(bcsp->packet =3D kmalloc(2 * (4 + bcsp->payload_length) + 2, GFP_AT= OMIC))) { @@ -127,7 +109,7 @@ } =20 s32 -slip_receive(struct bcsp* bcsp, const u8* packet, u32 len) +bcsp_slip_receive(struct bcsp* bcsp, const u8* packet, u32 len) { static u8 buffer[4 + 4096 + 2 + 1]; static s32 length =3D 0; @@ -188,6 +170,26 @@ } =20 return i; +} + +void +slip_send_add_byte(struct bcsp* bcsp, u8 data) +{ + switch (data) { + case 0xC0: + bcsp->packet[bcsp->packet_length++] =3D 0xDB; + bcsp->packet[bcsp->packet_length++] =3D 0xDC; + break; + + case 0xDB: + bcsp->packet[bcsp->packet_length++] =3D 0xDB; + bcsp->packet[bcsp->packet_length++] =3D 0xDD; + break; + + default: + bcsp->packet[bcsp->packet_length++] =3D data; + break; + } } =20 /****************** END OF FILE slip.c ***********************************= ***/ |
From: Peter K. <pk...@us...> - 2001-05-18 15:42:13
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp_datagram.c 1.2 1.3=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Use get_unaligned() instead of CHAR2INT32(). * Rewrote send_sync() & co to not use kmalloc(), and only implement the functionality once. Should now also be correct for big endian machines. The diff of the modified file(s): --- bcsp_datagram.c 2001/05/17 15:25:15 1.2 +++ bcsp_datagram.c 2001/05/18 15:42:13 1.3 @@ -42,18 +42,21 @@ =20 /****************** INCLUDE FILES SECTION ********************************= ***/ =20 -#include <stdio.h> #include <linux/malloc.h> +#include <asm/byteorder.h> +#include <asm/unaligned.h> + +#include <linux/bluetooth/sysdep-2.1.h> #include <linux/bluetooth/bcsp.h> #include <linux/bluetooth/bcsp_debug.h> #include <linux/bluetooth/btcommon.h> =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 -#define SYNC 0xededdcda -#define SYNC_RSP 0xeeefafac -#define CONF 0xedacefad -#define CONF_RSP 0xd0d0adde +#define SYNC 0xEDEDDCDA +#define SYNC_RSP 0xEEEFAFAC +#define CONF 0xEDACEFAD +#define CONF_RSP 0xD0D0ADDE =20 #if DATAGRAM_DEBUG #define D(fmt...) printk("DATAGRAM: " fmt) @@ -70,6 +73,7 @@ static s32 handle_sync_pkt(struct bcsp *bcsp); static s32 send_sync_rsp(void); static s32 send_conf_rsp(void); +static s32 send_sync_pkt(u32 type); =20 /****************** GLOBAL VARIABLE DECLARATION SECTION ******************= ***/ =20 @@ -85,7 +89,7 @@ return 0; } =20 - D(__FUNCTION__ ": Datagram packet received\n"); + D(__FUNCTION__ ": Datagram packet received:\n"); PRINTPKT(bcsp->payload, bcsp->payload_length); =20=09 return 0; @@ -109,12 +113,14 @@ s32 handle_sync_pkt(struct bcsp *bcsp) { - u32 sync_string; =20 - sync_string =3D CHAR2INT32(bcsp->payload[3],bcsp->payload[2], - bcsp->payload[1],bcsp->payload[0]); + if (bcsp->payload_length < sizeof(u32)) { + return FALSE; + } =20 + sync_string =3D le32_to_cpu(get_unaligned((u32 *)bcsp->payload)); + if (sync_string =3D=3D SYNC) { D(__FUNCTION__ ": Found SYNC\n"); send_sync_rsp();=09=09 @@ -126,83 +132,41 @@ } else { return FALSE; } -=09 } =20 s32 send_sync(void) { - struct bcsp bcsp; - u32 sync =3D SYNC; - s32 tmp; -=09 - D(__FUNCTION__ "\n"); - - init_bcsp_packet(&bcsp); -=09 - bcsp.identifier =3D 1;=20=20 - bcsp.payload_length =3D 4; - - if (!(bcsp.payload =3D kmalloc(bcsp.payload_length, GFP_ATOMIC))) { - return -ENOMEM; - } - memcpy(bcsp.payload, &sync, bcsp.payload_length); - - PRINTPKT(bcsp.payload, bcsp.payload_length); - - tmp =3D mux_send(&bcsp); - kfree(bcsp.payload); - return tmp; + return send_sync_pkt(SYNC); } =20 s32 send_sync_rsp(void) { - struct bcsp bcsp; - s32 tmp; - u32 sync_rsp =3D SYNC_RSP; - - D(__FUNCTION__ "\n"); - - init_bcsp_packet(&bcsp); - - bcsp.identifier =3D 1;=20=20 - bcsp.payload_length =3D 4; - - if (!(bcsp.payload =3D kmalloc(bcsp.payload_length, GFP_ATOMIC))) { - return -ENOMEM; + return send_sync_pkt(SYNC_RSP); } - memcpy(bcsp.payload, &sync_rsp, bcsp.payload_length); - - PRINTPKT(bcsp.payload, bcsp.payload_length); =20 - tmp =3D mux_send(&bcsp); - kfree(bcsp.payload); - return tmp; +s32 +send_conf_rsp(void) +{ + return send_sync_pkt(CONF_RSP); } =20 s32 -send_conf_rsp(void) +send_sync_pkt(u32 type) { struct bcsp bcsp; - s32 tmp; - u32 conf_rsp =3D CONF_RSP; + u32 payload =3D cpu_to_le32(type); =20=09 D(__FUNCTION__ "\n"); =20 init_bcsp_packet(&bcsp); =20=09 bcsp.identifier =3D 1;=20 - bcsp.payload_length =3D 4; - - if (!(bcsp.payload =3D kmalloc(bcsp.payload_length, GFP_ATOMIC))) { - return -ENOMEM; - } - memcpy(bcsp.payload, &conf_rsp, bcsp.payload_length); + bcsp.payload =3D (u8 *)&payload; + bcsp.payload_length =3D sizeof(u32); =20 - tmp =3D mux_send(&bcsp); - kfree(bcsp.payload); - return tmp; + return mux_send(&bcsp); } =20 /****************** END OF FILE sequence.c *******************************= ***/ |
From: Peter K. <pk...@us...> - 2001-05-18 15:39:45
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp_integrity.c 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Use get_unaligned() instead of CHAR2INT16(). * Call calc_crc() in verify_crc() instead of implementing the same code again. The diff of the modified file(s): --- bcsp_integrity.c 2001/05/17 17:47:53 1.3 +++ bcsp_integrity.c 2001/05/18 15:39:45 1.4 @@ -43,8 +43,9 @@ /****************** INCLUDE FILES SECTION ********************************= ***/ =20 #include <asm/byteorder.h> -#include <linux/bluetooth/sysdep-2.1.h> +#include <asm/unaligned.h> =20 +#include <linux/bluetooth/sysdep-2.1.h> #include <linux/bluetooth/bcsp.h> #include <linux/bluetooth/bcsp_debug.h> #include <linux/bluetooth/btcommon.h> @@ -106,16 +107,15 @@ } =20=09 if (BCSP_GET_CRC_PRESENT(bcsp)) { - bcsp->crc =3D CHAR2INT16(bcsp->packet[bcsp->packet_length - 1], - bcsp->packet[bcsp->packet_length - 2]); + bcsp->crc =3D le16_to_cpu(get_unaligned((u16 *)&bcsp->packet[bcsp->packe= t_length - 2])); =20=09=09 if (!verify_crc(bcsp)) { BCSP_SYS(__FUNCTION__ ": Incorrect CRC, discarding data\n"); } } =20 - D("Found the payload\n"); - bcsp->payload =3D bcsp->packet + 4; + D("Found the payload:\n"); + bcsp->payload =3D bcsp->packet + BCSP_HDR_SIZE; PRINTPKT(bcsp->payload, bcsp->payload_length); =20=09 return mux_receive(bcsp); @@ -179,16 +179,7 @@ s32 verify_crc(struct bcsp* bcsp) { - s32 i; - u16 crc; - - init_crc(&crc); -=09=09 - for (i =3D 0; i < ((bcsp->packet_length) - BCSP_CRC_SIZE); i++) { - update_crc(&crc, bcsp->packet[i]); - } - - return (get_big_endian_crc(crc) =3D=3D bcsp->crc); + return (get_big_endian_crc(calc_crc(bcsp)) =3D=3D bcsp->crc); } =20 u16 @@ -199,7 +190,7 @@ =20 init_crc(&crc); =20=09 - for (i =3D 0; i < ((bcsp->packet_length) - BCSP_CRC_SIZE); i++) { + for (i =3D 0; i < (bcsp->packet_length - BCSP_CRC_SIZE); i++) { update_crc(&crc, bcsp->packet[i]); } =20 @@ -207,7 +198,6 @@ =20 return crc; } - =20 /*********************** Code for the CRC calculation ********************= ***/ =20 |
From: Peter K. <pk...@us...> - 2001-05-18 15:38:02
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.c 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Use get_unaligned() instead of CHAR2INT16(). * Print the outgoing packet when debug is enabled. The diff of the modified file(s): --- bcsp.c 2001/05/18 13:56:14 1.6 +++ bcsp.c 2001/05/18 15:38:01 1.7 @@ -1,6 +1,5 @@ /* - * bcsp.c -- Implementation of glue layer functions to the BCSP - * protocol stack + * bcsp.c -- Implementation of glue layer functions for the BCSP protocol = stack * * Copyright (C) 2001 Axis Communications AB * @@ -42,13 +41,14 @@ =20 /****************** INCLUDE FILES SECTION ********************************= ***/ =20 +#include <linux/malloc.h> #include <linux/string.h> #include <linux/types.h> +#include <asm/byteorder.h> +#include <asm/unaligned.h> =20 -#include <linux/bluetooth/hci.h> #include <linux/bluetooth/sysdep-2.1.h> #include <linux/bluetooth/btcommon.h> -#include <linux/malloc.h> #include <linux/bluetooth/bcsp.h> #include <linux/bluetooth/bcsp_debug.h> #include <linux/bluetooth/bluetooth.h> @@ -191,7 +191,7 @@ =20=09 switch (data[0]) { case CMD_PKT: - opcode =3D CHAR2INT16(data[2], data[1]); + opcode =3D le16_to_cpu(get_unaligned((u16 *)&data[1])); if (hci_get_ocf(opcode) =3D=3D BCSP_OCF) { ret =3D sequence_send(data + 5, len - 5, data[4] & 0x3f); } else { @@ -215,6 +215,9 @@ s32 bcsp_write_lower(u8 *data, u32 len) { + D(__FUNCTION__ ": Outgoing data:\n"); + PRINTPKT(data, len); + return bt_write_lower_driver(data, len); } =20 |
From: Peter K. <pk...@us...> - 2001-05-18 15:18:49
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp_mux.c 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Do not include stdio.h The diff of the modified file(s): --- bcsp_mux.c 2001/05/17 15:55:00 1.3 +++ bcsp_mux.c 2001/05/18 15:18:17 1.4 @@ -41,8 +41,8 @@ =20 /****************** INCLUDE FILES SECTION ********************************= ***/ =20 -#include <stdio.h> #include <linux/malloc.h> + #include <linux/bluetooth/bcsp.h> #include <linux/bluetooth/bcsp_debug.h> =20 |
From: Mats F. <ma...@us...> - 2001-05-18 13:58:18
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp_sequence.c 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added case for handling of multiple acknowledgment packets The diff of the modified file(s): --- bcsp_sequence.c 2001/05/18 13:48:46 1.6 +++ bcsp_sequence.c 2001/05/18 13:58:17 1.7 @@ -46,6 +46,7 @@ #include <linux/types.h> #include <linux/bluetooth/bcsp.h> #include <linux/interrupt.h> +#include <linux/timer.h> #include <linux/bluetooth/sysdep-2.1.h> #include <linux/bluetooth/bcsp_debug.h> =20 @@ -195,7 +196,8 @@ =20 D(__FUNCTION__": Got rxack:%d\n", new_ack); =20=09 - if ((rxack =3D=3D new_ack) && !(rxack =3D=3D txseq)) { + if (rxack =3D=3D new_ack) { + if (!(rxack =3D=3D txseq)) { printk(__FUNCTION__": Got incorrect new_ack:%d, seq_nbr:%d\n", new_ack, = txseq); =20=09=09 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) @@ -204,6 +206,9 @@ queue_task(&resend_data_task, &tq_immediate); mark_bh(IMMEDIATE_BH); #endif + } else { + printk(__FUNCTION__": Got repeted ack%d\n", new_ack); + } } else if (rxack < new_ack) { D(__FUNCTION__": winspace before:%d\n", winspace); winspace +=3D new_ack - rxack; @@ -218,6 +223,10 @@ =20 if (winspace =3D=3D WINSIZE) { release_resend_timer(); + } else if (winspace > WINSIZE) { + printk(__FUNCTION__": Somthing has gone wrong winspace > WINSIZE\n"); + release_resend_timer(); + winspace =3D WINSIZE; } } =20 |
From: Mats F. <ma...@us...> - 2001-05-18 13:56:16
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.c 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: corrected spelling The diff of the modified file(s): --- bcsp.c 2001/05/18 09:14:20 1.5 +++ bcsp.c 2001/05/18 13:56:14 1.6 @@ -168,7 +168,7 @@ s32 handled =3D 0; struct bcsp bcsp; =20 - D(__FUNCTION__ ": Incomming data:\n"); + D(__FUNCTION__ ": Incoming data:\n"); PRINTPKT(data, len); =20 while (handled < len) { |
From: Peter K. <pk...@us...> - 2001-05-18 13:50:34
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp_debug.h 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Minor clean-up. The diff of the modified file(s): --- bcsp_debug.h 2001/05/15 14:37:52 1.1 +++ bcsp_debug.h 2001/05/18 13:50:33 1.2 @@ -42,10 +42,10 @@ #ifndef BCSP_DEBUG_H #define BCSP_DEBUG_H =20 -#include <linux/bluetooth/btdebug.h> - /****************** INCLUDE FILES SECTION ********************************= ***/ =20 +#include <linux/bluetooth/btdebug.h> + /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 #define BCSP_SYS_DEBUG 1 |