Routing Packets in a Wi-Fi network (802.11)
I think you are looking for Wi-Fi Direct, which allows devices to communicate to each other in a P2P manner, without any access points.

It facilitates connection between the devices over 802.11 protocols.

Latest revision of the specification can be accessed here (it will redirect to the pdf)