[haiku-commits] haiku: hrev52735 - src/libs/compat/freebsd_wlan/net80211

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 9 Jan 2019 16:31:08 -0500 (EST)

hrev52735 adds 1 changeset to branch 'master'
old head: 568bb7eeab4b485d19492b8415d858cf6297fb11
new head: 4293d6b7da93133bd872991d1758f4bdca64bf68
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=4293d6b7da93+%5E568bb7eeab4b

----------------------------------------------------------------------------

4293d6b7da93: freebsd_wlan: Tweak ioctl-size hacks.
  
  This doesn't seem to fix the wpa_supplicant crashes, though.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev52735
Commit:      4293d6b7da93133bd872991d1758f4bdca64bf68
URL:         https://git.haiku-os.org/haiku/commit/?id=4293d6b7da93
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Wed Jan  9 21:30:16 2019 UTC

----------------------------------------------------------------------------

2 files changed, 8 insertions(+), 6 deletions(-)
src/libs/compat/freebsd_wlan/net80211/ieee80211_ioctl.c | 10 ++++++----
src/libs/compat/freebsd_wlan/net80211/ieee80211_ioctl.h |  4 ++--

----------------------------------------------------------------------------

diff --git a/src/libs/compat/freebsd_wlan/net80211/ieee80211_ioctl.c 
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_ioctl.c
index 67d47073b2..38b8065e19 100644
--- a/src/libs/compat/freebsd_wlan/net80211/ieee80211_ioctl.c
+++ b/src/libs/compat/freebsd_wlan/net80211/ieee80211_ioctl.c
@@ -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));
+       ieee80211_sort_channels(ci->ic_chans, ci->ic_nchans);
 #ifdef __HAIKU__
-       if (maxchans == 0)
-               dc->dc_chaninfo.ic_nchans = 1; /* HACK: so it will really be 0 
*/
-       else
+       } else
+               dc->dc_chaninfo.ic_nchans = 0; /* HACK */
 #endif
-       ieee80211_sort_channels(ci->ic_chans, ci->ic_nchans);
        error = copyout(dc, ireq->i_data, IEEE80211_DEVCAPS_SPACE(dc));
        IEEE80211_FREE(dc, M_TEMP);
        return error;
diff --git a/src/libs/compat/freebsd_wlan/net80211/ieee80211_ioctl.h 
b/src/libs/compat/freebsd_wlan/net80211/ieee80211_ioctl.h
index 0d322967af..0791b4aaf6 100644
--- a/src/libs/compat/freebsd_wlan/net80211/ieee80211_ioctl.h
+++ b/src/libs/compat/freebsd_wlan/net80211/ieee80211_ioctl.h
@@ -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 */


Other related posts:

  • » [haiku-commits] haiku: hrev52735 - src/libs/compat/freebsd_wlan/net80211 - waddlesplash