|
From: Mattias A. <mat...@us...> - 2001-04-25 17:42:19
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.27 1.28=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* added parsing of biterror/rssi/packet_stat reports (HQ message)
The diff of the modified file(s):
--- hci_vendor.c 2001/04/20 11:45:05 1.27
+++ hci_vendor.c 2001/04/25 17:42:10 1.28
@@ -262,7 +262,7 @@
void
process_vendor_event(u8 *buf, u32 len, u32 event_code)
{
- D_ERR(__FUNCTION__ VENDOR " Vendor specicic event not recognized.\n");
+ D_ERR(__FUNCTION__ VENDOR " Vendor specific event not recognized.\n");
}
=20
char*
@@ -328,6 +328,7 @@
return tmp;
}
=20
+
u8*
get_digi_err_code(u8 code)
{
@@ -455,6 +456,11 @@
#define CSR_UART_ODD_PARITY 0x4000
#define CSR_UART_EVEN_PARITY 0xc000
=20
+#define CSR_VARID_RSSI_REPORT 0x0801
+#define CSR_VARID_PACKET_STAT_REPORT 0x1001
+#define CSR_VARID_BITERR_REPORT 0x1006
+
+
typedef struct payload_descr
{
u8 ch_id:6;
@@ -486,6 +492,27 @@
u16 ps_val[0];
} csr_bccmd_ps;
=20
+typedef struct csr_rssi_rep
+{=20=20
+ u16 rssi;
+} csr_rssi_rep;
+
+typedef struct csr_packstat_rep
+{=20=20
+ u16 n_pkts;
+ u16 n_good;
+ u16 n_corr;
+ u16 rssi;
+ u16 rssi_valid;
+} csr_packstat_rep;
+
+typedef struct csr_biterr_rep
+{=20=20
+ u16 index;
+ u16 val_last;
+ u16 val_tot;
+} csr_biterr_rep;
+
static u16 csr_count =3D 0;
=20
s32=20
@@ -686,6 +713,7 @@
if (cmd->type =3D=3D CSR_MSGTYPE_GETRESP &&
cmd->status =3D=3D CSR_STATUS_OK) {
switch (cmd->var_id) {
+
case CSR_CMD_CONFIG_UART:
break;
=20
@@ -712,9 +740,37 @@
break;
=20
case CSR_CH_ID_HQ:
+ switch (cmd->var_id)=20
+ {
+=09=09=09
+ case CSR_VARID_RSSI_REPORT:
+ {
+ csr_rssi_rep *rep;
+ rep =3D (csr_rssi_rep *)cmd->payload;
+ DSYS("RSSI report, rssi : %d\n", rep->rssi);
+ }
break;
=20
+ case CSR_VARID_PACKET_STAT_REPORT:
+ {
+ csr_packstat_rep *rep;
+ rep =3D (struct csr_packstat_rep*)cmd->payload;
+ DSYS("Packet status report : n_pkts %d, n_good %d, n_corr %d, rssi %d, =
rssi_valid %d\n", rep->n_pkts, rep->n_good, rep->n_corr, rep->rssi, rep->rs=
si_valid);
+ }
+ break;
+=09=09
+ case CSR_VARID_BITERR_REPORT:
+ {
+ csr_biterr_rep *rep;
+ rep =3D (struct csr_biterr_rep*)cmd->payload;
+ DSYS("Biterror report : index %d, val_last %d, val_tot %d\n", rep->inde=
x, rep->val_last, rep->val_tot);
+ }
+ }
+=09=09
+ break;
+=09=09
default:
+ D_ERR("Unknown varid [0x%x]!\n", cmd->var_id);
break;
}
=20
@@ -806,6 +862,7 @@
}
=20
#else
+
/*************************************************************************=
****/
/************************* HW_NOINIT and HW_GENERIC **********************=
****/
/*************************************************************************=
****/
|