* Copyright 2007, Michael Wu <flamingice@sourmilk.net>
  * Copyright 2013-2014  Intel Mobile Communications GmbH
  * Copyright (C) 2015 - 2017 Intel Deutschland GmbH
- * Copyright (C) 2018 - 2020 Intel Corporation
+ * Copyright (C) 2018 - 2021 Intel Corporation
  */
 
 #include <linux/delay.h>
        u32 rates = 0;
        __le16 listen_int;
        struct element *ext_capa = NULL;
+       enum nl80211_iftype iftype = ieee80211_vif_type_p2p(&sdata->vif);
+       const struct ieee80211_sband_iftype_data *iftd;
 
        /* we know it's writable, cast away the const */
        if (assoc_data->ie_len)
                }
        }
 
+       iftd = ieee80211_get_sband_iftype_data(sband, iftype);
+
        skb = alloc_skb(local->hw.extra_tx_headroom +
                        sizeof(*mgmt) + /* bit too much but doesn't matter */
                        2 + assoc_data->ssid_len + /* SSID */
                        2 + 1 + sizeof(struct ieee80211_he_6ghz_capa) +
                        assoc_data->ie_len + /* extra IEs */
                        (assoc_data->fils_kek_len ? 16 /* AES-SIV */ : 0) +
-                       9, /* WMM */
+                       9 + /* WMM */
+                       (iftd ? iftd->vendor_elems.len : 0),
                        GFP_KERNEL);
        if (!skb)
                return;
                ieee80211_add_s1g_capab_ie(sdata, &sband->s1g_cap, skb);
        }
 
+       if (iftd && iftd->vendor_elems.data && iftd->vendor_elems.len)
+               skb_put_data(skb, iftd->vendor_elems.data, iftd->vendor_elems.len);
+
        /* add any remaining custom (i.e. vendor specific here) IEs */
        if (assoc_data->ie_len) {
                noffset = assoc_data->ie_len;