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: Gordon M. <gm...@us...> - 2001-03-12 15:53:05
|
The following files were modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.h 1.46 1.47=20=20=20=20=20=20=20=20=20=20=20=20 local.h 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: --The other part of Matthias Fuchs big-endian patch The diff of the modified file(s): --- hci.h 2001/03/02 10:55:03 1.46 +++ hci.h 2001/03/12 15:55:02 1.47 @@ -75,11 +75,10 @@ u8 data[256]; } __attribute__ ((packed)) cmd_pkt; =20 -#define hci_put_opcode(ocf, ogf)(((ocf) & 0x03ff) | ((ogf) << 10 & 0xfc00)) -#define hci_put_le16(buf, val) { *((char*)buf) =3D (val) & 0xff; *((char*)= buf + 1) =3D (val) >> 8; } -#define hci_get_ocf(opcode) ((opcode) & 0x3ff) -#define hci_get_ogf(opcode) (((opcode) & 0xfc00) >> 10)=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 - +#define hci_put_opcode(ocf, ogf)(cpu_to_le16(((ocf) & 0x03ff) | ((ogf) << = 10 & 0xfc00))) +//#define hci_put_le16(buf, val) { *((char*)buf) =3D (val) & 0xff; *((char= *)buf + 1) =3D (val) >> 8; } +#define hci_get_ocf(opcode) (cpu_to_le16((opcode) & 0x3ff)) +#define hci_get_ogf(opcode) (cpu_to_le16(((opcode) & 0xfc00) >> 10)) =20 /****************** EXPORTED FUNCTION DECLARATION SECTION ****************= ***/ =20 --- local.h 2001/02/15 16:28:47 1.3 +++ local.h 2001/03/12 15:55:02 1.4 @@ -46,6 +46,43 @@ =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 +#include <asm/byteorder.h> +/* In kernel mode either __LITTLE_ENDIAN or __BIG_ENDIAN is defined, but i= n user usermode + * both are defined. In usermode __BYTE_ORDER contains the correct endiane= ss. So let's undefine + * one of them. + * __LITTLE_ENDIAN_BITTFIELD and __BIG_ENDIAN_BITFIELD do not cause such p= roblems. + */ +#ifndef __KERNEL__ +# if (__BYTE_ORDER =3D=3D __LITTLE_ENDIAN) +# undef __BIG_ENDIAN +# endif +# if (__BYTE_ORDER =3D=3D __BIG_ENDIAN) +# undef __LITTLE_ENDIAN +# endif +#endif +=20 +#ifdef BTD_USERSTACK +=20 +# 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 +=20 +# 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) +=20 +#endif + /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 typedef short s16;=20 |
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-03-10 12:58:24
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.16 1.17=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Remove .d-files when doing make clean. The diff of the modified file(s): --- Makefile 2001/03/09 20:08:57 1.16 +++ Makefile 2001/03/10 13:00:15 1.17 @@ -52,7 +52,7 @@ install: all =20 clean: - rm -f *.o core + rm -f *.o *.d core *~ =20 -include *.d endif |
From: Peter K. <pk...@us...> - 2001-03-10 12:56:18
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Remove .d-files when doing make clean. The diff of the modified file(s): --- Makefile 2001/03/10 09:17:25 1.8 +++ Makefile 2001/03/10 12:57:38 1.9 @@ -7,6 +7,13 @@ =20 PROGS =3D btd =20 +# Define HAVE_READLINE_READLINE if you have readline support, with the inc= lude +# files in $(include_dir)/readline. Define HAVE_READLINE if you have the +# include files in $(include_dir). Define neither if you do not want to use +# readline. +HAVE_READLINE_READLINE =3D 1 +#HAVE_READLINE =3D 1 + INSTDIR =3D $(prefix)/bin/ INSTMODE =3D 0755 INSTOWNER =3D root @@ -16,13 +23,6 @@ =20 OBJS =3D btd.o =20 -# Define HAVE_READLINE_READLINE if you have readline support, with the inc= lude -# files in $(include_dir)/readline. Define HAVE_READLINE if you have the -# include files in $(include_dir). Define neither if you do not want to use -# readline. -HAVE_READLINE_READLINE =3D 1 -#HAVE_READLINE =3D 1 - ifdef HAVE_READLINE_READLINE LDLIBS +=3D -lreadline -ltermcap CFLAGS +=3D -DHAVE_READLINE_READLINE -I$(prefix)/include @@ -42,6 +42,6 @@ $(INSTALL) -m $(INSTMODE) -o $(INSTOWNER) -g $(INSTGROUP) $(PROGS) $(INST= DIR) =20 clean: - rm -f $(PROGS) *.o core + rm -f $(PROGS) *.o *.d core *~ =20 -include *.d |
From: Peter K. <pk...@us...> - 2001-03-10 12:56:18
|
The following file was modified in apps/bluetooth/sdp_server: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Remove .d-files when doing make clean. The diff of the modified file(s): --- Makefile 2001/03/09 20:08:57 1.8 +++ Makefile 2001/03/10 12:57:38 1.9 @@ -39,6 +39,6 @@ $(CC) -DBTD_USERSTACK $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@ =20 clean: - rm -f $(PROGS) sdp_user *.o core=20 + rm -f $(PROGS) sdp_user *.o *.d core *~ =20 -include *.d |
From: Peter K. <pk...@us...> - 2001-03-10 12:55:48
|
The following file was modified in apps/bluetooth/userstack: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.17 1.18=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Remove .d-files when doing make clean. The diff of the modified file(s): --- Makefile 2001/03/09 20:08:57 1.17 +++ Makefile 2001/03/10 12:57:39 1.18 @@ -74,7 +74,7 @@ $(INSTALL) -m $(INSTMODE) -o $(INSTOWNER) -g $(INSTGROUP) $(PROGS) $(INST= DIR) =20 clean: - rm -f $(PROGS) *.o core *~ + rm -f $(PROGS) *.o *.d core *~ =20 links: @ln -sf ../btd/btd.c |
From: Peter K. <pk...@us...> - 2001-03-10 12:47:41
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20 bttest.c 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Support for compiling without readline (by Matthias Fuchs). The diff of the modified file(s): --- Makefile 2001/03/02 13:14:29 1.1 +++ Makefile 2001/03/10 12:49:32 1.2 @@ -7,33 +7,38 @@ =20 PROGS =3D btdm memul bti btinq btcon btsend btdisc =20 +# Define HAVE_READLINE_READLINE if you have readline support, with the inc= lude +# files in $(include_dir)/readline. Define HAVE_READLINE if you have the +# include files in $(include_dir). Define neither if you do not want to use +# readline. +HAVE_READLINE_READLINE =3D 1 +#HAVE_READLINE =3D 1 + INSTDIR =3D $(prefix)/bin/ INSTMODE =3D 0755 INSTOWNER =3D root INSTGROUP =3D root - -SRCS =3D btd.c - -OBJS =3D btd.o - -LDLIBS +=3D -lreadline -ltermcap - -CFLAGS +=3D -I$(prefix)/include=20 =20 -BTDOBJS =3D bt_vendor.o bt_misc.o bt_if.o bttest.o bt_ipa.o btd.o - +BTDOBJS =3D btd.o bttest.o bt_ipa.o bt_vendor.o bt_if.o bt_misc.o MEMULOBJS =3D modememul.o bt_misc.o - -BTINITOBJS =3D bt_vendor.o bt_misc.o bt_if.o btinit.o - +BTINITOBJS =3D btinit.o bt_vendor.o bt_if.o bt_misc.o BTCONOBJS =3D btcon.o bt_if.o bt_misc.o - BTSENDOBJS =3D btsend.o bt_if.o bt_misc.o - BTDISCOBJS =3D btdisc.o bt_if.o - BTINQOBJS =3D btinq.o bt_if.o =20 +ifdef HAVE_READLINE_READLINE +LDLIBS +=3D -lreadline -ltermcap +CFLAGS +=3D -DHAVE_READLINE_READLINE -I$(prefix)/include +endif + +ifdef HAVE_READLINE +LDLIBS +=3D -lreadline -ltermcap +CFLAGS +=3D -DHAVE_READLINE -I$(prefix)/include +endif + +CFLAGS +=3D -MD + all: $(PROGS) =20 # 'btdm' =3D> 'multipoint btd' instead of btd to differentiate from=20 @@ -65,13 +70,6 @@ $(INSTALL) -m $(INSTMODE) -o $(INSTOWNER) -g $(INSTGROUP) $(PROGS) $(INST= DIR) =20 clean: - rm -f $(PROGS) *.o core - -depend: - makedepend -Y $(SRCS) 2>/dev/null - -# ------------------------------------------------------------------------- -# The following is used to automatically generate dependencies. -# DO NOT DELETE + rm -f $(PROGS) *.o *.d core =20 -btd.o: btd.h +-include *.d --- bttest.c 2001/03/02 10:59:57 1.1 +++ bttest.c 2001/03/10 12:49:32 1.2 @@ -63,8 +63,14 @@ #include <signal.h> #include <getopt.h> =20 +#if defined(HAVE_READLINE_READLINE) #include <readline/readline.h> #include <readline/history.h> +#elif defined(HAVE_READLINE) +#include <readline.h> +#include <history.h> +#endif + #include "btd.h" #include "bttest.h" #include "bt_if.h" @@ -124,6 +130,13 @@ NULL }; =20 +#if !defined(HAVE_READLINE) && !defined(HAVE_READLINE_READLINE) +static void read_history(char *hist_file_name); +static void write_history(char *hist_file_name); +static void add_history(char *command); +static char *readline(char *promt); +#endif=20 + void show_menu(void) { @@ -165,6 +178,13 @@ { int tmp; char *line =3D (char*) readline("> "); + + if (!line) + { + start_ppp =3D 0; + break; + } + add_history(line); =20=20=20=20=20=20=20 tmp =3D process_cmd(line, bt_cfd); @@ -183,14 +203,8 @@ } write_history(BTD_HISTORY_FILE); }=20=20 - } =20 - - - - - int process_cmd(char *buf, int bt_cfd) { @@ -565,8 +579,41 @@ return 0; } =20 +/* readline replacement - mfuchs */ +#if !defined(HAVE_READLINE) && !defined(HAVE_READLINE_READLINE) +#define MAXLINE 100 =20 +static void read_history(char *hist_file_name) +{ +} + +static void write_history(char *hist_file_name) +{ +} + +static void add_history(char *command) +{ +} + +static char *readline(char *promt) +{ + int len; + char *line; =20 + if ((line =3D malloc(MAXLINE))) + { + printf("%s", promt); + fflush(stdout); + *line =3D 0; + if ((len =3D read(STDIN_FILENO, line, MAXLINE-1)) >=3D 0) + { + line[len] =3D 0; + } + } + + return line; +} +#endif /* !HAVE_READLINE */ =20 /* bttest.c */ /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ |
From: Peter K. <pk...@us...> - 2001-03-10 12:45:18
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_vendor.c 1.2 1.3=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: No need to include the readline files here. The diff of the modified file(s): --- bt_vendor.c 2001/03/02 14:29:32 1.2 +++ bt_vendor.c 2001/03/10 12:47:09 1.3 @@ -66,9 +66,6 @@ #include <sys/un.h> #include <arpa/inet.h> =20 -#include <readline/readline.h> -#include <readline/history.h> - #include "bt_misc.h" #include "bt_vendor.h" #include "bt_conf.h" |
From: Peter K. <pk...@us...> - 2001-03-10 09:15:35
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Always add -MD to $CFLAGS, even when compiling without readline. The diff of the modified file(s): --- Makefile 2001/03/09 20:08:57 1.7 +++ Makefile 2001/03/10 09:17:25 1.8 @@ -25,14 +25,16 @@ =20 ifdef HAVE_READLINE_READLINE LDLIBS +=3D -lreadline -ltermcap -CFLAGS +=3D -DHAVE_READLINE_READLINE -I$(prefix)/include -MD +CFLAGS +=3D -DHAVE_READLINE_READLINE -I$(prefix)/include endif =20 ifdef HAVE_READLINE LDLIBS +=3D -lreadline -ltermcap -CFLAGS +=3D -DHAVE_READLINE -I$(prefix)/include -MD +CFLAGS +=3D -DHAVE_READLINE -I$(prefix)/include endif =20 +CFLAGS +=3D -MD + all: $(PROGS) =20 install: $(PROGS) @@ -42,12 +44,4 @@ clean: rm -f $(PROGS) *.o core =20 -depend: - makedepend -Y $(SRCS) 2>/dev/null - -include *.d -# ------------------------------------------------------------------------- -# The following is used to automatically generate dependencies. -# DO NOT DELETE - -btd.o: btd.h |
From: Marcus A. S. <mar...@us...> - 2001-03-09 20:07:39
|
The following file was modified in apps/bluetooth/sdp_server: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added "-MD" and "-include *.d" to Makefiles to include dependency checking. The diff of the modified file(s): --- Makefile 2000/11/20 18:13:41 1.7 +++ Makefile 2001/03/09 20:08:57 1.8 @@ -22,7 +22,7 @@ =20 SRCS =3D sdp_server.c sdp_parser.c =20 -CFLAGS +=3D -I$(INCDIR) +CFLAGS +=3D -I$(INCDIR) -MD LDFLAGS +=3D -L$(LIBDIR) LDLIBS +=3D -lxmlparse -lxmltok =20 @@ -40,3 +40,5 @@ =20 clean: rm -f $(PROGS) sdp_user *.o core=20 + +-include *.d |
From: Marcus A. S. <mar...@us...> - 2001-03-09 20:07:39
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.15 1.16=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added "-MD" and "-include *.d" to Makefiles to include dependency checking. The diff of the modified file(s): --- Makefile 2001/03/03 15:34:47 1.15 +++ Makefile 2001/03/09 20:08:57 1.16 @@ -42,7 +42,7 @@ O_TARGET :=3D bt.o =20 MODFLAGS =3D -DMODVERSIONS -include $(INCLUDEDIR)/linux/modversions.h -CFLAGS =3D -D__KERNEL__ -DMODULE -I../../../include -I$(INCLUDEDIR) -Wal= l -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strength-reduce $(MODFL= AGS) +CFLAGS =3D -D__KERNEL__ -DMODULE -I../../../include -I$(INCLUDEDIR) -Wal= l -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strength-reduce $(MODFL= AGS) -MD =20 all: $(O_TARGET) =20 @@ -54,4 +54,6 @@ clean: rm -f *.o core =20 +-include *.d endif + |
From: Marcus A. S. <mar...@us...> - 2001-03-09 20:07:39
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added "-MD" and "-include *.d" to Makefiles to include dependency checking. The diff of the modified file(s): --- Makefile 2001/03/09 13:18:02 1.6 +++ Makefile 2001/03/09 20:08:57 1.7 @@ -25,12 +25,12 @@ =20 ifdef HAVE_READLINE_READLINE LDLIBS +=3D -lreadline -ltermcap -CFLAGS +=3D -DHAVE_READLINE_READLINE -I$(prefix)/include +CFLAGS +=3D -DHAVE_READLINE_READLINE -I$(prefix)/include -MD endif =20 ifdef HAVE_READLINE LDLIBS +=3D -lreadline -ltermcap -CFLAGS +=3D -DHAVE_READLINE -I$(prefix)/include +CFLAGS +=3D -DHAVE_READLINE -I$(prefix)/include -MD endif =20 all: $(PROGS) @@ -45,6 +45,7 @@ depend: makedepend -Y $(SRCS) 2>/dev/null =20 +-include *.d # ------------------------------------------------------------------------- # The following is used to automatically generate dependencies. # DO NOT DELETE |
From: Marcus A. S. <mar...@us...> - 2001-03-09 20:07:39
|
The following file was modified in apps/bluetooth/userstack: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.16 1.17=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added "-MD" and "-include *.d" to Makefiles to include dependency checking. The diff of the modified file(s): --- Makefile 2001/03/09 16:22:00 1.16 +++ Makefile 2001/03/09 20:08:57 1.17 @@ -19,7 +19,7 @@ srcdir =3D $(ELINUXDIR)/drivers/char/bluetooth incdir =3D $(ELINUXDIR)/include/linux/bluetooth =20 -CFLAGS +=3D -I$(prefix)/include +CFLAGS +=3D -I$(prefix)/include -MD LDFLAGS +=3D -L$(prefix)/lib else # In stand-alone tarball @@ -96,3 +96,5 @@ =20 unlinks: rm -f $(BTDSRCS) $(KSRCS) include + +-include *.d |
From: Peter K. <pk...@us...> - 2001-03-09 16:22:03
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.85 1.86=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Turn off pty echo in open_pty() (by Matthias Fuchs). The diff of the modified file(s): --- btd.c 2001/03/09 13:18:02 1.85 +++ btd.c 2001/03/09 16:23:51 1.86 @@ -207,7 +207,6 @@ extern int bt_read_proc(char *buf, int len); bt_stat_struct bt_stat; static int bt_initdone =3D 0; -static int ready_for_ppp =3D 0; rfcomm_con *test_rfcomm; int test_dlci; =20 @@ -936,10 +935,6 @@ static void start_pppd(void) { =20=20=20 -#ifdef BTD_USERSTACK - ready_for_ppp =3D 1; -#endif - /* run pppd in a child */ if (!(pppd_pid =3D vfork())) { @@ -978,11 +973,6 @@ syslog(LOG_ERR, "Failed to return IP address to IPA\n"); } #endif - -#ifdef BTD_USERSTACK - ready_for_ppp =3D 0; -#endif - }=20 =20 /* FIXME -- use separate options file 'pppd file <optionfile>' for=20 @@ -2212,10 +2202,38 @@ */ int open_pty(void) { + struct termios settings; + int result; + + printf("Open pty.\n"); - return openpty(&pty_master_fd, &pty_slave_fd, ptydev, NULL, NULL); + result =3D openpty(&pty_master_fd, &pty_slave_fd, ptydev, NULL, NULL); + if (result < 0) + { + perror("openpty"); + return result; } =20 + /* modify pty settinges -> turn off echo - mfuchs */ + result =3D tcgetattr(pty_master_fd, &settings); + if (result < 0) + { + perror("tcgetattr"); + return result; + } + + cfmakeraw(&settings); + settings.c_lflag &=3D ~ECHO; + + result =3D tcsetattr(pty_master_fd, TCSANOW, &settings); + if (result < 0) + { + perror("tcsetattr"); + return result; + } + return 0; +} + /* Create a thread that reads data from the pty and=20 passes it to the rfcomm layer */ int init_pty_thread(void) @@ -2308,11 +2326,6 @@ return len; } =20=20=20 - /* FIXME -- why is data echoed back if no application is running on top= =20 - of PTY ?? */ - if (!ready_for_ppp) - return len; - /* feed this to PTY connected to pppd or whatever application=20 that may be running there... */ =20=20=20 |
From: Peter K. <pk...@us...> - 2001-03-09 16:20:11
|
The following file was modified in apps/bluetooth/userstack: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.15 1.16=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Support for compiling without readline (by Matthias Fuchs). The diff of the modified file(s): --- Makefile 2001/02/28 19:29:43 1.15 +++ Makefile 2001/03/09 16:22:00 1.16 @@ -7,6 +7,13 @@ =20 PROGS =3D btduser =20 +# Define HAVE_READLINE_READLINE if you have readline support, with the inc= lude +# files in $(include_dir)/readline. Define HAVE_READLINE if you have the +# include files in $(include_dir). Define neither if you do not want to use +# readline. +HAVE_READLINE_READLINE =3D 1 +#HAVE_READLINE =3D 1 + ifdef ELINUXDIR # works for now... # In elinux tree... srcdir =3D $(ELINUXDIR)/drivers/char/bluetooth @@ -24,7 +31,15 @@ LDLIBS +=3D -lutil=20 endif =20 +ifdef HAVE_READLINE_READLINE LDLIBS +=3D -lreadline -ltermcap +CFLAGS +=3D -DHAVE_READLINE_READLINE +endif + +ifdef HAVE_READLINE +LDLIBS +=3D -lreadline -ltermcap +CFLAGS +=3D -DHAVE_READLINE +endif =20 INSTDIR =3D $(prefix)/bin INSTMODE =3D 0755 |
From: Olov H. <ol...@us...> - 2001-03-09 15:55:45
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.2 1.3=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added support for SIGTERM signal. Received by btdm when kill cmd is used. The diff of the modified file(s): --- btd.c 2001/03/02 12:35:41 1.2 +++ btd.c 2001/03/09 15:57:33 1.3 @@ -611,6 +611,7 @@ sigaction(SIGCHLD, &act, 0); /* Catches when pppd childs are done */ sigaction(SIGUSR1, &act, 0); /* Restart application */ sigaction(SIGUSR2, &act, 0); /* HW Upgrade ? */ + sigaction(SIGTERM, &act, 0); /* Received when kill cmd is used */ } =20 static void @@ -680,6 +681,8 @@ =20=20=20=20=20 return; } + else if(sig =3D=3D SIGTERM) + exit(0); } =20 /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ |
From: Peter K. <pk...@us...> - 2001-03-09 13:16:14
|
The following files were modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20 btd.c 1.84 1.85=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Support for compiling without readline (by Matthias Fuchs). The diff of the modified file(s): --- Makefile 2000/12/14 16:40:31 1.5 +++ Makefile 2001/03/09 13:18:02 1.6 @@ -16,8 +16,22 @@ =20 OBJS =3D btd.o =20 +# Define HAVE_READLINE_READLINE if you have readline support, with the inc= lude +# files in $(include_dir)/readline. Define HAVE_READLINE if you have the +# include files in $(include_dir). Define neither if you do not want to use +# readline. +HAVE_READLINE_READLINE =3D 1 +#HAVE_READLINE =3D 1 + +ifdef HAVE_READLINE_READLINE LDLIBS +=3D -lreadline -ltermcap -CFLAGS +=3D -I$(prefix)/include +CFLAGS +=3D -DHAVE_READLINE_READLINE -I$(prefix)/include +endif + +ifdef HAVE_READLINE +LDLIBS +=3D -lreadline -ltermcap +CFLAGS +=3D -DHAVE_READLINE -I$(prefix)/include +endif =20 all: $(PROGS) =20 --- btd.c 2001/03/05 11:15:55 1.84 +++ btd.c 2001/03/09 13:18:02 1.85 @@ -150,8 +150,13 @@ #include <sys/un.h> #include <arpa/inet.h> =20 +#if defined(HAVE_READLINE_READLINE) #include <readline/readline.h> #include <readline/history.h> +#elif defined(HAVE_READLINE) +#include <readline.h> +#include <history.h> +#endif =20 #define RESTART_ENABLED =20 @@ -322,6 +327,13 @@ #define MANUFACTURER_SPEC 0x3f #endif =20 +#if !defined(HAVE_READLINE) && !defined(HAVE_READLINE_READLINE) +void read_history(char *hist_file_name); +void write_history(char *hist_file_name); +void add_history(char *command); +char *readline(char *promt); +#endif=20 + /* Modem emulator stuff */ =20 #define CONNECT 1 @@ -776,6 +788,13 @@ { char *line =3D readline("> "); int tmp; + + if (!line) + { + start_ppp =3D 0; + break; + } + add_history(line); =20=20=20=20=20=20=20 tmp =3D process_cmd(line, bt_cfd); @@ -789,6 +808,7 @@ start_ppp =3D 0; break; } +=20=20=20=20=20=20 free(line); } write_history(BTD_HISTORY_FILE); @@ -860,6 +880,42 @@ syslog(LOG_INFO, "ppp child died, now restart!\n\n\n"); } } + +/* readline replacement - mfuchs */ +#if !defined(HAVE_READLINE) && !defined(HAVE_READLINE_READLINE) +#define MAXLINE 100 + +void read_history(char *hist_file_name) +{ +} + +void write_history(char *hist_file_name) +{ +} + +void add_history(char *command) +{ +} + +char *readline(char *promt) +{ + int len; + char *line; + + if ((line =3D malloc(MAXLINE))) + { + printf("%s", promt); + fflush(stdout); + *line =3D 0; + if ((len =3D read(STDIN_FILENO, line, MAXLINE-1)) >=3D 0) + { + line[len] =3D 0; + } + } + + return line; +} +#endif /* !HAVE_READLINE */ =20 #ifndef BTD_USERSTACK static void start_sdp_server(void) |
From: Peter K. <pk...@us...> - 2001-03-08 15:27:36
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.144 1.145=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: module_init() and module_exit() needs to be defined differently depending on whether this is compiled as a module or not. The diff of the modified file(s): --- bluetooth.c 2001/03/07 19:34:58 1.144 +++ bluetooth.c 2001/03/08 15:29:21 1.145 @@ -52,8 +52,13 @@ #include <linux/timer.h> =20 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0) +# ifdef MODULE # define module_init(x) int init_module(void) { return x(); } # define module_exit(x) void cleanup_module(void) { x(); } +# else +# define module_init(x) int x##_module(void) { return x(); } +# define module_exit(x) void x##_module(void) { x(); } +# endif # define __init # define __exit #else @@ -2552,6 +2557,7 @@ } =20 /************************ MODULE STUFF ***********************************= ***/ + #if defined(MODULE) || defined(__KERNEL__) =20 static void @@ -2601,8 +2607,10 @@ =20=09 DSYS("Bluetooth Driver unregistered\n"); } + module_init(bt_init); module_exit(bt_exit); + #endif /* MODULE */ =20 /****************** END OF FILE bluetooth.c ******************************= ***/ |
From: Peter K. <pk...@us...> - 2001-03-08 15:21:00
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- rfcomm.c 1.93 1.94=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Needed to include sysdep-2.1.h to get le16_to_cpu() defined on 2.0.x The diff of the modified file(s): --- rfcomm.c 2001/03/07 20:09:24 1.93 +++ rfcomm.c 2001/03/08 15:22:45 1.94 @@ -45,6 +45,7 @@ #define __NO_VERSION__ /* don't define kernel_version in module.h */ =20 #ifdef __KERNEL__=20 +#include <linux/bluetooth/sysdep-2.1.h> #include <linux/malloc.h> #include <linux/types.h> #include <linux/string.h> |
From: Gordon M. <gm...@us...> - 2001-03-07 20:08:12
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- rfcomm.h 1.34 1.35=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: --Made big-endian changes to rfcomm.c. The diff of the modified file(s): --- rfcomm.h 2001/03/02 10:55:03 1.34 +++ rfcomm.h 2001/03/07 20:09:24 1.35 @@ -54,6 +54,8 @@ #include "btcommon.h" #endif =20 +#include <asm/byteorder.h> + /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 /*=20 @@ -97,6 +99,8 @@ =20 /* These two are placed here temporary during the UnPlugFest */ =20 +#ifdef __LITTLE_ENDIAN_BITFIELD + typedef struct parameter_mask{ u8 bit_rate:1; u8 data_bits:1; @@ -133,6 +137,54 @@ u8 xoff_u8; parameter_mask pm; } __attribute__ ((packed)) rpn_values; + +#elif defined(__BIG_ENDIAN_BITFIELD) + +typedef struct parameter_mask{=20 + u8 res1:1; + u8 xoff_u8:1; + u8 xon_u8:1; + u8 parity_type:1; + u8 parity:1; + u8 stop_bit:1; + u8 data_bits:1; + u8 bit_rate:1; + + u8 res2:2; + u8 rtc_output:1; + u8 rtc_input:1; + u8 rtr_output:1; + u8 rtr_input:1; + u8 xon_output:1; + u8 xon_input:1; + +} __attribute__ ((packed)) parameter_mask; + +typedef struct rpn_values{=20 + u8 bit_rate; + + u8 res1:2; + u8 parity_type:2; + u8 parity:1; + u8 stop_bit:1; + u8 data_bits:2; + + u8 res2:2; + u8 rtc_output:1; + u8 rtc_input:1; + u8 rtr_output:1; + u8 rtr_input:1; + u8 xon_output:1; + u8 xon_input:1; + + u8 xon_u8; + u8 xoff_u8; + parameter_mask pm; +} __attribute__ ((packed)) rpn_values; + +#else /* __XXX_BITFIELD */ +#error Processor endianness unknown! +#endif =20 /****************** EXPORTED FUNCTION DECLARATION SECTION ****************= ***/ =20 |
From: Gordon M. <gm...@us...> - 2001-03-07 20:07:43
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- rfcomm.c 1.92 1.93=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: --Made big-endian changes to rfcomm.c. The diff of the modified file(s): --- rfcomm.c 2001/03/05 15:52:52 1.92 +++ rfcomm.c 2001/03/07 20:09:24 1.93 @@ -157,12 +157,43 @@ #define RTR 0x8 #define DV 0x80 =20 +/* endian-swapping macros for structs */ +#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 + /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 /* Typedefinitions of stuctures used for creating and parsing packets, for= a further description of the structures please se the bluetooth core specification part F:1 and the ETSI TS 07.10 specification */ =20 +#include <asm/byteorder.h> +#ifdef __LITTLE_ENDIAN_BITFIELD + typedef struct address_field{ u8 ea:1; u8 cr:1; @@ -361,6 +392,150 @@ u8 fcs; } __attribute__ ((packed)) nsc_msg; =20 +#elif defined(__BIG_ENDIAN_BITFIELD) + +typedef struct address_field{ + u8 server_chn:5; + u8 d:1; + u8 cr:1; + u8 ea:1; +} __attribute__ ((packed)) address_field; + +typedef struct short_length{ + u8 len:7; + u8 ea:1; +} __attribute__ ((packed)) short_length; + +typedef union long_length { + struct bits { + unsigned short len:15; + u8 ea:1; + } bits; + u16 val; +} __attribute__ ((packed)) long_length; + +typedef struct short_frame_head{=20 + address_field addr; + u8 control; + short_length length; +} __attribute__ ((packed)) short_frame_head; + +typedef struct short_frame{ + short_frame_head h; + u8 data[0]; +} __attribute__ ((packed)) short_frame; + +typedef struct long_frame_head{=20 + address_field addr; + u8 control; + long_length length; + u8 data[0]; +} __attribute__ ((packed)) long_frame_head; + +typedef struct long_frame{=20 + long_frame_head h; + u8 data[0]; +} __attribute__ ((packed)) long_frame; + +typedef struct mcc_type{=20 + u8 type:6; + u8 cr:1; + u8 ea:1; +} __attribute__ ((packed)) mcc_type; + +typedef struct mcc_short_frame_head{=20 + mcc_type type; + short_length length; + u8 value[0]; +} __attribute__ ((packed)) mcc_short_frame_head; + +typedef struct mcc_short_frame{=20 + mcc_short_frame_head h; + u8 value[0]; +} __attribute__ ((packed)) mcc_short_frame; + +typedef struct mcc_long_frame_head{=20 + mcc_type type; + long_length length; + u8 value[0]; +} __attribute__ ((packed)) mcc_long_frame_head; + +typedef struct mcc_long_frame{=20 + mcc_long_frame_head h; + u8 value[0]; +} __attribute__ ((packed)) mcc_long_frame; + +typedef struct v24_signals{=20 + u8 dv:1; + u8 ic:1; + u8 reserved:2; + u8 rtr:1; + u8 rtc:1; + u8 fc:1; + u8 ea:1; +} __attribute__ ((packed)) v24_sigs; + +typedef struct brk_sigs{=20 + u8 len:4; + u8 b3:1; + u8 b2:1; + u8 b1:1; + u8 ea:1; +} __attribute__ ((packed)) brk_sigs; + +typedef struct msc_msg{=20 + short_frame_head s_head; + mcc_short_frame_head mcc_s_head; + address_field dlci; + u8 v24_sigs; + //brk_sigs break_signals; + u8 fcs; +} __attribute__ ((packed)) msc_msg; + +typedef struct rpn_msg{=20 + short_frame_head s_head; + mcc_short_frame_head mcc_s_head; + address_field dlci; + rpn_values rpn_val; + u8 fcs; +} __attribute__ ((packed)) rpn_msg; + +typedef struct rls_msg{=20 + short_frame_head s_head; + mcc_short_frame_head mcc_s_head; + address_field dlci; + u8 res:4; + u8 error:4; + u8 fcs; +} __attribute__ ((packed)) rls_msg; + +typedef struct pn_msg{=20 + short_frame_head s_head; + mcc_short_frame_head mcc_s_head; + u8 res1:2; + u8 dlci:6; + u8 credit_flow:4; + u8 frame_type:4; + u8 res2:2; + u8 prior:6; + u8 ack_timer; + u32 frame_size:16; + u8 max_nbrof_retrans; + u8 credits; + u8 fcs; +} __attribute__ ((packed)) pn_msg; + +typedef struct nsc_msg{=20 + short_frame_head s_head; + mcc_short_frame_head mcc_s_head; + mcc_type command_type; + u8 fcs; +} __attribute__ ((packed)) nsc_msg; + +#else /* __XXX_ENDIAN */ +#error Processor endianness unknown! +#endif /* __XXX_ENDIAN */ + /****************** LOCAL FUNCTION DECLARATION SECTION *******************= ***/ =20 static void process_mcc(u8* data, u32 len, rfcomm_con *rfcomm, s32 long_pk= t); @@ -1061,6 +1236,7 @@ packet */=20 D_REC(FNC"Long UIH packet received\n"); long_pkt =3D (long_frame*) data; + swap_long_frame(long_pkt); uih_len =3D long_pkt->h.length.bits.len; uih_data_start =3D long_pkt->h.data; D_REC(FNC"long packet length %d\n", @@ -1256,6 +1432,7 @@ if ((mcc_short_pkt->h.length.ea) =3D=3D 0) { mcc_long_frame *mcc_long_pkt; mcc_long_pkt =3D (mcc_long_frame*) mcc_short_pkt; + swap_mcc_long_frame(mcc_long_pkt); rfcomm_test_msg(rfcomm, mcc_long_pkt->value, mcc_long_pkt->h.length.bits.len, MCC_RSP); @@ -1363,6 +1540,7 @@ case PN: /*DLC parameter negotiation*/ { pn_msg *pn_pkt =3D (pn_msg*) data; + swap_pn_msg(pn_pkt); D_CTRL(FNC"Received DLC parameter negotiation, PN\n"); if (longpkt) { /* UNPLUGGED Ericsson using 2 bytes length field */ @@ -1648,6 +1826,7 @@ set_uih_hdr((void*) l_pkt, dlci, len, rfcomm->initiator); memcpy(l_pkt->data, data, len); l_pkt->data[len] =3D crc_calc((u8*) l_pkt, SHORT_CRC_CHECK); + swap_long_frame(l_pkt); } else { short_frame *s_pkt; =20 @@ -1746,6 +1925,8 @@ mcc_pkt->h.type.type =3D TEST; mcc_pkt->h.length.bits.ea =3D EA; mcc_pkt->h.length.bits.len =3D len; + swap_long_frame(uih_pkt); + swap_mcc_long_frame(mcc_pkt); memcpy(mcc_pkt->value,test_pattern,len); } else if (len > (SHORT_PAYLOAD_SIZE-sizeof(mcc_short_frame))) { long_frame *uih_pkt; @@ -1777,6 +1958,7 @@ mcc_pkt->h.type.type =3D TEST; mcc_pkt->h.length.ea =3D EA; mcc_pkt->h. length.len =3D len; + swap_long_frame(uih_pkt); memcpy(mcc_pkt->value,test_pattern,len); } else { short_frame *uih_pkt; @@ -2033,6 +2215,8 @@ pn_pkt->credits =3D credits; pn_pkt->max_nbrof_retrans =3D 0; =20=20=20 + swap_pn_msg(pn_pkt); + return l2cap_send_data(tx_buf,rfcomm->l2cap); } =20 |
From: Gordon M. <gm...@us...> - 2001-03-07 19:33:16
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.143 1.144=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: --Added empty __exit and __init defines for linux 2.0.x The diff of the modified file(s): --- bluetooth.c 2001/03/07 18:54:56 1.143 +++ bluetooth.c 2001/03/07 19:34:58 1.144 @@ -54,6 +54,8 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0) # define module_init(x) int init_module(void) { return x(); } # define module_exit(x) void cleanup_module(void) { x(); } +# define __init +# define __exit #else # include <linux/init.h> # if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) |
From: Gordon M. <gm...@us...> - 2001-03-07 18:53:24
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.142 1.143=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: --Fixed last changes to work for linux 2.0.x (hopefully...) The diff of the modified file(s): --- bluetooth.c 2001/03/07 18:13:48 1.142 +++ bluetooth.c 2001/03/07 18:54:56 1.143 @@ -50,9 +50,15 @@ #include <linux/sched.h> #include <linux/delay.h> #include <linux/timer.h> + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0) +# define module_init(x) int init_module(void) { return x(); } +# define module_exit(x) void cleanup_module(void) { x(); } +#else #include <linux/init.h> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) #include <linux/kcomp.h> +# endif #endif =20 #include <linux/bluetooth/bluetooth.h> |
From: Gordon M. <gm...@us...> - 2001-03-07 18:12:36
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.141 1.142=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: --Added __init & __exit to module init & cleanup routines. The code is now = properly initialized when included as part of a 2.4 kernel. The diff of the modified file(s): --- bluetooth.c 2001/03/07 16:52:52 1.141 +++ bluetooth.c 2001/03/07 18:13:48 1.142 @@ -50,6 +50,10 @@ #include <linux/sched.h> #include <linux/delay.h> #include <linux/timer.h> +#include <linux/init.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) +#include <linux/kcomp.h> +#endif =20 #include <linux/bluetooth/bluetooth.h> #include <linux/bluetooth/btcommon.h> @@ -1231,6 +1235,7 @@ =20 /* * Callback function when data is available at the tty driver. + * Context: timer task or (less likely) hard interrupt. */ =20=20 static void @@ -1830,8 +1835,11 @@ /* Bluetooth Stack Initialization */ /**********************************/ =20 -s32 -bt_init(void) +#if defined(MODULE) || defined(__KERNEL__) +static int __init bt_init(void) +#else +s32 bt_init(void) +#endif { static struct tty_ldisc bt_ldisc; s32 status; @@ -2536,16 +2544,10 @@ } =20 /************************ MODULE STUFF ***********************************= ***/ -#ifdef MODULE -s32 -init_module(void) -{ - /* FIXME - check if serial module is loaded */ - return bt_init(); -} +#if defined(MODULE) || defined(__KERNEL__) =20 -void -cleanup_module(void)=20 +static void +__exit bt_exit(void)=20 { unsigned long flags; s32 error; @@ -2591,6 +2593,8 @@ =20=09 DSYS("Bluetooth Driver unregistered\n"); } +module_init(bt_init); +module_exit(bt_exit); #endif /* MODULE */ =20 /****************** END OF FILE bluetooth.c ******************************= ***/ |
From: Gordon M. <gm...@us...> - 2001-03-07 18:12:06
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.h 1.36 1.37=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: --Added __init & __exit to module init & cleanup routines. The code is now = properly initialized when included as part of a 2.4 kernel. The diff of the modified file(s): --- bluetooth.h 2001/03/01 00:31:05 1.36 +++ bluetooth.h 2001/03/07 18:13:48 1.37 @@ -59,7 +59,9 @@ /* Init, shutdown and registration */ /***********************************/ =20 +#if !defined(MODULE) && !defined(__KERNEL__) s32 bt_init(void); +#endif =20 s32 bt_register_rfcomm(rfcomm_con *rfcomm, u8 dlci); s32 bt_unregister_rfcomm(s32 line); |