diff --git a/sys/net80211/ieee80211_crypto_wep.c b/sys/net80211/ieee80211_crypto_wep.c index bdaab1b29e14..797de006cdf2 100644 --- a/sys/net80211/ieee80211_crypto_wep.c +++ b/sys/net80211/ieee80211_crypto_wep.c @@ -100,7 +100,7 @@ wep_attach(struct ieee80211vap *vap, struct ieee80211_key *k) ctx->wc_vap = vap; ctx->wc_ic = vap->iv_ic; - get_random_bytes(&ctx->wc_iv, sizeof(ctx->wc_iv)); + net80211_get_random_bytes(&ctx->wc_iv, sizeof(ctx->wc_iv)); nrefs++; /* NB: we assume caller locking */ return ctx; } diff --git a/sys/net80211/ieee80211_dfs.c b/sys/net80211/ieee80211_dfs.c index abe67576d711..b3959220bfc9 100644 --- a/sys/net80211/ieee80211_dfs.c +++ b/sys/net80211/ieee80211_dfs.c @@ -421,7 +421,7 @@ ieee80211_dfs_pickchannel(struct ieee80211com *ic) * one at random (skipping channels where radar has * been detected). */ - get_random_bytes(&v, sizeof(v)); + net80211_get_random_bytes(&v, sizeof(v)); v %= ic->ic_nchans; for (i = v; i < ic->ic_nchans; i++) { c = &ic->ic_channels[i]; diff --git a/sys/net80211/ieee80211_freebsd.c b/sys/net80211/ieee80211_freebsd.c index 850c93d1e5df..011ae7060a6c 100644 --- a/sys/net80211/ieee80211_freebsd.c +++ b/sys/net80211/ieee80211_freebsd.c @@ -749,7 +749,7 @@ ieee80211_vap_xmitpkt(struct ieee80211vap *vap, struct mbuf *m) #include void -get_random_bytes(void *p, size_t n) +net80211_get_random_bytes(void *p, size_t n) { uint8_t *dp = p; diff --git a/sys/net80211/ieee80211_freebsd.h b/sys/net80211/ieee80211_freebsd.h index c3811cc32e84..9d7b9cbb7cce 100644 --- a/sys/net80211/ieee80211_freebsd.h +++ b/sys/net80211/ieee80211_freebsd.h @@ -359,7 +359,7 @@ struct ieee80211com; int ieee80211_parent_xmitpkt(struct ieee80211com *, struct mbuf *); int ieee80211_vap_xmitpkt(struct ieee80211vap *, struct mbuf *); -void get_random_bytes(void *, size_t); +void net80211_get_random_bytes(void *, size_t); void ieee80211_sysctl_attach(struct ieee80211com *); void ieee80211_sysctl_detach(struct ieee80211com *); diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index 8402ade857ff..16a3d97ae7f2 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -1093,7 +1093,7 @@ hostap_auth_shared(struct ieee80211_node *ni, struct ieee80211_frame *wh, /* NB: don't return error so they rexmit */ return; } - get_random_bytes(ni->ni_challenge, + net80211_get_random_bytes(ni->ni_challenge, IEEE80211_CHALLENGE_LEN); IEEE80211_NOTE(vap, IEEE80211_MSG_DEBUG | IEEE80211_MSG_AUTH, ni, "shared key %sauth request", allocbs ? "" : "re"); diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c index fdb84a2acb3d..48a3590d0cf3 100644 --- a/sys/net80211/ieee80211_mesh.c +++ b/sys/net80211/ieee80211_mesh.c @@ -962,7 +962,7 @@ mesh_generateid(struct ieee80211vap *vap) uint16_t r; do { - get_random_bytes(&r, 2); + net80211_get_random_bytes(&r, 2); ieee80211_iterate_nodes(&vap->iv_ic->ic_sta, mesh_checkid, &r); maxiter--; } while (r == 0 && maxiter > 0); diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 64a0164aeb81..5a9677836dbd 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -363,7 +363,8 @@ ieee80211_create_ibss(struct ieee80211vap* vap, struct ieee80211_channel *chan) if (vap->iv_flags & IEEE80211_F_DESBSSID) IEEE80211_ADDR_COPY(ni->ni_bssid, vap->iv_des_bssid); else { - get_random_bytes(ni->ni_bssid, IEEE80211_ADDR_LEN); + net80211_get_random_bytes(ni->ni_bssid, + IEEE80211_ADDR_LEN); /* clear group bit, add local bit */ ni->ni_bssid[0] = (ni->ni_bssid[0] &~ 0x01) | 0x02; }