Return-path: Received: from mail-qy0-f11.google.com ([209.85.221.11]:49021 "EHLO mail-qy0-f11.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752121AbYKZWbF (ORCPT ); Wed, 26 Nov 2008 17:31:05 -0500 Received: by qyk4 with SMTP id 4so967751qyk.13 for ; Wed, 26 Nov 2008 14:31:03 -0800 (PST) Message-ID: <69e28c910811261431u26e341d3p51ebadca807f4b61@mail.gmail.com> (sfid-20081126_233110_621920_E110BF5A) Date: Wed, 26 Nov 2008 23:31:03 +0100 From: "=?ISO-8859-1?Q?Stefanik_G=E1bor?=" To: linux-wireless Subject: [RFC] rtl8187: Do not wait for an ACK when IEEE80211_TX_CTL_NO_ACK is set Cc: "Hin-Tak Leung" , "Herton Ronaldo Krzesinski" , "Larry Finger" , "Johannes Berg" , "John W. Linville" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_31144_21387733.1227738663297" Sender: linux-wireless-owner@vger.kernel.org List-ID: ------=_Part_31144_21387733.1227738663297 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline (Patch also available as an attachment in case Gmail decides to linewrap it= .) Currently we always wait for an ACK even if IEEE80211_TX_CTL_NO_ACK is set. This is just the opposite of what other drivers do. Change both RTL8187L and RTL8187B to skip waiting for an ACK when no ACK was requested. Signed-off-by: G=E1bor Stefanik --- drivers/net/wireless/rtl818x/rtl8187_dev.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c index 9fd23b5..7f12d9f 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c @@ -230,7 +230,10 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb) =09=09hdr->flags =3D cpu_to_le32(flags); =09=09hdr->len =3D 0; =09=09hdr->rts_duration =3D rts_dur; -=09=09hdr->retry =3D cpu_to_le32(info->control.rates[0].count << 8); +=09=09if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) +=09=09=09hdr->retry =3D cpu_to_le32(info->control.rates[0].count << 8); +=09=09else +=09=09=09hdr->retry =3D 0; =09=09buf =3D hdr; =09=09ep =3D 2; @@ -248,7 +251,10 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb) =09=09memset(hdr, 0, sizeof(*hdr)); =09=09hdr->flags =3D cpu_to_le32(flags); =09=09hdr->rts_duration =3D rts_dur; -=09=09hdr->retry =3D cpu_to_le32(info->control.rates[0].count << 8); +=09=09if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) +=09=09=09hdr->retry =3D cpu_to_le32(info->control.rates[0].count << 8); +=09=09else +=09=09=09hdr->retry =3D 0; =09=09hdr->tx_duration =3D =09=09=09ieee80211_generic_frame_duration(dev, priv->vif, =09=09=09=09=09=09=09 skb->len, txrate); --=20 1.5.4.5 ------=_Part_31144_21387733.1227738663297 Content-Type: application/octet-stream; name=0001-rtl8187-Do-not-wait-for-an-ACK-when-IEEE80211_TX_CT.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_fo0jvadp0 Content-Disposition: attachment; filename=0001-rtl8187-Do-not-wait-for-an-ACK-when-IEEE80211_TX_CT.patch RnJvbSBjOGQ0ODMwNmE0ODZjMjI2ZTJhYTBkNjJmYjQzMTYzODdiMmIwYTdmIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiByb290IDxyb290QE5SM0RNYWluLk5SM0Q+CkRhdGU6IFdlZCwg MjYgTm92IDIwMDggMjM6MTc6MDAgKzAxMDAKU3ViamVjdDogW1JGQ10gcnRsODE4NzogRG8gbm90 IHdhaXQgZm9yIGFuIEFDSyB3aGVuIElFRUU4MDIxMV9UWF9DVExfTk9fQUNLIGlzIHNldApNSU1F LVZlcnNpb246IDEuMApDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGN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