|
From: Peter K. <pk...@us...> - 2002-08-01 16:18:04
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
test.c 1.35 1.36=20=20=20=20=20=20=20=20=20=20=20=20=20=20
unplug_test.c 1.12 1.13=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Fixed a couple of compiler warnings.
The diff of the modified file(s):
--- test.c 11 Apr 2002 11:51:29 -0000 1.35
+++ test.c 1 Aug 2002 16:18:00 -0000 1.36
@@ -1,9 +1,9 @@
/*
* test.c -- Test layer used to verify stack=20=20=20=20=20=20=20
*
- * Copyright (C) 2000, 2001 Axis Communications AB
+ * Copyright (C) 2000, 2001, 2002 Axis Communications AB
*
- * Author: Mats Friden <mat...@ax...>
+ * Author: Mats Friden <mat...@ax...>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -55,6 +55,8 @@
#include <linux/bluetooth/btcommon.h>
#include <linux/bluetooth/btmem.h>
#include <linux/bluetooth/l2cap.h>
+#include <linux/bluetooth/l2cap_con.h>
+#include <linux/bluetooth/hci.h>
#include <linux/bluetooth/unplug_test.h>
#else
#include <string.h>
@@ -254,7 +256,6 @@
return;
}
=20=09
-=09
if (disable_testpsm =3D=3D 1)
{
/* send back psm not supp */
@@ -333,8 +334,6 @@
D_ERR("test_config_cfm : Configuration request failed\n"); }
}
=20=09=09
-=09=09
-=09=09
/* store connection */
if (con->psm =3D=3D L2CAP_TEST_LAYER)
testcon =3D con;
@@ -357,13 +356,11 @@
if(dont_accept_mtu) {
if (l2ca_config_rsp(con, 640, NULL, CONF_FAILURE)) {
D_ERR("test_config_ind : Configuration response failed\n");
-=09=09=09
}
dont_accept_mtu =3D 0;
}
else if (l2ca_config_rsp(con, 0, NULL, CONF_SUCCESS)) {
D_ERR("test_config_ind : Configuration response failed\n");
-=09=09=09
}
=20
/* Are we ready with our sides configuration */=20
@@ -465,7 +462,6 @@
return -1;
}
=20=09
-
/* tx bufs are all the same for each upper layer ... FIX one common */
tx_buf =3D subscribe_bt_buf(sizeof(rfcomm_tx_buf) + len);
=20
@@ -488,8 +484,9 @@
test_process_cmd(unsigned char *cmd, s32 size)
{=20
#ifdef CONFIG_BLUETOOTH_UNPLUG_TEST
- int testcase, tmp[10], i;
+ int testcase, i;
unsigned char bd[6], char_buf[4];
+
char_buf[3] =3D 0;
if(!strncmp(cmd, "bb_conn ", 8)) {
char *p =3D cmd + 8;
@@ -515,6 +512,7 @@
}
else {
printk("test_process_cmd: Couldn't parse testcase\n");
+ return -1;
}
}
else if(!strncmp(cmd, "bb_disc ", 8)) {
@@ -558,7 +556,7 @@
=20
return test_send_data(con, testdata, len);
} else if(!strncmp(cmd, "set_error ", 10)) {
- int pos =3D 10, n =3D 0;
+ int n =3D 0;
if(*(cmd + 10) =3D=3D '-') {
n =3D -(strtoul(cmd + 11, NULL, 0));
} else {
@@ -567,6 +565,7 @@
printk("Setting l2cap size error value =3D %d\n", n);
=20=09=09
add_value =3D n;
+ return 0;
} else if(!strncmp(cmd, "sdptest ", 8)) {
int n =3D strtoul(cmd+8, NULL, 0);=09
return do_sdp_test(n);
--- unplug_test.c 15 May 2002 13:29:42 -0000 1.12
+++ unplug_test.c 1 Aug 2002 16:17:59 -0000 1.13
@@ -1061,11 +1061,13 @@
return test_send_data(testcon, testdata, 672);=09
}
=20
+#if 0
static s32 test_2_13_6(void)
{
printk("test_2_13_6, server sending 672 bytes\n");=20
return test_send_data(testcon, testdata, 672);=09
}
+#endif
=20
/*
* SDP Stuff
@@ -1214,7 +1216,6 @@
static s32 sdp_test_53111(void)
{
static int t =3D 0;
- s32 retval;
if(!t) {
t =3D 1;
return sdp_send_data(&sdp_con_list[0], sdp_data_53111_1, sdp_data_53111_=
1[4] + 5);
@@ -1222,7 +1223,6 @@
t =3D 0;
return sdp_send_data(&sdp_con_list[0], sdp_data_53111_2, sdp_data_53111_=
2[4] + 5);
}
-=09
}
=20
static s32 sdp_test_53112(void)
@@ -1707,14 +1707,12 @@
retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_8, sdp_data_55=
111_8[4] + 5);
t =3D 0;
break;
-=09=09
}=20
return retval;
}
=20
static s32 sdp_test_55112(void)
{
-=20=20
static int t =3D 0;
s32 retval =3D 0;
=20
@@ -1990,6 +1988,7 @@
return rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 4, 1);
}
=20
+#if 0
static s32 spp_test_55111(void)
{
/* Establish a L2CAP channel on PSM 1 (SDP) before doing this test */
@@ -1999,7 +1998,9 @@
=20
return sdp_send_data(&sdp_con_list[0], sdp_query, sdp_query[4] + 5);
}
+#endif
=20
+#if 0
static s32 spp_test_55112(void)
{
/* Establish a L2CAP channel on PSM 1 (SDP) before doing this test */
@@ -2011,7 +2012,9 @@
=20
return sdp_send_data(&sdp_con_list[0], sdp_query, sdp_query[4] + 5);
}
+#endif
=20
+#if 0
static s32 spp_test_55113(void)
{
/* Establish a L2CAP channel on PSM 1 (SDP) before doing this test */
@@ -2023,6 +2026,7 @@
=20
return sdp_send_data(&sdp_con_list[0], sdp_query, sdp_query[4] + 5);
}
+#endif
=20
=20
static s32 spp_test_56211(void)
@@ -2300,11 +2304,13 @@
return 0;
}
=20
+#if 0
static s32 test_4_25_3(void)
{
printk("test_4_25_3\n");
return rfcomm_sabm_msg(&rfcomm_con_list[0], 2);
}
+#endif
=20
static s32 test_4_26(void)
{
@@ -2581,7 +2587,7 @@
=20=20=20=20=20=20=20=20=20
case 99999:=20
emulate_hw_error =3D 1;
- break;
+ return 0;
default:
printk("Unknown test case\n");
return -1;
|