Isn't it a hardware featue primarily (the hardware device that broadcasts the connection via radio waves to wireless enabled devices), IMO ? And needless to say, for the hardware to operate you need particular drivers/software (whichever software Android2.1/2.2 or Humpty-Dumpty 0.8 allows it do so)
You can do it with older Androids as well, but you need a rooted phone and some app or a Google provided application like this;
android-wifi-tether - Project Hosting on Google Code
With 2.2, Google have provided out of the box support for wi-fi tethering making it much easier to use taking the complications out of it