static int
 mlxsw_sp_port_attr_br_pre_flags_set(struct mlxsw_sp_port *mlxsw_sp_port,
-                                   struct switchdev_brport_flags flags)
+                                   struct switchdev_brport_flags flags,
+                                   struct netlink_ext_ack *extack)
 {
-       if (flags.mask & ~(BR_LEARNING | BR_FLOOD | BR_MCAST_FLOOD))
+       if (flags.mask & ~(BR_LEARNING | BR_FLOOD | BR_MCAST_FLOOD)) {
+               NL_SET_ERR_MSG_MOD(extack, "Unsupported bridge port flag");
                return -EINVAL;
+       }
 
        return 0;
 }
                break;
        case SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS:
                err = mlxsw_sp_port_attr_br_pre_flags_set(mlxsw_sp_port,
-                                                         attr->u.brport_flags);
+                                                         attr->u.brport_flags,
+                                                         extack);
                break;
        case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS:
                err = mlxsw_sp_port_attr_br_flags_set(mlxsw_sp_port,