Resource allocation for heterogeneous wireless networks