Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Johan Hedberg says: ==================== pull request: bluetooth-next 2015-08-16 Here's what's likely the last bluetooth-next pull request for 4.3: - 6lowpan/802.15.4 refactoring, cleanups & fixes - Document 6lowpan netdev usage in Documentation/networking/6lowpan.txt - Support for UART based QCA Bluetooth controllers - Power management support for Broeadcom Bluetooth controllers - Change LE connection initiation to always use passive scanning first - Support for new Silicon Wave USB ID Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -197,6 +197,27 @@
|
||||
#define LOWPAN_NHC_UDP_CS_P_11 0xF3 /* source & dest = 0xF0B + 4bit inline */
|
||||
#define LOWPAN_NHC_UDP_CS_C 0x04 /* checksum elided */
|
||||
|
||||
#define LOWPAN_PRIV_SIZE(llpriv_size) \
|
||||
(sizeof(struct lowpan_priv) + llpriv_size)
|
||||
|
||||
enum lowpan_lltypes {
|
||||
LOWPAN_LLTYPE_BTLE,
|
||||
LOWPAN_LLTYPE_IEEE802154,
|
||||
};
|
||||
|
||||
struct lowpan_priv {
|
||||
enum lowpan_lltypes lltype;
|
||||
|
||||
/* must be last */
|
||||
u8 priv[0] __aligned(sizeof(void *));
|
||||
};
|
||||
|
||||
static inline
|
||||
struct lowpan_priv *lowpan_priv(const struct net_device *dev)
|
||||
{
|
||||
return netdev_priv(dev);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
/* print data in line */
|
||||
static inline void raw_dump_inline(const char *caller, char *msg,
|
||||
@@ -372,6 +393,8 @@ lowpan_uncompress_size(const struct sk_buff *skb, u16 *dgram_offset)
|
||||
return skb->len + uncomp_header - ret;
|
||||
}
|
||||
|
||||
void lowpan_netdev_setup(struct net_device *dev, enum lowpan_lltypes lltype);
|
||||
|
||||
int
|
||||
lowpan_header_decompress(struct sk_buff *skb, struct net_device *dev,
|
||||
const u8 *saddr, const u8 saddr_type,
|
||||
|
||||
@@ -512,9 +512,11 @@ struct hci_conn_params {
|
||||
HCI_AUTO_CONN_DIRECT,
|
||||
HCI_AUTO_CONN_ALWAYS,
|
||||
HCI_AUTO_CONN_LINK_LOSS,
|
||||
HCI_AUTO_CONN_EXPLICIT,
|
||||
} auto_connect;
|
||||
|
||||
struct hci_conn *conn;
|
||||
bool explicit_connect;
|
||||
};
|
||||
|
||||
extern struct list_head hci_dev_list;
|
||||
@@ -639,6 +641,7 @@ enum {
|
||||
HCI_CONN_DROP,
|
||||
HCI_CONN_PARAM_REMOVAL_PEND,
|
||||
HCI_CONN_NEW_LINK_KEY,
|
||||
HCI_CONN_SCANNING,
|
||||
};
|
||||
|
||||
static inline bool hci_conn_ssp_enabled(struct hci_conn *conn)
|
||||
@@ -808,6 +811,26 @@ static inline struct hci_conn *hci_conn_hash_lookup_state(struct hci_dev *hdev,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct hci_conn *hci_lookup_le_connect(struct hci_dev *hdev)
|
||||
{
|
||||
struct hci_conn_hash *h = &hdev->conn_hash;
|
||||
struct hci_conn *c;
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
list_for_each_entry_rcu(c, &h->list, list) {
|
||||
if (c->type == LE_LINK && c->state == BT_CONNECT &&
|
||||
!test_bit(HCI_CONN_SCANNING, &c->flags)) {
|
||||
rcu_read_unlock();
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
rcu_read_unlock();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int hci_disconnect(struct hci_conn *conn, __u8 reason);
|
||||
bool hci_setup_sync(struct hci_conn *conn, __u16 handle);
|
||||
void hci_sco_setup(struct hci_conn *conn, __u8 status);
|
||||
@@ -823,6 +846,9 @@ void hci_chan_del(struct hci_chan *chan);
|
||||
void hci_chan_list_flush(struct hci_conn *conn);
|
||||
struct hci_chan *hci_chan_lookup_handle(struct hci_dev *hdev, __u16 handle);
|
||||
|
||||
struct hci_conn *hci_connect_le_scan(struct hci_dev *hdev, bdaddr_t *dst,
|
||||
u8 dst_type, u8 sec_level,
|
||||
u16 conn_timeout, u8 role);
|
||||
struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst,
|
||||
u8 dst_type, u8 sec_level, u16 conn_timeout,
|
||||
u8 role);
|
||||
@@ -988,6 +1014,9 @@ void hci_conn_params_clear_disabled(struct hci_dev *hdev);
|
||||
struct hci_conn_params *hci_pend_le_action_lookup(struct list_head *list,
|
||||
bdaddr_t *addr,
|
||||
u8 addr_type);
|
||||
struct hci_conn_params *hci_explicit_connect_lookup(struct hci_dev *hdev,
|
||||
bdaddr_t *addr,
|
||||
u8 addr_type);
|
||||
|
||||
void hci_uuids_clear(struct hci_dev *hdev);
|
||||
|
||||
|
||||
@@ -63,6 +63,8 @@ struct cfg802154_ops {
|
||||
s8 max_frame_retries);
|
||||
int (*set_lbt_mode)(struct wpan_phy *wpan_phy,
|
||||
struct wpan_dev *wpan_dev, bool mode);
|
||||
int (*set_ackreq_default)(struct wpan_phy *wpan_phy,
|
||||
struct wpan_dev *wpan_dev, bool ackreq);
|
||||
};
|
||||
|
||||
static inline bool
|
||||
@@ -173,6 +175,9 @@ struct wpan_dev {
|
||||
struct list_head list;
|
||||
struct net_device *netdev;
|
||||
|
||||
/* lowpan interface, set when the wpan_dev belongs to one lowpan_dev */
|
||||
struct net_device *lowpan_dev;
|
||||
|
||||
u32 identifier;
|
||||
|
||||
/* MAC PIB */
|
||||
@@ -193,6 +198,9 @@ struct wpan_dev {
|
||||
bool lbt;
|
||||
|
||||
bool promiscuous_mode;
|
||||
|
||||
/* fallback for acknowledgment bit setting */
|
||||
bool ackreq;
|
||||
};
|
||||
|
||||
#define to_phy(_dev) container_of(_dev, struct wpan_phy, dev)
|
||||
|
||||
@@ -52,6 +52,8 @@ enum nl802154_commands {
|
||||
|
||||
NL802154_CMD_SET_LBT_MODE,
|
||||
|
||||
NL802154_CMD_SET_ACKREQ_DEFAULT,
|
||||
|
||||
/* add new commands above here */
|
||||
|
||||
/* used to define NL802154_CMD_MAX below */
|
||||
@@ -104,6 +106,8 @@ enum nl802154_attrs {
|
||||
|
||||
NL802154_ATTR_SUPPORTED_COMMANDS,
|
||||
|
||||
NL802154_ATTR_ACKREQ_DEFAULT,
|
||||
|
||||
/* add attributes here, update the policy in nl802154.c */
|
||||
|
||||
__NL802154_ATTR_AFTER_LAST,
|
||||
|
||||
Reference in New Issue
Block a user