瀏覽代碼

qcacld-3.0: Add support for new attribute in TWT setup command

Add support for QCA_WLAN_VENDOR_ATTR_TWT_SETUP_ANNOUNCE_TIMEOUT
attribute as part of TWT setup command. This attribute is used
to configure the announce timeout value (in us) in the firmware.
This timeout value is only applicable for the announced TWT. If
the timeout value is non-zero, the firmware waits up to the
timeout value to use Data frame as an announcement frame. If the
timeout value is 0, the firmware sends an explicit QoS NULL frame
as the announcement frame on SP start.

Change-Id: If7a9c761ef5a657cc1ecba81851291a4711e6c1f
CRs-Fixed: 3086816
Gaurav Sharma 3 年之前
父節點
當前提交
2ebb5a37c1
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      core/hdd/src/wlan_hdd_twt.c

+ 9 - 0
core/hdd/src/wlan_hdd_twt.c

@@ -77,6 +77,7 @@ qca_wlan_vendor_twt_add_dialog_policy[QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MAX + 1] =
 							.type = NLA_U8 },
 	[QCA_WLAN_VENDOR_ATTR_TWT_SETUP_BCAST_PERSISTENCE] = {.type = NLA_U8 },
 	[QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_TIME_TSF] = {.type = NLA_U64 },
+	[QCA_WLAN_VENDOR_ATTR_TWT_SETUP_ANNOUNCE_TIMEOUT] = {.type = NLA_U32 },
 };
 
 static const struct nla_policy
@@ -320,6 +321,12 @@ int hdd_twt_get_add_dialog_values(struct nlattr **tb,
 	else
 		params->wake_time_tsf = 0;
 
+	cmd_id = QCA_WLAN_VENDOR_ATTR_TWT_SETUP_ANNOUNCE_TIMEOUT;
+	if (tb[cmd_id])
+		params->announce_timeout_us = nla_get_u32(tb[cmd_id]);
+	else
+		params->announce_timeout_us = 0;
+
 	hdd_debug("twt: dialog_id %d, vdev %d, wake intvl_us %d, min %d, max %d, mantis %d",
 		  params->dialog_id, params->vdev_id, params->wake_intvl_us,
 		  params->min_wake_intvl_us, params->max_wake_intvl_us,
@@ -337,6 +344,8 @@ int hdd_twt_get_add_dialog_values(struct nlattr **tb,
 	hdd_debug("twt: peer mac_addr "
 		  QDF_MAC_ADDR_FMT,
 		  QDF_MAC_ADDR_REF(params->peer_macaddr));
+	hdd_debug("twt: announce timeout(in us) %u",
+		  params->announce_timeout_us);
 
 	return 0;
 }