@@ -455,13 +455,15 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
ref->ops->get_rate(ref->priv, ista, priv_sta, txrc);
/*
- * Try to enforce the rateidx mask the user wanted. skip this if the
- * default mask (allow all rates) is used to save some processing for
- * the common case.
+ * Try to enforce the rateidx masks the user wanted. Skip this if mask
+ * is the default mask (allow all rates) and mcs_mask does not differ
+ * from the driver ht caps to save some processing for the common case.
*/
mask = txrc->rate_idx_mask;
mcs_mask = txrc->rate_idx_mcs_mask;
- if (mask != (1 << txrc->sband->n_bitrates) - 1) {
+ if (mask != (1 << txrc->sband->n_bitrates) - 1 ||
+ memcmp(txrc->sband->ht_cap.mcs.rx_mask, txrc->rate_idx_mcs_mask,
+ sizeof(txrc->rate_idx_mcs_mask))) {
if (sta) {
/* Filter out rates that the STA does not support */
mask &= sta->sta.supp_rates[info->band];