I wrote my own SPI transfer routines for use with PCH and the PIC18F range. I couldn't get stable behaviour from the BF flag, so I used the interrupt flag instead. Errata documents released by Microc ...
The optimisation levels are important to me at the moment as there is a bug in some of the RAM addressing in the most recent version of the PCH compiler. To get around it I need to set the opt level ...
Check out the 802.11 ChipWeb product that iosoft (www.iosoft.co.uk) offer. Their solution utilises 802.11b but could probably be shifted to the g version.
I haven't checked it out thoroug ...