On the optimal operation of wireless networks