diff options
| author | Johan Hedberg <johan.hedberg@nokia.com> | 2010-12-16 03:17:38 -0500 |
|---|---|---|
| committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-02-07 22:40:04 -0500 |
| commit | eec8d2bcc841ae44edcde9660ff21144a2016053 (patch) | |
| tree | 32756650c2932b07b4c4fcd7184eadaed766e3b3 /include | |
| parent | 5add6af8fcbce269cac2457584c0ebfda055474a (diff) | |
Bluetooth: Add support for set_powered management command
This patch adds a set_powered command to the management interface
through which the powered state of local adapters can be controlled.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/bluetooth/hci_core.h | 3 | ||||
| -rw-r--r-- | include/net/bluetooth/mgmt.h | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 32e11b37ef28..2d046e07a586 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
| @@ -667,7 +667,8 @@ void *hci_sent_cmd_data(struct hci_dev *hdev, __u16 opcode); | |||
| 667 | void hci_si_event(struct hci_dev *hdev, int type, int dlen, void *data); | 667 | void hci_si_event(struct hci_dev *hdev, int type, int dlen, void *data); |
| 668 | 668 | ||
| 669 | /* ----- HCI Sockets ----- */ | 669 | /* ----- HCI Sockets ----- */ |
| 670 | void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb); | 670 | void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb, |
| 671 | struct sock *skip_sk); | ||
| 671 | 672 | ||
| 672 | /* Management interface */ | 673 | /* Management interface */ |
| 673 | int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len); | 674 | int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len); |
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index 0ac1520573ed..81ef78918b66 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h | |||
| @@ -58,6 +58,16 @@ struct mgmt_rp_read_info { | |||
| 58 | __u16 hci_rev; | 58 | __u16 hci_rev; |
| 59 | } __packed; | 59 | } __packed; |
| 60 | 60 | ||
| 61 | #define MGMT_OP_SET_POWERED 0x0005 | ||
| 62 | struct mgmt_cp_set_powered { | ||
| 63 | __le16 index; | ||
| 64 | __u8 powered; | ||
| 65 | } __packed; | ||
| 66 | struct mgmt_rp_set_powered { | ||
| 67 | __le16 index; | ||
| 68 | __u8 powered; | ||
| 69 | } __packed; | ||
| 70 | |||
| 61 | #define MGMT_EV_CMD_COMPLETE 0x0001 | 71 | #define MGMT_EV_CMD_COMPLETE 0x0001 |
| 62 | struct mgmt_ev_cmd_complete { | 72 | struct mgmt_ev_cmd_complete { |
| 63 | __le16 opcode; | 73 | __le16 opcode; |
