mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-24 11:29:10 +00:00
Begin fleshing out a knob to enable/disable bluetooth coexistence.
Some firmware versions seem to get very unhappy if they're sent btcoex commands when they don't actually have bluetooth hardware in them. So, disable sending them those commands. Tested: * 5100 (which has bluetooth, no problems) * 4965 (which doesn't have bluetooth, but didn't seem to crash) * 6200 (no bluetooth, seems to get unhappy being sent bluetooth commands.)
This commit is contained in:
parent
2e6fe9b630
commit
8cf53c1244
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257134
@ -705,6 +705,8 @@ iwn4965_attach(struct iwn_softc *sc, uint16_t pid)
|
||||
/* Override chains masks, ROM is known to be broken. */
|
||||
sc->txchainmask = IWN_ANT_AB;
|
||||
sc->rxchainmask = IWN_ANT_ABC;
|
||||
/* Enable normal btcoex */
|
||||
sc->sc_flags |= IWN_FLAG_BTCOEX;
|
||||
|
||||
DPRINTF(sc, IWN_DEBUG_TRACE, "%s: end\n",__func__);
|
||||
|
||||
@ -752,23 +754,40 @@ iwn5000_attach(struct iwn_softc *sc, uint16_t pid)
|
||||
/* Override chains masks, ROM is known to be broken. */
|
||||
sc->txchainmask = IWN_ANT_B;
|
||||
sc->rxchainmask = IWN_ANT_AB;
|
||||
/* Enable normal btcoex */
|
||||
sc->sc_flags |= IWN_FLAG_BTCOEX;
|
||||
break;
|
||||
case IWN_HW_REV_TYPE_5150:
|
||||
sc->limits = &iwn5150_sensitivity_limits;
|
||||
sc->fwname = "iwn5150fw";
|
||||
/* Enable normal btcoex */
|
||||
sc->sc_flags |= IWN_FLAG_BTCOEX;
|
||||
break;
|
||||
case IWN_HW_REV_TYPE_5300:
|
||||
case IWN_HW_REV_TYPE_5350:
|
||||
sc->limits = &iwn5000_sensitivity_limits;
|
||||
sc->fwname = "iwn5000fw";
|
||||
/* Enable normal btcoex */
|
||||
sc->sc_flags |= IWN_FLAG_BTCOEX;
|
||||
break;
|
||||
case IWN_HW_REV_TYPE_1000:
|
||||
sc->limits = &iwn1000_sensitivity_limits;
|
||||
sc->fwname = "iwn1000fw";
|
||||
/* Enable normal btcoex */
|
||||
sc->sc_flags |= IWN_FLAG_BTCOEX;
|
||||
break;
|
||||
case IWN_HW_REV_TYPE_6000:
|
||||
sc->limits = &iwn6000_sensitivity_limits;
|
||||
sc->fwname = "iwn6000fw";
|
||||
/*
|
||||
* Disable btcoex for 6200.
|
||||
* XXX TODO: disable for 6205; no btcoex as well
|
||||
* (6230/6235 - enable bluetooth)
|
||||
*/
|
||||
if (pid != 0x422c) {
|
||||
/* Enable normal btcoex */
|
||||
sc->sc_flags |= IWN_FLAG_BTCOEX;
|
||||
}
|
||||
if (pid == 0x422c || pid == 0x4239) {
|
||||
sc->sc_flags |= IWN_FLAG_INTERNAL_PA;
|
||||
/* Override chains masks, ROM is known to be broken. */
|
||||
@ -782,14 +801,20 @@ iwn5000_attach(struct iwn_softc *sc, uint16_t pid)
|
||||
/* Override chains masks, ROM is known to be broken. */
|
||||
sc->txchainmask = IWN_ANT_AB;
|
||||
sc->rxchainmask = IWN_ANT_AB;
|
||||
/* Enable normal btcoex */
|
||||
sc->sc_flags |= IWN_FLAG_BTCOEX;
|
||||
break;
|
||||
case IWN_HW_REV_TYPE_6005:
|
||||
sc->limits = &iwn6000_sensitivity_limits;
|
||||
if (pid != 0x0082 && pid != 0x0085) {
|
||||
sc->fwname = "iwn6000g2bfw";
|
||||
sc->sc_flags |= IWN_FLAG_ADV_BTCOEX;
|
||||
} else
|
||||
} else {
|
||||
sc->fwname = "iwn6000g2afw";
|
||||
/*
|
||||
* 6250 - disable bluetooth coexistence.
|
||||
*/
|
||||
}
|
||||
break;
|
||||
default:
|
||||
device_printf(sc->sc_dev, "adapter type %d not supported\n",
|
||||
@ -797,6 +822,15 @@ iwn5000_attach(struct iwn_softc *sc, uint16_t pid)
|
||||
DPRINTF(sc, IWN_DEBUG_TRACE, "->%s: end in error\n",__func__);
|
||||
return ENOTSUP;
|
||||
}
|
||||
if (sc->sc_flags & IWN_FLAG_BTCOEX)
|
||||
device_printf(sc->sc_dev,
|
||||
"enable basic bluetooth coexistence\n");
|
||||
else if (sc->sc_flags & IWN_FLAG_ADV_BTCOEX)
|
||||
device_printf(sc->sc_dev,
|
||||
"enable advanced bluetooth coexistence\n");
|
||||
else
|
||||
device_printf(sc->sc_dev,
|
||||
"disable bluetooth coexistence\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -5404,9 +5438,10 @@ iwn_config(struct iwn_softc *sc)
|
||||
}
|
||||
|
||||
/* Configure bluetooth coexistence. */
|
||||
error = 0;
|
||||
if (sc->sc_flags & IWN_FLAG_ADV_BTCOEX)
|
||||
error = iwn_send_advanced_btcoex(sc);
|
||||
else
|
||||
else if (sc->sc_flags & IWN_FLAG_BTCOEX)
|
||||
error = iwn_send_btcoex(sc);
|
||||
if (error != 0) {
|
||||
device_printf(sc->sc_dev,
|
||||
|
@ -249,6 +249,7 @@ struct iwn_softc {
|
||||
#define IWN_FLAG_ENH_SENS (1 << 7)
|
||||
#define IWN_FLAG_ADV_BTCOEX (1 << 8)
|
||||
#define IWN_FLAG_PAN_SUPPORT (1 << 9)
|
||||
#define IWN_FLAG_BTCOEX (1 << 10)
|
||||
|
||||
uint8_t hw_type;
|
||||
/* subdevice_id used to adjust configuration */
|
||||
|
Loading…
Reference in New Issue
Block a user