ieee80211_hostap.c (2e370a5c7a5528afb124f6273136736e5d5fb798) | ieee80211_hostap.c (e1cfcbcb4e72759fea73161c2dc0761c09a8d788) |
---|---|
1/*- 2 * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 288 unchanged lines hidden (view full) --- 297 298static void 299hostap_deliver_data(struct ieee80211vap *vap, 300 struct ieee80211_node *ni, struct mbuf *m) 301{ 302 struct ether_header *eh = mtod(m, struct ether_header *); 303 struct ifnet *ifp = vap->iv_ifp; 304 | 1/*- 2 * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 288 unchanged lines hidden (view full) --- 297 298static void 299hostap_deliver_data(struct ieee80211vap *vap, 300 struct ieee80211_node *ni, struct mbuf *m) 301{ 302 struct ether_header *eh = mtod(m, struct ether_header *); 303 struct ifnet *ifp = vap->iv_ifp; 304 |
305 /* clear driver/net80211 flags before passing up */ 306 m->m_flags &= ~(M_80211_RX | M_MCAST | M_BCAST); 307 |
|
305 KASSERT(vap->iv_opmode == IEEE80211_M_HOSTAP, 306 ("gack, opmode %d", vap->iv_opmode)); 307 /* 308 * Do accounting. 309 */ 310 ifp->if_ipackets++; 311 IEEE80211_NODE_STAT(ni, rx_data); 312 IEEE80211_NODE_STAT_ADD(ni, rx_bytes, m->m_pkthdr.len); 313 if (ETHER_IS_MULTICAST(eh->ether_dhost)) { 314 m->m_flags |= M_MCAST; /* XXX M_BCAST? */ 315 IEEE80211_NODE_STAT(ni, rx_mcast); 316 } else 317 IEEE80211_NODE_STAT(ni, rx_ucast); 318 | 308 KASSERT(vap->iv_opmode == IEEE80211_M_HOSTAP, 309 ("gack, opmode %d", vap->iv_opmode)); 310 /* 311 * Do accounting. 312 */ 313 ifp->if_ipackets++; 314 IEEE80211_NODE_STAT(ni, rx_data); 315 IEEE80211_NODE_STAT_ADD(ni, rx_bytes, m->m_pkthdr.len); 316 if (ETHER_IS_MULTICAST(eh->ether_dhost)) { 317 m->m_flags |= M_MCAST; /* XXX M_BCAST? */ 318 IEEE80211_NODE_STAT(ni, rx_mcast); 319 } else 320 IEEE80211_NODE_STAT(ni, rx_ucast); 321 |
319 /* clear driver/net80211 flags before passing up */ 320 m->m_flags &= ~M_80211_RX; 321 | |
322 /* perform as a bridge within the AP */ 323 if ((vap->iv_flags & IEEE80211_F_NOBRIDGE) == 0) { 324 struct mbuf *mcopy = NULL; 325 326 if (m->m_flags & M_MCAST) { 327 mcopy = m_dup(m, M_DONTWAIT); 328 if (mcopy == NULL) 329 ifp->if_oerrors++; --- 1917 unchanged lines hidden --- | 322 /* perform as a bridge within the AP */ 323 if ((vap->iv_flags & IEEE80211_F_NOBRIDGE) == 0) { 324 struct mbuf *mcopy = NULL; 325 326 if (m->m_flags & M_MCAST) { 327 mcopy = m_dup(m, M_DONTWAIT); 328 if (mcopy == NULL) 329 ifp->if_oerrors++; --- 1917 unchanged lines hidden --- |