diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2007-06-16 11:56:21 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2007-06-16 11:56:21 +0000 |
commit | b897d89dc7cc3bc83cf615827957f363c505955e (patch) | |
tree | 74512bd1aae593adfdd9d4a0c07c33b7299b5775 /sys | |
parent | f044668231961c710a4134edb0c03f2f8bb19e83 (diff) |
de-static
ok jsg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211.c | 16 | ||||
-rw-r--r-- | sys/net80211/ieee80211_crypto.c | 10 | ||||
-rw-r--r-- | sys/net80211/ieee80211_input.c | 25 | ||||
-rw-r--r-- | sys/net80211/ieee80211_node.c | 51 | ||||
-rw-r--r-- | sys/net80211/ieee80211_output.c | 10 | ||||
-rw-r--r-- | sys/net80211/ieee80211_proto.c | 6 |
6 files changed, 62 insertions, 56 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index a497abfeaa5..4a10b850812 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211.c,v 1.21 2007/06/06 19:31:07 damien Exp $ */ +/* $OpenBSD: ieee80211.c,v 1.22 2007/06/16 11:56:20 damien Exp $ */ /* $NetBSD: ieee80211.c,v 1.19 2004/06/06 05:45:29 dyoung Exp $ */ /*- @@ -72,7 +72,8 @@ int ieee80211_cache_size = IEEE80211_CACHE_SIZE; struct ieee80211com_head ieee80211com_head = LIST_HEAD_INITIALIZER(ieee80211com_head); -static void ieee80211_setbasicrates(struct ieee80211com *); +void ieee80211_setbasicrates(struct ieee80211com *); +int ieee80211_findrate(struct ieee80211com *, enum ieee80211_phymode, int); void ieee80211_ifattach(struct ifnet *ifp) @@ -349,8 +350,9 @@ ieee80211_media_init(struct ifnet *ifp, #undef ADD } -static int -findrate(struct ieee80211com *ic, enum ieee80211_phymode mode, int rate) +int +ieee80211_findrate(struct ieee80211com *ic, enum ieee80211_phymode mode, + int rate) { #define IEEERATE(_ic,_m,_i) \ ((_ic)->ic_sup_rates[_m].rs_rates[_i] & IEEE80211_RATE_VAL) @@ -434,7 +436,7 @@ ieee80211_media_change(struct ifnet *ifp) j < IEEE80211_MODE_MAX; j++) { if ((ic->ic_modecaps & (1<<j)) == 0) continue; - i = findrate(ic, j, newrate); + i = ieee80211_findrate(ic, j, newrate); if (i != -1) { /* lock mode too */ newphymode = j; @@ -442,7 +444,7 @@ ieee80211_media_change(struct ifnet *ifp) } } } else { - i = findrate(ic, newphymode, newrate); + i = ieee80211_findrate(ic, newphymode, newrate); } if (i == -1) /* mode/rate mismatch */ return EINVAL; @@ -606,7 +608,7 @@ struct ieee80211_rateset ieee80211_std_rateset_11g = * 11b rates. There's also a pseudo 11a-mode used to mark only * the basic OFDM rates. */ -static void +void ieee80211_setbasicrates(struct ieee80211com *ic) { static const struct ieee80211_rateset basic[] = { diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c index f1d520e2ba5..fd7eb8a931d 100644 --- a/sys/net80211/ieee80211_crypto.c +++ b/sys/net80211/ieee80211_crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_crypto.c,v 1.10 2007/06/06 19:31:07 damien Exp $ */ +/* $OpenBSD: ieee80211_crypto.c,v 1.11 2007/06/16 11:56:20 damien Exp $ */ /* $NetBSD: ieee80211_crypto.c,v 1.5 2003/12/14 09:56:53 dyoung Exp $ */ /*- @@ -66,8 +66,8 @@ #define arc4_setkey(_c,_k,_l) rc4_keysetup(_c,_k,_l) #define arc4_encrypt(_c,_d,_s,_l) rc4_crypt(_c,_s,_d,_l) -static void ieee80211_crc_init(void); -static u_int32_t ieee80211_crc_update(u_int32_t crc, u_int8_t *buf, int len); +void ieee80211_crc_init(void); +u_int32_t ieee80211_crc_update(u_int32_t crc, u_int8_t *buf, int len); void ieee80211_crypto_attach(struct ifnet *ifp) @@ -293,7 +293,7 @@ ieee80211_wep_crypt(struct ifnet *ifp, struct mbuf *m0, int txflag) static u_int32_t ieee80211_crc_table[256]; /* Make the table for a fast CRC. */ -static void +void ieee80211_crc_init(void) { u_int32_t c; @@ -317,7 +317,7 @@ ieee80211_crc_init(void) * is the 1's complement of the final running CRC */ -static u_int32_t +u_int32_t ieee80211_crc_update(u_int32_t crc, u_int8_t *buf, int len) { u_int8_t *endbuf; diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index de9398f2eb4..5f3951de262 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -1,5 +1,5 @@ /* $NetBSD: ieee80211_input.c,v 1.24 2004/05/31 11:12:24 dyoung Exp $ */ -/* $OpenBSD: ieee80211_input.c,v 1.23 2007/06/06 19:31:07 damien Exp $ */ +/* $OpenBSD: ieee80211_input.c,v 1.24 2007/06/16 11:56:20 damien Exp $ */ /*- * Copyright (c) 2001 Atsushi Onoe * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting @@ -67,9 +67,14 @@ const struct timeval ieee80211_merge_print_intvl = { .tv_usec = 0 }; -static void ieee80211_recv_pspoll(struct ieee80211com *, - struct mbuf *, int, u_int32_t); -static int ieee80211_do_slow_print(struct ieee80211com *, int *); + +int ieee80211_setup_rates(struct ieee80211com *, struct ieee80211_node *, + u_int8_t *, u_int8_t *, int); +void ieee80211_auth_open(struct ieee80211com *, struct ieee80211_frame *, + struct ieee80211_node *, int, u_int32_t, u_int16_t, u_int16_t); +void ieee80211_recv_pspoll(struct ieee80211com *, struct mbuf *, int, + u_int32_t); +int ieee80211_do_slow_print(struct ieee80211com *, int *); /* * Process a received frame. The node associated with the sender @@ -557,7 +562,7 @@ ieee80211_decap(struct ifnet *ifp, struct mbuf *m) /* * Install received rate set information in the node's state block. */ -static int +int ieee80211_setup_rates(struct ieee80211com *ic, struct ieee80211_node *ni, u_int8_t *rates, u_int8_t *xrates, int flags) { @@ -618,7 +623,7 @@ ieee80211_setup_rates(struct ieee80211com *ic, struct ieee80211_node *ni, } while (0) #ifdef IEEE80211_DEBUG -static void +void ieee80211_ssid_mismatch(struct ieee80211com *ic, const char *tag, u_int8_t mac[IEEE80211_ADDR_LEN], u_int8_t *ssid) { @@ -649,7 +654,7 @@ ieee80211_ssid_mismatch(struct ieee80211com *ic, const char *tag, } while (0) #endif /* !IEEE80211_DEBUG */ -static void +void ieee80211_auth_open(struct ieee80211com *ic, struct ieee80211_frame *wh, struct ieee80211_node *ni, int rssi, u_int32_t rstamp, u_int16_t seq, u_int16_t status) @@ -735,7 +740,7 @@ ieee80211_auth_open(struct ieee80211com *ic, struct ieee80211_frame *wh, #if 0 /* TBD send appropriate responses on error? */ -static void +void ieee80211_auth_shared(struct ieee80211com *ic, struct ieee80211_frame *wh, u_int8_t *frm, u_int8_t *efrm, struct ieee80211_node *ni, int rssi, u_int32_t rstamp, u_int16_t seq, u_int16_t status) @@ -1553,7 +1558,7 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0, #undef IEEE80211_VERIFY_ELEMENT #undef IEEE80211_VERIFY_SSID -static void +void ieee80211_recv_pspoll(struct ieee80211com *ic, struct mbuf *m0, int rssi, u_int32_t rstamp) { @@ -1623,7 +1628,7 @@ ieee80211_recv_pspoll(struct ieee80211com *ic, struct mbuf *m0, int rssi, (*ifp->if_start)(ifp); } -static int +int ieee80211_do_slow_print(struct ieee80211com *ic, int *did_print) { if ((ic->ic_if.if_flags & IFF_LINK0) == 0) diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 21398865fe6..48f13002dae 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.c,v 1.21 2007/06/07 20:24:42 damien Exp $ */ +/* $OpenBSD: ieee80211_node.c,v 1.22 2007/06/16 11:56:20 damien Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -68,24 +68,19 @@ #include <dev/rndvar.h> -static struct ieee80211_node *ieee80211_node_alloc(struct ieee80211com *); -static void ieee80211_node_free(struct ieee80211com *, struct ieee80211_node *); -static void ieee80211_node_copy(struct ieee80211com *, - struct ieee80211_node *, const struct ieee80211_node *); -static u_int8_t ieee80211_node_getrssi(struct ieee80211com *, - struct ieee80211_node *); -static void ieee80211_setup_node(struct ieee80211com *ic, - struct ieee80211_node *ni, u_int8_t *macaddr); -static void ieee80211_free_node(struct ieee80211com *, - struct ieee80211_node *); -static struct ieee80211_node * - ieee80211_alloc_node_helper(struct ieee80211com *); -static void ieee80211_node_cleanup(struct ieee80211com *, - struct ieee80211_node *); -static void ieee80211_node_join_11g(struct ieee80211com *, - struct ieee80211_node *); -static void ieee80211_node_leave_11g(struct ieee80211com *, +struct ieee80211_node *ieee80211_node_alloc(struct ieee80211com *); +void ieee80211_node_free(struct ieee80211com *, struct ieee80211_node *); +void ieee80211_node_copy(struct ieee80211com *, struct ieee80211_node *, + const struct ieee80211_node *); +u_int8_t ieee80211_node_getrssi(struct ieee80211com *, struct ieee80211_node *); +void ieee80211_setup_node(struct ieee80211com *, struct ieee80211_node *, + u_int8_t *); +void ieee80211_free_node(struct ieee80211com *, struct ieee80211_node *); +struct ieee80211_node *ieee80211_alloc_node_helper(struct ieee80211com *); +void ieee80211_node_cleanup(struct ieee80211com *, struct ieee80211_node *); +void ieee80211_node_join_11g(struct ieee80211com *, struct ieee80211_node *); +void ieee80211_node_leave_11g(struct ieee80211com *, struct ieee80211_node *); #define M_80211_NODE M_DEVBUF @@ -117,7 +112,7 @@ ieee80211_node_attach(struct ifnet *ifp) memset(ic->ic_aid_bitmap, 0, size); } -static struct ieee80211_node * +struct ieee80211_node * ieee80211_alloc_node_helper(struct ieee80211com *ic) { struct ieee80211_node *ni; @@ -511,7 +506,7 @@ ieee80211_get_rate(struct ieee80211com *ic) return rate & IEEE80211_RATE_VAL; } -static struct ieee80211_node * +struct ieee80211_node * ieee80211_node_alloc(struct ieee80211com *ic) { struct ieee80211_node *ni; @@ -522,7 +517,7 @@ ieee80211_node_alloc(struct ieee80211com *ic) return ni; } -static void +void ieee80211_node_cleanup(struct ieee80211com *ic, struct ieee80211_node *ni) { if (ni->ni_challenge != NULL) { @@ -531,14 +526,14 @@ ieee80211_node_cleanup(struct ieee80211com *ic, struct ieee80211_node *ni) } } -static void +void ieee80211_node_free(struct ieee80211com *ic, struct ieee80211_node *ni) { ieee80211_node_cleanup(ic, ni); FREE(ni, M_80211_NODE); } -static void +void ieee80211_node_copy(struct ieee80211com *ic, struct ieee80211_node *dst, const struct ieee80211_node *src) { @@ -547,13 +542,13 @@ ieee80211_node_copy(struct ieee80211com *ic, dst->ni_challenge = NULL; } -static u_int8_t +u_int8_t ieee80211_node_getrssi(struct ieee80211com *ic, struct ieee80211_node *ni) { return ni->ni_rssi; } -static void +void ieee80211_setup_node(struct ieee80211com *ic, struct ieee80211_node *ni, u_int8_t *macaddr) { @@ -809,7 +804,7 @@ ieee80211_find_node_for_beacon(struct ieee80211com *ic, u_int8_t *macaddr, return (keep); } -static void +void ieee80211_free_node(struct ieee80211com *ic, struct ieee80211_node *ni) { if (ni == ic->ic_bss) @@ -944,7 +939,7 @@ ieee80211_iserp_sta(struct ieee80211_node *ni) /* * Handle a station joining an 11g network. */ -static void +void ieee80211_node_join_11g(struct ieee80211com *ic, struct ieee80211_node *ni) { if (!(ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_SLOTTIME)) { @@ -1043,7 +1038,7 @@ ieee80211_node_join(struct ieee80211com *ic, struct ieee80211_node *ni, /* * Handle a station leaving an 11g network. */ -static void +void ieee80211_node_leave_11g(struct ieee80211com *ic, struct ieee80211_node *ni) { if (!(ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_SLOTTIME)) { diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index d291e878cc7..0037623712c 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_output.c,v 1.26 2007/06/11 19:35:24 damien Exp $ */ +/* $OpenBSD: ieee80211_output.c,v 1.27 2007/06/16 11:56:20 damien Exp $ */ /* $NetBSD: ieee80211_output.c,v 1.13 2004/05/31 11:02:55 dyoung Exp $ */ /*- @@ -56,6 +56,10 @@ #include <net80211/ieee80211_var.h> +int ieee80211_mgmt_output(struct ifnet *, struct ieee80211_node *, + struct mbuf *, int); +struct mbuf *ieee80211_getmbuf(int, int, u_int); + /* * IEEE 802.11 output routine. Normally this will directly call the * Ethernet output routine because 802.11 encapsulation is called @@ -125,7 +129,7 @@ ieee80211_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, * dispatched to the driver, then it is responsible for freeing the * reference (and potentially free'ing up any associated storage). */ -static int +int ieee80211_mgmt_output(struct ifnet *ifp, struct ieee80211_node *ni, struct mbuf *m, int type) { @@ -514,7 +518,7 @@ ieee80211_add_erp(u_int8_t *frm, struct ieee80211com *ic) return frm; } -static struct mbuf * +struct mbuf * ieee80211_getmbuf(int flags, int type, u_int pktlen) { struct mbuf *m; diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index 684754352f3..27069916f05 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_proto.c,v 1.15 2007/06/06 19:31:07 damien Exp $ */ +/* $OpenBSD: ieee80211_proto.c,v 1.16 2007/06/16 11:56:20 damien Exp $ */ /* $NetBSD: ieee80211_proto.c,v 1.8 2004/04/30 23:58:20 dyoung Exp $ */ /*- @@ -87,7 +87,7 @@ const char *ieee80211_phymode_name[] = { "turbo", /* IEEE80211_MODE_TURBO */ }; -static int ieee80211_newstate(struct ieee80211com *, enum ieee80211_state, int); +int ieee80211_newstate(struct ieee80211com *, enum ieee80211_state, int); void ieee80211_proto_attach(struct ifnet *ifp) @@ -353,7 +353,7 @@ ieee80211_set_shortslottime(struct ieee80211com *ic, int on) ic->ic_updateslot(ic); } -static int +int ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int mgt) { |