Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4173ac8d authored by Surya Prakash Sivaraj's avatar Surya Prakash Sivaraj
Browse files

qcacld-3.0: Fix the TWT suspend operation command failure

TWT params are optional attributes for TWT suspend operation.
Do not mandate the check for TWT params for TWT suspend command.
Parse the TWT params if attribute is present in the suspend
command else use the default value.

Change-Id: I62fa5e0e8a9c0346957184b9578bdd273017df21
CRs-Fixed: 3027776
parent 0be03ac3
Loading
Loading
Loading
Loading
+15 −11
Original line number Diff line number Diff line
@@ -2728,7 +2728,9 @@ static int hdd_twt_pause_session(struct hdd_adapter *adapter,
	qdf_mem_copy(params.peer_macaddr, hdd_sta_ctx->conn_info.bssid.bytes,
		     QDF_MAC_ADDR_SIZE);
	params.vdev_id = adapter->vdev_id;
	params.dialog_id = 0;

	if (twt_param_attr) {
		ret = wlan_cfg80211_nla_parse_nested(tb,
					QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MAX,
					twt_param_attr,
@@ -2739,11 +2741,12 @@ static int hdd_twt_pause_session(struct hdd_adapter *adapter,
		}

		id = QCA_WLAN_VENDOR_ATTR_TWT_SETUP_FLOW_ID;
	if (tb[id]) {
		if (tb[id])
			params.dialog_id = nla_get_u8(tb[id]);
	} else {
		params.dialog_id = 0;
		else
			hdd_debug("TWT: FLOW_ID not specified. set to zero");
	} else {
		hdd_debug("TWT param not present. flow id set to zero");
	}

	status = hdd_twt_check_all_twt_support(adapter->hdd_ctx->psoc,
@@ -3877,7 +3880,8 @@ static int hdd_twt_configure(struct hdd_adapter *adapter,
	twt_param_attr = tb[id];

	if (!twt_param_attr &&
	    twt_oper != QCA_WLAN_TWT_GET_CAPABILITIES) {
	    twt_oper != QCA_WLAN_TWT_GET_CAPABILITIES &&
	    twt_oper != QCA_WLAN_TWT_SUSPEND) {
		hdd_err("TWT parameters NOT specified");
		return -EINVAL;
	}