On Thu, 2012-01-05 at 20:58 +0100, Simon Wunderlich wrote: > @@ -5413,7 +5451,28 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb, > sband, > nla_data(tb[NL80211_TXRATE_LEGACY]), > nla_len(tb[NL80211_TXRATE_LEGACY])); > - if (mask.control[band].legacy == 0) > + } > + if (tb[NL80211_TXRATE_MCS]) { > + if (!ht_rateset_to_mask( > + sband, > + nla_data(tb[NL80211_TXRATE_MCS]), > + nla_len(tb[NL80211_TXRATE_MCS]), > + mask.control[band].mcs)) > + return -EINVAL; > + } > + > + if (mask.control[band].legacy == 0) { > + /* don't allow empty legacy rates if HT > + * is not even supported. */ > + if (!rdev->wiphy.bands[band]->ht_cap.ht_supported) > + return -EINVAL; > + > + for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++) > + if (mask.control[band].mcs[i]) > + break; > + > + /* legacy and mcs rates may not be both empty */ > + if (i == IEEE80211_HT_MCS_MASK_LEN) > return -EINVAL; Ok ... what if you now associate to a non-HT AP? I don't really care what happens as long as we don't hit a ton of warnings? johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html