Return-path: Received: from mail-ww0-f44.google.com ([74.125.82.44]:55744 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751625Ab0K0A35 (ORCPT ); Fri, 26 Nov 2010 19:29:57 -0500 Received: by wwa36 with SMTP id 36so2644579wwa.1 for ; Fri, 26 Nov 2010 16:29:55 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <7537459.561290765440868.JavaMail.wlan@CHBU500181> References: <28511431.361290765324515.JavaMail.wlan@CHBU500181> <7537459.561290765440868.JavaMail.wlan@CHBU500181> Date: Sat, 27 Nov 2010 02:29:55 +0200 Message-ID: Subject: Re: [PATCH v6 9/9] ath5k: Fix reset and interrupts for AHB type of devices. From: Nick Kossifidis To: Wojciech Dubowik Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org, nbd@openwrt.org, ath5k-devel@lists.ath5k.org Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: MjAxMC8xMS8yNiBXb2pjaWVjaCBEdWJvd2lrIDxkdWJvd29qQG5lcmF0ZWMuY29tPjoKPiBGcm9t OiBGZWxpeCBGaWV0a2F1IDxuYmRAb3BlbndydC5vcmc+Cj4KPiBPbiBXaVNvYyB3ZSBjYW5ub3Qg YWNjZXNzIG1hYyByZWdpc3RlciBiZWZvcmUgaXQgaXMgcmVzZXR0ZWQuCj4gSXQgd2lsbCBjcmFz aCBoYXJkd2FyZSBvdGhlcndpc2UuCj4KPiBTaWduZWQtb2ZmLWJ5OiBGZWxpeCBGaWV0a2F1IDxu YmRAb3BlbndydC5vcmc+Cj4gU2lnbmVkLW9mZi1ieTogV29qY2llY2ggRHVib3dpayA8V29qY2ll Y2guRHVib3dpa0BuZXJhdGVjLmNvbT4KPiAtLS0KPiDCoGRyaXZlcnMvbmV0L3dpcmVsZXNzL2F0 aC9hdGg1ay9iYXNlLmMgwqB8IMKgIMKgNyArKy0KPiDCoGRyaXZlcnMvbmV0L3dpcmVsZXNz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