To change the hostname (device name) you have to use the terminal (as root):
For Eclair (2.1): echo MYNAME > /proc/sys/kernel/hostname
For Froyo (2.2): (works also on most 2.3) setprop net.hostname MYNAME
Then restart your wi-fi. To see the change, type uname -a
some devices needs reboot for work!