本文整理汇总了C++中ieee80211_free_node函数的典型用法代码示例。如果您正苦于以下问题:C++ ieee80211_free_node函数的具体用法?C++ ieee80211_free_node怎么用?C++ ieee80211_free_node使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ieee80211_free_node函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ieee80211_crypto_handle_keymiss
int ieee80211_crypto_handle_keymiss(struct ieee80211com *ic,
wbuf_t wbuf,
struct ieee80211_rx_status *rs)
{
struct ieee80211_node *ni = NULL;
/*
* Handle packets with keycache miss
*/
if ((rs->rs_flags & IEEE80211_RX_KEYMISS)) {
ni = ieee80211_find_rxnode(ic,
(const struct ieee80211_frame_min *) wbuf_header(wbuf));
if( ni != NULL) {
struct ieee80211vap *vap = ni->ni_vap;
ieee80211_key_update_begin(vap);
if (!ieee80211_crypto_keymiss(ni, wbuf, rs)) {
IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, "%s: Couldn't decrypt, dropping packet.\n",
__func__);
wbuf_free(wbuf);
ieee80211_key_update_end(vap);
ieee80211_free_node(ni);
return 1;
}else {
ieee80211_key_update_end(vap);
ieee80211_free_node(ni);
}
}
}
return 0;
}
开发者ID:jorneytu,项目名称:wlan,代码行数:32,代码来源:ieee80211_crypto_wep_mbssid.c
示例2: wlan_send_probereq
int wlan_send_probereq(
wlan_if_t vaphandle,
const u_int8_t *destination,
const u_int8_t *bssid,
const u_int8_t *ssid,
const u_int32_t ssidlen,
const void *optie,
const size_t optielen)
{
struct ieee80211vap *vap = vaphandle;
struct ieee80211_node *bss_node;
int err;
bss_node = ieee80211_ref_bss_node(vap);
err = ieee80211_send_probereq(bss_node,
vaphandle->iv_myaddr,
destination,
bssid,
ssid,
ssidlen,
optie,
optielen);
ieee80211_free_node(bss_node);
return err;
}
开发者ID:KHATEEBNSIT,项目名称:AP,代码行数:27,代码来源:ieee80211_vap.c
示例3: rtwn_pci_reset_tx_ring_stopped
static void
rtwn_pci_reset_tx_ring_stopped(struct rtwn_softc *sc, int qid)
{
struct rtwn_pci_softc *pc = RTWN_PCI_SOFTC(sc);
struct rtwn_tx_ring *ring = &pc->tx_ring[qid];
int i;
for (i = 0; i < RTWN_PCI_TX_LIST_COUNT; i++) {
struct rtwn_tx_data *data = &ring->tx_data[i];
void *desc = (uint8_t *)ring->desc + sc->txdesc_len * i;
rtwn_pci_copy_tx_desc(pc, desc, NULL);
if (data->m != NULL) {
bus_dmamap_sync(ring->data_dmat, data->map,
BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(ring->data_dmat, data->map);
m_freem(data->m);
data->m = NULL;
}
if (data->ni != NULL) {
ieee80211_free_node(data->ni);
data->ni = NULL;
}
}
bus_dmamap_sync(ring->desc_dmat, ring->desc_map,
BUS_DMASYNC_POSTWRITE);
sc->qfullmsk &= ~(1 << qid);
ring->queued = 0;
ring->last = ring->cur = 0;
}
开发者ID:mulichao,项目名称:freebsd,代码行数:33,代码来源:rtwn_pci_attach.c
示例4: wlan_btamp_conn_sm_delete
void wlan_btamp_conn_sm_delete(wlan_btamp_conn_sm_t handle)
{
wlan_btamp_conn_sm_t smhandle = (wlan_btamp_conn_sm_t)handle;
struct ieee80211vap *vap = NULL;
struct ieee80211_node *ni = NULL;
if (!smhandle)
return;
vap = smhandle->vap_handle;
if (smhandle->is_running) {
IEEE80211_DPRINTF(smhandle->vap_handle, IEEE80211_MSG_STATE,
"%s: Deleting state machine while it is still runing \n", __func__);
}
ASSERT(! smhandle->is_running);
OS_CANCEL_TIMER(&(smhandle->sm_timer));
OS_FREE_TIMER(&(smhandle->sm_timer));
ieee80211_sm_delete(smhandle->hsm_handle);
/* Delete node for the peer mac address */
ni = ieee80211_vap_find_node(vap, smhandle->peer);
if (ni) {
IEEE80211_NODE_LEAVE(ni);
ieee80211_free_node(ni); /* Decrement the extra ref count from find */
}
OS_FREE(smhandle);
}
开发者ID:KHATEEBNSIT,项目名称:AP,代码行数:31,代码来源:ieee80211_btamp_conn_sm.c
示例5: sm_assoc_indication
static void sm_assoc_indication(os_handle_t osif, u_int8_t *macaddr, u_int16_t result,
wbuf_t wbuf, wbuf_t resp_wbuf)
{
wlan_btamp_conn_sm_t sm;
struct ieee80211vap *vap = NULL;
struct ieee80211_node *ni = NULL;
sm = ieee80211_btamp_get_smhandle((wlan_btamp_conn_sm_t *)osif, macaddr,
IEEE80211_BTAMP_CONN_STATE_ASSOC);
if (!sm || sm->is_stop_requested) {
return;
}
vap = sm->vap_handle;
ni = ieee80211_vap_find_node(vap, sm->peer);
if (ni) {
ni->ni_assocstatus = result;
ieee80211_free_node(ni);
}
if (result == IEEE80211_STATUS_SUCCESS) {
ieee80211_sm_dispatch(sm->hsm_handle,IEEE80211_BTAMP_CONN_EVENT_ASSOC_SUCCESS, 0, NULL);
} else {
ieee80211_sm_dispatch(sm->hsm_handle,IEEE80211_BTAMP_CONN_EVENT_ASSOC_FAIL, 0, NULL);
}
}
开发者ID:KHATEEBNSIT,项目名称:AP,代码行数:26,代码来源:ieee80211_btamp_conn_sm.c
示例6: ieee80211_flush_ifq
void
ieee80211_flush_ifq(struct ifqueue* ifq, struct ieee80211vap* vap)
{
struct ieee80211_node* ni;
struct mbuf* m;
struct mbuf** mprev;
IF_LOCK(ifq);
mprev = &ifq->ifq_head;
while ((m = *mprev) != NULL) {
ni = (struct ieee80211_node*)m->m_pkthdr.rcvif;
if (ni != NULL && ni->ni_vap == vap) {
*mprev = m->m_nextpkt;
// remove from list
ifq->ifq_len--;
m_freem(m);
ieee80211_free_node(ni);
// reclaim ref
} else
mprev = &m->m_nextpkt;
}
// recalculate tail ptr
m = ifq->ifq_head;
for (; m != NULL && m->m_nextpkt != NULL; m = m->m_nextpkt);
ifq->ifq_tail = m;
IF_UNLOCK(ifq);
}
开发者ID:sahil9912,项目名称:haiku,代码行数:28,代码来源:ieee80211_haiku.cpp
示例7: ieee80211_mlme_recv_disassoc
void ieee80211_mlme_recv_disassoc(struct ieee80211_node *ni, u_int32_t reason_code)
{
struct ieee80211vap *vap = ni->ni_vap;
#if (UMAC_SUPPORT_TDLS == 1) && (ATH_TDLS_AUTO_CONNECT == 1)
struct ieee80211com *ic = vap->iv_ic;
ic->ic_tdls_clean(vap);
#endif
IEEE80211_DPRINTF(vap, IEEE80211_MSG_MLME, "%s\n", __func__);
switch(vap->iv_opmode) {
case IEEE80211_M_HOSTAP:
case IEEE80211_M_BTAMP:
if (ni != vap->iv_bss) {
#if ATH_SUPPORT_AOW
ieee80211_aow_join_indicate(ni->ni_ic, AOW_STA_DISCONNECTED, ni);
#endif /* ATH_SUPPORT_AOW */
ieee80211_ref_node(ni);
if(IEEE80211_NODE_LEAVE(ni)) {
/* Call MLME indication handler if node is in associated state */
IEEE80211_DELIVER_EVENT_MLME_DISASSOC_INDICATION(vap, ni->ni_macaddr, reason_code);
}
ieee80211_free_node(ni);
}
uranus_report_wireless_event(ni->ni_vap, ni, WEVENT_AUTH_STATUS_DEASSOC);
break;
default:
/* Call MLME indication handler */
IEEE80211_DELIVER_EVENT_MLME_DISASSOC_INDICATION(vap, ni->ni_macaddr, reason_code);
}
}
开发者ID:KHATEEBNSIT,项目名称:AP,代码行数:31,代码来源:ieee80211_mlme.c
示例8: rtwn_usb_reset_tx_list
static void
rtwn_usb_reset_tx_list(struct rtwn_usb_softc *uc,
rtwn_datahead *head, struct ieee80211vap *vap)
{
struct rtwn_vap *uvp = RTWN_VAP(vap);
struct rtwn_data *dp, *tmp;
int id;
id = (uvp != NULL ? uvp->id : RTWN_VAP_ID_INVALID);
STAILQ_FOREACH_SAFE(dp, head, next, tmp) {
if (vap == NULL || (dp->ni == NULL &&
(dp->id == id || id == RTWN_VAP_ID_INVALID)) ||
(dp->ni != NULL && dp->ni->ni_vap == vap)) {
if (dp->ni != NULL) {
ieee80211_free_node(dp->ni);
dp->ni = NULL;
}
if (dp->m != NULL) {
m_freem(dp->m);
dp->m = NULL;
}
STAILQ_REMOVE(head, dp, rtwn_data, next);
STAILQ_INSERT_TAIL(&uc->uc_tx_inactive, dp, next);
}
}
}
开发者ID:2trill2spill,项目名称:freebsd,代码行数:29,代码来源:rtwn_usb_attach.c
示例9: ieee80211_clean_nodes
/*
* Timeout inactive nodes.
*/
void Voodoo80211Device::
ieee80211_clean_nodes(struct ieee80211com *ic)
{
struct ieee80211_node *ni, *next_ni;
u_int gen = ic->ic_scangen++; /* NB: ok 'cuz single-threaded*/
int s;
s = splnet();
for (ni = RB_MIN(ieee80211_tree, &ic->ic_tree);
ni != NULL; ni = next_ni) {
next_ni = RB_NEXT(ieee80211_tree, &ic->ic_tree, ni);
if (ic->ic_nnodes < ic->ic_max_nnodes)
break;
if (ni->ni_scangen == gen) /* previously handled */
continue;
ni->ni_scangen = gen;
if (ni->ni_refcnt > 0)
continue;
DPRINTF(("station %s purged from LRU cache\n",
ether_sprintf(ni->ni_macaddr)));
/*
* Send a deauthenticate frame.
*/
ieee80211_free_node(ic, ni);
ic->ic_stats.is_node_timeout++;
}
splx(s);
}
开发者ID:mercurysquad,项目名称:Voodoo80211,代码行数:31,代码来源:ieee80211_node.cpp
示例10: r92c_init_ra
static void
r92c_init_ra(struct rtwn_softc *sc, int macid)
{
struct ieee80211_htrateset *rs_ht;
struct ieee80211_node *ni;
uint32_t rates;
int maxrate;
RTWN_NT_LOCK(sc);
if (sc->node_list[macid] == NULL) {
RTWN_DPRINTF(sc, RTWN_DEBUG_RA, "%s: macid %d, ni is NULL\n",
__func__, macid);
RTWN_NT_UNLOCK(sc);
return;
}
ni = ieee80211_ref_node(sc->node_list[macid]);
if (ni->ni_flags & IEEE80211_NODE_HT)
rs_ht = &ni->ni_htrates;
else
rs_ht = NULL;
/* XXX MACID_BC */
rtwn_get_rates(sc, &ni->ni_rates, rs_ht, &rates, &maxrate, 0);
RTWN_NT_UNLOCK(sc);
#ifndef RTWN_WITHOUT_UCODE
if (sc->sc_ratectl == RTWN_RATECTL_FW) {
r92c_send_ra_cmd(sc, macid, rates, maxrate);
}
#endif
rtwn_write_1(sc, R92C_INIDATA_RATE_SEL(macid), maxrate);
ieee80211_free_node(ni);
}
开发者ID:jaredmcneill,项目名称:freebsd,代码行数:35,代码来源:r92c_fw.c
示例11: ath_net80211_uapsd_retqosnullframe
void ath_net80211_uapsd_retqosnullframe(ieee80211_node_t node, wbuf_t wbuf)
{
struct ieee80211_node *ni;
ni = (struct ieee80211_node *)node;
/* Release the node refcnt that was acquired in ath_net80211_uapsd_getqosnullframe() */
ieee80211_free_node(ni);
}
开发者ID:jorneytu,项目名称:wlan,代码行数:9,代码来源:if_ath_uapsd.c
示例12: ageq_mfree
/*
* Free an mbuf according to ageq rules: if marked as holding
* and 802.11 frame then also reclaim a node reference from
* the packet header; this handles packets q'd in the tx path.
*/
static void
ageq_mfree(struct mbuf *m)
{
if (m->m_flags & M_ENCAP) {
struct ieee80211_node *ni = (void *) m->m_pkthdr.rcvif;
ieee80211_free_node(ni);
}
m->m_nextpkt = NULL;
m_freem(m);
}
开发者ID:DangerDexter,项目名称:FreeBSD-8.0-dyntick,代码行数:15,代码来源:ieee80211_ageq.c
示例13: wlan_getrssi
int wlan_getrssi(wlan_if_t vaphandle, wlan_rssi_info *rssi_info, u_int32_t flags)
{
struct ieee80211vap *vap = vaphandle;
struct ieee80211_node *bss_node;
int err;
bss_node = ieee80211_ref_bss_node(vap);
err = wlan_node_getrssi(bss_node,rssi_info,flags);
ieee80211_free_node(bss_node);
return err;
}
开发者ID:KHATEEBNSIT,项目名称:AP,代码行数:11,代码来源:ieee80211_vap.c
示例14: wlan_get_txrate_info
int wlan_get_txrate_info(wlan_if_t vaphandle, ieee80211_rate_info *rate_info)
{
struct ieee80211vap *vap = vaphandle;
struct ieee80211_node *bss_node ;
int err;
bss_node = ieee80211_ref_bss_node(vap);
err = wlan_node_txrate_info(bss_node,rate_info);
ieee80211_free_node(bss_node);
return err;
}
开发者ID:KHATEEBNSIT,项目名称:AP,代码行数:11,代码来源:ieee80211_vap.c
示例15: rtwn_drain_mbufq
void
rtwn_drain_mbufq(struct rtwn_softc *sc)
{
struct mbuf *m;
struct ieee80211_node *ni;
RTWN_ASSERT_LOCKED(sc);
while ((m = mbufq_dequeue(&sc->sc_snd)) != NULL) {
ni = (struct ieee80211_node *)m->m_pkthdr.rcvif;
m->m_pkthdr.rcvif = NULL;
ieee80211_free_node(ni);
m_freem(m);
}
}
开发者ID:jaredmcneill,项目名称:freebsd,代码行数:13,代码来源:if_rtwn_tx.c
示例16: ieee80211_release_node
void
ieee80211_release_node(struct ieee80211com *ic, struct ieee80211_node *ni)
{
int s;
DPRINTF(("%s refcnt %u\n", ether_sprintf(ni->ni_macaddr),
ni->ni_refcnt));
s = splnet();
if (ieee80211_node_decref(ni) == 0 &&
ni->ni_state == IEEE80211_STA_COLLECT) {
ieee80211_free_node(ic, ni);
}
splx(s);
}
开发者ID:SylvestreG,项目名称:bitrig,代码行数:14,代码来源:ieee80211_node.c
示例17: ath_handle_micerror
static void
ath_handle_micerror(struct ieee80211com *ic,
struct ieee80211_frame *wh, int keyix)
{
struct ieee80211_node *ni;
/* XXX recheck MIC to deal w/ chips that lie */
/* XXX discard MIC errors on !data frames */
ni = ieee80211_find_rxnode(ic, (const struct ieee80211_frame_min *) wh);
if (ni != NULL) {
ieee80211_notify_michael_failure(ni->ni_vap, wh, keyix);
ieee80211_free_node(ni);
}
}
开发者ID:hmatyschok,项目名称:MeshBSD,代码行数:14,代码来源:if_ath_rx.c
示例18: ieee80211_free_allnodes
void
ieee80211_free_allnodes(struct ieee80211com *ic)
{
struct ieee80211_node *ni;
int s;
DPRINTF(("freeing all nodes\n"));
s = splnet();
while ((ni = RB_MIN(ieee80211_tree, &ic->ic_tree)) != NULL)
ieee80211_free_node(ic, ni);
splx(s);
if (ic->ic_bss != NULL)
ieee80211_node_cleanup(ic, ic->ic_bss); /* for station mode */
}
开发者ID:SylvestreG,项目名称:bitrig,代码行数:15,代码来源:ieee80211_node.c
示例19: wlan_add_sta_node
int wlan_add_sta_node(wlan_if_t vap, const u_int8_t *macaddr, u_int16_t auth_alg)
{
struct ieee80211_node *ni;
ni = ieee80211_vap_find_node(vap, macaddr);
if (ni == NULL) {
ni = ieee80211_dup_bss(vap, macaddr);
}
if (ni == NULL) {
return -ENOMEM;
}
/* claim node immediately */
ieee80211_free_node(ni);
return 0;
}
开发者ID:KHATEEBNSIT,项目名称:AP,代码行数:16,代码来源:ieee80211_node_ap.c
示例20: wmi_peer_sta_kickout_event_handler
static int
wmi_peer_sta_kickout_event_handler(ol_scn_t scn, u_int8_t *data, u_int16_t datalen, void *context)
{
struct ieee80211com *ic = &scn->sc_ic;
A_UINT8 peer_macaddr[ATH_MAC_LEN];
struct ieee80211_node *ni;
wmi_peer_sta_kickout_event *kickout_event = (wmi_peer_sta_kickout_event *)data;
WMI_MAC_ADDR_TO_CHAR_ARRAY(&kickout_event->peer_macaddr,peer_macaddr);
ni = ieee80211_find_node(&ic->ic_sta, peer_macaddr);
if (!ni) {
return -1;
}
ieee80211_kick_node(ni);
ieee80211_free_node(ni);
return 0;
}
开发者ID:KHATEEBNSIT,项目名称:AP,代码行数:16,代码来源:ol_if_node.c
注:本文中的ieee80211_free_node函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论