Shares of Sprint and T-Mobile are up in midday trading following a CNBC report that the companies are in “active talks” about a merger.

They’re said to be looking at a stock-for-stock deal that would leave T-Mobile owner Deutsche Telekom in control of the combined company, with T-Mobile’s colorful CEO John Legere running operations. Sprint is controlled by Japan’s Softbank and would have a loud voice in the merged company’s affairs.

An agreement is “weeks away,” CNBC’s David Faber says. Negotiators have yet to determine key terms including the ratio of the stocks to be swapped.

Still, the prospect of a merger between the Nos. 3 and 4 wireless providers sent Sprint shares up 9.8% and T-Mobile up 5.1%.

The companies have run hot and cold about a merger over many years. Even if they agree on terms, it’s unclear whether antitrust officials would approve a deal that reduces the number of major wireless carriers from four to three.

In 2011, AT&T abandoned its plan to buy T-Mobile after the Justice Department sued to block the deal, saying that consumer prices could rise if competition in wireless was reduced.

The Trump administration might be more open to consolidation, though — especially now that major cable operators including Comcast and Charter are beginning to introduce their own wireless services that largely depend on Wi-Fi.

This summer Sprint expressed interest in buying Charter. The cable company rejected the idea.