Return-path: Received: from galiil.marvell.com ([199.203.130.254]:36510 "EHLO galiil.marvell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752340AbZI1Wmt (ORCPT ); Mon, 28 Sep 2009 18:42:49 -0400 From: Bing Zhao To: Dan Williams CC: "libertas-dev@lists.infradead.org" , "linux-wireless@vger.kernel.org" , Amitkumar Karwar Date: Mon, 28 Sep 2009 15:42:22 -0700 Subject: RE: [PATCH] libertas: Add auto deep sleep support for SD8385/SD8686/SD8688 Message-ID: <477F20668A386D41ADCC57781B1F704306DDA6C1B6@SC-VEXCH1.marvell.com> References: <1253058359-1934-1-git-send-email-bzhao@marvell.com> <1253458691.11702.46.camel@localhost.localdomain> In-Reply-To: <1253458691.11702.46.camel@localhost.localdomain> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: SGkgRGFuLA0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IERhbiBXaWxs aWFtcyBbbWFpbHRvOmRjYndAcmVkaGF0LmNvbV0NCj4gU2VudDogU3VuZGF5LCBTZXB0ZW1iZXIg MjAsIDIwMDkgNzo1OCBBTQ0KPiBUbzogQmluZyBaaGFvDQo+IENjOiBsaWJlcnRhcy1kZXZAbGlz dHMuaW5mcmFkZWFkLm9yZzsgbGludXgtd2lyZWxlc3NAdmdlci5rZXJuZWwub3JnOyBBbWl0a3Vt YXIgS2Fyd2FyDQo+IFN1YmplY3Q6IFJlOiBbUEFUQ0hdIGxpYmVydGFzOiBBZGQgYXV0byBkZWVw IHNsZWVwIHN1cHBvcnQgZm9yIFNEODM4NS9TRDg2ODYvU0Q4Njg4DQo+DQo+IE9uIFR1ZSwgMjAw OS0wOS0xNSBhdCAxNjo0NSAtMDcwMCwgQmluZyBaaGFvIHdyb3RlOg0KPiA+IEZyb206IEFtaXRr dW1hciBLYXJ3YXIgPGFrYXJ3YXJAbWFydmVsbC5jb20+DQo+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2ltcGxlIGNhbGxiYWNrIHRoYXQgY29waWVzIHJlc3BvbnNl IGJhY2sgaW50byBjb21tYW5kDQo+ID4gICAqDQo+ID4gQEAgLTMxOSw2ICszMTgsNjAgQEAgaW50 IGxic19jbWRfODAyXzExX3NsZWVwX3BhcmFtcyhzdHJ1Y3QgbGJzX3ByaXZhdGUgKnByaXYsIHVp bnQxNl90IGNtZF9hY3Rpb24sDQo+ID4gICAgIHJldHVybiAwOw0KPiA+ICB9DQo+ID4NCj4gPiAr c3RhdGljIGludCBsYnNfd2FpdF9mb3JfZHNfYXdha2Uoc3RydWN0IGxic19wcml2YXRlICpwcml2 KQ0KPiA+ICt7DQo+ID4gKyAgIGludCByZXQgPSAwOw0KPiA+ICsNCj4gPiArICAgbGJzX2RlYl9l bnRlcihMQlNfREVCX0NNRCk7DQo+ID4gKw0KPiA+ICsgICBpZiAocHJpdi0+aXNfZGVlcF9zbGVl cCkgew0KPiA+ICsgICAgICAgICAgIGlmICghd2FpdF9ldmVudF9pbnRlcnJ1cHRpYmxlX3RpbWVv dXQocHJpdi0+ZHNfYXdha2VfcSwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAhcHJpdi0+aXNfZGVlcF9zbGVlcCwgKDEwICogSFopKSkgew0KPiA+ICsgICAgICAgICAg ICAgICAgICAgbGJzX3ByX2VycigiZHNfYXdha2VfcTogdGltZXIgZXhwaXJlZFxuIik7DQo+ID4g KyAgICAgICAgICAgICAgICAgICByZXQgPSAtMTsNCj4gPiArICAgICAgICAgICB9DQo+ID4gKyAg IH0NCj4gPiArDQo+ID4gKyAgIGxic19kZWJfbGVhdmVfYXJncyhMQlNfREVCX0NNRCwgInJldCAl ZCIsIHJldCk7DQo+ID4gKyAgIHJldHVybiByZXQ7DQo+ID4gK30NCj4gPiArDQo+ID4gK2ludCBs YnNfc2V0X2RlZXBfc2xlZXAoc3RydWN0IGxic19wcml2YXRlICpwcml2LCBpbnQgZGVlcF9zbGVl cCkNCj4gPiArew0KPiA+ICsgICBpbnQgcmV0ID0gIDA7DQo+ID4gKw0KPiA+ICsgICBsYnNfZGVi X2VudGVyKExCU19ERUJfQ01EKTsNCj4gPiArDQo+ID4gKyAgIGlmIChkZWVwX3NsZWVwKSB7DQo+ ID4gKyAgICAgICAgICAgaWYgKHByaXYtPmlzX2RlZXBfc2xlZXAgIT0gMSkgew0KPiA+ICsgICAg ICAgICAgICAgICAgICAgbGJzX2RlYl9jbWQoImRlZXAgc2xlZXA6IHNsZWVwXG4iKTsNCj4gPiAr ICAgICAgICAgICAgICAgICAgIEJVR19PTighcHJpdi0+ZW50ZXJfZGVlcF9zbGVlcCk7DQo+ID4g KyAgICAgICAgICAgICAgICAgICByZXQgPSBwcml2LT5lbnRlcl9kZWVwX3NsZWVwKHByaXYpOw0K PiA+ICsgICAgICAgICAgICAgICAgICAgaWYgKCFyZXQpIHsNCj4gPiArICAgICAgICAgICAgICAg ICAgICAgICAgICAgbmV0aWZfc3RvcF9xdWV1ZShwcml2LT5kZXYpOw0KPiA+ICsgICAgICAgICAg ICAgICAgICAgICAgICAgICBuZXRpZl9jYXJyaWVyX29mZihwcml2LT5kZXYpOw0KPiA+ICsgICAg ICAgICAgICAgICAgICAgfQ0KPiA+ICsgICAgICAgICAgIH0gZWxzZSB7DQo+ID4gKyAgICAgICAg ICAgICAgICAgICBsYnNfcHJfZXJyKCJkZWVwIHNsZWVwOiBhbHJlYWR5IGVuYWJsZWRcbiIpOw0K PiA+ICsgICAgICAgICAgIH0NCj4gPiArICAgfSBlbHNlIHsNCj4gPiArICAgICAgICAgICBpZiAo cHJpdi0+aXNfZGVlcF9zbGVlcCkgew0KPiA+ICsgICAgICAgICAgICAgICAgICAgbGJzX2RlYl9j bWQoImRlZXAgc2xlZXA6IHdha2V1cFxuIik7DQo+ID4gKyAgICAgICAgICAgICAgICAgICBCVUdf T04oIXByaXYtPmV4aXRfZGVlcF9zbGVlcCk7DQo+ID4gKyAgICAgICAgICAgICAgICAgICByZXQg PSBwcml2LT5leGl0X2RlZXBfc2xlZXAocHJpdik7DQo+ID4gKyAgICAgICAgICAgICAgICAgICBp ZiAoIXJldCkgew0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICByZXQgPSBsYnNfd2Fp dF9mb3JfZHNfYXdha2UocHJpdik7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGlm IChyZXQpDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGJzX3ByX2Vy cigiZGVlcCBzbGVlcDogd2FrZXVwIg0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAiZmFpbGVkXG4iKTsNCj4gPiArICAgICAgICAgICAgICAg ICAgIH0NCj4gPiArICAgICAgICAgICB9DQo+ID4gKyAgIH0NCj4gPiArDQo+ID4gKyAgIGxic19k ZWJfbGVhdmVfYXJncyhMQlNfREVCX0NNRCwgInJldCAlZCIsIHJldCk7DQo+ID4gKyAgIHJldHVy biByZXQ7DQo+ID4gK30NCj4gPiArDQo+ID4gIGludCBsYnNfY21kXzgwMl8xMV9zZXRfd2VwKHN0 cnVjdCBsYnNfcHJpdmF0ZSAqcHJpdiwgdWludDE2X3QgY21kX2FjdGlvbiwNCj4gPiAgICAgICAg ICAgICAgICAgICAgICAgIHN0cnVjdCBhc3NvY19yZXF1ZXN0ICphc3NvYykNCj4gPiAgew0KPiA+ IEBAIC0xMjQyLDggKzEyOTUsMTcgQEAgc3RhdGljIHZvaWQgbGJzX3N1Ym1pdF9jb21tYW5kKHN0 cnVjdCBsYnNfcHJpdmF0ZSAqcHJpdiwNCj4gPiAgICAgICAgICAgICB0aW1lbyA9IEhaLzQ7DQo+ ID4gICAgIH0NCj4gPg0KPiA+IC0gICAvKiBTZXR1cCB0aGUgdGltZXIgYWZ0ZXIgdHJhbnNtaXQg Y29tbWFuZCAqLw0KPiA+IC0gICBtb2RfdGltZXIoJnByaXYtPmNvbW1hbmRfdGltZXIsIGppZmZp ZXMgKyB0aW1lbyk7DQo+ID4gKyAgIGlmIChjb21tYW5kID09IENNRF84MDJfMTFfREVFUF9TTEVF UCkgew0KPiA+ICsgICAgICAgICAgIGlmIChwcml2LT5pc19hdXRvX2RlZXBfc2xlZXBfZW5hYmxl ZCkgew0KPiA+ICsgICAgICAgICAgICAgICAgICAgcHJpdi0+d2FrZXVwX2Rldl9yZXF1aXJlZCA9 IDE7DQo+ID4gKyAgICAgICAgICAgICAgICAgICBwcml2LT5kbmxkX3NlbnQgPSAwOw0KPiA+ICsg ICAgICAgICAgIH0NCj4gPiArICAgICAgICAgICBwcml2LT5pc19kZWVwX3NsZWVwID0gMTsNCj4g PiArICAgICAgICAgICBsYnNfY29tcGxldGVfY29tbWFuZChwcml2LCBjbWRub2RlLCAwKTsNCj4g PiArICAgfSBlbHNlIHsNCj4gPiArICAgICAgICAgICAvKiBTZXR1cCB0aGUgdGltZXIgYWZ0ZXIg dHJhbnNtaXQgY29tbWFuZCAqLw0KPiA+ICsgICAgICAgICAgIG1vZF90aW1lcigmcHJpdi0+Y29t bWFuZF90aW1lciwgamlmZmllcyArIHRpbWVvKTsNCj4gPiArICAgfQ0KPiA+DQo+ID4gICAgIGxi c19kZWJfbGVhdmUoTEJTX0RFQl9IT1NUKTsNCj4gPiAgfQ0KPiA+IEBAIC0xNTA1LDYgKzE1Njcs MTAgQEAgaW50IGxic19wcmVwYXJlX2FuZF9zZW5kX2NvbW1hbmQoc3RydWN0IGxic19wcml2YXRl ICpwcml2LA0KPiA+ICAgICBjYXNlIENNRF84MDJfMTFfQkVBQ09OX0NUUkw6DQo+ID4gICAgICAg ICAgICAgcmV0ID0gbGJzX2NtZF9iY25fY3RybChwcml2LCBjbWRwdHIsIGNtZF9hY3Rpb24pOw0K PiA+ICAgICAgICAgICAgIGJyZWFrOw0KPiA+ICsgICBjYXNlIENNRF84MDJfMTFfREVFUF9TTEVF UDoNCj4gPiArICAgICAgICAgICBjbWRwdHItPmNvbW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gcG9z ICs9IHNucHJpbnRmKGJ1ZiwgbGVuLCAiJWQgJWRcbiIsDQo+ID4gKyAgICAgICAgICAgICAgICAg ICAgICAgICAgIHByaXYtPmlzX2F1dG9fZGVlcF9zbGVlcF9lbmFibGVkLA0KPiA+ICsgICAgICAg ICAgICAgICAgICAgICAgICAgICBwcml2LT5hdXRvX2RlZXBfc2xlZXBfdGltZW91dCk7DQo+ID4g KyAgIGVsc2UgaWYgKHByaXYtPmlzX2RlZXBfc2xlZXApDQo+ID4gKyAgICAgICAgICAgcG9zICs9 IHNucHJpbnRmKGJ1ZiwgbGVuLCAiJWQgJWRcbiIsDQo+ID4gKyAgICAgICAgICAgICAgICAgICAg ICAgICAgIHByaXYtPmlzX2RlZXBfc2xlZXAsDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAg ICAgIHByaXYtPmF1dG9fZGVlcF9zbGVlcF90aW1lb3V0KTsNCj4gPiArICAgZWxzZQ0KPiA+ICsg ICAgICAgICAgIHBvcyArPSBzbnByaW50ZihidWYsIGxlbiwgIiVkICVkXG4iLA0KPiA+ICsgICAg ICAgICAgICAgICAgICAgICAgICAgICBwcml2LT5pc19kZWVwX3NsZWVwLA0KPiA+ICsgICAgICAg ICAgICAgICAgICAgICAgICAgICBwcml2LT5hdXRvX2RlZXBfc2xlZXBfdGltZW91dCk7DQo+ID4g Kw0KPiA+ICsgICByZXQgPSBzaW1wbGVfcmVhZF9mcm9tX2J1ZmZlcih1c2VyYnVmLCBjb3VudCwg cHBvcywgYnVmLCBwb3MpOw0KPiA+ICsNCj4gPiArb3V0X2RzOg0KPiA+ICsgICBmcmVlX3BhZ2Uo YWRkcik7DQo+ID4gKyAgIHJldHVybiByZXQ7DQo+ID4gK30NCj4gPiArDQo+ID4gK3N0YXRpYyBz c2l6ZV90IGxic19kZWVwc2xlZXBfd3JpdGUoc3RydWN0IGZpbGUgKmZpbGUsDQo+ID4gKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBja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ICAgICAgcmVzID0gLUVJTlZBTDsNCj4gPiArICAgICAgICAgICBnb3RvIG91dF9kczsN Cj4gPiArICAgfQ0KPiA+ICsNCj4gPiArICAgYnVmX3NpemUgPSBtaW4oY291bnQsIGxlbiAtIDEp Ow0KPiA+ICsgICBpZiAoY29weV9mcm9tX3VzZXIoYnVmLCB1c2VyYnVmLCBidWZfc2l6ZSkpIHsN Cj4gPiArICAgICAgICAgICByZXMgPSAtRUZBVUxUOw0KPiA+ICsgICAgICAgICAgIGdvdG8gb3V0 X2RzOw0KPiA+ICsgICB9DQo+ID4gKw0KPiA+ICsgICByZXMgPSBzc2NhbmYoYnVmLCAiJWQgJWQi LCAmaXNfZGVlcF9zbGVlcCwgJmF1dG9fZGVlcF9zbGVlcF90aW1lb3V0KTsNCj4gPiArICAgaWYg KChyZXMgIT0gMikgfHwgKCFpc19kZWVwX3NsZWVwICYmIGF1dG9fZGVlcF9zbGVlcF90aW1lb3V0 KSB8fA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICEoKGlzX2RlZXBf c2xlZXAgPT0gMSkgfHwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo aXNfZGVlcF9zbGVlcCA9PSAwKSkpIHsNCj4gPiArICAgICAgICAgICBsYnNfcHJfZXJyKCJ1bmtu b3duIG9wdGlvblxuIik7DQo+ID4gKyAgICAgICAgICAgcmVzID0gLUVJTlZBTDsNCj4gPiArICAg ICAgICAgICBnb3RvIG91dF9kczsNCj4gPiArICAgfQ0KPiA+ICsNCj4gPiArICAgaWYgKGF1dG9f ZGVlcF9zbGVlcF90aW1lb3V0KSB7DQo+ID4gKyAgICAgICAgICAgaWYgKCFwcml2LT5pc19hdXRv X2RlZXBfc2xlZXBfZW5hYmxlZCkgew0KPiA+ICsgICAgICAgICAgICAgICAgICAgcHJpdi0+aXNf YWN0aXZpdHlfZGV0ZWN0ZWQgPSAwOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgcHJpdi0+YXV0 b19kZWVwX3NsZWVwX3RpbWVvdXQgPSBhdXRvX2RlZXBfc2xlZXBfdGltZW91dDsNCj4gPiArICAg ICAgICAgICAgICAgICAgIGxic19lbnRlcl9hdXRvX2RlZXBfc2xlZXAocHJpdik7DQo+ID4gKyAg ICAgICAgICAgfSBlbHNlIHsNCj4gPiArICAgICAgICAgICAgICAgICAgIHByaXYtPmF1dG9fZGVl cF9zbGVlcF90aW1lb3V0ID0gYXV0b19kZWVwX3NsZWVwX3RpbWVvdXQ7DQo+ID4gKyAgICAgICAg ICAgICAgICAgICBsYnNfZGViX2RlYnVnZnMoImF1dG8gZGVlcCBzbGVlcDogYWxyZWFkeSBlbmFi bGVkXG4iKTsNCj4gPiArICAgICAgICAgICB9DQo+ID4gKyAgIH0gZWxzZSB7DQo+ID4gKyAgICAg ICAgICAgaWYgKHByaXYtPmlzX2F1dG9fZGVlcF9zbGVlcF9lbmFibGVkKSB7DQo+ID4gKyAgICAg ICAgICAgICAgICAgICBsYnNfZXhpdF9hdXRvX2RlZXBfc2xlZXAocHJpdik7DQo+ID4gKyAgICAg ICAgICAgICAgICAgICAvKiBUcnkgdG8gZXhpdCBkZWVwIHNsZWVwIGlmIGF1dG8gZGVlcCBzbGVl cCBkaXNhYmxlZCAqLw0KPiA+ICsgICAgICAgICAgICAgICAgICAgcmVzID0gbGJzX3NldF9kZWVw X3NsZWVwKHByaXYsIDApOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgaWYgKHJlcykNCj4gPiAr ICAgICAgICAgICAgICAgICAgICAgICAgICAgZ290byBvdXRfZHM7DQo+ID4gKyAgICAgICAgICAg fQ0KPiA+ICsgICAgICAgICAgIGlmICgoaXNfZGVlcF9zbGVlcCA9PSAwKSB8fCAoaXNfZGVlcF9z bGVlcCA9PSAxKSkgew0KPiA+ICsgICAgICAgICAgICAgICAgICAgcmVzID0gbGJzX3NldF9kZWVw X3NsZWVwKHByaXYsIGlzX2RlZXBfc2xlZXApOw0KPiA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Qo+ID4gKyAgIHN0cnVj dCBpZl9zZGlvX2NhcmQgKmNhcmQgPSBwcml2LT5jYXJkOw0KPiA+ICsgICBpbnQgcmV0ID0gLTE7 DQo+ID4gKw0KPiA+ICsgICBsYnNfZGViX2VudGVyKExCU19ERUJfU0RJTyk7DQo+ID4gKyAgIHNk aW9fY2xhaW1faG9zdChjYXJkLT5mdW5jKTsNCj4gPiArDQo+ID4gKyAgIHNkaW9fd3JpdGViKGNh cmQtPmZ1bmMsIDAsIENPTkZJR1VSQVRJT05fUkVHLCAmcmV0KTsNCj4gPiArICAgaWYgKHJldCkN Cj4gPiArICAgICAgICAgICBsYnNfcHJfZXJyKCJzZGlvX3dyaXRlYiBmYWlsZWQhXG4iKTsNCj4g PiArDQo+ID4gKyAgIHNkaW9fcmVsZWFzZV9ob3N0KGNhcmQtPmZ1bmMpOw0KPiA+ICsgICBsYnNf ZGViX2xlYXZlX2FyZ3MoTEJTX0RFQl9TRElPLCAicmV0ICVkIiwgcmV0KTsNCj4gPiArICAgcmV0 dXJuIHJldDsNCj4gPiArDQo+ID4gK30NCj4gPiArDQo+ID4gIC8qKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KPiA+ICAv KiBTRElPIGNhbGxiYWNrcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKi8NCj4gPiAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiovDQo+ID4gQEAgLTg1OSw2ICs5MTEsNyBAQCBz dGF0aWMgdm9pZCBpZl9zZGlvX2ludGVycnVwdChzdHJ1Y3Qgc2Rpb19mdW5jICpmdW5jKQ0KPiA+ ICAgICAgKiBJZ25vcmUgdGhlIGRlZmluZSBuYW1lLCB0aGlzIHJlYWxseSBtZWFucyB0aGUgY2Fy ZCBoYXMNCj4gPiAgICAgICogc3VjY2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Y2VzcyBoYXJkd2FyZSBldmVu dHMsIGUuZy4gY2FyZCByZW1vdmVkLCBsaW5rIGxvc3QgKi8NCj4gPiArICAgICAgICAgICBzcGlu X2xvY2tfaXJxKCZwcml2LT5kcml2ZXJfbG9jayk7DQo+ID4gKyAgICAgICAgICAgd2hpbGUgKF9f a2ZpZm9fbGVuKHByaXYtPmV2ZW50X2ZpZm8pKSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICB1 MzIgZXZlbnQ7DQo+ID4gKyAgICAgICAgICAgICAgICAgICBfX2tmaWZvX2dldChwcml2LT5ldmVu dF9maWZvLCAodW5zaWduZWQgY2hhciAqKSAmZXZlbnQsDQo+ID4gKyAgICAgICAgICAgICAgICAg ICAgICAgICAgIHNpemVvZihldmVudCkpOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgc3Bpbl91 bmxvY2tfaXJxKCZwcml2LT5kcml2ZXJfbG9jayk7DQo+ID4gKyAgICAgICAgICAgICAgICAgICBs YnNfcHJvY2Vzc19ldmVudChwcml2LCBldmVudCk7DQo+ID4gKyAgICAgICAgICAgICAgICAgICBz cGluX2xvY2tfaXJxKCZwcml2LT5kcml2ZXJfbG9jayk7DQo+ID4gKyAgICAgICAgICAgfQ0KPiA+ ICsgICAgICAgICAgIHNwaW5fdW5sb2NrX2lycSgmcHJpdi0+ZHJpdmVyX2xvY2spOw0KPiA+ICsN Cj4gPiArICAgICAgICAgICBpZiAocHJpdi0+d2FrZXVwX2Rldl9yZXF1aXJlZCkgew0KPiA+ICsg ICAgICAgICAgICAgICAgICAgbGJzX2RlYl90aHJlYWQoIldha2luZyB1cCBkZXZpY2UuLi5cbiIp Ow0KPiA+ICsgICAgICAgICAgICAgICAgICAgLyogV2FrZSB1cCBkZXZpY2UgKi8NCj4gPiArICAg ICAgICAgICAgICAgICAgIGlmIChwcml2LT5leGl0X2RlZXBfc2xlZXAocHJpdikpDQo+ID4gKyAg ICAgICAgICAgICAgICAgICAgICAgICAgIGxic19kZWJfdGhyZWFkKCJXYWtldXAgZGV2aWNlIGZh aWxlZFxuIik7DQo+ID4gKyAgICAgICAgICAgICAgICAgICBjb250aW51ZTsNCj4gPiArICAgICAg ICAgICB9DQo+ID4gKw0KPiA+ICAgICAgICAgICAgIC8qIGNvbW1hbmQgdGltZW91dCBzdHVmZiAq Lw0KPiA+ICAgICAgICAgICAgIGlmIChwcml2LT5jbWRfdGltZWRfb3V0ICYmIHByaXYtPmN1cl9j bWQpIHsNCj4gPiAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjbWRfY3RybF9ub2RlICpjbWRu b2RlID0gcHJpdi0+Y3VyX2NtZDsNCj4gPiBAQCAtODQ5LDE4ICs4NzIsNyBAQCBzdGF0aWMgaW50 IGxic190aHJlYWQodm9pZCAqZGF0YSkNCj4gPiAgICAgICAgICAgICB9DQo+ID4gICAgICAgICAg ICAgcHJpdi0+Y21kX3RpbWVkX291dCA9IDA7DQo+ID4NCj4gPiAtICAgICAgICAgICAvKiBQcm9j ZXNzIGhhcmR3YXJlIGV2ZW50cywgZS5nLiBjYXJkIHJlbW92ZWQsIGxpbmsgbG9zdCAqLw0KPiA+ IC0gICAgICAgICAgIHNwaW5fbG9ja19pcnEoJnByaXYtPmRyaXZlcl9sb2NrKTsNCj4gPiAtICAg ICAgICAgICB3aGlsZSAoX19rZmlmb19sZW4ocHJpdi0+ZXZlbnRfZmlmbykpIHsNCj4gPiAtICAg ICAgICAgICAgICAgICAgIHUzMiBldmVudDsNCj4gPg0KPiA+IC0gICAgICAgICAgICAgICAgICAg X19rZmlmb19nZXQocHJpdi0+ZXZlbnRfZmlmbywgKHVuc2lnbmVkIGNoYXIgKikgJmV2ZW50LA0K PiA+IC0gICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YoZXZlbnQpKTsNCj4gPiAtICAg ICAgICAgICAgICAgICAgIHNwaW5fdW5sb2NrX2lycSgmcHJpdi0+ZHJpdmVyX2xvY2spOw0KPiA+ IC0gICAgICAgICAgICAgICAgICAgbGJzX3Byb2Nlc3NfZXZlbnQocHJpdiwgZXZlbnQpOw0KPiA+ IC0gICAgICAgICAgICAgICAgICAgc3Bpbl9sb2NrX2lycSgmcHJpdi0+ZHJpdmVyX2xvY2spOw0K PiA+IC0gICAgICAgICAgIH0NCj4gPiAtICAgICAgICAgICBzcGluX3VubG9ja19pcnEoJnByaXYt PmRyaXZlcl9sb2NrKTsNCj4gPg0KPiA+ICAgICAgICAgICAgIGlmICghcHJpdi0+ZndfcmVhZHkp DQo+ID4gICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsNCj4gPiBAQCAtODk0LDYgKzkwNiw5 IEBAIHN0YXRpYyBpbnQgbGJzX3RocmVhZCh2b2lkICpkYXRhKQ0KPiA+ICAgICAgICAgICAgICAg ICAocHJpdi0+cHNzdGF0ZSA9PSBQU19TVEFURV9QUkVfU0xFRVApKQ0KPiA+ICAgICAgICAgICAg ICAgICAgICAgY29udGludWU7DQo+ID4NCj4gPiArICAgICAgICAgICBpZiAocHJpdi0+aXNfZGVl cF9zbGVlcCkNCj4gPiArICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOw0KPiA+ICsNCj4gPiAg ICAgICAgICAgICAvKiBFeGVjdXRlIHRoZSBuZXh0IGNvbW1hbmQgKi8NCj4gPiAgICAgICAgICAg ICBpZiAoIXByaXYtPmRubGRfc2VudCAmJiAhcHJpdi0+Y3VyX2NtZCkNCj4gPiAgICAgICAgICAg ICAgICAgICAgIGxic19leGVjdXRlX25leHRfY29tbWFuZChwcml2KTsNCj4gPiBAQCAtOTI4LDYg Kzk0Myw3IEBAIHN0YXRpYyBpbnQgbGJzX3RocmVhZCh2b2lkICpkYXRhKQ0KPiA+ICAgICB9DQo+ ID4NCj4gPiAgICAgZGVsX3RpbWVyKCZwcml2LT5jb21tYW5kX3RpbWVyKTsNCj4gPiArICAgZGVs X3RpbWVyKCZwcml2LT5hdXRvX2RlZXBzbGVlcF90aW1lcik7DQo+ID4gICAgIHdha2VfdXBfYWxs KCZ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Q09OTkVDVEVEKSkgew0KPiA+ICsgICAgICAgICAgICAgICAgICAg bGJzX2RlYl9tYWluKCJFbnRlcmluZyBhdXRvIGRlZXAgc2xlZXAgbW9kZS4uLlxuIik7DQo+ID4g KyAgICAgICAgICAgICAgICAgICByZXQgPSBsYnNfcHJlcGFyZV9hbmRfc2VuZF9jb21tYW5kKHBy aXYsDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ01EXzgwMl8xMV9E RUVQX1NMRUVQLCAwLA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAs IDAsIE5VTEwpOw0KPiA+ICsgICAgICAgICAgIH0NCj4gPiArICAgfQ0KPiA+ICsgICBtb2RfdGlt ZXIoJnByaXYtPmF1dG9fZGVlcHNsZWVwX3RpbWVyICwgamlmZmllcyArDQo+ID4gKyAgICAgICAg ICAgICAgICAgICAgICAgICAgIChwcml2LT5hdXRvX2RlZXBfc2xlZXBfdGltZW91dCAqIEhaKS8x MDAwKTsNCj4gPiArICAgbGJzX2RlYl9sZWF2ZShMQlNfREVCX0NNRCk7DQo+ID4gK30NCj4gPiAr DQo+ID4gK2ludCBsYnNfZW50ZXJfYXV0b19kZWVwX3NsZWVwKHN0cnVjdCBsYnNfcHJpdmF0ZSAq cHJpdikNCj4gPiArew0KPiA+ICsgICBsYnNfZGViX2VudGVyKExCU19ERUJfU0RJTyk7DQo+ID4g Kw0KPiA+ICsgICBwcml2LT5pc19hdXRvX2RlZXBfc2xlZXBfZW5hYmxlZCA9IDE7DQo+ID4gKyAg IGlmIChwcml2LT5pc19kZWVwX3NsZWVwKQ0KPiA+ICsgICAgICAgICAgIHByaXYtPndha2V1cF9k ZXZfcmVxdWlyZWQgPSAxOw0KPiA+ICsgICBtb2RfdGltZXIoJnByaXYtPmF1dG9fZGVlcHNsZWVw X3RpbWVyICwNCj4gPiArICAgICAgICAgICAgICAgICAgIGppZmZpZXMgKyAocHJpdi0+YXV0b19k ZWV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