We consider joint congestion and contention control for multihop wireless ad hoc networks, where the goal is to find optimal end-to-end source rates at the transport layer and per-link persistence probabilities at the medium access control (MAC) layer to maximize the aggregate source utility. The primal formulation of this problem is non-convex and nonseparable. Under certain conditions, by applying appropriate transformations and introducing new variables, we obtain a decoupled and dual-decomposable convex formulation. For general non-logarithmic concave utilities, we develop a novel dualbased distributed algorithm using the subgradient method. For logarithmic utilities, we introduce two modified algorithms: a heuristic one with linearly regularized log rate adjustments and a penalty-based one by adding a quadratic term to the linear objective. For both logarithmic and non-logarithmic utilities, our solutions enjoy the benefits of cross-layer optimization while maintaining the simplicity and modularity of the traditional layered architecture.