Beleaguered equipment maker Ericsson is benefitting from its cost-cutting measures and the growing 5G momentum. After six quarters of being in the red, Ericsson reported a modest operating profit of $23 million.

The company also reported second quarter revenue of $5.7 billion, which is up from the first quarter revenue of $5.14 billion. But Ericsson’s losses also increased in the quarter to $204.1 million, and the company reported a GAAP loss of 7 cents per share.

Ericsson’s stock surged 9.94 percent to $7.10 per share on the positive earnings report.

The company said that it has met its restructuring plan goal of achieving a $1.1 billion run rate by mid-2018. Ericsson instituted this cost savings plan back in November 2014. “Now, it’s business as usual,” said Ericsson CEO Borje Ekholm, adding that the company has a much more competitive cost structure than it did a year ago.

5G Momentum

Ericsson executives said there has been a dramatic acceleration in interest in 5G over the past 18 to 24 months and added that they are having much more “active” discussions with customers about 5G than they anticipated. “We are seeing more traction with our customer discussions than the overall external market reports seem to indicate,” Ekholm said.

Specifically, he said that North America seems to be very active in 5G, followed by Northeast Asia. “We will see early deployments there,” Ekholm said, adding that even the tone about 5G is changing in Europe where operators previously were more pessimistic about the technology.

When it comes to virtualization of the network, Ericsson executives said that operators are increasingly moving to virtualization, and the company is seeing a lot of demand for programmable networks, virtualization of the packet core, and even interest in IP multimedia systems (IMS).

To account for this increase in software versus hardware, Ekholm said that Ericsson is trying to pre-integrate software solutions into its equipment, which should help with the company’s gross margin.

Ekholm also touted Ericsson’s increased investment in research and development. In the first quarter the company said that it had added 500 engineers to its R&D team to focus primarily on 5G. He said that more R&D investment will likely occur as the company needs to do this to stay on top of technology innovation.