diff options
author | Kalle Valo <kvalo@qca.qualcomm.com> | 2014-07-24 13:06:37 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2014-07-24 13:06:37 -0400 |
commit | 30d88ce331d566f496fe7bea25ee560dcfd253ae (patch) | |
tree | a1dfe71a00fad0fa20693c350557609f8ecf9d36 /include | |
parent | c29a380e4a8157f8bf6a91c216a77439a293c93d (diff) | |
parent | bac9832076ee3b134bc859e07698c99276fc9459 (diff) |
Merge remote-tracking branch 'wireless-next/master' into ath-next
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ieee80211.h | 20 | ||||
-rw-r--r-- | include/net/bluetooth/hci.h | 6 | ||||
-rw-r--r-- | include/net/bluetooth/hci_core.h | 20 | ||||
-rw-r--r-- | include/net/bluetooth/l2cap.h | 2 | ||||
-rw-r--r-- | include/net/mac80211.h | 34 |
5 files changed, 72 insertions, 10 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 75d17e15da33..63ab3873c5ed 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -1001,6 +1001,26 @@ struct ieee80211_vendor_ie { | |||
1001 | u8 oui_type; | 1001 | u8 oui_type; |
1002 | } __packed; | 1002 | } __packed; |
1003 | 1003 | ||
1004 | struct ieee80211_wmm_ac_param { | ||
1005 | u8 aci_aifsn; /* AIFSN, ACM, ACI */ | ||
1006 | u8 cw; /* ECWmin, ECWmax (CW = 2^ECW - 1) */ | ||
1007 | __le16 txop_limit; | ||
1008 | } __packed; | ||
1009 | |||
1010 | struct ieee80211_wmm_param_ie { | ||
1011 | u8 element_id; /* Element ID: 221 (0xdd); */ | ||
1012 | u8 len; /* Length: 24 */ | ||
1013 | /* required fields for WMM version 1 */ | ||
1014 | u8 oui[3]; /* 00:50:f2 */ | ||
1015 | u8 oui_type; /* 2 */ | ||
1016 | u8 oui_subtype; /* 1 */ | ||
1017 | u8 version; /* 1 for WMM version 1.0 */ | ||
1018 | u8 qos_info; /* AP/STA specific QoS info */ | ||
1019 | u8 reserved; /* 0 */ | ||
1020 | /* AC_BE, AC_BK, AC_VI, AC_VO */ | ||
1021 | struct ieee80211_wmm_ac_param ac[4]; | ||
1022 | } __packed; | ||
1023 | |||
1004 | /* Control frames */ | 1024 | /* Control frames */ |
1005 | struct ieee80211_rts { | 1025 | struct ieee80211_rts { |
1006 | __le16 frame_control; | 1026 | __le16 frame_control; |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 2fee852816ee..f0a3d8890760 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -401,6 +401,9 @@ enum { | |||
401 | /* The core spec defines 127 as the "not available" value */ | 401 | /* The core spec defines 127 as the "not available" value */ |
402 | #define HCI_TX_POWER_INVALID 127 | 402 | #define HCI_TX_POWER_INVALID 127 |
403 | 403 | ||
404 | #define HCI_ROLE_MASTER 0x00 | ||
405 | #define HCI_ROLE_SLAVE 0x01 | ||
406 | |||
404 | /* Extended Inquiry Response field types */ | 407 | /* Extended Inquiry Response field types */ |
405 | #define EIR_FLAGS 0x01 /* flags */ | 408 | #define EIR_FLAGS 0x01 /* flags */ |
406 | #define EIR_UUID16_SOME 0x02 /* 16-bit UUID, more available */ | 409 | #define EIR_UUID16_SOME 0x02 /* 16-bit UUID, more available */ |
@@ -1713,9 +1716,6 @@ struct hci_ev_sync_train_complete { | |||
1713 | 1716 | ||
1714 | #define HCI_EV_SLAVE_PAGE_RESP_TIMEOUT 0x54 | 1717 | #define HCI_EV_SLAVE_PAGE_RESP_TIMEOUT 0x54 |
1715 | 1718 | ||
1716 | /* Low energy meta events */ | ||
1717 | #define LE_CONN_ROLE_MASTER 0x00 | ||
1718 | |||
1719 | #define HCI_EV_LE_CONN_COMPLETE 0x01 | 1719 | #define HCI_EV_LE_CONN_COMPLETE 0x01 |
1720 | struct hci_ev_le_conn_complete { | 1720 | struct hci_ev_le_conn_complete { |
1721 | __u8 status; | 1721 | __u8 status; |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index b52c2ef3f56d..996ed065b6c2 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -83,6 +83,7 @@ struct hci_conn_hash { | |||
83 | unsigned int amp_num; | 83 | unsigned int amp_num; |
84 | unsigned int sco_num; | 84 | unsigned int sco_num; |
85 | unsigned int le_num; | 85 | unsigned int le_num; |
86 | unsigned int le_num_slave; | ||
86 | }; | 87 | }; |
87 | 88 | ||
88 | struct bdaddr_list { | 89 | struct bdaddr_list { |
@@ -371,6 +372,7 @@ struct hci_conn { | |||
371 | __u16 state; | 372 | __u16 state; |
372 | __u8 mode; | 373 | __u8 mode; |
373 | __u8 type; | 374 | __u8 type; |
375 | __u8 role; | ||
374 | bool out; | 376 | bool out; |
375 | __u8 attempt; | 377 | __u8 attempt; |
376 | __u8 dev_class[3]; | 378 | __u8 dev_class[3]; |
@@ -540,12 +542,12 @@ enum { | |||
540 | HCI_CONN_POWER_SAVE, | 542 | HCI_CONN_POWER_SAVE, |
541 | HCI_CONN_REMOTE_OOB, | 543 | HCI_CONN_REMOTE_OOB, |
542 | HCI_CONN_FLUSH_KEY, | 544 | HCI_CONN_FLUSH_KEY, |
543 | HCI_CONN_MASTER, | ||
544 | HCI_CONN_ENCRYPT, | 545 | HCI_CONN_ENCRYPT, |
545 | HCI_CONN_AUTH, | 546 | HCI_CONN_AUTH, |
546 | HCI_CONN_SECURE, | 547 | HCI_CONN_SECURE, |
547 | HCI_CONN_FIPS, | 548 | HCI_CONN_FIPS, |
548 | HCI_CONN_STK_ENCRYPT, | 549 | HCI_CONN_STK_ENCRYPT, |
550 | HCI_CONN_AUTH_INITIATOR, | ||
549 | }; | 551 | }; |
550 | 552 | ||
551 | static inline bool hci_conn_ssp_enabled(struct hci_conn *conn) | 553 | static inline bool hci_conn_ssp_enabled(struct hci_conn *conn) |
@@ -575,6 +577,8 @@ static inline void hci_conn_hash_add(struct hci_dev *hdev, struct hci_conn *c) | |||
575 | break; | 577 | break; |
576 | case LE_LINK: | 578 | case LE_LINK: |
577 | h->le_num++; | 579 | h->le_num++; |
580 | if (c->role == HCI_ROLE_SLAVE) | ||
581 | h->le_num_slave++; | ||
578 | break; | 582 | break; |
579 | case SCO_LINK: | 583 | case SCO_LINK: |
580 | case ESCO_LINK: | 584 | case ESCO_LINK: |
@@ -599,6 +603,8 @@ static inline void hci_conn_hash_del(struct hci_dev *hdev, struct hci_conn *c) | |||
599 | break; | 603 | break; |
600 | case LE_LINK: | 604 | case LE_LINK: |
601 | h->le_num--; | 605 | h->le_num--; |
606 | if (c->role == HCI_ROLE_SLAVE) | ||
607 | h->le_num_slave--; | ||
602 | break; | 608 | break; |
603 | case SCO_LINK: | 609 | case SCO_LINK: |
604 | case ESCO_LINK: | 610 | case ESCO_LINK: |
@@ -695,7 +701,8 @@ void hci_disconnect(struct hci_conn *conn, __u8 reason); | |||
695 | bool hci_setup_sync(struct hci_conn *conn, __u16 handle); | 701 | bool hci_setup_sync(struct hci_conn *conn, __u16 handle); |
696 | void hci_sco_setup(struct hci_conn *conn, __u8 status); | 702 | void hci_sco_setup(struct hci_conn *conn, __u8 status); |
697 | 703 | ||
698 | struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst); | 704 | struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst, |
705 | u8 role); | ||
699 | int hci_conn_del(struct hci_conn *conn); | 706 | int hci_conn_del(struct hci_conn *conn); |
700 | void hci_conn_hash_flush(struct hci_dev *hdev); | 707 | void hci_conn_hash_flush(struct hci_dev *hdev); |
701 | void hci_conn_check_pending(struct hci_dev *hdev); | 708 | void hci_conn_check_pending(struct hci_dev *hdev); |
@@ -707,14 +714,15 @@ struct hci_chan *hci_chan_lookup_handle(struct hci_dev *hdev, __u16 handle); | |||
707 | 714 | ||
708 | struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst, | 715 | struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst, |
709 | u8 dst_type, u8 sec_level, u16 conn_timeout, | 716 | u8 dst_type, u8 sec_level, u16 conn_timeout, |
710 | bool master); | 717 | u8 role); |
711 | struct hci_conn *hci_connect_acl(struct hci_dev *hdev, bdaddr_t *dst, | 718 | struct hci_conn *hci_connect_acl(struct hci_dev *hdev, bdaddr_t *dst, |
712 | u8 sec_level, u8 auth_type); | 719 | u8 sec_level, u8 auth_type); |
713 | struct hci_conn *hci_connect_sco(struct hci_dev *hdev, int type, bdaddr_t *dst, | 720 | struct hci_conn *hci_connect_sco(struct hci_dev *hdev, int type, bdaddr_t *dst, |
714 | __u16 setting); | 721 | __u16 setting); |
715 | int hci_conn_check_link_mode(struct hci_conn *conn); | 722 | int hci_conn_check_link_mode(struct hci_conn *conn); |
716 | int hci_conn_check_secure(struct hci_conn *conn, __u8 sec_level); | 723 | int hci_conn_check_secure(struct hci_conn *conn, __u8 sec_level); |
717 | int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type); | 724 | int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type, |
725 | bool initiator); | ||
718 | int hci_conn_change_link_key(struct hci_conn *conn); | 726 | int hci_conn_change_link_key(struct hci_conn *conn); |
719 | int hci_conn_switch_role(struct hci_conn *conn, __u8 role); | 727 | int hci_conn_switch_role(struct hci_conn *conn, __u8 role); |
720 | 728 | ||
@@ -881,12 +889,12 @@ struct link_key *hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, | |||
881 | bdaddr_t *bdaddr, u8 *val, u8 type, | 889 | bdaddr_t *bdaddr, u8 *val, u8 type, |
882 | u8 pin_len, bool *persistent); | 890 | u8 pin_len, bool *persistent); |
883 | struct smp_ltk *hci_find_ltk(struct hci_dev *hdev, __le16 ediv, __le64 rand, | 891 | struct smp_ltk *hci_find_ltk(struct hci_dev *hdev, __le16 ediv, __le64 rand, |
884 | bool master); | 892 | u8 role); |
885 | struct smp_ltk *hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, | 893 | struct smp_ltk *hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, |
886 | u8 addr_type, u8 type, u8 authenticated, | 894 | u8 addr_type, u8 type, u8 authenticated, |
887 | u8 tk[16], u8 enc_size, __le16 ediv, __le64 rand); | 895 | u8 tk[16], u8 enc_size, __le16 ediv, __le64 rand); |
888 | struct smp_ltk *hci_find_ltk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr, | 896 | struct smp_ltk *hci_find_ltk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr, |
889 | u8 addr_type, bool master); | 897 | u8 addr_type, u8 role); |
890 | int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 bdaddr_type); | 898 | int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 bdaddr_type); |
891 | void hci_smp_ltks_clear(struct hci_dev *hdev); | 899 | void hci_smp_ltks_clear(struct hci_dev *hdev); |
892 | int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); | 900 | int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); |
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 1fffd92808b0..8df15ad0d43f 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -905,7 +905,7 @@ int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid, | |||
905 | bdaddr_t *dst, u8 dst_type); | 905 | bdaddr_t *dst, u8 dst_type); |
906 | int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len); | 906 | int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len); |
907 | void l2cap_chan_busy(struct l2cap_chan *chan, int busy); | 907 | void l2cap_chan_busy(struct l2cap_chan *chan, int busy); |
908 | int l2cap_chan_check_security(struct l2cap_chan *chan); | 908 | int l2cap_chan_check_security(struct l2cap_chan *chan, bool initiator); |
909 | void l2cap_chan_set_defaults(struct l2cap_chan *chan); | 909 | void l2cap_chan_set_defaults(struct l2cap_chan *chan); |
910 | int l2cap_ertm_init(struct l2cap_chan *chan); | 910 | int l2cap_ertm_init(struct l2cap_chan *chan); |
911 | void l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan); | 911 | void l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan); |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 9ce5cb17ed82..dae2e24616e1 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -4552,6 +4552,40 @@ void ieee80211_stop_rx_ba_session(struct ieee80211_vif *vif, u16 ba_rx_bitmap, | |||
4552 | */ | 4552 | */ |
4553 | void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn); | 4553 | void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn); |
4554 | 4554 | ||
4555 | /** | ||
4556 | * ieee80211_start_rx_ba_session_offl - start a Rx BA session | ||
4557 | * | ||
4558 | * Some device drivers may offload part of the Rx aggregation flow including | ||
4559 | * AddBa/DelBa negotiation but may otherwise be incapable of full Rx | ||
4560 | * reordering. | ||
4561 | * | ||
4562 | * Create structures responsible for reordering so device drivers may call here | ||
4563 | * when they complete AddBa negotiation. | ||
4564 | * | ||
4565 | * @vif: &struct ieee80211_vif pointer from the add_interface callback | ||
4566 | * @addr: station mac address | ||
4567 | * @tid: the rx tid | ||
4568 | */ | ||
4569 | void ieee80211_start_rx_ba_session_offl(struct ieee80211_vif *vif, | ||
4570 | const u8 *addr, u16 tid); | ||
4571 | |||
4572 | /** | ||
4573 | * ieee80211_stop_rx_ba_session_offl - stop a Rx BA session | ||
4574 | * | ||
4575 | * Some device drivers may offload part of the Rx aggregation flow including | ||
4576 | * AddBa/DelBa negotiation but may otherwise be incapable of full Rx | ||
4577 | * reordering. | ||
4578 | * | ||
4579 | * Destroy structures responsible for reordering so device drivers may call here | ||
4580 | * when they complete DelBa negotiation. | ||
4581 | * | ||
4582 | * @vif: &struct ieee80211_vif pointer from the add_interface callback | ||
4583 | * @addr: station mac address | ||
4584 | * @tid: the rx tid | ||
4585 | */ | ||
4586 | void ieee80211_stop_rx_ba_session_offl(struct ieee80211_vif *vif, | ||
4587 | const u8 *addr, u16 tid); | ||
4588 | |||
4555 | /* Rate control API */ | 4589 | /* Rate control API */ |
4556 | 4590 | ||
4557 | /** | 4591 | /** |