]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - net/mac80211/rate.c
Merge tag 'mac80211-next-for-davem-2015-10-05' of git://git.kernel.org/pub/scm/linux...
[mirror_ubuntu-zesty-kernel.git] / net / mac80211 / rate.c
index 9857693b91ec721ff71e3f3cd1087ccc289912e1..b07e2f748f9388f0e7f591555aced4856200292f 100644 (file)
@@ -305,7 +305,10 @@ static void __rate_control_send_low(struct ieee80211_hw *hw,
                info->control.rates[0].idx = i;
                break;
        }
-       WARN_ON_ONCE(i == sband->n_bitrates);
+       WARN_ONCE(i == sband->n_bitrates,
+                 "no supported rates (0x%x) in rate_mask 0x%x with flags 0x%x\n",
+                 sta ? sta->supp_rates[sband->band] : 0,
+                 rate_mask, rate_flags);
 
        info->control.rates[0].count =
                (info->flags & IEEE80211_TX_CTL_NO_ACK) ?
@@ -716,7 +719,7 @@ static bool rate_control_cap_mask(struct ieee80211_sub_if_data *sdata,
 
                /* Filter out rates that the STA does not support */
                *mask &= sta->supp_rates[sband->band];
-               for (i = 0; i < sizeof(mcs_mask); i++)
+               for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++)
                        mcs_mask[i] &= sta->ht_cap.mcs.rx_mask[i];
 
                sta_vht_cap = sta->vht_cap.vht_mcs.rx_mcs_map;