linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] mac80211, iwlwifi, ath9k: Fix rate scaling for IEEE80211_TX_CTL_NO_ACK packets
@ 2009-04-23 17:35 Gábor Stefanik
  2009-04-23 18:09 ` Jouni Malinen
  2009-04-28 20:53 ` Gábor Stefanik
  0 siblings, 2 replies; 8+ messages in thread
From: Gábor Stefanik @ 2009-04-23 17:35 UTC (permalink / raw)
  To: John Linville, linux-wireless, Johannes Berg
  Cc: Zhu Yi, Tomas Winkler, Tomas Winkler, Nick Kossifidis,
	Luis R. Rodriguez, Luis R. Rodriguez, Felix Fietkau

Handling of multicast/NO_ACK packets by mac80211 rate scaling is a
mess. Basically, the rule of thumb is that any packet with
IEEE80211_TX_CTL_NO_ACK (including multicasts and broadcasts, which
always have this flag set) should be sent at lowest rate (unless
overridden by radiotap - this is not covered in this patchset), with
no retries.

So, the right thing to do in any rate scaling algorithm:
 * Check for IEEE80211_TX_CTL_NO_ACK. No need to check
is_multicast_ether_addr, as multicasts always have NO_ACK set.
 * If it is set, select the lowest available rate (unless overridden
by radiotap), with a retry count of 0 (total try count of 1).

However, the actual rate scaling algorithms get this wrong in various w=
ays:
 * Minstrel checks for both is_multicast_ether_addr and
IEEE80211_TX_CTL_NO_ACK (redundant, since the former implies the
latter), and sets the rate to the lowest (correct), and the retry
count to the max (wrong).
 * PID only checks is_multicast_ether_addr (completely leaving out
unicasts with IEEE80211_TX_CTL_NO_ACK set by e.g. Radiotap), setting
the rate to the lowest (correct). However, the same logic is used for
determining retry count of multicasts as for unicasts (wrong).
 * Iwlwifi's rate scaling algorithms behave like PID. In addition,
they appear to not care about retry count at all, which is handled in
the drivers themselves I guess.
 * Ath5k's algorithm correctly sets both the rate and the retry count
- but incorrectly bases its checks on is_multicast_ether_addr instead
of IEEE80211_TX_CTL_NO_ACK, again missing unicasts with this flag set.

Most PHYs can gracefully handle this error (with the help of a no-ACK
knob in the PHY TX header that disables retries), but those that have
no such knob, and instead depend on getting a correct retry count of 0
(total try count of 1), such as RTL818x, end up always transmitting
multicast/NO_ACK frames multiple times, as (incorrectly) requested by
the RC algorithm.

Signed-off-by: G=E1bor Stefanik <netrolller.3d@gmail.com>
Cc: Felix Fietkau <nbd@openwrt.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Zhu Yi <yi.zhu@intel.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: Louis R. Rodriguez <mcgrof@gmail.com>

G=E1bor Stefanik (5):
 mac80211: Fix handling of retry count of NO_ACK frames in minstrel
 mac80211: Fix handling of retry count of NO_ACK frames in PID
 iwlwifi: Fix handling of retry count of NO_ACK frames for iwl-{3945|ag=
n}-rs
 ath5k: Fix handling of retry count of NO_ACK frames
 mac80211: Warn if the rate controller requests retries for a NO_ACK fr=
ame

 drivers/net/wireless/ath/ath9k/rc.c        |    6 +++---
 drivers/net/wireless/iwlwifi/iwl-3945-rs.c |    7 ++++---
 drivers/net/wireless/iwlwifi/iwl-agn-rs.c  |   14 +++++++-------
 net/mac80211/rc80211_minstrel.c            |    8 +++++---
 net/mac80211/rc80211_pid_algo.c            |    8 +++++---
 net/mac80211/tx.c                          |    4 ++++
 6 files changed, 28 insertions(+), 19 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-04-30 19:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-23 17:35 [PATCH 0/5] mac80211, iwlwifi, ath9k: Fix rate scaling for IEEE80211_TX_CTL_NO_ACK packets Gábor Stefanik
2009-04-23 18:09 ` Jouni Malinen
2009-04-23 18:18   ` Gábor Stefanik
2009-04-24 17:31   ` Felix Fietkau
2009-04-25  7:12     ` Johannes Berg
2009-04-28 20:53 ` Gábor Stefanik
2009-04-30 18:28   ` John W. Linville
2009-04-30 19:02     ` John W. Linville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).