From cc67e7f9be78679ce8dcbb41314f5ce506ad14c2 Mon Sep 17 00:00:00 2001 From: scottr Date: Wed, 16 Jul 2008 10:07:01 +0000 Subject: [PATCH] minstrel: Don't try to set up the multi-rate retry descriptor when there are no rates for the node. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3775 0192ed92-7a03-0410-a25b-9323aeb14dbd --- ath_rate/minstrel/minstrel.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ath_rate/minstrel/minstrel.c b/ath_rate/minstrel/minstrel.c index c63f0d0..564530f 100644 --- a/ath_rate/minstrel/minstrel.c +++ b/ath_rate/minstrel/minstrel.c @@ -407,6 +407,14 @@ ath_rate_get_mrr(struct ath_softc *sc, struct ath_node *an, int shortPreamble, /* Index into the rate table, so for example, it is 0..11. */ int rc1, rc2, rc3; + if (sn->num_rates <= 0) { + DPRINTF(sc, "%s: no rates for " MAC_FMT "\n", + dev_info, + MAC_ADDR(an->an_node.ni_macaddr)); + memset(mrr, 0, sizeof(struct ieee80211_mrr)); + return; + } + if (sn->is_sampling) { sn->is_sampling = 0; if (sn->rs_sample_rate_slower)