Resource allocation for wireless networks