All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@adurom.com>
To: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: John Linville <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org,
	Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [PATCH 2/2] mac80211: Don't use a buf_size=0 in ADDBA requests
Date: Fri, 05 Aug 2011 11:15:12 +0300	[thread overview]
Message-ID: <878vr8s29b.fsf@purkki.adurom.net> (raw)
In-Reply-To: <1311675508-29005-2-git-send-email-helmut.schaa@googlemail.com> (Helmut Schaa's message of "Tue\, 26 Jul 2011 12\:18\:28 +0200")

Helmut Schaa <helmut.schaa@googlemail.com> writes:

> According to 802.11-2007, 7.3.1.14 it is compliant to use a buf_size of
> 0 in ADDBA requests. But some devices (AVM Fritz Stick N) arn't able to
> handle that correctly and will reply with an ADDBA reponse with a
> buf_size of 0 which in turn will disallow BA sessions for these
> devices.
>
> To work around this problem, if the hardware doesn't specify an upper
> limit for the number of subframes in an AMPDU send the maximum 0x40 by
> default in ADDBA requests.

[...]

> @@ -345,7 +345,9 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
>  	/* send AddBA request */
>  	ieee80211_send_addba_request(sdata, sta->sta.addr, tid,
>  				     tid_tx->dialog_token, start_seq_num,
> -				     local->hw.max_tx_aggregation_subframes,
> +				     local->hw.max_tx_aggregation_subframes ?
> +				     local->hw.max_tx_aggregation_subframes :
> +				     0x40,
>  				     tid_tx->timeout);

A define would be better than a magic value. This would also need a
comment but if you choose a good name for the define the comment won't
be needed. Also " ? :" inside a function call is not readable IMHO,
maybe instead a separate variable with if() statements?

-- 
Kalle Valo

  reply	other threads:[~2011-08-05  8:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-26 10:18 [PATCH 1/2] mac80211: Stop TX BA session if buf_size is zero Helmut Schaa
2011-07-26 10:18 ` [PATCH 2/2] mac80211: Don't use a buf_size=0 in ADDBA requests Helmut Schaa
2011-08-05  8:15   ` Kalle Valo [this message]
2011-08-05  8:35     ` Helmut Schaa
2011-08-05  8:54       ` Kalle Valo
2011-08-05  9:46   ` [PATCHv2 " Helmut Schaa
2011-08-08  8:29     ` Johannes Berg
2011-08-08  8:40       ` Helmut Schaa
2011-08-08  8:46         ` Johannes Berg
2011-08-08  8:50 ` [PATCH 1/2] mac80211: Stop TX BA session if buf_size is zero Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878vr8s29b.fsf@purkki.adurom.net \
    --to=kvalo@adurom.com \
    --cc=helmut.schaa@googlemail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.