To make your ubuntu machine act as a wifi hot-spot for any device, install and configure the hostapd package. It is designed for this very purpose. I'm sharing my mobile broadband connection (Tata Photon) with my android phone using this very method on ubuntu 12.04!
Here are the per-requisites you will need to use hostapd in this manner:
Ability of your wireless card to support infrastructure mode. To find out:
i. Find your kernel driver module in use by issuing the below command:
lspci -k | grep -A 3 -i “network”
(In my case, the driver in use was ath9k)
ii. Now, use the below command to find out your wifi capabilities (replace ath9k by your kernel driver):
modinfo ath9k | grep ‘depend’
(iii) If the above output includes “mac80211” then it means your wifi card will support the AP mode.
Hostapd software: Hostapd is the standard linux daemon that will be used to create your access-point.
Dhcp software: Even after hostapd creates the AP and your device detects it, you will still need a dhcp server to assign a dynamic ip-address to your AP client. (unless you are assigning static address to each device)
Refer my article for further details on how to set up and configure the hostapd package.
Update on 08-Jul-2014
To solve this problem, I've written Hotspotd, a small linux daemon to create a wifi hotspot on top of hostapd. It uses dnsmasq for IP-address provisioning to and iptables to generate the routing table.
tar xvf hotspotd-0.1.tar.gz
sudo python setup.py install
Workaround for 14.04 broken hostapd bug is included.