Beware two versions of the WG511
There are (at least) two versions of the WG511. Although it sounds like your problem is to do with compiiling the module itself. If your card is labelled "Made in Taiwan" then it should work with prism54 once you get that installed. If your card is labelled "Made in China" then save yourself the hassle, the "Made in China" version doesn't work with prism54 although the driver recognises it as a prism54 card.
For the Chinese-made WG511, you'll have to use the ndiswrapper or mebbe that linexant driverloader thing (the latter costs money and seems to work in an odd way, the ndiswrapper is free and seems to work fine for me.) For (not very many) more details, see my post in this thread: http://www.linuxforums.org/forum/topic-28004.html