PERFORCE change 135192 for review
Sam Leffler
sam at FreeBSD.org
Sun Feb 10 20:38:12 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=135192
Change 135192 by sam at sam_ebb on 2008/02/11 04:37:28
purge dead code
Affected files ...
.. //depot/projects/vap/sys/net80211/ieee80211_scan_sta.c#18 edit
Differences ...
==== //depot/projects/vap/sys/net80211/ieee80211_scan_sta.c#18 (text+ko) ====
@@ -1641,131 +1641,8 @@
/*
* Module glue.
*/
-#if 0
-IEEE80211_SCANNER_MODULE(sta, IEEE80211_M_STA, sta_default, 1);
-IEEE80211_SCANNER_MODULE(adhoc, IEEE80211_M_IBSS, adhoc_default, 1);
-IEEE80211_SCANNER_MODULE(adhoc, IEEE80211_M_AHDEMO, adhoc_default, 1);
-IEEE80211_SCANNER_MODULE(ap, IEEE80211_M_HOSTAP, ap_default, 1);
-static int
-wlan_scan_modevent(module_t mod, int type, void *unused)
-{
- switch (type) {
- case MOD_LOAD:
- ieee80211_scanner_register(IEEE80211_M_STA, &sta_default);
- ieee80211_scanner_register(IEEE80211_M_IBSS, &adhoc_default);
- ieee80211_scanner_register(IEEE80211_M_AHDEMO, &adhoc_default);
- ieee80211_scanner_register(IEEE80211_M_HOSTAP, &ap_default);
- return 0;
- case MOD_UNLOAD:
- case MOD_QUIESCE:
- if (nrefs) {
- printf("wlan_scan: still in use (%u dynamic refs)\n",
- nrefs);
- return EBUSY;
- }
- if (type == MOD_UNLOAD) {
- ieee80211_scanner_unregister_all(&sta_default);
- ieee80211_scanner_unregister_all(&adhoc_default);
- ieee80211_scanner_unregister_all(&ap_default);
- }
- return 0;
- }
- return EINVAL;
-}
-static moduledata_t wlan_scan_mod = {
- "wlan_scan_sta",
- wlan_scan_modevent,
- 0
-};
-DECLARE_MODULE(wlan_scan_sta, wlan_scan_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
-MODULE_VERSION(wlan_scan_sta, 1);
-MODULE_DEPEND(wlan_scan_sta, wlan, 1, 1, 1);
-#endif
-#if 0
-typedef void (*scanner_setup)(int);
-SET_DECLARE(scanner_set, scanner_setup);
-
-static int
-wlan_scan_modevent(module_t mod, int type, void *unused)
-{
- scanner_setup * const *iter, f;
-
- switch (type) {
- case MOD_LOAD:
- SET_FOREACH(iter, scanner_set) {
- f = (void*) *iter;
- f(type);
- }
- return 0;
- case MOD_UNLOAD:
- case MOD_QUIESCE:
- if (nrefs) {
- printf("wlan_scan: still in use (%u dynamic refs)\n",
- nrefs);
- return EBUSY;
- }
- if (type == MOD_UNLOAD) {
- SET_FOREACH(iter, scanner_set) {
- f = (void*) *iter;
- f(type);
- }
- }
- return 0;
- }
- return EINVAL;
-}
-static moduledata_t wlan_scan_mod = {
- "wlan_scan_sta",
- wlan_scan_modevent,
- 0
-};
-DECLARE_MODULE(wlan_scan_sta, wlan_scan_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
-MODULE_VERSION(wlan_scan_sta, 1);
-MODULE_DEPEND(wlan_scan_sta, wlan, 1, 1, 1);
-
-static void
-sta_modevent(int type)
-{
- if (type == MOD_LOAD)
- ieee80211_scanner_register(IEEE80211_M_STA, &sta_default);
- else
- ieee80211_scanner_unregister(IEEE80211_M_STA, &sta_default);
-}
-TEXT_SET(scanner_set, sta_modevent);
-
-static void
-ibss_modevent(int type)
-{
- if (type == MOD_LOAD)
- ieee80211_scanner_register(IEEE80211_M_IBSS, &adhoc_default);
- else
- ieee80211_scanner_unregister(IEEE80211_M_IBSS, &adhoc_default);
-}
-TEXT_SET(scanner_set, ibss_modevent);
-
-static void
-ahdemo_modevent(int type)
-{
- if (type == MOD_LOAD)
- ieee80211_scanner_register(IEEE80211_M_AHDEMO, &adhoc_default);
- else
- ieee80211_scanner_unregister(IEEE80211_M_AHDEMO, &adhoc_default);
-}
-TEXT_SET(scanner_set, ahdemo_modevent);
-
-static void
-ap_modevent(int type)
-{
- if (type == MOD_LOAD)
- ieee80211_scanner_register(IEEE80211_M_HOSTAP, &ap_default);
- else
- ieee80211_scanner_unregister(IEEE80211_M_HOSTAP, &ap_default);
-}
-TEXT_SET(scanner_set, ap_modevent);
-#else
IEEE80211_SCANNER_MODULE(sta, 1);
IEEE80211_SCANNER_ALG(sta, IEEE80211_M_STA, sta_default);
IEEE80211_SCANNER_ALG(ibss, IEEE80211_M_IBSS, adhoc_default);
IEEE80211_SCANNER_ALG(ahdemo, IEEE80211_M_AHDEMO, adhoc_default);
IEEE80211_SCANNER_ALG(ap, IEEE80211_M_HOSTAP, ap_default);
-#endif
More information about the p4-projects
mailing list