diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2013-10-01 12:19:13 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2013-10-02 00:36:15 -0700 |
commit | 7d5b400cb0018bd23f643adbd413e5e77cce6409 (patch) | |
tree | 7146358561ec6fb5aabbee5c4ef01bfc900e6735 /drivers/bluetooth/btmrvl_main.c | |
parent | c037874ca291a47b863c0732aac0dda98cda66c7 (diff) | |
download | op-kernel-dev-7d5b400cb0018bd23f643adbd413e5e77cce6409.zip op-kernel-dev-7d5b400cb0018bd23f643adbd413e5e77cce6409.tar.gz |
Bluetooth: btmrvl: get rid of struct btmrvl_cmd
Replace this proprietary structure with the standard one
(struct hci_command_hdr).
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btmrvl_main.c')
-rw-r--r-- | drivers/bluetooth/btmrvl_main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index d9d4229..a4da7c8 100644 --- a/drivers/bluetooth/btmrvl_main.c +++ b/drivers/bluetooth/btmrvl_main.c @@ -170,20 +170,20 @@ static int btmrvl_send_sync_cmd(struct btmrvl_private *priv, u16 cmd_no, const void *param, u8 len) { struct sk_buff *skb; - struct btmrvl_cmd *cmd; + struct hci_command_hdr *hdr; - skb = bt_skb_alloc(sizeof(*cmd), GFP_ATOMIC); + skb = bt_skb_alloc(HCI_COMMAND_HDR_SIZE + len, GFP_ATOMIC); if (skb == NULL) { BT_ERR("No free skb"); return -ENOMEM; } - cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd)); - cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, cmd_no)); - cmd->length = len; + hdr = (struct hci_command_hdr *)skb_put(skb, HCI_COMMAND_HDR_SIZE); + hdr->opcode = cpu_to_le16(hci_opcode_pack(OGF, cmd_no)); + hdr->plen = len; if (len) - memcpy(cmd->data, param, len); + memcpy(skb_put(skb, len), param, len); bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; |