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

Commit b1ed6440 authored by Dundi Raviteja's avatar Dundi Raviteja
Browse files

wlan: Drop received data packets if wcts state is closed

Drop received data packets from smd if WCTS state is closed.

Change-Id: I15f5b417517b7dc7fd5db16683c51195e42a04d4
CRs-Fixed: 2743417
parent 67d00c8f
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -492,6 +492,14 @@ int WCTS_smd_resp_process(struct rpmsg_device *rpdev,
	WCTS_ControlBlockType* wcts_cb = (WCTS_ControlBlockType*) priv;
	struct data_msg *msg;

	if (WCTS_STATE_REM_CLOSED == wcts_cb->wctsState) {
		WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
			"%s: received SMD data when wcts state is closed ",
			__func__);
		/* we should not be getting any data now */
		return 0;
	}

	gWdiSmdStats.smd_event_data++;

	msg = wpalMemoryAllocate(sizeof(*msg));