From ad6f6e23b040c8efeb8cc553fe4421646df115d2 Mon Sep 17 00:00:00 2001 From: Kiran Venkatappa Date: Mon, 30 Jul 2018 12:04:42 +0530 Subject: [PATCH] qcacmn: Add twt req and responder flags in peer assoc params WMI_PEER_TWT_REQ and WMI_PEER_TWT_RESP flags are introduced in peer flags sent to FW in PEER_ASSOC_CMD. Add corresponding flags in host structure to indicate peer's support for TWT requester and TWT responder. Change-Id: Ic5edb594a95b255fe8ce1091d96c4d886b4d6170 CRs-Fixed: 2290026 --- wmi/inc/wmi_unified_param.h | 4 ++++ wmi/src/wmi_unified_tlv.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 49b78aa99c..894d9837f2 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -1196,6 +1196,8 @@ typedef struct { * @amsdu_disable: AMSDU disble * @peer_mac: Peer mac address * @he_flag: HE flags + * @twt_requester: TWT Requester Support bit in Extended Capabilities element + * @twt_responder: TWT Responder Support bit in Extended Capabilities element * @peer_he_cap_macinfo: Peer HE Cap MAC info * @peer_he_ops: Peer HE operation info * @peer_he_cap_phyinfo: Peer HE Cap PHY info @@ -1254,6 +1256,8 @@ struct peer_assoc_params { uint8_t peer_mac[IEEE80211_ADDR_LEN]; #endif bool he_flag; + bool twt_requester; + bool twt_responder; uint32_t peer_he_cap_macinfo; uint32_t peer_he_ops; uint32_t peer_he_cap_phyinfo[WMI_HOST_MAX_HECAP_PHY_SIZE]; diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 81b85c7743..df681b696d 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -2313,6 +2313,12 @@ static inline void copy_peer_flags_tlv( **/ if (param->peer_ht_rates.num_rates == 0) cmd->peer_flags &= ~WMI_PEER_HT; + + if (param->twt_requester) + cmd->peer_flags |= WMI_PEER_TWT_REQ; + + if (param->twt_responder) + cmd->peer_flags |= WMI_PEER_TWT_RESP; } #endif