simplify ic_newassoc callback

MFC after:	3 days
This commit is contained in:
Sam Leffler 2005-07-22 17:57:16 +00:00
parent 641b4d0b2d
commit e996233220
3 changed files with 6 additions and 7 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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];