freebsd_wlan: Tweak ioctl-size hacks.

This doesn't seem to fix the wpa_supplicant crashes, though.
This commit is contained in:
Augustin Cavalier
2019-01-09 16:30:16 -05:00
parent 568bb7eeab
commit 4293d6b7da
2 changed files with 9 additions and 7 deletions
@@ -720,15 +720,17 @@ ieee80211_ioctl_getdevcaps(struct ieee80211com *ic,
dc->dc_vhtcaps = ic->ic_vhtcaps;
#endif
ci = &dc->dc_chaninfo;
#ifdef __HAIKU__
if (maxchans != 0) {
#endif
ic->ic_getradiocaps(ic, maxchans, &ci->ic_nchans, ci->ic_chans);
KASSERT(ci->ic_nchans <= maxchans,
("nchans %d maxchans %d", ci->ic_nchans, maxchans));
#ifdef __HAIKU__
if (maxchans == 0)
dc->dc_chaninfo.ic_nchans = 1; /* HACK: so it will really be 0 */
else
#endif
ieee80211_sort_channels(ci->ic_chans, ci->ic_nchans);
#ifdef __HAIKU__
} else
dc->dc_chaninfo.ic_nchans = 0; /* HACK */
#endif
error = copyout(dc, ireq->i_data, IEEE80211_DEVCAPS_SPACE(dc));
IEEE80211_FREE(dc, M_TEMP);
return error;
@@ -429,8 +429,8 @@ struct ieee80211req_sta_info {
uint16_t isi_ie_off; /* offset to IE data */
uint16_t isi_ie_len; /* IE length */
#ifdef __HAIKU__
uint32_t isi_flags; /* MHz */
uint16_t isi_freq; /* channel flags */
uint32_t isi_flags; /* channel flags */
uint16_t isi_freq; /* MHz */
int8_t padding[10];
#else
uint16_t isi_freq; /* MHz */