[Madwifi-cvs] madwifi/net80211 ieee80211_proto.c,1.1.4.3,1.1.4.4
Status: Beta
Brought to you by:
otaku
From: Sam L. <sam...@us...> - 2004-06-09 19:53:20
|
Update of /cvsroot/madwifi/madwifi/net80211 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7820 Modified Files: Tag: WPA ieee80211_proto.c Log Message: o aclator support o on transition to INIT state only send one of DEAUTH and DEASSOC o propragate argument to ieee80211_begin_scan so caller can control whether or not the scan set is cleared o add comments about pending issues o add missing ieee80211_notify_node_leave on RUN->AUTH transition Index: ieee80211_proto.c =================================================================== RCS file: /cvsroot/madwifi/madwifi/net80211/Attic/ieee80211_proto.c,v retrieving revision 1.1.4.3 retrieving revision 1.1.4.4 diff -C2 -d -r1.1.4.3 -r1.1.4.4 *** ieee80211_proto.c 14 May 2004 06:20:51 -0000 1.1.4.3 --- ieee80211_proto.c 9 Jun 2004 19:53:11 -0000 1.1.4.4 *************** *** 219,222 **** --- 219,256 ---- EXPORT_SYMBOL(ieee80211_authenticator_backend_get); + /* + * Very simple-minded ACL module support. + */ + /* XXX just one for now */ + static const struct ieee80211_aclator *acl = NULL; + + void + ieee80211_aclator_register(const struct ieee80211_aclator *iac) + { + printk(KERN_INFO "802.1x wlan: %s acl policy registered\n", + iac->iac_name); + acl = iac; + } + EXPORT_SYMBOL(ieee80211_aclator_register); + + void + ieee80211_aclator_unregister(const struct ieee80211_aclator *iac) + { + if (acl == iac) + acl = NULL; + printk(KERN_INFO "802.1x wlan: %s acl policy unregistered\n", + iac->iac_name); + } + EXPORT_SYMBOL(ieee80211_aclator_unregister); + + const struct ieee80211_aclator * + ieee80211_aclator_get(const char *name) + { + if (acl == NULL) + request_module("wlan_acl"); + return acl && strcmp(acl->iac_name, name) == 0 ? acl : NULL; + } + EXPORT_SYMBOL(ieee80211_aclator_get); + void ieee80211_print_essid(u_int8_t *essid, int len) *************** *** 438,442 **** static int ! ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int mgt) { struct net_device *dev = ic->ic_dev; --- 472,476 ---- static int ! ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) { struct net_device *dev = ic->ic_dev; *************** *** 476,480 **** break; } ! /* FALLTHRU */ case IEEE80211_S_ASSOC: switch (ic->ic_opmode) { --- 510,514 ---- break; } ! goto reset; case IEEE80211_S_ASSOC: switch (ic->ic_opmode) { *************** *** 496,505 **** break; } ! /* FALLTHRU */ case IEEE80211_S_AUTH: case IEEE80211_S_SCAN: ic->ic_mgt_timer = 0; ieee80211_free_allnodes(ic); - ieee80211_crypto_detach(ic); break; } --- 530,540 ---- break; } ! goto reset; case IEEE80211_S_AUTH: case IEEE80211_S_SCAN: + reset: ic->ic_mgt_timer = 0; + ic->ic_inact_timer = 0; ieee80211_free_allnodes(ic); break; } *************** *** 528,532 **** ieee80211_create_ibss(ic, ic->ic_des_chan); } else { ! ieee80211_begin_scan(ic); } break; --- 563,567 ---- ieee80211_create_ibss(ic, ic->ic_des_chan); } else { ! ieee80211_begin_scan(ic, arg); } break; *************** *** 544,551 **** --- 579,588 ---- ether_sprintf(ic->ic_bss->ni_bssid))); ieee80211_notify_node_leave(ic, ni); + /* XXX this clears the scan set */ ieee80211_free_allnodes(ic); /* FALLTHRU */ case IEEE80211_S_AUTH: case IEEE80211_S_ASSOC: + /* XXX doesn't work, ni_macaddr rewritten above */ /* timeout restart scan */ ni = ieee80211_find_node(ic, ic->ic_bss->ni_macaddr); *************** *** 554,558 **** ieee80211_unref_node(&ni); } ! ieee80211_begin_scan(ic); break; } --- 591,595 ---- ieee80211_unref_node(&ni); } ! ieee80211_begin_scan(ic, arg); break; } *************** *** 567,571 **** case IEEE80211_S_AUTH: case IEEE80211_S_ASSOC: ! switch (mgt) { case IEEE80211_FC0_SUBTYPE_AUTH: /* ??? */ --- 604,608 ---- case IEEE80211_S_AUTH: case IEEE80211_S_ASSOC: ! switch (arg) { case IEEE80211_FC0_SUBTYPE_AUTH: /* ??? */ *************** *** 579,583 **** break; case IEEE80211_S_RUN: ! switch (mgt) { case IEEE80211_FC0_SUBTYPE_AUTH: IEEE80211_SEND_MGMT(ic, ni, --- 616,620 ---- break; case IEEE80211_S_RUN: ! switch (arg) { case IEEE80211_FC0_SUBTYPE_AUTH: IEEE80211_SEND_MGMT(ic, ni, *************** *** 610,613 **** --- 647,651 ---- IEEE80211_SEND_MGMT(ic, ni, IEEE80211_FC0_SUBTYPE_ASSOC_REQ, 1); + ieee80211_notify_node_leave(ic, ni); break; } *************** *** 649,653 **** if (ic->ic_opmode == IEEE80211_M_STA) ieee80211_notify_node_join(ic, ni, ! mgt == IEEE80211_FC0_SUBTYPE_ASSOC_RESP); break; } --- 687,691 ---- if (ic->ic_opmode == IEEE80211_M_STA) ieee80211_notify_node_join(ic, ni, ! arg == IEEE80211_FC0_SUBTYPE_ASSOC_RESP); break; } |