Return-path: Received: from web28309.mail.ukl.yahoo.com ([87.248.110.128]:26759 "HELO web28309.mail.ukl.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754194AbZIGSyH (ORCPT ); Mon, 7 Sep 2009 14:54:07 -0400 Message-ID: <143541.29987.qm@web28309.mail.ukl.yahoo.com> Date: Mon, 7 Sep 2009 18:47:27 +0000 (GMT) From: Albert Herranz Subject: [PATCH RFC 3/3] ssb: add support for ssb over sdio To: bcm43xx-dev@lists.berlios.de Cc: linux-wireless@vger.kernel.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-300175264-1252349247=:29987" Sender: linux-wireless-owner@vger.kernel.org List-ID: --0-300175264-1252349247=:29987 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =0A=0A=0A --0-300175264-1252349247=:29987 Content-Type: text/x-patch; name="0118-ssb-add-support-for-ssb-over-sdio.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0118-ssb-add-support-for-ssb-over-sdio.patch" RnJvbSBjMGY1ZTUwMDJiNjlkNWNjMjI2YTBjMzFkNzkxYmNjZWZjMmM5MmUz IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBBbGJlcnQgSGVycmFu eiA8YWxiZXJ0X2hlcnJhbnpAeWFob28uZXM+CkRhdGU6IFR1ZSwgMTggQXVn IDIwMDkgMjE6Mzk6MDYgKzAyMDAKU3ViamVjdDogW1BBVENIXSBzc2I6IGFk ZCBzdXBwb3J0IGZvciBzc2Igb3ZlciBzZGlvCgpBZGQgc3VwcG9ydCBmb3Ig Y29tbXVuaWNhdGluZyB3aXRoIGEgU29uaWNzIFNpbGljb24gQmFja3BsYW5l IHRocm91Z2ggYQpTRElPIGludGVyZmFjZSwgYXMgZm91bmQgaW4gdGhlIE5p bnRlbmRvIFdpaSBXTEFOIGRhdWdodGVyIGNhcmQuCgpUaGUgTmludGVuZG8g V2lpIFdMQU4gY2FyZCBpbmNsd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