diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-07-14 20:13:54 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-24 15:05:14 -0400 |
commit | e43419f9ad99112a2715ee34c634ffeac3bf730d (patch) | |
tree | 43e05e182b076d6f36ebec04421f6abbd0480869 /drivers/net/wireless | |
parent | b770b43e95a66587fbd8c1841de83da87fbf23ea (diff) |
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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index ba06e78b2f50..d7f403080f7a 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
@@ -741,10 +741,18 @@ static u8 ath_rc_ratefind_ht(struct ath_softc *sc, | |||
741 | if (rate > (ath_rc_priv->rate_table_size - 1)) | 741 | if (rate > (ath_rc_priv->rate_table_size - 1)) |
742 | rate = ath_rc_priv->rate_table_size - 1; | 742 | rate = ath_rc_priv->rate_table_size - 1; |
743 | 743 | ||
744 | ASSERT((rate_table->info[rate].valid && | 744 | if (rate_table->info[rate].valid && |
745 | (ath_rc_priv->ht_cap & WLAN_RC_DS_FLAG)) || | 745 | (ath_rc_priv->ht_cap & WLAN_RC_DS_FLAG)) |
746 | (rate_table->info[rate].valid_single_stream && | 746 | return rate; |
747 | !(ath_rc_priv->ht_cap & WLAN_RC_DS_FLAG))); | 747 | |
748 | if (rate_table->info[rate].valid_single_stream && | ||
749 | !(ath_rc_priv->ht_cap & WLAN_RC_DS_FLAG)); | ||
750 | return rate; | ||
751 | |||
752 | /* This should not happen */ | ||
753 | WARN_ON(1); | ||
754 | |||
755 | rate = ath_rc_priv->valid_rate_index[0]; | ||
748 | 756 | ||
749 | return rate; | 757 | return rate; |
750 | } | 758 | } |