diff options
author | sam <sam@FreeBSD.org> | 2005-07-22 17:36:12 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-07-22 17:36:12 +0000 |
commit | 7c3e01b45a80cdbc30a8a0fa1457ba098b3d54a9 (patch) | |
tree | 47b2fd4221c6d263ca06fd6bcc5f7bee6ddd799b /sys/net80211 | |
parent | 0fe58ae3f007b53e2a202cd3a3bf5a35d0a44b99 (diff) | |
download | FreeBSD-src-7c3e01b45a80cdbc30a8a0fa1457ba098b3d54a9.zip FreeBSD-src-7c3e01b45a80cdbc30a8a0fa1457ba098b3d54a9.tar.gz |
simplify ieee80211_node_authorize and ieee80211_node_unauthorize api's
MFC after: 3 days
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_input.c | 4 | ||||
-rw-r--r-- | sys/net80211/ieee80211_ioctl.c | 4 | ||||
-rw-r--r-- | sys/net80211/ieee80211_node.c | 8 | ||||
-rw-r--r-- | sys/net80211/ieee80211_node.h | 6 | ||||
-rw-r--r-- | sys/net80211/ieee80211_output.c | 2 | ||||
-rw-r--r-- | sys/net80211/ieee80211_proto.c | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 5cef95d..bd5eff9 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -904,7 +904,7 @@ ieee80211_auth_open(struct ieee80211com *ic, struct ieee80211_frame *wh, * authorized at this point so traffic can flow. */ if (ni->ni_authmode != IEEE80211_AUTH_8021X) - ieee80211_node_authorize(ic, ni); + ieee80211_node_authorize(ni); break; case IEEE80211_M_STA: @@ -1127,7 +1127,7 @@ ieee80211_auth_shared(struct ieee80211com *ic, struct ieee80211_frame *wh, IEEE80211_MSG_DEBUG | IEEE80211_MSG_AUTH, "[%s] station authenticated (shared key)\n", ether_sprintf(ni->ni_macaddr)); - ieee80211_node_authorize(ic, ni); + ieee80211_node_authorize(ni); break; default: IEEE80211_DISCARD_MAC(ic, IEEE80211_MSG_AUTH, diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 2a47920..3396934 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1685,9 +1685,9 @@ ieee80211_ioctl_setmlme(struct ieee80211com *ic, struct ieee80211req *ireq) if (ni == NULL) return EINVAL; if (mlme.im_op == IEEE80211_MLME_AUTHORIZE) - ieee80211_node_authorize(ic, ni); + ieee80211_node_authorize(ni); else - ieee80211_node_unauthorize(ic, ni); + ieee80211_node_unauthorize(ni); ieee80211_free_node(ni); break; default: diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 835ec46..be80bd3 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -200,14 +200,16 @@ ieee80211_node_detach(struct ieee80211com *ic) */ void -ieee80211_node_authorize(struct ieee80211com *ic, struct ieee80211_node *ni) +ieee80211_node_authorize(struct ieee80211_node *ni) { + struct ieee80211com *ic = ni->ni_ic; + ni->ni_flags |= IEEE80211_NODE_AUTH; ni->ni_inact_reload = ic->ic_inact_run; } void -ieee80211_node_unauthorize(struct ieee80211com *ic, struct ieee80211_node *ni) +ieee80211_node_unauthorize(struct ieee80211_node *ni) { ni->ni_flags &= ~IEEE80211_NODE_AUTH; } @@ -1048,7 +1050,7 @@ ieee80211_fakeup_adhoc_node(struct ieee80211_node_table *nt, if (ic->ic_newassoc != NULL) ic->ic_newassoc(ic, ni, 1); /* XXX not right for 802.1x/WPA */ - ieee80211_node_authorize(ic, ni); + ieee80211_node_authorize(ni); } return ni; } diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index c7ac7c1..0d89490 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -182,10 +182,8 @@ ieee80211_node_is_authorized(const struct ieee80211_node *ni) return (ni->ni_flags & IEEE80211_NODE_AUTH); } -void ieee80211_node_authorize(struct ieee80211com *, - struct ieee80211_node *); -void ieee80211_node_unauthorize(struct ieee80211com *, - struct ieee80211_node *); +void ieee80211_node_authorize(struct ieee80211_node *); +void ieee80211_node_unauthorize(struct ieee80211_node *); void ieee80211_begin_scan(struct ieee80211com *, int); int ieee80211_next_scan(struct ieee80211com *); diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index f45aa0f..024099c 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1131,7 +1131,7 @@ ieee80211_send_mgmt(struct ieee80211com *ic, struct ieee80211_node *ni, IEEE80211_NODE_STAT(ni, tx_deauth); IEEE80211_NODE_STAT_SET(ni, tx_deauth_code, arg); - ieee80211_node_unauthorize(ic, ni); /* port closed */ + ieee80211_node_unauthorize(ni); /* port closed */ break; case IEEE80211_FC0_SUBTYPE_ASSOC_REQ: diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index 2ab0e38..0288b0d 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -1068,7 +1068,7 @@ ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg * at this point so traffic can flow. */ if (ni->ni_authmode != IEEE80211_AUTH_8021X) - ieee80211_node_authorize(ic, ni); + ieee80211_node_authorize(ni); /* * Enable inactivity processing. * XXX |