ieee80211.c (2263fb580e50256fbdbb081ca0756389d72b6bfc) ieee80211.c (6459bd2843eab7f7d383415a6ee0873f68f3437d)
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 690 unchanged lines hidden (view full) ---

699 * Count number of vaps in promisc, and issue promisc on
700 * parent respectively.
701 */
702void
703ieee80211_promisc(struct ieee80211vap *vap, bool on)
704{
705 struct ieee80211com *ic = vap->iv_ic;
706
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 690 unchanged lines hidden (view full) ---

699 * Count number of vaps in promisc, and issue promisc on
700 * parent respectively.
701 */
702void
703ieee80211_promisc(struct ieee80211vap *vap, bool on)
704{
705 struct ieee80211com *ic = vap->iv_ic;
706
707 /*
708 * XXX the bridge sets PROMISC but we don't want to
709 * enable it on the device, discard here so all the
710 * drivers don't need to special-case it
711 */
712 if (!(vap->iv_opmode == IEEE80211_M_MONITOR ||
713 (vap->iv_opmode == IEEE80211_M_AHDEMO &&
714 (vap->iv_caps & IEEE80211_C_TDMA) == 0)))
715 return;
716
717 IEEE80211_LOCK_ASSERT(ic);
718
719 if (on) {
720 if (++ic->ic_promisc == 1)
721 ieee80211_runtask(ic, &ic->ic_promisc_task);
722 } else {
723 KASSERT(ic->ic_promisc > 0, ("%s: ic %p not promisc",
724 __func__, ic));

--- 1095 unchanged lines hidden ---
707 IEEE80211_LOCK_ASSERT(ic);
708
709 if (on) {
710 if (++ic->ic_promisc == 1)
711 ieee80211_runtask(ic, &ic->ic_promisc_task);
712 } else {
713 KASSERT(ic->ic_promisc > 0, ("%s: ic %p not promisc",
714 __func__, ic));

--- 1095 unchanged lines hidden ---