Hi relative4,
Updating BIOS and wireless driver should resolve this issue. Along with BIOS and wireless driver, update quickset driver from the link below:
Restart the system after each driver update
Since the wireless connection is getting disconnected only when the lid is closed, I suspect it is a software issue. Power option in the properties window did not resolve the issue; next option is to update the above said drivers to get the issue resolved.