Return-path: Received: from web28308.mail.ukl.yahoo.com ([87.248.110.127]:32797 "HELO web28308.mail.ukl.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754217AbZIGSxv (ORCPT ); Mon, 7 Sep 2009 14:53:51 -0400 Message-ID: <80555.93921.qm@web28308.mail.ukl.yahoo.com> Date: Mon, 7 Sep 2009 18:47:12 +0000 (GMT) From: Albert Herranz Subject: [PATCH RFC 2/3] sdio: pass unknown cis tuples to sdio drivers To: bcm43xx-dev@lists.berlios.de Cc: linux-mmc@vger.kernel.org, linux-wireless@vger.kernel.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1081116690-1252349232=:93921" Sender: linux-wireless-owner@vger.kernel.org List-ID: --0-1081116690-1252349232=:93921 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =0A=0A=0A --0-1081116690-1252349232=:93921 Content-Type: text/x-patch; name="0117-sdio-pass-unknown-cis-tuples-to-sdio-drivers.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0117-sdio-pass-unknown-cis-tuples-to-sdio-drivers.patch" RnJvbSBiYjg4ODQ2MWRjZWI4NWU0M2I5YzFmYzk1NTlmMDEyZGZlYjE5Njg4 IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBBbGJlcnQgSGVycmFu eiA8YWxiZXJ0X2hlcnJhbnpAeWFob28uZXM+CkRhdGU6IFR1ZSwgMTggQXVn IDIwMDkgMjE6MjQ6MTEgKzAyMDAKU3ViamVjdDogW1BBVENIXSBzZGlvOiBw YXNzIHVua25vd24gY2lzIHR1cGxlcyB0byBzZGlvIGRyaXZlcnMKClNvbWUg bWFudWZhY3R1cmVzIHByb3ZpZGUgdmVuZG9yIGluZm9ybWF0aW9uIGluIG5v bi12ZW5kb3Igc3BlY2lmaWMgQ0lTCnR1cGxlcy4gRm9yIGV4YW1wbGUsIEJy b2FkY29tIHVzZXMgYW4gRXh0ZW5kZWQgRnVuY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