Commit 6368c235 authored by Eyal Birger's avatar Eyal Birger Committed by David S. Miller

net: bluetooth: compact struct bt_skb_cb by converting boolean fields to bit fields

Convert boolean fields incoming and req_start to bit fields and move
force_active in order save space in bt_skb_cb in an effort to use
a portion of skb->cb[] for storing skb->dropcount.
Signed-off-by: default avatarEyal Birger <eyal.birger@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 49a6fe05
...@@ -277,11 +277,11 @@ typedef void (*hci_req_complete_t)(struct hci_dev *hdev, u8 status, u16 opcode); ...@@ -277,11 +277,11 @@ typedef void (*hci_req_complete_t)(struct hci_dev *hdev, u8 status, u16 opcode);
struct bt_skb_cb { struct bt_skb_cb {
__u8 pkt_type; __u8 pkt_type;
__u8 incoming; __u8 force_active;
__u16 opcode; __u16 opcode;
__u16 expect; __u16 expect;
__u8 force_active; __u8 incoming:1;
bool req_start; __u8 req_start:1;
u8 req_event; u8 req_event;
hci_req_complete_t req_complete; hci_req_complete_t req_complete;
struct l2cap_chan *chan; struct l2cap_chan *chan;
......
...@@ -3517,7 +3517,7 @@ int hci_send_cmd(struct hci_dev *hdev, __u16 opcode, __u32 plen, ...@@ -3517,7 +3517,7 @@ int hci_send_cmd(struct hci_dev *hdev, __u16 opcode, __u32 plen,
/* Stand-alone HCI commands must be flagged as /* Stand-alone HCI commands must be flagged as
* single-command requests. * single-command requests.
*/ */
bt_cb(skb)->req_start = true; bt_cb(skb)->req_start = 1;
skb_queue_tail(&hdev->cmd_q, skb); skb_queue_tail(&hdev->cmd_q, skb);
queue_work(hdev->workqueue, &hdev->cmd_work); queue_work(hdev->workqueue, &hdev->cmd_work);
......
...@@ -116,7 +116,7 @@ void hci_req_add_ev(struct hci_request *req, u16 opcode, u32 plen, ...@@ -116,7 +116,7 @@ void hci_req_add_ev(struct hci_request *req, u16 opcode, u32 plen,
} }
if (skb_queue_empty(&req->cmd_q)) if (skb_queue_empty(&req->cmd_q))
bt_cb(skb)->req_start = true; bt_cb(skb)->req_start = 1;
bt_cb(skb)->req_event = event; bt_cb(skb)->req_event = event;
......
...@@ -965,7 +965,7 @@ static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock, ...@@ -965,7 +965,7 @@ static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
/* Stand-alone HCI commands must be flagged as /* Stand-alone HCI commands must be flagged as
* single-command requests. * single-command requests.
*/ */
bt_cb(skb)->req_start = true; bt_cb(skb)->req_start = 1;
skb_queue_tail(&hdev->cmd_q, skb); skb_queue_tail(&hdev->cmd_q, skb);
queue_work(hdev->workqueue, &hdev->cmd_work); queue_work(hdev->workqueue, &hdev->cmd_work);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment