Distributed resource allocation in wireless networks