|
@@ -233,6 +233,27 @@ static void rc_send_low_broadcast(s8 *idx, u32 basic_rates,
|
|
/* could not find a basic rate; use original selection */
|
|
/* could not find a basic rate; use original selection */
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline s8
|
|
|
|
+rate_lowest_non_cck_index(struct ieee80211_supported_band *sband,
|
|
|
|
+ struct ieee80211_sta *sta)
|
|
|
|
+{
|
|
|
|
+ int i;
|
|
|
|
+
|
|
|
|
+ for (i = 0; i < sband->n_bitrates; i++) {
|
|
|
|
+ struct ieee80211_rate *srate = &sband->bitrates[i];
|
|
|
|
+ if ((srate->bitrate == 10) || (srate->bitrate == 20) ||
|
|
|
|
+ (srate->bitrate == 55) || (srate->bitrate == 110))
|
|
|
|
+ continue;
|
|
|
|
+
|
|
|
|
+ if (rate_supported(sta, sband->band, i))
|
|
|
|
+ return i;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /* No matching rate found */
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
bool rate_control_send_low(struct ieee80211_sta *sta,
|
|
bool rate_control_send_low(struct ieee80211_sta *sta,
|
|
void *priv_sta,
|
|
void *priv_sta,
|
|
struct ieee80211_tx_rate_control *txrc)
|
|
struct ieee80211_tx_rate_control *txrc)
|
|
@@ -242,7 +263,13 @@ bool rate_control_send_low(struct ieee80211_sta *sta,
|
|
int mcast_rate;
|
|
int mcast_rate;
|
|
|
|
|
|
if (!sta || !priv_sta || rc_no_data_or_no_ack(txrc)) {
|
|
if (!sta || !priv_sta || rc_no_data_or_no_ack(txrc)) {
|
|
- info->control.rates[0].idx = rate_lowest_index(txrc->sband, sta);
|
|
|
|
|
|
+ if ((sband->band != IEEE80211_BAND_2GHZ) ||
|
|
|
|
+ !(info->flags & IEEE80211_TX_CTL_NO_CCK_RATE))
|
|
|
|
+ info->control.rates[0].idx =
|
|
|
|
+ rate_lowest_index(txrc->sband, sta);
|
|
|
|
+ else
|
|
|
|
+ info->control.rates[0].idx =
|
|
|
|
+ rate_lowest_non_cck_index(txrc->sband, sta);
|
|
info->control.rates[0].count =
|
|
info->control.rates[0].count =
|
|
(info->flags & IEEE80211_TX_CTL_NO_ACK) ?
|
|
(info->flags & IEEE80211_TX_CTL_NO_ACK) ?
|
|
1 : txrc->hw->max_rate_tries;
|
|
1 : txrc->hw->max_rate_tries;
|