ソースを参照

qcacmn: Add wake time absolute tsf value field in nudge command

In nudge response, FW sends wake TSF value. Implement changes
to handle wake TSF values.

Change-Id: I941f1dbab3ba83bba1f0b8e03b83d1b81365c7dd
CRs-Fixed: 2847181
Rajasekaran Kalidoss 4 年 前
コミット
9fc1e5f34b
2 ファイル変更12 行追加2 行削除
  1. 5 1
      wmi/inc/wmi_unified_twt_param.h
  2. 7 1
      wmi/src/wmi_unified_twt_tlv.c

+ 5 - 1
wmi/inc/wmi_unified_twt_param.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -519,12 +519,16 @@ enum WMI_HOST_NUDGE_TWT_STATUS {
  * @peer_macaddr: Peer mac address
  * @dialog_id: TWT dialog ID
  * @status: refer to WMI_HOST_PAUSE_TWT_STATUS
+ * @next_twt_tsf_us_lo: TSF lower bits (31:0) of next wake time
+ * @next_twt_tsf_us_hi: TSF higher bits (32:63) of next wake time
  */
 struct wmi_twt_nudge_dialog_complete_event_param {
 	uint32_t vdev_id;
 	uint8_t  peer_macaddr[QDF_MAC_ADDR_SIZE];
 	uint32_t dialog_id;
 	enum WMI_HOST_NUDGE_TWT_STATUS status;
+	uint32_t next_twt_tsf_us_lo;
+	uint32_t next_twt_tsf_us_hi;
 };
 
 /**

+ 7 - 1
wmi/src/wmi_unified_twt_tlv.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -703,6 +703,12 @@ static QDF_STATUS extract_twt_nudge_dialog_comp_event_tlv(
 	WMI_MAC_ADDR_TO_CHAR_ARRAY(&ev->peer_macaddr, params->peer_macaddr);
 	params->status = wmi_twt_nudge_status_to_host_twt_status(ev->status);
 	params->dialog_id = ev->dialog_id;
+	params->next_twt_tsf_us_lo = ev->sp_tsf_us_lo;
+	params->next_twt_tsf_us_hi = ev->sp_tsf_us_hi;
+
+	wmi_debug("vdev_id: %d dialog_id: %d tsf hi : %x tsf lo: %x",
+		  params->vdev_id, params->dialog_id,
+		  params->next_twt_tsf_us_hi, params->next_twt_tsf_us_lo);
 
 	return QDF_STATUS_SUCCESS;
 }