try this
What you need
Part 1: Create the Ad Hoc Network
Windows XP
Open the Start menu.
Click on Control Panel.
Under Pick a category, click Network and Internet Connections.
Under Pick a Control Panel icon, click Network Connections.
Right-click your wireless network connection, and then click Properties.
In the Wireless Network Connection Properties dialog box, click the Wireless Networks tab.
On the Wireless Networks tab, under Preferred networks, click Add.
In the Wireless network properties dialog box, on the Association tab, type the name of your ad hoc wireless network in Network name (SSID) box. For example, you could name your wireless network "LogicNetwork".
Clear the The key is provided for me automatically check box.
Select the This is a computer-to-computer (ad hoc) network check box.
Create a password and type it in both the Network key and Confirm network key boxes. For the best security, include letters, numbers, and punctuation. Then click OK.
Click OK again to save your changes.
Part 2: Connect your mobile device
Tap on the Settings icon in your iPhone main menu.
Click on Wi-Fi.
Your ad hoc network "LogicNetwork" should appear in the list.
Click on you network.
Enter the Password.