The word "confusion" here is used as a casual way of saying the Philistines were unable to think clearly. Alternate translation: "made them unable to think clearly" (See: [[rc://en/ta/man/jit/figs-idiom]])
This can be translated in active form. Possible meanings are 1) "Yahweh routed them before Israel" or 2) "Israel routed them" (See: [[rc://en/ta/man/jit/figs-activepassive]])