ath9k: downgrade assert in rc.c for invalid rate

The case where no vaid rate is found should not happen now
but to help debugging and downgrade this to a warn.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Luis R. Rodriguez 2009-07-14 20:13:54 -04:00 коммит произвёл John W. Linville
Родитель b770b43e95
Коммит e43419f9ad
1 изменённых файлов: 12 добавлений и 4 удалений

Просмотреть файл

@ -741,10 +741,18 @@ static u8 ath_rc_ratefind_ht(struct ath_softc *sc,
if (rate > (ath_rc_priv->rate_table_size - 1)) if (rate > (ath_rc_priv->rate_table_size - 1))
rate = ath_rc_priv->rate_table_size - 1; rate = ath_rc_priv->rate_table_size - 1;
ASSERT((rate_table->info[rate].valid && if (rate_table->info[rate].valid &&
(ath_rc_priv->ht_cap & WLAN_RC_DS_FLAG)) || (ath_rc_priv->ht_cap & WLAN_RC_DS_FLAG))
(rate_table->info[rate].valid_single_stream && return rate;
!(ath_rc_priv->ht_cap & WLAN_RC_DS_FLAG)));
if (rate_table->info[rate].valid_single_stream &&
!(ath_rc_priv->ht_cap & WLAN_RC_DS_FLAG));
return rate;
/* This should not happen */
WARN_ON(1);
rate = ath_rc_priv->valid_rate_index[0];
return rate; return rate;
} }