Re: [PATCH] Bluetooth: btmrvl: operate on 16-bit opcodes instead of ogf/ocf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bing,

On Thu, Oct 3, 2013 at 5:06 PM, Bing Zhao <bzhao@xxxxxxxxxxx> wrote:
>> >         hdr = (struct hci_command_hdr *)skb_put(skb, HCI_COMMAND_HDR_SIZE);
>> > -       hdr->opcode = cpu_to_le16(hci_opcode_pack(OGF, cmd_no));
>> > +       hdr->opcode = cpu_to_le16(opcode);
>>
>> Are you sure the callers of btmrvl_send_sync_cmd() do not need to be
>> changed to pass an opcode instead of just the OCF?
>
> Previously we pass the cmd_no which is the OCF bits to the function, and the function packs it to opcode.
>
> Now I changed the macros of the cmd_no from OCF to opcode as shown below, so no change to the callers.
>
> -/* Bluetooth commands  */
> -#define BT_CMD_AUTO_SLEEP_MODE         0x23
> -#define BT_CMD_HOST_SLEEP_CONFIG       0x59
> -#define BT_CMD_HOST_SLEEP_ENABLE       0x5A
> -#define BT_CMD_MODULE_CFG_REQ          0x5B
> -#define BT_CMD_LOAD_CONFIG_DATA                0x61
> +/* Vendor specific Bluetooth commands */
> +#define BT_CMD_AUTO_SLEEP_MODE         0xFC23
> +#define BT_CMD_HOST_SLEEP_CONFIG       0xFC59
> +#define BT_CMD_HOST_SLEEP_ENABLE       0xFC5A
> +#define BT_CMD_MODULE_CFG_REQ          0xFC5B
> +#define BT_CMD_LOAD_CONFIG_DATA                0xFC61

Now I got it :)

Best Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux