Bluetooth: Add mgmt HCI channel registration API
This patch adds an API for registering HCI channels with mgmt-like semantics. For now the only user will be HCI_CHANNEL_CONTROL, but e.g. 6lowpan is intended to use this as well in the future. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
committed by
Marcel Holtmann
parent
93690c227a
commit
801c1e8da5
@@ -1273,6 +1273,23 @@ void hci_send_to_monitor(struct hci_dev *hdev, struct sk_buff *skb);
|
||||
|
||||
void hci_sock_dev_event(struct hci_dev *hdev, int event);
|
||||
|
||||
struct hci_mgmt_handler {
|
||||
int (*func) (struct sock *sk, struct hci_dev *hdev, void *data,
|
||||
u16 data_len);
|
||||
bool var_len;
|
||||
size_t data_len;
|
||||
};
|
||||
|
||||
struct hci_mgmt_chan {
|
||||
struct list_head list;
|
||||
unsigned short channel;
|
||||
size_t handler_count;
|
||||
const struct hci_mgmt_handler *handlers;
|
||||
};
|
||||
|
||||
int hci_mgmt_chan_register(struct hci_mgmt_chan *c);
|
||||
void hci_mgmt_chan_unregister(struct hci_mgmt_chan *c);
|
||||
|
||||
/* Management interface */
|
||||
#define DISCOV_TYPE_BREDR (BIT(BDADDR_BREDR))
|
||||
#define DISCOV_TYPE_LE (BIT(BDADDR_LE_PUBLIC) | \
|
||||
|
||||
Reference in New Issue
Block a user