From: damien Date: Mon, 19 Jul 2010 18:53:52 +0000 (+0000) Subject: in hostap mode, notify drivers via a new callback when a STA leaves X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a2be7d77adf5634208c71ce789d61c6a7f9e6a15;p=openbsd in hostap mode, notify drivers via a new callback when a STA leaves the BSS. this is needed by drivers that need to maintain a hardware table of associated STAs (like ral(4) RT2860). idea from Nathanael Rensen --- diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index b3c483570c5..8ea9c0a5c69 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.c,v 1.60 2010/06/19 08:33:50 damien Exp $ */ +/* $OpenBSD: ieee80211_node.c,v 1.61 2010/07/19 18:53:52 damien Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -1524,6 +1524,9 @@ ieee80211_node_leave(struct ieee80211com *ic, struct ieee80211_node *ni) ieee80211_node_leave_ht(ic, ni); #endif + if (ic->ic_node_leave != NULL) + (*ic->ic_node_leave)(ic, ni); + IEEE80211_AID_CLR(ni->ni_associd, ic->ic_aid_bitmap); ni->ni_associd = 0; ieee80211_node_newstate(ni, IEEE80211_STA_COLLECT); diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index e5154e15705..ba218df0742 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_var.h,v 1.60 2009/05/19 16:09:02 damien Exp $ */ +/* $OpenBSD: ieee80211_var.h,v 1.61 2010/07/19 18:53:52 damien Exp $ */ /* $NetBSD: ieee80211_var.h,v 1.7 2004/05/06 03:07:10 dyoung Exp $ */ /*- @@ -202,6 +202,8 @@ struct ieee80211com { enum ieee80211_state, int); void (*ic_newassoc)(struct ieee80211com *, struct ieee80211_node *, int); + void (*ic_node_leave)(struct ieee80211com *, + struct ieee80211_node *); void (*ic_updateslot)(struct ieee80211com *); void (*ic_updateedca)(struct ieee80211com *); void (*ic_set_tim)(struct ieee80211com *, int, int);