Return-path: Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:45957 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932775AbcKHLGz (ORCPT ); Tue, 8 Nov 2016 06:06:55 -0500 From: Xinming Hu To: Brian Norris , Xinming Hu CC: Linux Wireless , Kalle Valo , Dmitry Torokhov , Amitkumar Karwar , Cathy Luo , Shengzhen Li , Wei-Ning Huang Subject: RE: [PATCH v2 01/12] mwifiex: check tx_hw_pending before downloading sleep confirm Date: Tue, 8 Nov 2016 11:06:48 +0000 Message-ID: (sfid-20161108_120659_681410_572FDBE9) References: <1478002098-14189-1-git-send-email-huxinming820@marvell.com> <20161103161153.GA37095@google.com> In-Reply-To: <20161103161153.GA37095@google.com> Content-Type: text/plain; charset="gb2312" MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: SGkNCg0KPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBCcmlhbiBOb3JyaXMg W21haWx0bzpicmlhbm5vcnJpc0BjaHJvbWl1bS5vcmddDQo+IFNlbnQ6IDIwMTbE6jEx1MI0yNUg MDoxMg0KPiBUbzogWGlubWluZyBIdQ0KPiBDYzogTGludXggV2lyZWxlc3M7IEthbGxlIFZhbG87 IERtaXRyeSBUb3Jva2hvdjsgQW1pdGt1bWFyIEthcndhcjsgQ2F0aHkgTHVvOw0KPiBTaGVuZ3po ZW4gTGk7IFhpbm1pbmcgSHU7IFdlaS1OaW5nIEh1YW5nDQo+IFN1YmplY3Q6IFJlOiBbUEFUQ0gg djIgMDEvMTJdIG13aWZpZXg6IGNoZWNrIHR4X2h3X3BlbmRpbmcgYmVmb3JlDQo+IGRvd25sb2Fk aW5nIHNsZWVwIGNvbmZpcm0NCj4gDQo+ICsgV2VpLU5pbmcNCj4gDQo+IE9uIFR1ZSwgTm92IDAx LCAyMDE2IGF0IDA4OjA4OjE3UE0gKzA4MDAsIFhpbm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