diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index bbdba2ae7b1..24fd504c252 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -161,8 +161,7 @@ static void ath_next_scan(void *); static void ath_calibrate(void *); static int ath_newstate(struct ieee80211com *, enum ieee80211_state, int); static void ath_setup_stationkey(struct ieee80211_node *); -static void ath_newassoc(struct ieee80211com *, - struct ieee80211_node *, int); +static void ath_newassoc(struct ieee80211_node *, int); static int ath_getchannels(struct ath_softc *, u_int cc, HAL_BOOL outdoor, HAL_BOOL xchanmode); static void ath_led_event(struct ath_softc *, int); @@ -4285,8 +4284,9 @@ ath_setup_stationkey(struct ieee80211_node *ni) * param tells us if this is the first time or not. */ static void -ath_newassoc(struct ieee80211com *ic, struct ieee80211_node *ni, int isnew) +ath_newassoc(struct ieee80211_node *ni, int isnew) { + struct ieee80211com *ic = ni->ni_ic; struct ath_softc *sc = ic->ic_ifp->if_softc; ath_rate_newassoc(sc, ATH_NODE(ni), isnew); diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index ef1b78a3891..a2fe8672255 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1048,7 +1048,7 @@ ieee80211_fakeup_adhoc_node(struct ieee80211_node_table *nt, /* XXX no rate negotiation; just dup */ ni->ni_rates = ic->ic_bss->ni_rates; if (ic->ic_newassoc != NULL) - ic->ic_newassoc(ic, ni, 1); + ic->ic_newassoc(ni, 1); /* XXX not right for 802.1x/WPA */ ieee80211_node_authorize(ni); } @@ -1678,7 +1678,7 @@ ieee80211_node_join(struct ieee80211com *ic, struct ieee80211_node *ni, int resp /* give driver a chance to setup state like ni_txrate */ if (ic->ic_newassoc != NULL) - ic->ic_newassoc(ic, ni, newassoc); + ic->ic_newassoc(ni, newassoc); ni->ni_inact_reload = ic->ic_inact_auth; ni->ni_inact = ni->ni_inact_reload; IEEE80211_SEND_MGMT(ic, ni, resp, IEEE80211_STATUS_SUCCESS); diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index ce78635feb3..e06673d78e0 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -100,8 +100,7 @@ struct ieee80211com { struct ieee80211_node *, int, int); int (*ic_newstate)(struct ieee80211com *, enum ieee80211_state, int); - void (*ic_newassoc)(struct ieee80211com *, - struct ieee80211_node *, int); + void (*ic_newassoc)(struct ieee80211_node *, int); void (*ic_updateslot)(struct ifnet *); void (*ic_set_tim)(struct ieee80211_node *, int); u_int8_t ic_myaddr[IEEE80211_ADDR_LEN];