sync with OpenBSD -current
This commit is contained in:
parent
222e583e28
commit
2d58860211
41 changed files with 532 additions and 277 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: acpi.c,v 1.428 2024/05/13 19:56:37 kettenis Exp $ */
|
||||
/* $OpenBSD: acpi.c,v 1.429 2024/05/29 12:21:33 kettenis Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
|
||||
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
|
||||
|
@ -2085,6 +2085,7 @@ acpi_powerdown_task(void *arg0, int dummy)
|
|||
int
|
||||
acpi_interrupt(void *arg)
|
||||
{
|
||||
extern int cpu_suspended;
|
||||
struct acpi_softc *sc = (struct acpi_softc *)arg;
|
||||
uint32_t processed = 0, idx, jdx;
|
||||
uint16_t sts, en;
|
||||
|
@ -2137,6 +2138,9 @@ acpi_interrupt(void *arg)
|
|||
ACPI_PM1_PWRBTN_STS);
|
||||
sts &= ~ACPI_PM1_PWRBTN_STS;
|
||||
|
||||
if (cpu_suspended)
|
||||
cpu_suspended = 0;
|
||||
|
||||
acpi_addtask(sc, acpi_pbtn_task, sc, 0);
|
||||
}
|
||||
if (sts & ACPI_PM1_SLPBTN_STS) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: acpi_x86.c,v 1.20 2024/05/28 09:40:40 kettenis Exp $ */
|
||||
/* $OpenBSD: acpi_x86.c,v 1.21 2024/05/29 12:21:33 kettenis Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
|
||||
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
|
||||
|
@ -31,13 +31,18 @@ int
|
|||
sleep_showstate(void *v, int sleepmode)
|
||||
{
|
||||
struct acpi_softc *sc = v;
|
||||
int fallback_state = -1;
|
||||
|
||||
switch (sleepmode) {
|
||||
case SLEEP_SUSPEND:
|
||||
sc->sc_state = ACPI_STATE_S3;
|
||||
#ifdef __amd64__
|
||||
fallback_state = ACPI_STATE_S0; /* No S3, use S0 */
|
||||
#endif
|
||||
break;
|
||||
case SLEEP_HIBERNATE:
|
||||
sc->sc_state = ACPI_STATE_S4;
|
||||
fallback_state = ACPI_STATE_S5; /* No S4, use S5 */
|
||||
break;
|
||||
default:
|
||||
return (EOPNOTSUPP);
|
||||
|
@ -45,10 +50,10 @@ sleep_showstate(void *v, int sleepmode)
|
|||
|
||||
if (sc->sc_sleeptype[sc->sc_state].slp_typa == -1 ||
|
||||
sc->sc_sleeptype[sc->sc_state].slp_typb == -1) {
|
||||
if (sc->sc_state == ACPI_STATE_S4) {
|
||||
sc->sc_state = ACPI_STATE_S5; /* No S4, use S5 */
|
||||
printf("%s: S4 unavailable, using S5\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
if (fallback_state != -1) {
|
||||
printf("%s: S%d unavailable, using S%d\n",
|
||||
sc->sc_dev.dv_xname, sc->sc_state, fallback_state);
|
||||
sc->sc_state = fallback_state;
|
||||
} else {
|
||||
printf("%s: state S%d unavailable\n",
|
||||
sc->sc_dev.dv_xname, sc->sc_state);
|
||||
|
@ -57,8 +62,10 @@ sleep_showstate(void *v, int sleepmode)
|
|||
}
|
||||
|
||||
/* 1st suspend AML step: _TTS(tostate) */
|
||||
if (aml_node_setval(sc, sc->sc_tts, sc->sc_state) != 0)
|
||||
return (EINVAL);
|
||||
if (sc->sc_state != ACPI_STATE_S0) {
|
||||
if (aml_node_setval(sc, sc->sc_tts, sc->sc_state) != 0)
|
||||
return (EINVAL);
|
||||
}
|
||||
acpi_indicator(sc, ACPI_SST_WAKING); /* blink */
|
||||
return 0;
|
||||
}
|
||||
|
@ -69,8 +76,10 @@ sleep_setstate(void *v)
|
|||
struct acpi_softc *sc = v;
|
||||
|
||||
/* 2nd suspend AML step: _PTS(tostate) */
|
||||
if (aml_node_setval(sc, sc->sc_pts, sc->sc_state) != 0)
|
||||
return (EINVAL);
|
||||
if (sc->sc_state != ACPI_STATE_S0) {
|
||||
if (aml_node_setval(sc, sc->sc_pts, sc->sc_state) != 0)
|
||||
return (EINVAL);
|
||||
}
|
||||
acpi_indicator(sc, ACPI_SST_WAKING); /* blink */
|
||||
return 0;
|
||||
}
|
||||
|
@ -85,7 +94,8 @@ gosleep(void *v)
|
|||
acpi_indicator(sc, ACPI_SST_SLEEPING);
|
||||
|
||||
/* 3rd suspend AML step: _GTS(tostate) */
|
||||
aml_node_setval(sc, sc->sc_gts, sc->sc_state);
|
||||
if (sc->sc_state != ACPI_STATE_S0)
|
||||
aml_node_setval(sc, sc->sc_gts, sc->sc_state);
|
||||
|
||||
/* Clear fixed event status */
|
||||
acpi_write_pmreg(sc, ACPIREG_PM1_STS, 0, ACPI_PM1_ALL_STS);
|
||||
|
@ -110,8 +120,10 @@ sleep_resume(void *v)
|
|||
acpibtn_disable_psw(); /* disable _LID for wakeup */
|
||||
|
||||
/* 3rd resume AML step: _TTS(runstate) */
|
||||
if (aml_node_setval(sc, sc->sc_tts, ACPI_STATE_S0) != 0)
|
||||
return (EINVAL);
|
||||
if (sc->sc_state != ACPI_STATE_S0) {
|
||||
if (aml_node_setval(sc, sc->sc_tts, ACPI_STATE_S0) != 0)
|
||||
return (EINVAL);
|
||||
}
|
||||
acpi_indicator(sc, ACPI_SST_WAKING); /* blink */
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: tpm.c,v 1.19 2024/05/13 01:15:50 jsg Exp $ */
|
||||
/* $OpenBSD: tpm.c,v 1.20 2024/05/29 12:21:33 kettenis Exp $ */
|
||||
|
||||
/*
|
||||
* Minimal interface to Trusted Platform Module chips implementing the
|
||||
|
@ -376,6 +376,9 @@ tpm_suspend(struct tpm_softc *sc)
|
|||
uint8_t *command;
|
||||
size_t commandlen;
|
||||
|
||||
if (sc->sc_acpi->sc_state == ACPI_STATE_S0)
|
||||
return 0;
|
||||
|
||||
DPRINTF(("%s: saving state preparing for suspend\n",
|
||||
sc->sc_dev.dv_xname));
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: acxvar.h,v 1.19 2008/07/21 04:12:21 kevlo Exp $ */
|
||||
/* $OpenBSD: acxvar.h,v 1.20 2024/05/29 01:11:53 jsg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
|
||||
|
@ -469,8 +469,6 @@ struct acx_softc {
|
|||
#define ACX_RADIO_RSSI_RADIA 78 /* 78db */
|
||||
#define ACX_RADIO_RSSI_UNKN 0 /* unknown radio */
|
||||
|
||||
extern const struct ieee80211_rateset acx_rates_11b;
|
||||
extern const struct ieee80211_rateset acx_rates_11g;
|
||||
extern int acx_beacon_intvl;
|
||||
|
||||
void acx100_set_param(struct acx_softc *);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: aic79xx.h,v 1.30 2022/10/21 17:45:40 kn Exp $ */
|
||||
/* $OpenBSD: aic79xx.h,v 1.31 2024/05/29 00:48:15 jsg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
|
||||
|
@ -1329,8 +1329,6 @@ void ahd_unbusy_tcl(struct ahd_softc *ahd, u_int tcl);
|
|||
|
||||
/***************************** PCI Front End *********************************/
|
||||
const struct ahd_pci_identity * ahd_find_pci_device(pcireg_t, pcireg_t);
|
||||
int ahd_pci_config(struct ahd_softc *,
|
||||
struct ahd_pci_identity *);
|
||||
int ahd_pci_test_register_access(struct ahd_softc *);
|
||||
|
||||
/************************** SCB and SCB queue management **********************/
|
||||
|
@ -1405,10 +1403,6 @@ int ahd_search_qinfifo(struct ahd_softc *ahd, int target,
|
|||
char channel, int lun, u_int tag,
|
||||
role_t role, uint32_t status,
|
||||
ahd_search_action action);
|
||||
int ahd_search_disc_list(struct ahd_softc *ahd, int target,
|
||||
char channel, int lun, u_int tag,
|
||||
int stop_on_first, int remove,
|
||||
int save_state);
|
||||
void ahd_freeze_devq(struct ahd_softc *ahd, struct scb *scb);
|
||||
int ahd_reset_channel(struct ahd_softc *ahd, char channel,
|
||||
int initiate_reset);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: aic79xx_openbsd.h,v 1.21 2020/07/28 21:33:14 krw Exp $ */
|
||||
/* $OpenBSD: aic79xx_openbsd.h,v 1.22 2024/05/29 00:48:15 jsg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
|
||||
|
@ -232,9 +232,6 @@ void aic_platform_scb_free(struct ahd_softc *, struct scb *);
|
|||
#define aic_get_pci_function(pci) ((pci)->pa_function)
|
||||
#define aic_get_pci_slot(pci) ((pci)->pa_device)
|
||||
#define aic_get_pci_bus(pci) ((pci)->pa_bus)
|
||||
|
||||
int ahd_pci_map_registers(struct ahd_softc *);
|
||||
int ahd_pci_map_int(struct ahd_softc *);
|
||||
/*#endif*/
|
||||
|
||||
typedef enum
|
||||
|
@ -245,15 +242,11 @@ typedef enum
|
|||
AHD_POWER_STATE_D3
|
||||
} ahd_power_state;
|
||||
|
||||
void ahd_power_state_change(struct ahd_softc *, ahd_power_state);
|
||||
|
||||
/********************************* Debug **************************************/
|
||||
void ahd_print_path(struct ahd_softc *, struct scb *);
|
||||
void ahd_platform_dump_card_state(struct ahd_softc *ahd);
|
||||
|
||||
/**************************** Transfer Settings *******************************/
|
||||
void ahd_notify_xfer_settings_change(struct ahd_softc *,
|
||||
struct ahd_devinfo *);
|
||||
void ahd_platform_set_tags(struct ahd_softc *, struct ahd_devinfo *,
|
||||
ahd_queue_alg);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: aic7xxx_openbsd.h,v 1.31 2020/08/13 12:11:15 krw Exp $ */
|
||||
/* $OpenBSD: aic7xxx_openbsd.h,v 1.32 2024/05/29 00:48:15 jsg Exp $ */
|
||||
/* $NetBSD: aic7xxx_osm.h,v 1.7 2003/11/02 11:07:44 wiz Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -357,10 +357,6 @@ typedef enum
|
|||
|
||||
void ahc_power_state_change(struct ahc_softc *, ahc_power_state);
|
||||
#endif
|
||||
/******************************** VL/EISA *************************************/
|
||||
int aic7770_map_registers(struct ahc_softc *, u_int);
|
||||
int aic7770_map_int(struct ahc_softc *, int);
|
||||
|
||||
/********************************* Debug **************************************/
|
||||
static __inline void ahc_print_path(struct ahc_softc *, struct scb *);
|
||||
static __inline void ahc_platform_dump_card_state(struct ahc_softc *);
|
||||
|
@ -379,15 +375,11 @@ ahc_platform_dump_card_state(struct ahc_softc *ahc)
|
|||
ahc->features, ahc->flags, ahc->chip, ahc->bugs);
|
||||
}
|
||||
/**************************** Transfer Settings *******************************/
|
||||
void ahc_notify_xfer_settings_change(struct ahc_softc *,
|
||||
struct ahc_devinfo *);
|
||||
void ahc_platform_set_tags(struct ahc_softc *, struct ahc_devinfo *, int);
|
||||
|
||||
/************************* Initialization/Teardown ****************************/
|
||||
int ahc_map_int(struct ahc_softc *);
|
||||
int ahc_attach(struct ahc_softc *);
|
||||
int ahc_softc_comp(struct ahc_softc *, struct ahc_softc *);
|
||||
int ahc_detach(struct device *, int);
|
||||
|
||||
/****************************** Interrupts ************************************/
|
||||
int ahc_platform_intr(void *);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: aic7xxxvar.h,v 1.38 2022/10/21 17:45:40 kn Exp $ */
|
||||
/* $OpenBSD: aic7xxxvar.h,v 1.40 2024/05/29 01:11:53 jsg Exp $ */
|
||||
/*
|
||||
* Core definitions and data structures shareable across OS platforms.
|
||||
*
|
||||
|
@ -38,7 +38,7 @@
|
|||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGES.
|
||||
*
|
||||
* $Id: aic7xxxvar.h,v 1.38 2022/10/21 17:45:40 kn Exp $
|
||||
* $Id: aic7xxxvar.h,v 1.40 2024/05/29 01:11:53 jsg Exp $
|
||||
*
|
||||
* $FreeBSD: src/sys/dev/aic7xxx/aic7xxx.h,v 1.50 2003/12/17 00:02:09 gibbs Exp $
|
||||
*/
|
||||
|
@ -1164,15 +1164,6 @@ struct ahc_pci_identity {
|
|||
extern const struct ahc_pci_identity ahc_pci_ident_table[];
|
||||
|
||||
/***************************** VL/EISA Declarations ***************************/
|
||||
struct aic7770_identity {
|
||||
uint32_t full_id;
|
||||
uint32_t id_mask;
|
||||
const char *name;
|
||||
ahc_device_setup_t *setup;
|
||||
};
|
||||
extern struct aic7770_identity aic7770_ident_table[];
|
||||
extern const int ahc_num_aic7770_devs;
|
||||
|
||||
#define AHC_EISA_SLOT_OFFSET 0xc00
|
||||
#define AHC_EISA_IOSIZE 0x100
|
||||
|
||||
|
@ -1184,15 +1175,8 @@ void ahc_busy_tcl(struct ahc_softc *, u_int, u_int);
|
|||
|
||||
/***************************** PCI Front End *********************************/
|
||||
const struct ahc_pci_identity *ahc_find_pci_device(pcireg_t, pcireg_t, u_int);
|
||||
int ahc_pci_config(struct ahc_softc *,
|
||||
struct ahc_pci_identity *);
|
||||
int ahc_pci_test_register_access(struct ahc_softc *);
|
||||
|
||||
/*************************** EISA/VL Front End ********************************/
|
||||
struct aic7770_identity *aic7770_find_device(uint32_t);
|
||||
int aic7770_config(struct ahc_softc *,
|
||||
struct aic7770_identity *, u_int);
|
||||
|
||||
/************************** SCB and SCB queue management **********************/
|
||||
int ahc_probe_scbs(struct ahc_softc *);
|
||||
void ahc_run_untagged_queues(struct ahc_softc *ahc);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: comvar.h,v 1.60 2024/05/12 08:42:13 jsg Exp $ */
|
||||
/* $OpenBSD: comvar.h,v 1.61 2024/05/29 00:48:15 jsg Exp $ */
|
||||
/* $NetBSD: comvar.h,v 1.5 1996/05/05 19:50:47 christos Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -147,7 +147,6 @@ void com_resume(struct com_softc *);
|
|||
|
||||
void comdiag(void *);
|
||||
int comspeed(long, long);
|
||||
u_char com_cflag2lcr(tcflag_t); /* XXX undefined */
|
||||
int comparam(struct tty *, struct termios *);
|
||||
void comstart(struct tty *);
|
||||
void comsoft(void *);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: dp8390var.h,v 1.13 2022/01/09 05:42:38 jsg Exp $ */
|
||||
/* $OpenBSD: dp8390var.h,v 1.14 2024/05/29 00:48:15 jsg Exp $ */
|
||||
/* $NetBSD: dp8390var.h,v 1.8 1998/08/12 07:19:09 scottr Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -173,4 +173,3 @@ void dp8390_rint(struct dp8390_softc *);
|
|||
|
||||
void dp8390_getmcaf(struct arpcom *, u_int8_t *);
|
||||
struct mbuf *dp8390_get(struct dp8390_softc *, int, u_short);
|
||||
void dp8390_read(struct dp8390_softc *, int, u_short);
|
||||
|
|
125
sys/dev/ic/qwx.c
125
sys/dev/ic/qwx.c
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: qwx.c,v 1.61 2024/05/28 13:02:45 jsg Exp $ */
|
||||
/* $OpenBSD: qwx.c,v 1.62 2024/05/29 07:24:26 stsp Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2023 Stefan Sperling <stsp@openbsd.org>
|
||||
|
@ -157,6 +157,7 @@ int qwx_wmi_vdev_install_key(struct qwx_softc *,
|
|||
struct wmi_vdev_install_key_arg *, uint8_t);
|
||||
int qwx_dp_peer_rx_pn_replay_config(struct qwx_softc *, struct qwx_vif *,
|
||||
struct ieee80211_node *, struct ieee80211_key *, int);
|
||||
void qwx_setkey_clear(struct qwx_softc *);
|
||||
|
||||
int qwx_scan(struct qwx_softc *);
|
||||
void qwx_scan_abort(struct qwx_softc *);
|
||||
|
@ -183,7 +184,45 @@ qwx_init(struct ifnet *ifp)
|
|||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
|
||||
sc->fw_mode = ATH11K_FIRMWARE_MODE_NORMAL;
|
||||
sc->crypto_mode = ATH11K_CRYPT_MODE_HW;
|
||||
/*
|
||||
* There are several known hardware/software crypto issues
|
||||
* on wcn6855 devices, firmware 0x1106196e. It is unclear
|
||||
* if these are driver or firmware bugs.
|
||||
*
|
||||
* 1) Broadcast/Multicast frames will only be received on
|
||||
* encrypted networks if hardware crypto is used and a
|
||||
* CCMP group key is used. Otherwise such frames never
|
||||
* even trigger an interrupt. This breaks ARP and IPv6.
|
||||
* This issue is known to affect the Linux ath11k vendor
|
||||
* driver when software crypto mode is selected.
|
||||
* Workaround: Use hardware crypto on WPA2 networks.
|
||||
* However, even with hardware crypto broadcast frames
|
||||
* are never received if TKIP is used as the WPA2 group
|
||||
* cipher and we have no workaround for this.
|
||||
*
|
||||
* 2) Adding WEP keys for hardware crypto crashes the firmware.
|
||||
* Presumably, lack of WEP support is deliberate because the
|
||||
* Linux ath11k vendor driver rejects attempts to install
|
||||
* WEP keys to hardware.
|
||||
* Workaround: Use software crypto if WEP is enabled.
|
||||
* This suffers from the broadcast issues mentioned above.
|
||||
*
|
||||
* 3) A WPA1 group key handshake message from the AP is never
|
||||
* received if hardware crypto is used.
|
||||
* Workaround: Use software crypto if WPA1 is enabled.
|
||||
* This suffers from the broadcast issues mentioned above,
|
||||
* even on WPA2 networks when WPA1 and WPA2 are both enabled.
|
||||
* On OpenBSD, WPA1 is disabled by default.
|
||||
*
|
||||
* The only known fully working configurations are unencrypted
|
||||
* networks, and WPA2/CCMP-only networks provided WPA1 remains
|
||||
* disabled.
|
||||
*/
|
||||
if ((ic->ic_flags & IEEE80211_F_WEPON) ||
|
||||
(ic->ic_rsnprotos & IEEE80211_PROTO_WPA))
|
||||
sc->crypto_mode = ATH11K_CRYPT_MODE_SW;
|
||||
else
|
||||
sc->crypto_mode = ATH11K_CRYPT_MODE_HW;
|
||||
sc->frame_mode = ATH11K_HW_TXRX_NATIVE_WIFI;
|
||||
ic->ic_state = IEEE80211_S_INIT;
|
||||
sc->ns_nstate = IEEE80211_S_INIT;
|
||||
|
@ -291,6 +330,8 @@ qwx_stop(struct ifnet *ifp)
|
|||
qwx_del_task(sc, systq, &sc->setkey_task);
|
||||
refcnt_finalize(&sc->task_refs, "qwxstop");
|
||||
|
||||
qwx_setkey_clear(sc);
|
||||
|
||||
clear_bit(ATH11K_FLAG_CRASH_FLUSH, sc->sc_flags);
|
||||
|
||||
ifp->if_timer = sc->sc_tx_timer = 0;
|
||||
|
@ -529,8 +570,8 @@ qwx_set_key(struct ieee80211com *ic, struct ieee80211_node *ni,
|
|||
struct qwx_softc *sc = ic->ic_softc;
|
||||
|
||||
if (test_bit(ATH11K_FLAG_HW_CRYPTO_DISABLED, sc->sc_flags) ||
|
||||
(k->k_cipher != IEEE80211_CIPHER_CCMP &&
|
||||
k->k_cipher != IEEE80211_CIPHER_TKIP))
|
||||
k->k_cipher == IEEE80211_CIPHER_WEP40 ||
|
||||
k->k_cipher == IEEE80211_CIPHER_WEP104)
|
||||
return ieee80211_set_key(ic, ni, k);
|
||||
|
||||
return qwx_queue_setkey_cmd(ic, ni, k, QWX_ADD_KEY);
|
||||
|
@ -543,8 +584,8 @@ qwx_delete_key(struct ieee80211com *ic, struct ieee80211_node *ni,
|
|||
struct qwx_softc *sc = ic->ic_softc;
|
||||
|
||||
if (test_bit(ATH11K_FLAG_HW_CRYPTO_DISABLED, sc->sc_flags) ||
|
||||
(k->k_cipher != IEEE80211_CIPHER_CCMP &&
|
||||
k->k_cipher != IEEE80211_CIPHER_TKIP)) {
|
||||
k->k_cipher == IEEE80211_CIPHER_WEP40 ||
|
||||
k->k_cipher == IEEE80211_CIPHER_WEP104) {
|
||||
ieee80211_delete_key(ic, ni, k);
|
||||
return;
|
||||
}
|
||||
|
@ -757,6 +798,24 @@ qwx_setkey_task(void *arg)
|
|||
splx(s);
|
||||
}
|
||||
|
||||
void
|
||||
qwx_setkey_clear(struct qwx_softc *sc)
|
||||
{
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
struct qwx_setkey_task_arg *a;
|
||||
|
||||
while (sc->setkey_nkeys > 0) {
|
||||
a = &sc->setkey_arg[sc->setkey_tail];
|
||||
ieee80211_release_node(ic, a->ni);
|
||||
a->ni = NULL;
|
||||
sc->setkey_tail = (sc->setkey_tail + 1) %
|
||||
nitems(sc->setkey_arg);
|
||||
sc->setkey_nkeys--;
|
||||
}
|
||||
memset(sc->setkey_arg, 0, sizeof(sc->setkey_arg));
|
||||
sc->setkey_cur = sc->setkey_tail = sc->setkey_nkeys = 0;
|
||||
}
|
||||
|
||||
int
|
||||
qwx_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
|
||||
{
|
||||
|
@ -773,21 +832,11 @@ qwx_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
|
|||
nstate != IEEE80211_S_AUTH)
|
||||
return 0;
|
||||
if (ic->ic_state == IEEE80211_S_RUN) {
|
||||
struct qwx_setkey_task_arg *a;
|
||||
#if 0
|
||||
qwx_del_task(sc, systq, &sc->ba_task);
|
||||
#endif
|
||||
qwx_del_task(sc, systq, &sc->setkey_task);
|
||||
while (sc->setkey_nkeys > 0) {
|
||||
a = &sc->setkey_arg[sc->setkey_tail];
|
||||
ieee80211_release_node(ic, a->ni);
|
||||
a->ni = NULL;
|
||||
sc->setkey_tail = (sc->setkey_tail + 1) %
|
||||
nitems(sc->setkey_arg);
|
||||
sc->setkey_nkeys--;
|
||||
}
|
||||
memset(sc->setkey_arg, 0, sizeof(sc->setkey_arg));
|
||||
sc->setkey_cur = sc->setkey_tail = sc->setkey_nkeys = 0;
|
||||
qwx_setkey_clear(sc);
|
||||
#if 0
|
||||
qwx_del_task(sc, systq, &sc->bgscan_done_task);
|
||||
#endif
|
||||
|
@ -16021,13 +16070,15 @@ qwx_dp_rx_h_reo_err(struct qwx_softc *sc, struct qwx_rx_msdu *msdu,
|
|||
int
|
||||
qwx_dp_rx_h_rxdma_err(struct qwx_softc *sc, struct qwx_rx_msdu *msdu)
|
||||
{
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
int drop = 0;
|
||||
#if 0
|
||||
ar->ab->soc_stats.rxdma_error[rxcb->err_code]++;
|
||||
#endif
|
||||
switch (msdu->err_code) {
|
||||
case HAL_REO_ENTR_RING_RXDMA_ECODE_TKIP_MIC_ERR:
|
||||
drop = 1; /* OpenBSD uses TKIP in software crypto mode only */
|
||||
ic->ic_stats.is_rx_locmicfail++;
|
||||
drop = 1;
|
||||
break;
|
||||
default:
|
||||
/* TODO: Review other rxdma error code to check if anything is
|
||||
|
@ -24193,7 +24244,7 @@ qwx_dp_tx(struct qwx_softc *sc, struct qwx_vif *arvif, uint8_t pdev_id,
|
|||
void *hal_tcl_desc;
|
||||
uint8_t pool_id;
|
||||
uint8_t hal_ring_id;
|
||||
int ret, msdu_id;
|
||||
int ret, msdu_id, off;
|
||||
uint32_t ring_selector = 0;
|
||||
uint8_t ring_map = 0;
|
||||
|
||||
|
@ -24238,22 +24289,34 @@ qwx_dp_tx(struct qwx_softc *sc, struct qwx_vif *arvif, uint8_t pdev_id,
|
|||
if ((wh->i_fc[1] & IEEE80211_FC1_PROTECTED) &&
|
||||
ti.encap_type == HAL_TCL_ENCAP_TYPE_RAW) {
|
||||
k = ieee80211_get_txkey(ic, wh, ni);
|
||||
switch (k->k_cipher) {
|
||||
case IEEE80211_CIPHER_CCMP:
|
||||
ti.encrypt_type = HAL_ENCRYPT_TYPE_CCMP_128;
|
||||
m->m_pkthdr.len += IEEE80211_CCMP_MICLEN;
|
||||
break;
|
||||
case IEEE80211_CIPHER_TKIP:
|
||||
ti.encrypt_type = HAL_ENCRYPT_TYPE_TKIP_MIC;
|
||||
m->m_pkthdr.len += IEEE80211_TKIP_MICLEN;
|
||||
break;
|
||||
default:
|
||||
/* Fallback to software crypto for other ciphers. */
|
||||
if (test_bit(ATH11K_FLAG_HW_CRYPTO_DISABLED, sc->sc_flags)) {
|
||||
ti.encrypt_type = HAL_ENCRYPT_TYPE_OPEN;
|
||||
break;
|
||||
} else {
|
||||
switch (k->k_cipher) {
|
||||
case IEEE80211_CIPHER_CCMP:
|
||||
ti.encrypt_type = HAL_ENCRYPT_TYPE_CCMP_128;
|
||||
if (m_makespace(m, m->m_pkthdr.len,
|
||||
IEEE80211_CCMP_MICLEN, &off) == NULL) {
|
||||
m_freem(m);
|
||||
return ENOSPC;
|
||||
}
|
||||
break;
|
||||
case IEEE80211_CIPHER_TKIP:
|
||||
ti.encrypt_type = HAL_ENCRYPT_TYPE_TKIP_MIC;
|
||||
if (m_makespace(m, m->m_pkthdr.len,
|
||||
IEEE80211_TKIP_MICLEN, &off) == NULL) {
|
||||
m_freem(m);
|
||||
return ENOSPC;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ti.encrypt_type = HAL_ENCRYPT_TYPE_OPEN;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (ti.encrypt_type == HAL_ENCRYPT_TYPE_OPEN) {
|
||||
/* Using software crypto. */
|
||||
if ((m = ieee80211_encrypt(ic, m, k)) == NULL)
|
||||
return ENOBUFS;
|
||||
/* 802.11 header may have moved. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: stivar.h,v 1.27 2021/05/01 20:04:33 kettenis Exp $ */
|
||||
/* $OpenBSD: stivar.h,v 1.28 2024/05/29 00:48:15 jsg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000-2003 Michael Shalayeff
|
||||
|
@ -138,8 +138,6 @@ struct sti_softc {
|
|||
|
||||
int sti_attach_common(struct sti_softc *, bus_space_tag_t, bus_space_tag_t,
|
||||
bus_space_handle_t, u_int);
|
||||
int sti_cnattach(struct sti_rom *, struct sti_screen *, bus_space_tag_t,
|
||||
bus_addr_t *, u_int);
|
||||
void sti_describe(struct sti_softc *);
|
||||
void sti_end_attach(void *);
|
||||
u_int sti_rom_size(bus_space_tag_t, bus_space_handle_t);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: ufshcivar.h,v 1.8 2024/05/24 09:51:14 mglocker Exp $ */
|
||||
/* $OpenBSD: ufshcivar.h,v 1.9 2024/05/29 00:48:15 jsg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2022 Marcus Glocker <mglocker@openbsd.org>
|
||||
|
@ -82,6 +82,5 @@ struct ufshci_softc {
|
|||
};
|
||||
|
||||
int ufshci_intr(void *);
|
||||
void ufshci_attach_hook(struct device *); /* XXX: Only for testing */
|
||||
int ufshci_attach(struct ufshci_softc *);
|
||||
int ufshci_activate(struct ufshci_softc *, int);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: wdcvar.h,v 1.57 2022/01/09 05:42:42 jsg Exp $ */
|
||||
/* $OpenBSD: wdcvar.h,v 1.58 2024/05/29 00:48:15 jsg Exp $ */
|
||||
/* $NetBSD: wdcvar.h,v 1.17 1999/04/11 20:50:29 bouyer Exp $ */
|
||||
|
||||
/*-
|
||||
|
@ -305,7 +305,6 @@ void wdc_delref(struct channel_softc *);
|
|||
|
||||
void wdc_disable_intr(struct channel_softc *);
|
||||
void wdc_enable_intr(struct channel_softc *);
|
||||
int wdc_select_drive(struct channel_softc *, int, int);
|
||||
void wdc_set_drive(struct channel_softc *, int drive);
|
||||
void wdc_output_bytes(struct ata_drive_datas *drvp, void *, unsigned int);
|
||||
void wdc_input_bytes(struct ata_drive_datas *drvp, void *, unsigned int);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: gusvar.h,v 1.13 2022/11/02 10:41:34 kn Exp $ */
|
||||
/* $OpenBSD: gusvar.h,v 1.14 2024/05/29 00:48:14 jsg Exp $ */
|
||||
/* $NetBSD: gus.c,v 1.51 1998/01/25 23:48:06 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
|
@ -310,7 +310,6 @@ void gusmax_close(void *);
|
|||
int gusintr(void *);
|
||||
int gus_set_in_gain(caddr_t, u_int, u_char);
|
||||
int gus_get_in_gain(caddr_t);
|
||||
int gus_set_out_gain(caddr_t, u_int, u_char);
|
||||
int gus_get_out_gain(caddr_t);
|
||||
int gus_set_params(void *, int, int, struct audio_params *, struct audio_params *);
|
||||
int gusmax_set_params(void *, int, int, struct audio_params *, struct audio_params *);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_athn_usb.c,v 1.66 2024/05/23 03:21:08 jsg Exp $ */
|
||||
/* $OpenBSD: if_athn_usb.c,v 1.67 2024/05/29 07:27:33 stsp Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 Damien Bergamini <damien.bergamini@free.fr>
|
||||
|
@ -1640,6 +1640,11 @@ athn_usb_set_key(struct ieee80211com *ic, struct ieee80211_node *ni,
|
|||
(IFF_UP | IFF_RUNNING))
|
||||
return (0);
|
||||
|
||||
if (k->k_cipher != IEEE80211_CIPHER_CCMP) {
|
||||
/* Use software crypto for ciphers other than CCMP. */
|
||||
return ieee80211_set_key(ic, ni, k);
|
||||
}
|
||||
|
||||
/* Do it in a process context. */
|
||||
cmd.ni = (ni != NULL) ? ieee80211_ref_node(ni) : NULL;
|
||||
cmd.key = k;
|
||||
|
@ -1682,6 +1687,11 @@ athn_usb_delete_key(struct ieee80211com *ic, struct ieee80211_node *ni,
|
|||
ic->ic_state != IEEE80211_S_RUN)
|
||||
return; /* Nothing to do. */
|
||||
|
||||
if (k->k_cipher != IEEE80211_CIPHER_CCMP) {
|
||||
ieee80211_delete_key(ic, ni, k);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Do it in a process context. */
|
||||
cmd.ni = (ni != NULL) ? ieee80211_ref_node(ni) : NULL;
|
||||
cmd.key = k;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$OpenBSD: usbdevs,v 1.765 2024/05/23 08:06:22 kevlo Exp $
|
||||
$OpenBSD: usbdevs,v 1.766 2024/05/29 06:48:43 jsg Exp $
|
||||
/* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -1023,6 +1023,7 @@ product APPLE IPHONE_4S 0x12a0 iPhone 4S
|
|||
product APPLE IPHONE_6 0x12a8 iPhone 6
|
||||
product APPLE ETHERNET 0x1402 Ethernet A1277
|
||||
product APPLE BLUETOOTH2 0x8205 Bluetooth
|
||||
product APPLE BLUETOOTH3 0x8207 Bluetooth
|
||||
product APPLE BLUETOOTH 0x8300 Bluetooth
|
||||
product APPLE ISIGHT_1 0x8501 iSight
|
||||
product APPLE ISIGHT 0x8502 iSight
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* $OpenBSD: usbdevs.h,v 1.777 2024/05/23 08:06:45 kevlo Exp $ */
|
||||
/* $OpenBSD: usbdevs.h,v 1.778 2024/05/29 06:49:38 jsg Exp $ */
|
||||
|
||||
/*
|
||||
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
*
|
||||
* generated from:
|
||||
* OpenBSD: usbdevs,v 1.765 2024/05/23 08:06:22 kevlo Exp
|
||||
* OpenBSD: usbdevs,v 1.766 2024/05/29 06:48:43 jsg Exp
|
||||
*/
|
||||
/* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */
|
||||
|
||||
|
@ -1030,6 +1030,7 @@
|
|||
#define USB_PRODUCT_APPLE_IPHONE_6 0x12a8 /* iPhone 6 */
|
||||
#define USB_PRODUCT_APPLE_ETHERNET 0x1402 /* Ethernet A1277 */
|
||||
#define USB_PRODUCT_APPLE_BLUETOOTH2 0x8205 /* Bluetooth */
|
||||
#define USB_PRODUCT_APPLE_BLUETOOTH3 0x8207 /* Bluetooth */
|
||||
#define USB_PRODUCT_APPLE_BLUETOOTH 0x8300 /* Bluetooth */
|
||||
#define USB_PRODUCT_APPLE_ISIGHT_1 0x8501 /* iSight */
|
||||
#define USB_PRODUCT_APPLE_ISIGHT 0x8502 /* iSight */
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* $OpenBSD: usbdevs_data.h,v 1.771 2024/05/23 08:06:45 kevlo Exp $ */
|
||||
/* $OpenBSD: usbdevs_data.h,v 1.772 2024/05/29 06:49:38 jsg Exp $ */
|
||||
|
||||
/*
|
||||
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
*
|
||||
* generated from:
|
||||
* OpenBSD: usbdevs,v 1.765 2024/05/23 08:06:22 kevlo Exp
|
||||
* OpenBSD: usbdevs,v 1.766 2024/05/29 06:48:43 jsg Exp
|
||||
*/
|
||||
/* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */
|
||||
|
||||
|
@ -1001,6 +1001,10 @@ const struct usb_known_product usb_known_products[] = {
|
|||
USB_VENDOR_APPLE, USB_PRODUCT_APPLE_BLUETOOTH2,
|
||||
"Bluetooth",
|
||||
},
|
||||
{
|
||||
USB_VENDOR_APPLE, USB_PRODUCT_APPLE_BLUETOOTH3,
|
||||
"Bluetooth",
|
||||
},
|
||||
{
|
||||
USB_VENDOR_APPLE, USB_PRODUCT_APPLE_BLUETOOTH,
|
||||
"Bluetooth",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: wsmux.c,v 1.57 2024/03/25 13:01:49 mvs Exp $ */
|
||||
/* $OpenBSD: wsmux.c,v 1.58 2024/05/29 06:39:13 jsg Exp $ */
|
||||
/* $NetBSD: wsmux.c,v 1.37 2005/04/30 03:47:12 augustss Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -216,7 +216,7 @@ wsmuxopen(dev_t dev, int flags, int mode, struct proc *p)
|
|||
|
||||
error = wsmux_do_open(sc, evar);
|
||||
if (error)
|
||||
wsevent_fini(evar);
|
||||
wsevent_fini(evar);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue