When setting a fixed channel on adapters with 11n support the scan channel list ends up with 2 entries, the HT and the legacy channel. The scan itself is currently always done at legacy rates so we end up receiving scan results for legacy networks on the HT channel and erroneously assigning the BSS to the 11n channel. As the channel's capabilities are used to setup the adapter we might end up with non-working settings and/or firmware crashes.
When setting a fixed channel on adapters with 11n support the scan
channel list ends up with 2 entries, the HT and the legacy channel.
The scan itself is currently always done at legacy rates so we end
up receiving scan results for legacy networks on the HT channel and
erroneously assigning the BSS to the 11n channel. As the channel's
capabilities are used to setup the adapter we might end up with
non-working settings and/or firmware crashes.

Fix this by ensuring that scan results received on a HT channel
are only assigned to that channel if the htcap IE is available,
else use the legacy channel equivalent.

Tested by:	Pawel Worach, Raoul Megelas, Maciej Milewski,
		Andrei <az at azsupport dot com>
Approved by:	re (kib)

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase