From 83a6125d7e22c64125f7086b758c2359f7497187 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Thu, 28 Jun 2018 17:25:20 -0400 Subject: [PATCH] iprowifi4965: Fix for the Intel Centrino 6235. The first change (universally disable ICT mode on Haiku) was my fault for not properly carrying forward from the FreeBSD 9 driver, but the second change (remove flag from _base_params) is indeed a bug in FreeBSD 11. This device ID was not present in the FreeBSD 9 driver; we added it ourselves, and somehow it "just worked." FreeBSD 11 tries to properly configure this device, which nearly works, but somehow they also wound up with this flag in the base parameters, which even the comment suspected was wrong. Thanks to Humdinger for diligently trying all the strange code changes I suggested to him over IRC. :) --- src/add-ons/kernel/drivers/network/wlan/Jamfile | 6 ++++-- .../drivers/network/wlan/iprowifi4965/dev/iwn/if_iwn.c | 2 ++ .../network/wlan/iprowifi4965/dev/iwn/if_iwn_chip_cfg.h | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/add-ons/kernel/drivers/network/wlan/Jamfile b/src/add-ons/kernel/drivers/network/wlan/Jamfile index 52864c0159..da225677f5 100644 --- a/src/add-ons/kernel/drivers/network/wlan/Jamfile +++ b/src/add-ons/kernel/drivers/network/wlan/Jamfile @@ -15,8 +15,10 @@ SubInclude HAIKU_TOP src add-ons kernel drivers network wlan aironetwifi ; SubInclude HAIKU_TOP src add-ons kernel drivers network wlan atheroswifi ; SubInclude HAIKU_TOP src add-ons kernel drivers network wlan broadcom43xx ; SubInclude HAIKU_TOP src add-ons kernel drivers network wlan iprowifi2200 ; -SubInclude HAIKU_TOP src add-ons kernel drivers network wlan iprowifi3945 ; -SubInclude HAIKU_TOP src add-ons kernel drivers network wlan iprowifi4965 ; SubInclude HAIKU_TOP src add-ons kernel drivers network wlan marvell88w8363 ; SubInclude HAIKU_TOP src add-ons kernel drivers network wlan ralinkwifi ; SubInclude HAIKU_TOP src add-ons kernel drivers network wlan wavelanwifi ; + +# FreeBSD 11.1 drivers +SubInclude HAIKU_TOP src add-ons kernel drivers network wlan iprowifi3945 ; +SubInclude HAIKU_TOP src add-ons kernel drivers network wlan iprowifi4965 ; diff --git a/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/dev/iwn/if_iwn.c b/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/dev/iwn/if_iwn.c index f5eea18786..219e39d09f 100644 --- a/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/dev/iwn/if_iwn.c +++ b/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/dev/iwn/if_iwn.c @@ -7758,8 +7758,10 @@ iwn5000_post_alive(struct iwn_softc *sc) DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__); +#ifndef __HAIKU__ /* Switch to using ICT interrupt mode. */ iwn5000_ict_reset(sc); +#endif if ((error = iwn_nic_lock(sc)) != 0){ DPRINTF(sc, IWN_DEBUG_TRACE, "->%s end in error\n", __func__); diff --git a/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/dev/iwn/if_iwn_chip_cfg.h b/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/dev/iwn/if_iwn_chip_cfg.h index ea6f3e12e4..041238681a 100644 --- a/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/dev/iwn/if_iwn_chip_cfg.h +++ b/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/dev/iwn/if_iwn_chip_cfg.h @@ -382,8 +382,7 @@ static const struct iwn_base_params iwn_6235_base_params = { | IWN_FLG_NEED_PHY_CALIB_TEMP_OFFSET ), .support_hostap = false, .no_multi_vaps = true, - /* XXX 1x2? This NIC is 2x2, right? */ - .additional_gp_drv_bit = IWN_GP_DRIVER_6050_1X2, + .additional_gp_drv_bit = 0, .bt_mode = IWN_BT_ADVANCED, .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, };