Following the WiFi connection problems faced by the iMac when coming out of sleep mode, Apple has released an update which should put an end to the bug. The iMac previously had trouble remembering known WiFI networks after being taken out of sleep mode, so users had to re-enter the codes every time they woke up their iMac.
The minimum spec required for this update is an iMac from late 2009 running 10.7.3.