LinuxKPI: 802.11: improve hw_scan
Initially we were using the IEs from ieee80211_probereq_ie() of net80211
and put them into the common_ies field. Start by manually building the
per-band and common IE parts as drivers put them back together.
This also involves allocating the req.ie as one buffer for all IEs over
all bands and setting req.ie_len correctly based on how many bytes we
put in.
Manually building per-band scan IEs we still use the net80211 routines
to add IEs to the buffer (mostly).
This is needed by Realtek drivers but will equally used by others.
Realtek would simply panic due to skbs being allocated with the wrong
length.
Longer-term this will help us, e.g., when not supporting VHT on 2Ghz
and we would have to do this anyway.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit d9945d7821b9baf724a704d37d33b9adcad70030)