aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2017-05-09 05:32:35 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2017-05-09 05:32:35 +0000
commitf32adafde11c36b1ba679fdc8c66febc5c5f369f (patch)
treef4ac6bd1d6515de65c1e727f6ee82377509fb96c /sys
parentc44c4d8d92080ad3231b0e36b0245ddc19253daa (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/iwm/if_iwm.c22
-rw-r--r--sys/dev/iwm/if_iwm_binding.c12
-rw-r--r--sys/dev/iwm/if_iwm_binding.h6
-rw-r--r--sys/dev/iwm/if_iwmvar.h3
4 files changed, 22 insertions, 21 deletions
diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c
index 566a54dc6af0..9541a538423c 100644
--- a/sys/dev/iwm/if_iwm.c
+++ b/sys/dev/iwm/if_iwm.c
@@ -355,7 +355,7 @@ static int iwm_mvm_add_int_sta_common(struct iwm_softc *,
struct iwm_int_sta *,
const uint8_t *, uint16_t, uint16_t);
static int iwm_mvm_add_aux_sta(struct iwm_softc *);
-static int iwm_mvm_update_quotas(struct iwm_softc *, struct iwm_node *);
+static int iwm_mvm_update_quotas(struct iwm_softc *, struct iwm_vap *);
static int iwm_auth(struct ieee80211vap *, struct iwm_softc *);
static int iwm_assoc(struct ieee80211vap *, struct iwm_softc *);
static int iwm_release(struct iwm_softc *, struct iwm_node *);
@@ -1286,6 +1286,7 @@ iwm_stop_device(struct iwm_softc *sc)
*/
if (vap) {
struct iwm_vap *iv = IWM_VAP(vap);
+ iv->phy_ctxt = NULL;
iv->is_uploaded = 0;
}
@@ -4014,7 +4015,7 @@ iwm_mvm_add_aux_sta(struct iwm_softc *sc)
*/
static int
-iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_node *in)
+iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_vap *ivp)
{
struct iwm_time_quota_cmd cmd;
int i, idx, ret, num_active_macs, quota, quota_rem;
@@ -4025,10 +4026,10 @@ iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_node *in)
memset(&cmd, 0, sizeof(cmd));
/* currently, PHY ID == binding ID */
- if (in) {
- id = in->in_phyctxt->id;
+ if (ivp) {
+ id = ivp->phy_ctxt->id;
KASSERT(id < IWM_MAX_BINDINGS, ("invalid id"));
- colors[id] = in->in_phyctxt->color;
+ colors[id] = ivp->phy_ctxt->color;
if (1)
n_ifs[id] = 1;
@@ -4153,9 +4154,9 @@ iwm_auth(struct ieee80211vap *vap, struct iwm_softc *sc)
"%s: failed update phy ctxt\n", __func__);
goto out;
}
- in->in_phyctxt = &sc->sc_phyctxt[0];
+ iv->phy_ctxt = &sc->sc_phyctxt[0];
- if ((error = iwm_mvm_binding_update(sc, in)) != 0) {
+ if ((error = iwm_mvm_binding_update(sc, iv)) != 0) {
device_printf(sc->sc_dev,
"%s: binding update cmd\n", __func__);
goto out;
@@ -4184,9 +4185,9 @@ iwm_auth(struct ieee80211vap *vap, struct iwm_softc *sc)
error = ETIMEDOUT;
goto out;
}
- in->in_phyctxt = &sc->sc_phyctxt[0];
+ iv->phy_ctxt = &sc->sc_phyctxt[0];
- if ((error = iwm_mvm_binding_add_vif(sc, in)) != 0) {
+ if ((error = iwm_mvm_binding_add_vif(sc, iv)) != 0) {
device_printf(sc->sc_dev,
"%s: binding add cmd\n", __func__);
goto out;
@@ -4590,7 +4591,7 @@ iwm_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
in = IWM_NODE(vap->iv_bss);
iwm_mvm_enable_beacon_filter(sc, in);
iwm_mvm_power_update_mac(sc);
- iwm_mvm_update_quotas(sc, in);
+ iwm_mvm_update_quotas(sc, ivp);
iwm_setrates(sc, in);
cmd.data[0] = &in->in_lq;
@@ -5761,7 +5762,6 @@ iwm_intr(void *arg)
device_printf(sc->sc_dev, "%s: controller panicked, iv_state = %d; "
"restarting\n", __func__, vap->iv_state);
- /* XXX TODO: turn this into a callout/taskqueue */
ieee80211_restart_all(ic);
return;
}
diff --git a/sys/dev/iwm/if_iwm_binding.c b/sys/dev/iwm/if_iwm_binding.c
index eafe08a60755..0f0960f82dce 100644
--- a/sys/dev/iwm/if_iwm_binding.c
+++ b/sys/dev/iwm/if_iwm_binding.c
@@ -162,10 +162,10 @@ __FBSDID("$FreeBSD$");
*/
int
-iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_node *in, uint32_t action)
+iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_vap *ivp, uint32_t action)
{
struct iwm_binding_cmd cmd;
- struct iwm_mvm_phy_ctxt *phyctxt = in->in_phyctxt;
+ struct iwm_mvm_phy_ctxt *phyctxt = ivp->phy_ctxt;
int i, ret;
uint32_t status;
@@ -204,13 +204,13 @@ iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_node *in, uint32_t action)
}
int
-iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_node *in)
+iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_vap *ivp)
{
- return iwm_mvm_binding_cmd(sc, in, IWM_FW_CTXT_ACTION_MODIFY);
+ return iwm_mvm_binding_cmd(sc, ivp, IWM_FW_CTXT_ACTION_MODIFY);
}
int
-iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_node *in)
+iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_vap *ivp)
{
- return iwm_mvm_binding_cmd(sc, in, IWM_FW_CTXT_ACTION_ADD);
+ return iwm_mvm_binding_cmd(sc, ivp, IWM_FW_CTXT_ACTION_ADD);
}
diff --git a/sys/dev/iwm/if_iwm_binding.h b/sys/dev/iwm/if_iwm_binding.h
index 933738455049..1aa8760cfa3c 100644
--- a/sys/dev/iwm/if_iwm_binding.h
+++ b/sys/dev/iwm/if_iwm_binding.h
@@ -105,9 +105,9 @@
#ifndef __IF_IWM_BINDING_H__
#define __IF_IWM_BINDING_H__
-extern int iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_node *in,
+extern int iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_vap *ivp,
uint32_t action);
-extern int iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_node *in);
-extern int iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_node *in);
+extern int iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_vap *ivp);
+extern int iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_vap *ivp);
#endif /* __IF_IWM_BINDING_H__ */
diff --git a/sys/dev/iwm/if_iwmvar.h b/sys/dev/iwm/if_iwmvar.h
index b0292308f2b8..fa2c2c37d31e 100644
--- a/sys/dev/iwm/if_iwmvar.h
+++ b/sys/dev/iwm/if_iwmvar.h
@@ -373,12 +373,13 @@ struct iwm_vap {
int (*iv_newstate)(struct ieee80211vap *,
enum ieee80211_state, int);
+
+ struct iwm_mvm_phy_ctxt *phy_ctxt;
};
#define IWM_VAP(_vap) ((struct iwm_vap *)(_vap))
struct iwm_node {
struct ieee80211_node in_ni;
- struct iwm_mvm_phy_ctxt *in_phyctxt;
/* status "bits" */
int in_assoc;