Merge tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee139...
[firefly-linux-kernel-4.4.55.git] / net / mac80211 / rc80211_minstrel_ht.c
index 2d1acc6c54455de4d397dc64cc471d8890e95bc7..fb1d4aa65e8c9e68b347e292a583081ac07c50c5 100644 (file)
@@ -626,8 +626,12 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
 
 #ifdef CONFIG_MAC80211_DEBUGFS
        /* use fixed index if set */
-       if (mp->fixed_rate_idx != -1)
-               sample_idx = mp->fixed_rate_idx;
+       if (mp->fixed_rate_idx != -1) {
+               mi->max_tp_rate = mp->fixed_rate_idx;
+               mi->max_tp_rate2 = mp->fixed_rate_idx;
+               mi->max_prob_rate = mp->fixed_rate_idx;
+               sample_idx = -1;
+       }
 #endif
 
        if (sample_idx >= 0) {
@@ -809,7 +813,7 @@ minstrel_ht_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp)
                        max_rates = sband->n_bitrates;
        }
 
-       msp = kzalloc(sizeof(struct minstrel_ht_sta), gfp);
+       msp = kzalloc(sizeof(*msp), gfp);
        if (!msp)
                return NULL;