--- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -1867,7 +1867,11 @@ memset(sample_table, 0xff, sizeof(sample_table)); for (col = 0; col < SAMPLE_COLUMNS; col++) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0) prandom_bytes(rnd, sizeof(rnd)); +#else + get_random_bytes(rnd, sizeof(rnd)); +#endif for (i = 0; i < MCS_GROUP_RATES; i++) { new_idx = (i + rnd[i]) % MCS_GROUP_RATES; while (sample_table[col][new_idx] != 0xff)