In order to improve network coverage and throughput at low cost, a mesh mode is defined in IEEE 802.16 standard recently. Although the standard defines the multiple access signaling mechanisms, it doesn't specify resource allocation issue. In this paper, we address the problem of resource allocation with the goal of achieving optimization network throughput in WiMax mesh networks. We first establish mathematical formulation for this problem that takes into account spatial reuse so that system's gain is maximized. Then, a dynamic programming based link scheduling algorithm is presented to provide an optimal resource allocation for achieving maximal network throughput in WiMax mesh networks. Simulation results show that our proposed algorithm significantly improves the performance of the WiMax mesh networks in terms of link scheduling.