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

Commit a730bf45 authored by Jack Pham's avatar Jack Pham
Browse files

usb: gadget: rndis: Don't call netif_carrier_on/off for IPA



commit 35d3ad1b (f_qc_rndis: Fix issue with bus resume while using
Linux Host) added a new common function rndis_flow_control() which
handles suspend/resume as well as PACKET_FILTER messages. However,
the logic checking for IPA was incorrectly streamlined as:

	if (is_rndis_ipa_supported() &&
		params->state == RNDIS_DATA_INITIALIZED)
		...
	else
		...

when it should have been a nested if check:

	if (is_rndis_ipa_supported()) {
		if (params->state == RNDIS_DATA_INITIALIZED)
			...
	} else {
		...
	}

This fixes the behavior so that the "else" branch only gets
executed when IPA is not supported, not when either half of the
AND statement evaluates to false.

Change-Id: I6dcc709fb591c9793d8b733bb72e673e74259ead
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent e22a9bf6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment