--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -1493,6 +1493,19 @@
 	}
 #endif /* CONFIG_IEEE80211BE */

+	/*
+	 * The kernel side used in this build rejects VLAN operations for
+	 * MLO stations with -EINVAL (see the driver_nl80211.c part of this
+	 * patch), and the error makes ap_sta_bind_vlan() fail association
+	 * processing, which bounces MLO clients.  An untagged station
+	 * (vlan_id 0) has no VLAN binding to perform anyway, so skip the
+	 * driver call in that case.  Dynamic VLAN together with MLO keeps
+	 * its previous (rejected) behaviour until the kernel side gains
+	 * ML VLAN support.
+	 */
+	if (ap_sta_is_mld(hapd, sta) && sta->vlan_id == 0)
+		return 0;
+
 	if ((sta->flags & WLAN_STA_WDS) && sta->vlan_id == 0) {
 		wpa_printf(MSG_DEBUG,
 			   "Do not override WDS VLAN assignment for STA "
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -9134,6 +9134,18 @@
 		   ", ifname=%s[%d], vlan_id=%d)",
 		   bss->ifname, if_nametoindex(bss->ifname),
 		   MAC2STR(addr), ifname, if_nametoindex(ifname), vlan_id);
+	/*
+	 * Every STA VLAN binding funnels through here.  On an MLD AP each
+	 * command carries NL80211_ATTR_MLO_LINK_ID, and the kernel side
+	 * used in this build (no ML VLAN support) rejects such untagged
+	 * binds with -EINVAL, which hostapd turns into a station teardown.
+	 * vlan_id 0 carries no VLAN semantics, so skip the command whenever
+	 * a link id is present; the station stays bound to its own BSS
+	 * interface as intended.  Dynamic VLAN (vlan_id > 0) keeps its
+	 * previous behaviour.
+	 */
+	if (vlan_id == 0 && link_id != NL80211_DRV_LINK_ID_NA)
+		return 0;
 	if (!(msg = nl80211_bss_msg(bss, 0, NL80211_CMD_SET_STATION)) ||
 	    nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, addr) ||
 	    (vlan_id && (drv->capa.flags & WPA_DRIVER_FLAGS_VLAN_OFFLOAD) &&
