Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/usb/wlan/if_rsu.c
Show First 20 Lines • Show All 2,075 Lines • ▼ Show 20 Lines | rsu_event_survey(struct rsu_softc *sc, uint8_t *buf, int len) | ||||
memcpy(&wh[1], (uint8_t *)&bss[1], ieslen); | memcpy(&wh[1], (uint8_t *)&bss[1], ieslen); | ||||
/* Finalize mbuf. */ | /* Finalize mbuf. */ | ||||
m->m_pkthdr.len = m->m_len = pktlen; | m->m_pkthdr.len = m->m_len = pktlen; | ||||
/* Set channel flags for input path */ | /* Set channel flags for input path */ | ||||
bzero(&rxs, sizeof(rxs)); | bzero(&rxs, sizeof(rxs)); | ||||
rxs.r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; | rxs.r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; | ||||
rxs.r_flags |= IEEE80211_R_BAND; | |||||
rxs.r_flags |= IEEE80211_R_NF | IEEE80211_R_RSSI; | rxs.r_flags |= IEEE80211_R_NF | IEEE80211_R_RSSI; | ||||
rxs.c_ieee = le32toh(bss->config.dsconfig); | rxs.c_ieee = le32toh(bss->config.dsconfig); | ||||
rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, IEEE80211_CHAN_2GHZ); | rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, IEEE80211_CHAN_2GHZ); | ||||
rxs.c_band = IEEE80211_CHAN_2GHZ; | |||||
/* This is a number from 0..100; so let's just divide it down a bit */ | /* This is a number from 0..100; so let's just divide it down a bit */ | ||||
rxs.c_rssi = le32toh(bss->rssi) / 2; | rxs.c_rssi = le32toh(bss->rssi) / 2; | ||||
rxs.c_nf = -96; | rxs.c_nf = -96; | ||||
if (ieee80211_add_rx_params(m, &rxs) == 0) | if (ieee80211_add_rx_params(m, &rxs) == 0) | ||||
return; | return; | ||||
/* XXX avoid a LOR */ | /* XXX avoid a LOR */ | ||||
RSU_UNLOCK(sc); | RSU_UNLOCK(sc); | ||||
▲ Show 20 Lines • Show All 1,672 Lines • Show Last 20 Lines |