First thing to do is to see what wireless card you are using:

$ lspci | grep -i network

Let’s see what ipw-like modules/drivers are currently running/loaded:

$ modprobe -l | grep ipw/lib/modules/2.6.20-17-generic/kernel/ubuntu/wireless/ipw2100/ipw2100.ko/lib/modules/2.6.20-17-generic/kernel/drivers/usb/serial/ipw.ko/lib/modules/2.6.20-17-generic/kernel/drivers/net/wireless/ipw2100.ko/lib/modules/2.6.20-17-generic/kernel/drivers/net/wireless/ipw2100.ko

Here it is “ipw2100″. Let’s kill it (-r stands for “remove”):

$ sudo modprobe -r ipw2100

Let’s start it back up:

$ sudo modprobe ipw2100

Checking connectivity:
I issued the following commands:

sudo ifdown wlan0
sudo rmmod ipw2100

Waited a few seconds … and then:

sudo modprobe rtl8187
sudo ifup wlan0

Wireless networking then started working without the need of a reboot.

I had the same problem, and i should reboot the system to get wireless to work.

But now every time wireless stops working, I just enter these commands:

rmmod iwlagn
rmmod iwlcore
modprobe iwlcore
modprobe iwlagn