I recently saw a film where the police were able to locate where the criminal was because the GSM network operator knew the name of the Wi-Fi access point the phone of the criminal was connected to when a SMS text message was sent from the phone. Is this realistic? Does a mobile phone broadcast the name of the Wi-Fi access point to which the phone is connected?
It isn't typical for a WiFi SSID to be transmitted to the GSM provider, though it isn't impossible either.
It also isn't typical to track down a criminal by the SSID of his wifi network. Where would the police find the network? Since a router isn't sending the SSID to an ISP, and WiFi is relatively short-range, this would be unrealistic and purely within "hollywood" realm.
It would be more realistic in this case for police to track a cell phone by which cellular towers are nearby. While it's relatively low accuracy, it's possible to position a cell phone by its distance to the towers surrounding it.
From there, if the cell phone is connected to a WiFi network, then the GSM provider will likely be able to retrieve a higher-accuracy positioning provided by the ISP.
Now like I've said before, it isn't necessarily impossible either. Once when in an Apple callcenter, I fielded a police call where they were trying to get a warrant based off the fact that they knew the SSID of the wifi network that a phone was connected to, and they needed some additional information about the range of our routers. They never told me how they got that information, but it isn't farfetched to say that the GSM provider may have provided it.
Is it realistic? Yes and no.
UPDATE Does your mobile phone automatically tell your mobile operator the name of your wi-fi access point? no.
TL;DR you most likely have a smart phone with several apps installed, and chances are that several of those apps already "phone home" in the clear lots of information about you, including your wi-fi access point name. So a mobile operator would just have to sniff your traffic and you won't even notice.
That said, as 99% of the movies out there, technical realism is missing and if there is any left it's grossly over-simplified to move on with the plot. See for example this XKCD comic:
Furthermore, your mobile operator can push content to your phone. Non-smartphones can receive instructions to turn on their microphones and become bugs. Smartphones, on the other hand, have many more vulnerabilities as you might be already aware. Often a smartphone comes with a bunch of pre-installed apps from the manufacturer, and planned obsolescence pretty much guarantees that old models "re-branded" will not receive any security updates after a short lifetime, in the hope that you (the customer) will just buy a new phone. The margins for a phone manufacturer are so low that it's not worth pushing it.
Now, once your phone is pwned it would be trivial to execute code to determine the wi-fi access point you're connected to.
I haven't provided any links here on purpose: see if you can find more information on this for yourself. It will be a learning experience.