|
From: Peter K. <pk...@us...> - 2001-07-31 19:28:57
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
unplug_test.c 1.2 1.3=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Corrected includes.
* Made all local functions static.
* Corrected indentation.
The diff of the modified file(s):
--- unplug_test.c 2001/07/30 16:53:43 1.2
+++ unplug_test.c 2001/07/31 19:28:55 1.3
@@ -41,34 +41,26 @@
=20
#define __NO_VERSION__ /* don't define kernel_version in module.h */
=20
-#ifndef UNPLUG_TEST_C=20
-#define UNPLUG_TEST_C
+#ifdef __KERNEL__
+#include <linux/malloc.h>
=20
+#include <linux/bluetooth/hci.h>
+#include <linux/bluetooth/l2cap_con.h>
+#include <linux/bluetooth/sdp.h>
+#include <linux/bluetooth/tcs.h>
+#include <linux/bluetooth/test.h>
+#include <linux/bluetooth/rfcomm.h>
+#include <linux/bluetooth/btcommon.h>
+#else
#include <string.h>
=20
-#ifdef BTD_USERSTACK
-#include "include/btmem.h"
#include "include/hci.h"
-#include "include/l2cap.h"
#include "include/l2cap_con.h"
#include "include/sdp.h"
#include "include/tcs.h"
#include "include/test.h"
#include "include/rfcomm.h"
-#include "include/btdebug.h"
#include "include/btcommon.h"
-#else
-#include <linux/bluetooth/btmem.h>
-#include <linux/bluetooth/hci.h>
-#include <linux/bluetooth/l2cap.h>
-#include <linux/bluetooth/l2cap_con.h>
-#include <linux/bluetooth/sdp.h>
-#include <linux/bluetooth/tcs.h>
-#include <linux/bluetooth/test.h>
-#include <linux/bluetooth/rfcomm.h>
-#include <linux/bluetooth/btdebug.h>
-#include <linux/bluetooth/btcommon.h>
-#define printf printk
#endif
=20
=20
@@ -251,10 +243,10 @@
=20
#define UPDATA_MAXLEN 16384
static u8 tmpdata[UPDATA_MAXLEN];
-static u8 isInitialized =3D 0;
+static u8 test_is_initialized =3D 0;
=20
-void
-unplug_test_init()
+static void
+unplug_test_init(void)
{
/* initializes temp data */
s32 i;
@@ -264,21 +256,21 @@
for (i =3D 0; i < UPDATA_MAXLEN; i++) {
*(tmpdata+i) =3D (u8) i%0x100;
}
- isInitialized =3D 1;
+ test_is_initialized =3D 1;
}
=20
#define SERVER 0
#define CLIENT 1
=20
-void test_server(void)
+static void test_server(void)
{
- printf("Now we are test server (device A)\n");
+ printk("Now we are test server (device A)\n");
test_role =3D SERVER;
}
=20
-void test_client(void)
+static void test_client(void)
{
- printf("Now we are test client (device B)\n");
+ printk("Now we are test client (device B)\n");
test_role =3D CLIENT;
}
=20
@@ -310,42 +302,42 @@
* Test case : Data transfer via Open L2CAP Channel (L2CAP Test 3)
*/
=20
-void test_2_2_1(void)
+static void test_2_2_1(void)
{
/* client sends 10 bytes */
printk("test_2_2_1, client sends 10 bytes\n");=20
test_send_data(testcon, tmpdata, 10);
}
=20
-void test_2_2_2(void)
+static void test_2_2_2(void)
{
/* client sends 350 bytes */
printk("test_2_2_2, client sends 350 bytes\n");=20
test_send_data(testcon, tmpdata, 350);
}
=20
-void test_2_2_3(void)
+static void test_2_2_3(void)
{
/* client sends 672 bytes */
printk("test_2_2_3, client sends 672 bytes\n");=20
test_send_data(testcon, tmpdata, 672);
}
=20
-void test_2_2_4(void)
+static void test_2_2_4(void)
{
/* server sends 10 bytes */
printk("test_2_2_4, server sends 10 bytes\n");=20
test_send_data(testcon, tmpdata, 10);
}
=20
-void test_2_2_5(void)
+static void test_2_2_5(void)
{
/* server sends 350 bytes */
printk("test_2_2_5, server sends 350 bytes\n");=20
test_send_data(testcon, tmpdata, 350);
}
=20
-void test_2_2_6(void)
+static void test_2_2_6(void)
{
/* server sends 672 bytes */
printk("test_2_2_6, server sends 672 bytes\n");=20
@@ -373,7 +365,7 @@
*/
=20
=20
-void test_2_5_1(void)
+static void test_2_5_1(void)
{
/* FIXME - Client sends configure request with MTU 4096 */
if(l2ca_config_req(testcon, 48, NULL, 0, 0)){
@@ -381,7 +373,7 @@
}
}
=20
-void test_2_5_3(void)
+static void test_2_5_3(void)
{
/* FIXME - Server sends configure request with MTU 16384 */
if(l2ca_config_req(testcon, 16384, NULL, 0xffff, 0)){
@@ -389,21 +381,19 @@
}
}
=20
-void test_2_5_4(void)
+static void test_2_5_4(void)
{
-=20
/* FIXME - Client responds success in configure response */
-=20
}
=20
-void test_2_5_5(void)
+static void test_2_5_5(void)
{
/* Client sends 8192 bytes of data */
printk("test_2_5_6, client sends 8192 bytes\n");
test_send_data(testcon, tmpdata, 8192);
}
=20
-void test_2_5_6(void)
+static void test_2_5_6(void)
{
printk("test_2_5_6, server sends 4096 bytes\n");
/* Server sends 4096 bytes of data */
@@ -414,7 +404,7 @@
* Test case : Connection reject on psm 0x4561
*/
=20
-void test_2_6_1(void)
+static void test_2_6_1(void)
{
printk("Now disabling test psm\n");
disable_testpsm =3D 1;
@@ -431,37 +421,37 @@
*/
=20
=20
-void test_2_7_2()
+static void test_2_7_2(void)
{
printk("Emulating authorization pending...\n");
emulate_pending =3D 1;
}
=20
-void test_2_8_1()
+static void test_2_8_1(void)
{
printk("Client sends 350 bytes on testcon 1\n");
test_send_data(testcon, tmpdata, 350);
}
=20
-void test_2_8_2()
+static void test_2_8_2(void)
{
printk("Server sends 350 bytes on testcon 1\n");
test_send_data(testcon, tmpdata, 350);
}
=20
-void test_2_8_3()
+static void test_2_8_3(void)
{
printk("Client sends 350 bytes on testcon 2\n");
test_send_data(testcon2, tmpdata, 350);
}
=20
-void test_2_8_4()
+static void test_2_8_4(void)
{
printk("Server sends 350 bytes on testcon 2\n");
test_send_data(testcon2, tmpdata, 350);
}
=20
-void test_2_9_1()
+static void test_2_9_1(void)
{
printk("Now testing timeout in reconfigure state\n");
printk("Client tries to reconfigure mtu 4096\n");
@@ -471,14 +461,14 @@
}
}
=20
-void test_2_9_2()
+static void test_2_9_2(void)
{
printk("Server won't send a config req back...\n");
dont_send_config_req =3D 1;
}
=20
=20
-void test_2_10()
+static void test_2_10(void)
{
/* set to use mutiple config parameters */
printk("Using multiple config parameters\n");
@@ -499,7 +489,7 @@
} flow;
#endif
=20
-void test_2_13_1()
+static void test_2_13_1(void)
{
flow qos;
init_flow(&qos);
@@ -515,15 +505,15 @@
=20
=20
=20
-void test_2_13_5(void)
+static void test_2_13_5(void)
{
printk("test_2_13_5, client sending 672 bytes\n");=20
test_send_data(testcon, tmpdata, 672);=09
}
=20
-void test_2_13_6(void)
+static void test_2_13_6(void)
{
- printk("test_2_13_5, server sending 672 bytes\n");=20
+ printk("test_2_13_6, server sending 672 bytes\n");=20
test_send_data(testcon, tmpdata, 672);=09
}
=20
@@ -532,185 +522,176 @@
* SDP Stuff
*/
=20
-void sdp_test_52111(void)
+static void sdp_test_52111(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_52111, sdp_data_52111[4] + 5);
}
=20
-void sdp_test_52113(void)
+static void sdp_test_52113(void)
{
static int t =3D 0;
=20
- if (!t)
- {
+ if (!t) {
sdp_send_data(&sdp_con_list[0], sdp_data_52113_1, sdp_data_52113_1[4] =
+ 5);
t =3D 1;
- }
- else
- {
+ } else {
sdp_send_data(&sdp_con_list[0], sdp_data_52113_2, sdp_data_52113_2[4] =
+ 5);
t =3D 0;
}
}
=20
=20
-void sdp_test_52114(void)
+static void sdp_test_52114(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_52114, sdp_data_52114[4] + 5);
}
=20
-void sdp_test_52121(void)
+static void sdp_test_52121(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_52121, sdp_data_52121[4] + 5);
}
=20
-void sdp_test_52122(void)
+static void sdp_test_52122(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_52122, sdp_data_52122[4] + 5);
}
=20
-void sdp_test_53111(void)
+static void sdp_test_53111(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_53111, sdp_data_53111[4] + 5);
}
=20
-void sdp_test_53113(void)
+static void sdp_test_53113(void)
{
static int t =3D 0;
=20=20=20
- if (!t)
- {
+ if (!t) {
sdp_send_data(&sdp_con_list[0], sdp_data_53113_1, sdp_data_53113_2[4] =
+ 5);
t =3D 1;
- }
- else
- {
+ } else {
sdp_send_data(&sdp_con_list[0], sdp_data_53113_2, sdp_data_53113_2[4] =
+ 5);
t =3D 0;
}
}
=20
-void sdp_test_53114(void)
+static void sdp_test_53114(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_53114, sdp_data_53114[4] + 5);
}
=20
-void sdp_test_53115(void)
+static void sdp_test_53115(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_53115, sdp_data_53115[4] + 5);
}
=20
-void sdp_test_53118(void)
+static void sdp_test_53118(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_53118, sdp_data_53118[4] + 5);
}
=20
-void sdp_test_531110(void)
+static void sdp_test_531110(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_531110, sdp_data_531110[4] + 5);
}
=20
-void sdp_test_531117(void)
+static void sdp_test_531117(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_531117, sdp_data_531117[4] + 5);
}
=20
-void sdp_test_531120(void)
+static void sdp_test_531120(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_531120, sdp_data_531120[4] + 5);
}
=20
-void sdp_test_53121(void)
+static void sdp_test_53121(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_53121, sdp_data_53121[4] + 5);
}
=20
-void sdp_test_53122(void)
+static void sdp_test_53122(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_53122, sdp_data_53122[4] + 5);
}
=20
-void sdp_test_53123(void)
+static void sdp_test_53123(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_53123, sdp_data_53123[4] + 5);
}
=20
-void sdp_test_54111(void)
+static void sdp_test_54111(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_54111, sdp_data_54111[4] + 5);
}
=20
-void sdp_test_54112(void)
+static void sdp_test_54112(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_54112, sdp_data_54112[4] + 5);
}
=20
-void sdp_test_54113(void)
+static void sdp_test_54113(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_54113, sdp_data_54113[4] + 5);
}
=20
-void sdp_test_54114(void)
+static void sdp_test_54114(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_54114, sdp_data_54114[4] + 5);
}
=20
-void sdp_test_54116(void)
+static void sdp_test_54116(void)
{
static int t =3D 0;
=20
- if(!t)
- {
+ if (!t) {
sdp_send_data(&sdp_con_list[0], sdp_data_54116_1, sdp_data_54116_1[4] =
+ 5);
t =3D 1;
- }
- else
- {
+ } else {
sdp_send_data(&sdp_con_list[0], sdp_data_54116_2, sdp_data_54116_2[4] =
+ 5);
t =3D 0;
}=20
}
=20
-void sdp_test_541110(void)
+static void sdp_test_541110(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_541110, sdp_data_541110[4] + 5);
}
=20
-void sdp_test_541111(void)
+static void sdp_test_541111(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_541111, sdp_data_541111[4] + 5);
}
=20
-void sdp_test_541112(void)
+static void sdp_test_541112(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_541112, sdp_data_541112[4] + 5);
}
=20
-void sdp_test_541120(void)
+static void sdp_test_541120(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_541120, sdp_data_541120[4] + 5);
}
=20
-void sdp_test_54121(void)
+static void sdp_test_54121(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_54121, sdp_data_54121[4] + 5);
}
=20
-void sdp_test_54122(void)
+static void sdp_test_54122(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_54122, sdp_data_54122[4] + 5);
}
=20
-void sdp_test_55111(void)
+static void sdp_test_55111(void)
{
static int t =3D 0;
=20
- switch(t)
- {
+ switch (t) {
case 0:
sdp_send_data(&sdp_con_list[0], sdp_data_55111_1, sdp_data_55111_1[4] =
+ 5);
t =3D 1;
break;
+
case 1:
sdp_send_data(&sdp_con_list[0], sdp_data_55111_2, sdp_data_55111_2[4] =
+ 5);
t =3D 2;
@@ -742,16 +723,16 @@
}=20
}
=20
-void sdp_test_55112(void)
+static void sdp_test_55112(void)
{
static int t =3D 0;
=20
- switch(t)
- {
+ switch (t) {
case 0:
sdp_send_data(&sdp_con_list[0], sdp_data_55112_1, sdp_data_55112_1[4] =
+ 5);
t =3D 1;
break;
+
case 1:
sdp_send_data(&sdp_con_list[0], sdp_data_55112_2, sdp_data_55112_2[4] =
+ 5);
t =3D 0;
@@ -764,7 +745,7 @@
* Serial Port Profile Stuff
*/
=20
-void spp_test_52211(void)
+static void spp_test_52211(void)
{
static int t =3D 0;
=20=20=20
@@ -777,17 +758,20 @@
sdp_send_data(&sdp_con_list[0], sdp_query, sdp_query[4] + 5);
t++;
break;
+
case 1:
- printf(__FUNCTION__": Establish RFCOMM on channel 0\n");
+ printk(__FUNCTION__": Establish RFCOMM on channel 0\n");
t++;
break;
- printf(__FUNCTION__": Establish RFCOMM on channel 2\n");
+
+ case 2:
+ printk(__FUNCTION__": Establish RFCOMM on channel 2\n");
t =3D 0;
break;
}
}
=20
-void spp_test_52311(void)
+static void spp_test_52311(void)
{
static int t =3D 0;
=20
@@ -796,6 +780,7 @@
hci_sniff_mode(rfcomm_con_list[0].l2cap->hci_hdl, 0xff, 0xf0, 0x10, 0x=
05);
t =3D 1;
break;
+
case 1:
hci_exit_sniff_mode(rfcomm_con_list[0].l2cap->hci_hdl);
t =3D 0;
@@ -803,7 +788,7 @@
}
}
=20
-void spp_test_52312(void)
+static void spp_test_52312(void)
{
static int t =3D 0;
=20
@@ -812,6 +797,7 @@
hci_park_mode(rfcomm_con_list[0].l2cap->hci_hdl, 0xfff, 0xf0);
t =3D 1;
break;
+
case 1:
hci_exit_park_mode(rfcomm_con_list[0].l2cap->hci_hdl);
t =3D 0;
@@ -819,76 +805,77 @@
}
}
=20
-void spp_test_52313(void)
+static void spp_test_52313(void)
{
hci_hold_mode(rfcomm_con_list[0].l2cap->hci_hdl, 0xfff, 0xf0);
}
=20
-void spp_test_52314(void)
+static void spp_test_52314(void)
{
- printf(__FUNCTION__": Do test 52211, then do a M/S switch\n");
+ printk(__FUNCTION__": Do test 52211, then do a M/S switch\n");
}
=20
=20
-void spp_test_53112(void)
+static void spp_test_53112(void)
{
/* Establish a L2CAP channel in PSM 3 (RFCOMM), before doing this test */
=20
rfcomm_sabm_msg(&rfcomm_con_list[0], 0);
}
=20
-void spp_test_53211(void)
-{ /* This test has to be done rigth after test 53112 */
+static void spp_test_53211(void)
+{
+ /* This test has to be done rigth after test 53112 */
=20
rfcomm_disc_msg(&rfcomm_con_list[0], 0);
}
=20
-void spp_test_53312(void)
+static void spp_test_53312(void)
{
- /* Establish a L2CAP channel in PSM 3 (RFCOMM), and establish DLCI 0 bef=
ore
- doing this test */
+ /* Establish a L2CAP channel in PSM 3 (RFCOMM), and establish DLCI 0
+ before doing this test */
=20
rfcomm_sabm_msg(&rfcomm_con_list[0], 2);
}
=20
-void spp_test_53411(void)
+static void spp_test_53411(void)
{
- /* Establish a L2CAP channel in PSM 3 (RFCOMM), and establish DLCI 0 and=
2
- before doing this test */
-
- /* Here the BAP should send the disc command so we just have to wait for
- that, rf_disc should probably work in the BAP */
+ /* Establish a L2CAP channel in PSM 3 (RFCOMM), and establish DLCI 0
+ and 2 before doing this test */
=20=09
+ /* Here the BAP should send the disc command so we just have to wait
+ for that, rf_disc should probably work in the BAP */
}
=20
-void spp_test_53412(void)
-{ /* This test has to be done rigth after test 53116 */
+static void spp_test_53412(void)
+{
+ /* This test has to be done rigth after test 53116 */
=20
rfcomm_disc_msg(&rfcomm_con_list[0], 2);
}
=20
-void spp_test_53511(void)
+static void spp_test_53511(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20
/* Send data from the BAp with the rf_send command */
=20=20=20
rfcomm_msc_msg(&rfcomm_con_list[0], 0x85 ,MCC_CMD, 2);
}
=20
-void spp_test_53611(void)
+static void spp_test_53611(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20=20=20
/* Then send data from the BAP with the rf_send command */
}
=20
-void spp_test_53711(void)
+static void spp_test_53711(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20
unsigned char data[] =3D {0,1,2,3,4,5,6,7,9};
=20=20=20
@@ -896,39 +883,40 @@
rfcomm_test_msg(&rfcomm_con_list[0], data, 10, MCC_CMD);
}
=20
-void spp_test_53811(void)
+static void spp_test_53811(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20
static int t =3D 0;
=20
switch (t) {
case 0:
rfcomm_fcoff_msg(&rfcomm_con_list[0], MCC_CMD);
- printf(__FUNCTION__": Flow is set to OFF\n");
+ printk(__FUNCTION__": Flow is set to OFF\n");
t++;
break;
+
case 1:
rfcomm_fcon_msg(&rfcomm_con_list[0], MCC_CMD);
- printf(__FUNCTION__": Flow is set to ON\n");
+ printk(__FUNCTION__": Flow is set to ON\n");
t =3D 0;
break;
}
}
=20
-void spp_test_53911(void)
+static void spp_test_53911(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20
rfcomm_rls_msg(&rfcomm_con_list[0], MCC_CMD, 2, 0x05);
}
=20
-void spp_test_531011(void)
+static void spp_test_531011(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20
static int t =3D 0;
=20=20=20
@@ -937,29 +925,30 @@
rfcomm_pn_msg(&rfcomm_con_list[0], 2, 0, 1000);
t++;
break;
+
case 1:
rfcomm_pn_msg(&rfcomm_con_list[0], 2, 0, 667);
break;
}
}
=20
-void spp_test_531111(void)
+static void spp_test_531111(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20
rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 4, 0);
}
=20
-void spp_test_531112(void)
+static void spp_test_531112(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20
rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 4, 1);
}
=20
-void spp_test_55111(void)
+static void spp_test_55111(void)
{
/* Establish a L2CAP channel on PSM 1 (SDP) before doing this test */
=20
@@ -969,7 +958,7 @@
sdp_send_data(&sdp_con_list[0], sdp_query, sdp_query[4] + 5);
}
=20
-void spp_test_55112(void)
+static void spp_test_55112(void)
{
/* Establish a L2CAP channel on PSM 1 (SDP) before doing this test */
=20
@@ -978,11 +967,10 @@
0x09, 0x00, 0x01, 0x09, 0x00, 0x04, 0x09, 0x01,
0x00, 0x00};
=20
-
sdp_send_data(&sdp_con_list[0], sdp_query, sdp_query[4] + 5);
}
=20
-void spp_test_55113(void)
+static void spp_test_55113(void)
{
/* Establish a L2CAP channel on PSM 1 (SDP) before doing this test */
=20
@@ -991,12 +979,11 @@
0x09, 0x09, 0x00, 0x01, 0x09, 0x00, 0x04, 0x09,
0x01, 0x00, 0x00};
=20
-
sdp_send_data(&sdp_con_list[0], sdp_query, sdp_query[4] + 5);
}
=20
=20
-void spp_test_56211(void)
+static void spp_test_56211(void)
{
/* Run the hci_write_encryption_mode(1) in hci_init */
}
@@ -1005,41 +992,41 @@
* RFCOMM stuff=20
*/
=20
-void test_4_1(void)
+static void test_4_1(void)
{
/* Create a connection */
printk("Please use rf_conn server channel 2\n");
}
=20
-void test_4_2_1(void)
+static void test_4_2_1(void)
{
/* Send stop flow command on dlci 4*/
printk("test_4_2\n");
rfcomm_msc_msg(&rfcomm_con_list[0], 0x87 ,MCC_CMD, 4);
}
=20
-void test_4_2_2(void)
+static void test_4_2_2(void)
{
/* Send start flow command on dlci 4 */
printk("test_4_2\n");
rfcomm_msc_msg(&rfcomm_con_list[0], 0x85 ,MCC_CMD, 4);
}
=20
-void test_4_2_3(void)
+static void test_4_2_3(void)
{
/* Send start flow command on dlci 4 */
printk("test_4_2\n");
rfcomm_msc_msg(&rfcomm_con_list[0], 0x85 ,MCC_CMD, 3);
}
=20
-void test_4_2_4(void)
+static void test_4_2_4(void)
{
/* Send start flow command on dlci 4 */
printk("test_4_2\n");
rfcomm_msc_msg(&rfcomm_con_list[0], 0x85 ,MCC_CMD, 2);
}
=20
-void test_4_3(void)
+static void test_4_3(void)
{
/* Here we should send data after we received a flow stop command */
printk("test_4_3\n");
@@ -1049,20 +1036,20 @@
}
}
=20
-void test_4_4(void)
+static void test_4_4(void)
{
/* If we should initiate the disconnection we do this */
printk("test_4_4\n");
rfcomm_disconnect_req(0);
}
=20
-void test_4_5_1(void)
+static void test_4_5_1(void)
{
printk("test_4_5_1\n");
rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 4, 1);
}
=20
-void test_4_5_2(void)
+static void test_4_5_2(void)
{
printk("test_4_5_2\n");
rpn_val.rtr_input =3D 1;
@@ -1074,7 +1061,7 @@
rpn_val.pm.rtr_output =3D 0;
}
=20
-void test_4_6(void)
+static void test_4_6(void)
{
u8 data[1];
=20
@@ -1084,54 +1071,53 @@
rfcomm_test_msg(&rfcomm_con_list[0], data, 1, MCC_CMD);
}
=20
-void test_4_7(void)
+static void test_4_7(void)
{
-=09
printk("test_4_7\n");
rfcomm_rls_msg(&rfcomm_con_list[0], MCC_CMD, 4, 0x03);
}
=20
-void test_4_8_1(void)
+static void test_4_8_1(void)
{
/* Here we send a fcoff command */
printk("test_4_8\n");
rfcomm_fcoff_msg(&rfcomm_con_list[0], MCC_CMD);
}
=20
-void test_4_8_2(void)
+static void test_4_8_2(void)
{
/* Here we send a fcon command */
printk("test_4_8\n");
rfcomm_fcon_msg(&rfcomm_con_list[0], MCC_CMD);
}
=20
-void test_4_9(void)
+static void test_4_9(void)
{
/* Test to send data after received fcoff command */
printk("test_4_9\n");
test_4_3();
}
=20
-void test_4_10(void)
+static void test_4_10(void)
{
/* Create a connection on serverchannel one */
printk("Please use rfcomm_connect server channel 1, line 0 instead\n");
}
=20
-void test_4_11(void)
+static void test_4_11(void)
{
/* Same as test 4.10, but here we should be the responder */
printk("test_4_11\n");
test_4_10();
}
=20
-void test_4_12(void)
+static void test_4_12(void)
{
printk("test_4_12\n");
test_4_4();
}
=20
-void test_4_13(void)
+static void test_4_13(void)
{=09
printk("test_4_13\n");
rfcomm_set_mtu(&rfcomm_con_list[0], 4, 500);
@@ -1139,31 +1125,31 @@
printk("Please use rfcomm_connect server channel 2, line 0 to connect\n"=
);
}
=20
-void test_4_14(void)
+static void test_4_14(void)
{
printk("test_4_14\n");
printk("PLease use rfcomm_conn on serverchannel 4\n");
}
=20
-void test_4_15(void)
+static void test_4_15(void)
{
printk("test_4_15\n");
rfcomm_crap_msg(&rfcomm_con_list[0]);
}
=20
-void test_4_16(void)
+static void test_4_16(void)
{
printk("test_4_16\n");
rfcomm_msc_msg(&rfcomm_con_list[0], 0x8d ,MCC_CMD, 8);
}
=20
-void test_4_21_1(void)
+static void test_4_21_1(void)
{
printk("test_4_21_1\n");
rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 2, 1);
}
=20
-void test_4_21_2(void)
+static void test_4_21_2(void)
{
printk("test_4_21_2\n");
rpn_val.rtr_input =3D 1;
@@ -1175,7 +1161,7 @@
rpn_val.pm.rtr_output =3D 0;
}
=20
-void test_4_22_1(void)
+static void test_4_22_1(void)
{
printk("test_4_22_1\n");
rpn_val.rtr_input =3D 1;
@@ -1187,98 +1173,97 @@
rpn_val.pm.rtr_output =3D 0;
}
=20
-void test_4_22_2(void)
+static void test_4_22_2(void)
{
printk("test_4_22_2\n");
rfcomm_sabm_msg(&rfcomm_con_list[0], 2);;
}
=20
-void test_4_22_3(void)
+static void test_4_22_3(void)
{
printk("test_4_21_1\n");
rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 2, 1);
}
=20
-void test_4_23_1(void)
+static void test_4_23_1(void)
{
printk("test_4_23_1\n");
test_4_22_1();
}
=20
-void test_4_23_2(void)
+static void test_4_23_2(void)
{
printk("test_4_23_2\n");
rfcomm_pn_msg(&rfcomm_con_list[0], 2, 0, 127);
}
=20
-void test_4_23_3(void)
+static void test_4_23_3(void)
{
printk("test_4_23_2\n");
rfcomm_sabm_msg(&rfcomm_con_list[0], 2);
}
=20
-void test_4_23_4(void)
+static void test_4_23_4(void)
{
printk("test_4_23_1\n");
test_4_22_3();
}
=20
-void test_4_24_1(void)
+static void test_4_24_1(void)
{
printk("test_4_23_1\n");
test_4_23_2();
}
=20
-void test_4_24_2(void)
+static void test_4_24_2(void)
{
printk("test_4_23_2\n");
test_4_23_1();
}
=20
-void test_4_24_3(void)
+static void test_4_24_3(void)
{
printk("test_4_23_2\n");
rfcomm_sabm_msg(&rfcomm_con_list[0], 2);
-=20=20
}
=20
-void test_4_24_4(void)
+static void test_4_24_4(void)
{
printk("test_4_23_1\n");
rfcomm_sabm_msg(&rfcomm_con_list[0], 2);
}
=20
-void test_4_25_1(void)
+static void test_4_25_1(void)
{
printk("test_4_25_1\n");
rfcomm_pn_msg(&rfcomm_con_list[0], 2, 0, 500);
}
=20
-void test_4_25_2(void)
+static void test_4_25_2(void)
{
printk("test_4_25_2\n");
rfcomm_con_list[0].l2cap->local_mtu =3D 65;
}
=20
-void test_4_25_3(void)
+static void test_4_25_3(void)
{
printk("test_4_25_3\n");
rfcomm_sabm_msg(&rfcomm_con_list[0] ,2);=20
}
=20
-void test_4_26(void)
+static void test_4_26(void)
{
printk("test_4_26\n");
rfcomm_pn_msg(&rfcomm_con_list[0], 4, 0, 127);
}
=20
-void test_4_27(void)
+static void test_4_27(void)
{
printk("test_4_27\n");
rfcomm_pn_msg(&rfcomm_con_list[0], 4, 10, 127);
}
=20
-void test_4_28(void)
+static void test_4_28(void)
{
printk("test_4_28\n");
rfcomm_send_credits(&rfcomm_con_list[0], 4, 10);
@@ -1290,7 +1275,7 @@
* TCS stuff
*/
=20
-void test_5_1(void)
+static void test_5_1(void)
{
if (!tcs[0].l2cap) {
printk("Please connect TCS first with tcs_connect bd_addr\n");
@@ -1299,7 +1284,7 @@
tcs_setup(tcs[0].l2cap, NULL, 0);
}
=20
-void test_5_1_1(void)
+static void test_5_1_1(void)
{
u8 nbr[2];
=20
@@ -1325,7 +1310,7 @@
}
=20
=20
-void test_5_2(void)
+static void test_5_2(void)
{
if (!tcs[0].l2cap) {
printk("Please connect TCS first with tcs_connect bd_addr\n");
@@ -1334,7 +1319,7 @@
tcs_connect(tcs[0].l2cap);
}
=20
-void test_5_3(void)
+static void test_5_3(void)
{
if (!tcs[0].l2cap) {
printk("Please connect TCS first with tcs_connect bd_addr\n");
@@ -1343,22 +1328,22 @@
tcs_disconnect(tcs[0].l2cap);
}
=20
-void test_5_4(void)
+static void test_5_4(void)
{
test_5_1();
}
=20
-void test_5_5(void)
+static void test_5_5(void)
{
test_5_2();
}
=20
-void test_5_6(void)
+static void test_5_6(void)
{
test_5_3();
}
=20
-void test_5_7(void)
+static void test_5_7(void)
{
if (!tcs[0].l2cap) {
printk("Please connect TCS first with tcs_connect bd_addr\n");
@@ -1367,9 +1352,10 @@
tcs_send_information(tcs[0].l2cap, '1');
}
=20
-void test_gateway_call()
+static void test_gateway_call(void)
{
unsigned char *atd =3D "ATD4257272353\r\n";
+
printk("test_gateway_call, sending %s\n", atd);
rfcomm_send_data(CREATE_RFCOMM_ID(0,2), atd, strlen(atd));
}
@@ -1379,16 +1365,14 @@
*/
=20
void process_test_cmd(s32 test_case)
-{
- if(!isInitialized)
{
+ if (!test_is_initialized) {
unplug_test_init();
}
=20=20=20=20=20
- printf("test_case %d\n",test_case);
+ printk("test_case %d\n",test_case);
=20
switch(test_case){
-=20=20=20=20
case 0: test_server();
break;
case 1: test_client();
@@ -1641,9 +1625,7 @@
break;
=20
default:
- printf("Unknown test case\n");
+ printk("Unknown test case\n");
break;
}
}
-
-#endif /* UNPLUG_TEST_C */
|