/* get ieee prev rate from rate scale table. for A and B mode we need to overright prev value  */
int iwl3945_rs_next_rate(struct iwl_priv *priv, int rate)
/* get ieee prev rate from rate scale table. for A and B mode we need to overright prev value  */
int iwl3945_rs_next_rate(struct iwl_priv *priv, int rate)
{
	int next_rate = iwl3945_get_prev_ieee_rate(rate);
	switch (priv->band) {
	case IEEE80211_BAND_5GHZ:
		if (rate == IWL_RATE_12M_INDEX)
			next_rate = IWL_RATE_9M_INDEX;
		else if (rate == IWL_RATE_6M_INDEX)
			next_rate = IWL_RATE_6M_INDEX;
		break;
	case IEEE80211_BAND_2GHZ:
		if (!(priv->sta_supp_rates & IWL_OFDM_RATES_MASK) &&
		    iwl_is_associated(priv)) {
			if (rate == IWL_RATE_11M_INDEX)
				next_rate = IWL_RATE_5M_INDEX;
		}
		break;
	default:
		break;
	}
	return next_rate;
}