diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2013-10-01 15:19:13 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2013-10-02 03:36:15 -0400 |
commit | 7d5b400cb0018bd23f643adbd413e5e77cce6409 (patch) | |
tree | 7146358561ec6fb5aabbee5c4ef01bfc900e6735 | |
parent | c037874ca291a47b863c0732aac0dda98cda66c7 (diff) |
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>
-rw-r--r-- | drivers/bluetooth/btmrvl_drv.h | 6 | ||||
-rw-r--r-- | drivers/bluetooth/btmrvl_main.c | 12 |
2 files changed, 6 insertions, 12 deletions
diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h index 27068d149380..42f7028d3890 100644 --- a/drivers/bluetooth/btmrvl_drv.h +++ b/drivers/bluetooth/btmrvl_drv.h | |||
@@ -116,12 +116,6 @@ struct btmrvl_private { | |||
116 | #define PS_SLEEP 0x01 | 116 | #define PS_SLEEP 0x01 |
117 | #define PS_AWAKE 0x00 | 117 | #define PS_AWAKE 0x00 |
118 | 118 | ||
119 | struct btmrvl_cmd { | ||
120 | __le16 ocf_ogf; | ||
121 | u8 length; | ||
122 | u8 data[4]; | ||
123 | } __packed; | ||
124 | |||
125 | struct btmrvl_event { | 119 | struct btmrvl_event { |
126 | u8 ec; /* event counter */ | 120 | u8 ec; /* event counter */ |
127 | u8 length; | 121 | u8 length; |
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index d9d42295e533..a4da7c830b12 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, | |||
170 | const void *param, u8 len) | 170 | const void *param, u8 len) |
171 | { | 171 | { |
172 | struct sk_buff *skb; | 172 | struct sk_buff *skb; |
173 | struct btmrvl_cmd *cmd; | 173 | struct hci_command_hdr *hdr; |
174 | 174 | ||
175 | skb = bt_skb_alloc(sizeof(*cmd), GFP_ATOMIC); | 175 | skb = bt_skb_alloc(HCI_COMMAND_HDR_SIZE + len, GFP_ATOMIC); |
176 | if (skb == NULL) { | 176 | if (skb == NULL) { |
177 | BT_ERR("No free skb"); | 177 | BT_ERR("No free skb"); |
178 | return -ENOMEM; | 178 | return -ENOMEM; |
179 | } | 179 | } |
180 | 180 | ||
181 | cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd)); | 181 | hdr = (struct hci_command_hdr *)skb_put(skb, HCI_COMMAND_HDR_SIZE); |
182 | cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, cmd_no)); | 182 | hdr->opcode = cpu_to_le16(hci_opcode_pack(OGF, cmd_no)); |
183 | cmd->length = len; | 183 | hdr->plen = len; |
184 | 184 | ||
185 | if (len) | 185 | if (len) |
186 | memcpy(cmd->data, param, len); | 186 | memcpy(skb_put(skb, len), param, len); |
187 | 187 | ||
188 | bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; | 188 | bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; |
189 | 189 | ||