Kalle Valo says:
[sfrench/cifs-2.6.git] / drivers / net / wireless / ath / ath11k / mac.c
index 8094384b86164771045c29674c84c4d5488578eb..3cbcbb93a1a7a1c6556b15c794f51ad5ea056933 100644 (file)
@@ -2081,7 +2081,7 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar,
        struct cfg80211_chan_def def;
        const struct ieee80211_sta_he_cap *he_cap = &sta->deflink.he_cap;
        enum nl80211_band band;
-       u16 *he_mcs_mask;
+       u16 he_mcs_mask[NL80211_HE_NSS_MAX];
        u8 max_nss, he_mcs;
        u16 he_tx_mcs = 0, v = 0;
        int i, he_nss, nss_idx;
@@ -2098,7 +2098,8 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar,
                return;
 
        band = def.chan->band;
-       he_mcs_mask = arvif->bitrate_mask.control[band].he_mcs;
+       memcpy(he_mcs_mask, arvif->bitrate_mask.control[band].he_mcs,
+              sizeof(he_mcs_mask));
 
        if (ath11k_peer_assoc_h_he_masked(he_mcs_mask))
                return;