A Cross-Layer Energy-efficient Transmission Power Control Mechanism for Wireless Sensor Networks