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

Commit 3bcbdd26 authored by Lena Salman's avatar Lena Salman Committed by Gerrit - the friendly Code Review server
Browse files

drivers: usb: Stop transfers on MSG_HALT



Some of the versions of windows XP send MSG_HALT
without sending RNDIS_OID_GEN_CURRENT_PACKET_FILTER
before. This causes the interface to lose IP upon consequent
enable.
With this fix we close the transfer with the IPA correctly, and
allowing the next connect to open the connection correctly.

CRs-fixed: 711489
Change-Id: Iaf50803853581ff5bb1df4b3407e5614797defd1
Signed-off-by: default avatarLena Salman <esalman@codeaurora.org>
parent ef9db122
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -866,11 +866,17 @@ int rndis_msg_parser(u8 configNr, u8 *buf)
	case RNDIS_MSG_HALT:
		pr_debug("%s: RNDIS_MSG_HALT\n",
			__func__);
		params->state = RNDIS_UNINITIALIZED;

		if (!is_rndis_ipa_supported()) {
			if (params->dev) {
				netif_carrier_off(params->dev);
				netif_stop_queue(params->dev);
			}
		} else {
			if (params->state == RNDIS_DATA_INITIALIZED)
				u_bam_data_stop_rndis_ipa();
		}
		params->state = RNDIS_UNINITIALIZED;
		return 0;

	case RNDIS_MSG_QUERY:
+2 −0
Original line number Diff line number Diff line
@@ -1217,6 +1217,8 @@ void u_bam_data_start_rndis_ipa(void)

	if (!is_ipa_rndis_net_on)
		queue_work(bam_data_wq, rndis_conn_w);
	else
		pr_debug("%s: Transfers already started?\n", __func__);
}

void u_bam_data_stop_rndis_ipa(void)