Search Linux Wireless

Re: [RFC] rtl8187: Do not wait for an ACK when IEEE80211_TX_CTL_NO_ACK is set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em Quarta 26 Novembro 2008, às 20:31:03, Stefanik Gábor escreveu:
> (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.

nack.

I've seen other drivers set just a flag when hardware has a bit field to
signalize that there isn't need to ack the tx packet to be sent, but
don't saw anyone changing retry in tx hw header. Also setting to 0 in
no_ack case looks wrong, for example see ath5k where it even checks for
0 and returns an error if you try to do this.

> Change both RTL8187L and RTL8187B to skip waiting for an ACK when no
> ACK was requested.
>
> Signed-off-by: Gábor Stefanik <netrolller.3d@xxxxxxxxx>
> ---
>  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)
>  		hdr->flags = cpu_to_le32(flags);
>  		hdr->len = 0;
>  		hdr->rts_duration = rts_dur;
> -		hdr->retry = cpu_to_le32(info->control.rates[0].count << 8);
> +		if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
> +			hdr->retry = cpu_to_le32(info->control.rates[0].count << 8);
> +		else
> +			hdr->retry = 0;
>  		buf = hdr;
>
>  		ep = 2;
> @@ -248,7 +251,10 @@ static int rtl8187_tx(struct ieee80211_hw *dev,
> struct sk_buff *skb)
>  		memset(hdr, 0, sizeof(*hdr));
>  		hdr->flags = cpu_to_le32(flags);
>  		hdr->rts_duration = rts_dur;
> -		hdr->retry = cpu_to_le32(info->control.rates[0].count << 8);
> +		if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
> +			hdr->retry = cpu_to_le32(info->control.rates[0].count << 8);
> +		else
> +			hdr->retry = 0;
>  		hdr->tx_duration =
>  			ieee80211_generic_frame_duration(dev, priv->vif,
>  							 skb->len, txrate);

--
[]'s
Herton
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux