The Senate has passed heavily debated legislation that would split Telstra's retail and wholesale divisions to make way for the National Broadband Network.

The bill was passed by a vote of 30 to 28 this afternoon, after a lengthy debate that caused parliamentary sitting time to be extended last night and today.
It was put forward by the Labor Government and supported by the Greens and independent senators Nick Xenophon and Steve Fielding.
The bill facilitated an $11 billion deal under which Telstra would migrate its copper and cable broadband networks to Government-owned NBN Co.
Xenophon yesterday told the Senate that there were "compelling reasons we need to deal with this legislation now", despite Coalition attempts to delay the vote until next year.
Coalition politicians opposed the passing of the bill, arguing that the Government had not provided enough information about its NBN plans.
"There are some very worthwhile reforms in this legislation with which we agree," Shadow Communications Minister Malcolm Turnbull stated after the bill was passed this afternoon.
"But the legislation cannot be separated from the NBN project it is designed to facilitate.
"We can all agree about the merits of structural separation or indeed of universal and affordable broadband."