|
From: Alain P. <apa...@us...> - 2002-07-22 17:29:51
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
hci_vendor.c 1.65 1.66=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Made several CSR specific things Big Endian compatible :
- Interpretation of BUILD_ID (consequence : speed can now be set in big end=
ian)
- Reading and writing PS keys
Note : hci_set_bd_addr and setting speed are for the moment not big-endian =
compatible.
The diff of the modified file(s):
--- hci_vendor.c 15 May 2002 13:29:41 -0000 1.65
+++ hci_vendor.c 22 Jul 2002 17:29:50 -0000 1.66
@@ -572,7 +572,6 @@
csr_bccmd_ps *ps;
=20=09
D_REC(__FUNCTION__ "\n");
-
hci_ctrl.hc_buf.cmd_num =3D 1;=20=20
=20
release_cmd_timer();
@@ -595,12 +594,10 @@
break;
=20=09=09=09=09
case CSR_CMD_BUILD_ID:
-#ifndef CONFIG_BLUETOOTH_SD_SPECIFIC
/* Store this for later retrieval */
sprintf(bt_hw_firmware_info,
"\n Firmware version: %d",
cmd->payload[0]);
-#endif
break;
=20=09=09=09=09
case CSR_CMD_CHIP_VER:
@@ -861,8 +858,6 @@
csr_bccmd *cmd;
csr_bccmd_ps *ps;
=20
-#ifndef CONFIG_BLUETOOTH_SD_SPECIFIC
-
D_CMD(__FUNCTION__" : ps_key 0x%x [%d]\n", ps_key, rw_mode);=09
PRINTPKT("pars : ", (u8*)retb, n_pars*sizeof(u16));
=20
@@ -882,16 +877,16 @@
=20
/* BCCMD type */
=20
- cmd->type =3D rw_mode;
- cmd->len =3D 5 + 3 + n_pars;
- cmd->seq =3D csr_count++;
- cmd->var_id =3D CSR_CMD_PS;
- cmd->status =3D CSR_STATUS_OK; /* always OK in SETREQ */
+ cmd->type =3D cpu_to_le16(rw_mode);
+ cmd->len =3D cpu_to_le16(5 + 3 + n_pars);
+ cmd->seq =3D cpu_to_le16(csr_count++);
+ cmd->var_id =3D cpu_to_le16(CSR_CMD_PS);
+ cmd->status =3D cpu_to_le16(CSR_STATUS_OK); /* always OK in SETREQ */
=20
/* Actual PS key request */
- ps->ps_key =3D ps_key;
- ps->ps_len =3D n_pars; /* x 16 bits */
- ps->unused =3D 0x0000;
+ ps->ps_key =3D cpu_to_le16(ps_key);
+ ps->ps_len =3D cpu_to_le16(n_pars); /* x 16 bits */
+ ps->unused =3D cpu_to_le16(0x0000);
=20
if (rw_mode =3D=3D CSR_MSGTYPE_GETREQ)
memset(ps->ps_val, 0, n_pars*sizeof(u16)); /* zero params in GETREQ */
@@ -910,9 +905,6 @@
/* Signal status back in SETREQ ? */
=20
return tmp;
-#else
- return 0;
-#endif
}
=20
s32=20
|