Return-path: Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:43049 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933352AbcJUPuS (ORCPT ); Fri, 21 Oct 2016 11:50:18 -0400 From: Amitkumar Karwar To: Johannes Berg CC: Kalle Valo , Brian Norris , Nishant Sarmukadam , Cathy Luo , "linux-wireless@vger.kernel.org" , "Ganapathi Bhat" Subject: RE: cfg80211: race problem between suspend and disconnect event Date: Fri, 21 Oct 2016 15:48:52 +0000 Message-ID: <7af766c43f2f426b8db177f8d4e67031@SC-EXCH04.marvell.com> (sfid-20161021_175022_808079_2F652704) References: <67400d1c5c2141b3af75bdce9ec43840@SC-EXCH04.marvell.com> <1476989132.14078.12.camel@sipsolutions.net> In-Reply-To: <1476989132.14078.12.camel@sipsolutions.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: SGkgSm9oYW5uZXMsDQoNCj4gRnJvbTogSm9oYW5uZXMgQmVyZyBbbWFpbHRvOmpvaGFubmVzQHNp cHNvbHV0aW9ucy5uZXRdDQo+IFNlbnQ6IEZyaWRheSwgT2N0b2JlciAyMSwgMjAxNiAxMjoxNiBB TQ0KPiBUbzogQW1pdGt1bWFyIEthcndhcg0KPiBDYzogS2FsbGUgVmFsbzsgQnJpYW4gTm9ycmlz OyBOaXNoYW50IFNhcm11a2FkYW07IENhdGh5IEx1bzsgbGludXgtDQo+IHdpcmVsZXNzQHZnZXIu a2VybmVsLm9yZzsgR2FuYXBhdGhpIEJoYXQNCj4gU3ViamVjdDogUmU6IGNmZzgwMjExOiByYWNl IHByb2JsZW0gYmV0d2VlbiBzdXNwZW5kIGFuZCBkaXNjb25uZWN0IGV2ZW50DQo+IA0KPiBIaSwN Cj4gDQo+ID4gTXdpZmlleCBkcml2ZXIgcmVqZWN0cyBkZWxfa2V5KCkgcmVxdWVzdHMgZnJvbSBj Zmc4MDIxMSBk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