diff options
| author | Maksim Krasnyanskiy <maxk@viper.qualcomm.com> | 2002-10-03 21:53:20 -0700 |
|---|---|---|
| committer | Maksim Krasnyanskiy <maxk@viper.qualcomm.com> | 2002-10-03 21:53:20 -0700 |
| commit | e4c609fe6dea9af8bb70b7ed9e6e4cafd00a2d1f (patch) | |
| tree | 7138105e001734c6262bed80c7f7d6f7c1492dfb /include | |
| parent | 706e54557b43681eae8eb0443eab33262f603127 (diff) | |
| parent | fcde38d442b6940b8094634835b962c1d8b8a3a7 (diff) | |
Merge bk://linux-bt.bkbits.net/bt-2.5
into viper.qualcomm.com:/usr/src/bt-2.5
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/bluetooth/bluetooth.h | 11 | ||||
| -rw-r--r-- | include/net/bluetooth/hci.h | 36 | ||||
| -rw-r--r-- | include/net/bluetooth/hci_core.h | 13 |
3 files changed, 21 insertions, 39 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index baa076bc2cbb..fd561cca76db 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h @@ -50,6 +50,7 @@ #define BTPROTO_HCI 1 #define BTPROTO_SCO 2 #define BTPROTO_RFCOMM 3 +#define BTPROTO_BNEP 4 #define SOL_HCI 0 #define SOL_L2CAP 6 @@ -199,14 +200,4 @@ int hci_sock_cleanup(void); int bterr(__u16 code); -#ifndef MODULE_LICENSE -#define MODULE_LICENSE(x) -#endif - -#ifndef list_for_each_safe -#define list_for_each_safe(pos, n, head) \ - for (pos = (head)->next, n = pos->next; pos != (head); \ - pos = n, n = pos->next) -#endif - #endif /* __BLUETOOTH_H */ diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 3fa7b3032c88..b58ebef5397b 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -113,10 +113,10 @@ enum { #define ACL_PTYPE_MASK (~SCO_PTYPE_MASK) /* ACL flags */ -#define ACL_CONT 0x0001 -#define ACL_START 0x0002 -#define ACL_ACTIVE_BCAST 0x0010 -#define ACL_PICO_BCAST 0x0020 +#define ACL_CONT 0x01 +#define ACL_START 0x02 +#define ACL_ACTIVE_BCAST 0x04 +#define ACL_PICO_BCAST 0x08 /* Baseband links */ #define SCO_LINK 0x00 @@ -542,7 +542,7 @@ typedef struct { bdaddr_t bdaddr; __u8 role; } __attribute__ ((packed)) evt_role_change; -#define EVT_ROLE_CHANGE_SIZE 1 +#define EVT_ROLE_CHANGE_SIZE 8 #define EVT_PIN_CODE_REQ 0x16 typedef struct { @@ -658,9 +658,15 @@ struct sockaddr_hci { #define HCI_DEV_NONE 0xffff struct hci_filter { - __u32 type_mask; - __u32 event_mask[2]; - __u16 opcode; + unsigned long type_mask; + unsigned long event_mask[2]; + __u16 opcode; +}; + +struct hci_ufilter { + __u32 type_mask; + __u32 event_mask[2]; + __u16 opcode; }; #define HCI_FLT_TYPE_BITS 31 @@ -668,20 +674,6 @@ struct hci_filter { #define HCI_FLT_OGF_BITS 63 #define HCI_FLT_OCF_BITS 127 -#if BITS_PER_LONG == 64 -static inline void hci_set_bit(int nr, void *addr) -{ - *((__u32 *) addr + (nr >> 5)) |= ((__u32) 1 << (nr & 31)); -} -static inline int hci_test_bit(int nr, void *addr) -{ - return *((__u32 *) addr + (nr >> 5)) & ((__u32) 1 << (nr & 31)); -} -#else -#define hci_set_bit set_bit -#define hci_test_bit test_bit -#endif - /* Ioctl requests structures */ struct hci_dev_stats { __u32 err_rx; diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 15cca8727616..1740cde1287d 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -149,7 +149,7 @@ struct hci_conn { extern struct hci_proto *hci_proto[]; extern struct list_head hdev_list; -extern spinlock_t hdev_list_lock; +extern rwlock_t hdev_list_lock; /* ----- Inquiry cache ----- */ #define INQUIRY_CACHE_AGE_MAX (HZ*30) // 30 seconds @@ -339,8 +339,8 @@ static inline void hci_sched_tx(struct hci_dev *hdev) /* ----- HCI protocols ----- */ struct hci_proto { char *name; - __u32 id; - __u32 flags; + unsigned int id; + unsigned long flags; void *priv; @@ -450,12 +450,11 @@ struct hci_pinfo { #define HCI_SFLT_MAX_OGF 4 struct hci_sec_filter { - __u32 type_mask; - __u32 event_mask[2]; - __u32 ocf_mask[HCI_SFLT_MAX_OGF + 1][4]; + unsigned long type_mask; + unsigned long event_mask[2]; + unsigned long ocf_mask[HCI_SFLT_MAX_OGF + 1][4]; }; - /* ----- HCI requests ----- */ #define HCI_REQ_DONE 0 #define HCI_REQ_PEND 1 |
