Эх сурвалжийг харах

qcacld-3.0: send get status wake interval in multiples of TU

The current get params logic sends wake_interval_us
without converting to multiples of TU. Correct it to
send the get status wake interval in multiples of TU to the
userspace

Change-Id: Ib583581287f9440e438ef3296ea48ef1148ae083
CRs-Fixed: 2862651
Rajasekaran Kalidoss 4 жил өмнө
parent
commit
ae43f49618

+ 5 - 2
core/hdd/src/wlan_hdd_twt.c

@@ -500,6 +500,7 @@ hdd_twt_pack_get_params_resp_nlmsg(struct wlan_objmgr_psoc *psoc,
 	enum qca_wlan_twt_setup_state converted_state;
 	uint64_t tsf_val;
 	uint32_t wake_duration;
+	uint32_t wake_intvl_mantis_tu;
 	int i, attr;
 
 	config_attr = nla_nest_start(reply_skb,
@@ -576,15 +577,17 @@ hdd_twt_pack_get_params_resp_nlmsg(struct wlan_objmgr_psoc *psoc,
 		}
 
 		attr = QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_DURATION;
-		wake_duration = (params[i].wake_intvl_us /
+		wake_duration = (params[i].wake_dura_us /
 				 TWT_WAKE_DURATION_MULTIPLICATION_FACTOR);
 		if (nla_put_u32(reply_skb, attr, wake_duration)) {
 			hdd_err("TWT: get_params failed to put Wake duration");
 			return QDF_STATUS_E_INVAL;
 		}
 
+		wake_intvl_mantis_tu = params[i].wake_intvl_us /
+				       TWT_WAKE_INTVL_MULTIPLICATION_FACTOR;
 		attr = QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_INTVL_MANTISSA;
-		if (nla_put_u32(reply_skb, attr, params[i].wake_intvl_us)) {
+		if (nla_put_u32(reply_skb, attr, wake_intvl_mantis_tu)) {
 			hdd_err("TWT: get_params failed to put Wake Interval");
 			return QDF_STATUS_E_INVAL;
 		}