diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2019-05-09 16:14:15 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2019-05-09 16:14:15 +0000 |
commit | 85010783c2cdfe90ae359de3f0e181aeec89ec17 (patch) | |
tree | 8de281f65d2ebe0a951b95468b2bf300fa8b329d /sys/dev/pci | |
parent | 38d9bc99f56bc8019d4320aa7dac59f91ec39b2d (diff) |
Correctly mask status bits in iwm's ADD_STA command response; remaining
bits are used by firmware to return the BAID for a BA session.
matches:
Dragonfly 74d41163ddac72b0d7ea7b7873d53fe134723a12
Linux 837c4da98481d4e504b2aba077c8528fee1b6d13
ok kevlo mpi jmatthew
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 981936fd3a5..a4e087dbb87 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.240 2019/05/09 16:13:34 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.241 2019/05/09 16:14:14 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -2566,7 +2566,7 @@ iwm_sta_rx_agg(struct iwm_softc *sc, struct ieee80211_node *ni, uint8_t tid, &status); s = splnet(); - if (err == 0 && status == IWM_ADD_STA_SUCCESS) { + if (!err && (status & IWM_ADD_STA_STATUS_MASK) == IWM_ADD_STA_SUCCESS) { if (start) { sc->sc_rx_ba_sessions++; ieee80211_addba_req_accept(ic, ni, tid); @@ -4675,7 +4675,7 @@ iwm_add_sta_cmd(struct iwm_softc *sc, struct iwm_node *in, int update) status = IWM_ADD_STA_SUCCESS; err = iwm_send_cmd_pdu_status(sc, IWM_ADD_STA, sizeof(add_sta_cmd), &add_sta_cmd, &status); - if (err == 0 && status != IWM_ADD_STA_SUCCESS) + if (!err && (status & IWM_ADD_STA_STATUS_MASK) != IWM_ADD_STA_SUCCESS) err = EIO; return err; @@ -4702,7 +4702,7 @@ iwm_add_aux_sta(struct iwm_softc *sc) status = IWM_ADD_STA_SUCCESS; err = iwm_send_cmd_pdu_status(sc, IWM_ADD_STA, sizeof(cmd), &cmd, &status); - if (err == 0 && status != IWM_ADD_STA_SUCCESS) + if (!err && (status & IWM_ADD_STA_STATUS_MASK) != IWM_ADD_STA_SUCCESS) err = EIO; return err; |