Return-Path: MIME-Version: 1.0 In-Reply-To: <477F20668A386D41ADCC57781B1F70430F451FB266@SC-VEXCH1.marvell.com> References: <1380824600-13655-1-git-send-email-bzhao@marvell.com> <477F20668A386D41ADCC57781B1F70430F451FB266@SC-VEXCH1.marvell.com> Date: Thu, 3 Oct 2013 19:26:41 -0400 Message-ID: Subject: Re: [PATCH] Bluetooth: btmrvl: operate on 16-bit opcodes instead of ogf/ocf From: Anderson Lizardo To: Bing Zhao Cc: BlueZ development , Marcel Holtmann , Gustavo Padovan , Johan Hedberg , "linux-wireless@vger.kernel.org" , Amitkumar Karwar Content-Type: text/plain; charset=ISO-8859-1 List-ID: Hi Bing, On Thu, Oct 3, 2013 at 5:06 PM, Bing Zhao 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