Q:

Ad hoc vs Mesh, which one to use?

Say we have four nodes (A, B, C, D) that are arranged in a chain-like topology.
A <-------> B <-------> C <-------> D
Only the adjacent nodes are in range of one another (A can communicate with B, B can do so with A and C, C can do so with B and D, and D only with C). Is it possible to create an 802.11 ad hoc network (an IBSS) in such a case? After going through the requirements for an IBSS in the 802.11 standard, it seems that all four nodes would have to be in range of one another. Why is this so? My guess is that for exchanging beacons, all the nodes would have to be in range of one another.
Alternatively, can the above topology be achieved through an 802.11 mesh network? For instance, B and C could act as gateways ('mesh routers' might be the more accurate term) for communication between A and D.
Assume that a single/same channel is used for communication between all nodes.

A:

IBSS mode does not provide a mechanism for one peer to forward traffic on behalf of another peer. So all IBSS peers that need to communicate with each other must be in direct radio range of each other. In your description, you described a classic "hidden node problem" where C is visible to B but hidden from A. So C and D are considered "hidden nodes" from A's perspective. IBSS does not provide a solution to the hidden node problem.
In contrast, AP-based BSSes do not have this problem, as all devices currently in the BSS are guaranteed to be in range of the AP, and the AP acts as an "intra-BSS relay", relaying packets between wireless clients within the BSS. In fact, in AP-mode operation, intra-BSS relay is always in effect, even if the two clients that are talking to each other are in range of each other. There's a newer technology called Tunneled Direct Link Setup (TDLS), that doesn't seem to be widely deployed, but it provides a way for clients of an AP to establish direct connections to each other so they can go faster by avoiding Intra-BSS Relay and the associated overhead.
So for your A > B > C > D illustration to work, you'll need something more than IBSS. Mesh is one solution, although even before mesh protocols started to catch on, there were ways to solve this. For example, you could make B and C both act as APs, and use a wired Ethernet or WDS wireless backhaul between them. The latter assumes B and C have the ability to be configured as both APs and WDS bridges simultaneously. The ability to act in both AP mode and WDS mode simultaneously is not uncommon, but it's not universal either.
Mesh's advantage over what I've just described is that mesh can handle the topology changes of any of the nodes moving around, whereas statically configuring B and C to act as APs and statically configuring a wired Ethernet or WDS wireless backhaul between them assumes that B and C won't be moving around.

