supp_ht = supp_ht || sband->ht_cap.ht_supported;
                supp_vht = supp_vht || sband->vht_cap.vht_supported;
 
-               if (!supp_he)
-                       supp_he = !!ieee80211_get_he_sta_cap(sband);
+               for (i = 0; i < sband->n_iftype_data; i++) {
+                       const struct ieee80211_sband_iftype_data *iftd;
+
+                       iftd = &sband->iftype_data[i];
+
+                       supp_he = supp_he || (iftd && iftd->he_cap.has_he);
+               }
 
                /* HT, VHT, HE require QoS, thus >= 4 queues */
                if (WARN_ON(local->hw.queues < IEEE80211_NUM_ACS &&
 
 
        /* don't check HE if we associated as non-HE station */
        if (ifmgd->flags & IEEE80211_STA_DISABLE_HE ||
-           !ieee80211_get_he_sta_cap(sband))
+           !ieee80211_get_he_iftype_cap(sband,
+                                        ieee80211_vif_type_p2p(&sdata->vif)))
+
                he_oper = NULL;
 
        if (WARN_ON_ONCE(!sta))
 
        rcu_read_unlock();
 
-       he_cap = ieee80211_get_he_sta_cap(sband);
+       he_cap = ieee80211_get_he_iftype_cap(sband,
+                                            ieee80211_vif_type_p2p(&sdata->vif));
        if (!he_cap || !reg_cap)
                return;
 
        return 0;
 }
 
-static bool ieee80211_twt_bcast_support(struct ieee80211_bss_conf *bss_conf,
+static bool ieee80211_twt_bcast_support(struct ieee80211_sub_if_data *sdata,
+                                       struct ieee80211_bss_conf *bss_conf,
                                        struct ieee80211_supported_band *sband,
                                        struct sta_info *sta)
 {
        const struct ieee80211_sta_he_cap *own_he_cap =
-               ieee80211_get_he_sta_cap(sband);
+               ieee80211_get_he_iftype_cap(sband,
+                                           ieee80211_vif_type_p2p(&sdata->vif));
 
        return bss_conf->he_support &&
                (sta->sta.he_cap.he_cap_elem.mac_cap_info[2] &
        }
 
        bss_conf->twt_broadcast =
-               ieee80211_twt_bcast_support(bss_conf, sband, sta);
+               ieee80211_twt_bcast_support(sdata, bss_conf, sband, sta);
 
        if (bss_conf->he_support) {
                bss_conf->he_bss_color.color =
 }
 
 static bool
-ieee80211_verify_sta_he_mcs_support(struct ieee80211_supported_band *sband,
+ieee80211_verify_sta_he_mcs_support(struct ieee80211_sub_if_data *sdata,
+                                   struct ieee80211_supported_band *sband,
                                    const struct ieee80211_he_operation *he_op)
 {
        const struct ieee80211_sta_he_cap *sta_he_cap =
-               ieee80211_get_he_sta_cap(sband);
+               ieee80211_get_he_iftype_cap(sband,
+                                           ieee80211_vif_type_p2p(&sdata->vif));
        u16 ap_min_req_set;
        int i;
 
                ifmgd->flags |= IEEE80211_STA_DISABLE_HE;
        }
 
-       if (!ieee80211_get_he_sta_cap(sband))
+       if (!ieee80211_get_he_iftype_cap(sband,
+                                        ieee80211_vif_type_p2p(&sdata->vif)))
                ifmgd->flags |= IEEE80211_STA_DISABLE_HE;
 
        rcu_read_lock();
                else
                        he_oper = NULL;
 
-               if (!ieee80211_verify_sta_he_mcs_support(sband, he_oper))
+               if (!ieee80211_verify_sta_he_mcs_support(sdata, sband, he_oper))
                        ifmgd->flags |= IEEE80211_STA_DISABLE_HE;
        }