--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
-@@ -561,6 +561,7 @@ __sta_info_alloc(struct ieee80211_sub_if
+@@ -561,6 +561,11 @@ __sta_info_alloc(struct ieee80211_sub_if
INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames);
INIT_WORK(&sta->ampdu_mlme.work, ieee80211_ba_session_work);
mutex_init(&sta->ampdu_mlme.mtx);
++#if LINUX_VERSION_IS_LESS(6,2,0)
+ sta->ampdu_mlme.dialog_token_allocator = prandom_u32_max(U8_MAX);
++#else
++ sta->ampdu_mlme.dialog_token_allocator = get_random_u32_below(U8_MAX);
++#endif
#ifdef CPTCFG_MAC80211_MESH
if (ieee80211_vif_is_mesh(&sdata->vif)) {
sta->mesh = kzalloc(sizeof(*sta->mesh), gfp);