VLAN with 2 Wifi networks on the same AP.

Basic decission to make is about local forwarding VS capsman forwarding.

If you’re going with capsman forwarding, then you only have to set up VLANs for discovery interface. All the traffic will flow through this VLAN encapsulated in a sort of a tunnel regardless the VIDs associated with SSIDs.

If you’re going with local forwarding, then you have to prepare all the VLANs needed (discovery interface plus any data paths) between main router and AP (including switch). They should be prepared just the same way as they would be for wired access or tagged ports (read this article about VLANs). After that set up data path on capsman (my favourite is under /caps-man datapath, then used in /caps-man configuration) specifying vlan-id to be used and vlan-mode=use-tag. When capsman provisions wireless interface, the interface gets added to bridge on AP (as configured on AP under /interface wireless cap) as tagged port while wireless driver takes care of tagging and untagging frames.

The HP switch should be setup the same way as router and AP.