Browse Source

qcacmn: Handle new WMI param to support flexible TWT

This change is to handle new WMI param sp_start_offset. It
is use to pass value to fw to offset the start time of next SP.

Change-Id: Id3eb1cecdcdfc883c0620ad7f5cf18a50bd5256b
CRs-Fixed: 3266687
nakul kachhwaha 2 years ago
parent
commit
566ce9d06b

+ 2 - 0
umac/twt/dispatcher/inc/wlan_twt_public_structs.h

@@ -691,6 +691,7 @@ struct twt_pause_dialog_cmd_param {
  * @dialog_id: TWT dialog ID
  * @suspend_duration: TWT suspend duration in microseconds
  * @next_twt_size: next TWT size
+ * @sp_start_offset: value to offset the start of service period
  */
 struct twt_nudge_dialog_cmd_param {
 	uint32_t vdev_id;
@@ -698,6 +699,7 @@ struct twt_nudge_dialog_cmd_param {
 	uint32_t dialog_id;
 	uint32_t suspend_duration;
 	uint32_t next_twt_size;
+	int32_t sp_start_offset;
 };
 
 /* enum HOST_TWT_PAUSE_STATUS - status code of pause TWT dialog

+ 6 - 3
wmi/src/wmi_unified_twt_tlv.c

@@ -327,11 +327,14 @@ send_twt_nudge_dialog_cmd_tlv(wmi_unified_t wmi_handle,
 	cmd->dialog_id = params->dialog_id;
 	cmd->suspend_duration_ms = params->suspend_duration / 1000;
 	cmd->next_twt_size = params->next_twt_size;
+	cmd->sp_start_offset = params->sp_start_offset;
 
 	wmi_debug("vdev_id: %d dialog_id: %d duration(in ms): %u next_twt_size: %d "
-		  "peer_macaddr: "QDF_MAC_ADDR_FMT, cmd->vdev_id,
-		  cmd->dialog_id, cmd->suspend_duration_ms, cmd->next_twt_size,
-		  QDF_MAC_ADDR_REF(params->peer_macaddr.bytes));
+		  "peer_macaddr: " QDF_MAC_ADDR_FMT " sp_start_offset: %d",
+		  cmd->vdev_id, cmd->dialog_id, cmd->suspend_duration_ms,
+		  cmd->next_twt_size,
+		  QDF_MAC_ADDR_REF(params->peer_macaddr.bytes),
+		  cmd->sp_start_offset);
 
 	status = wmi_unified_cmd_send(wmi_handle, buf, sizeof(*cmd),
 				      WMI_TWT_NUDGE_DIALOG_CMDID);