summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2005-10-02 13:02:00 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2005-10-02 13:02:00 +0000
commit2c01167486c741ec90591dd31f440c89bfa9de34 (patch)
treec0232e7a6801c402bc5415fa39e634055b6cdc25
parenta3a2763403737413e7e4df2c349c894d5cdadbf2 (diff)
allows dhcpd to work when ral/ural is acting as a standalone AP (without
bridging). it appears that ieee80211_input() enqueues packets in if_snd without calling if_start(). closes PR/4237
-rw-r--r--sys/dev/ic/ral.c9
-rw-r--r--sys/dev/usb/if_ral.c9
2 files changed, 16 insertions, 2 deletions
diff --git a/sys/dev/ic/ral.c b/sys/dev/ic/ral.c
index 14b3f3703d5..bbe973430f7 100644
--- a/sys/dev/ic/ral.c
+++ b/sys/dev/ic/ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ral.c,v 1.59 2005/08/27 14:46:21 damien Exp $ */
+/* $OpenBSD: ral.c,v 1.60 2005/10/02 13:01:54 damien Exp $ */
/*-
* Copyright (c) 2005
@@ -1342,6 +1342,13 @@ skip: desc->flags = htole32(RAL_RX_BUSY);
sc->rxq.cur_decrypt =
(sc->rxq.cur_decrypt + 1) % RAL_RX_RING_COUNT;
}
+
+ /*
+ * In HostAP mode, ieee80211_input() will enqueue packets in if_snd
+ * without calling if_start().
+ */
+ if (!IFQ_IS_EMPTY(&ifp->if_snd) && !(ifp->if_flags & IFF_OACTIVE))
+ ral_start(ifp);
}
/*
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c
index 8ed4e0cc98f..b69cbaf3ae1 100644
--- a/sys/dev/usb/if_ral.c
+++ b/sys/dev/usb/if_ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ral.c,v 1.44 2005/08/27 14:46:37 damien Exp $ */
+/* $OpenBSD: if_ral.c,v 1.45 2005/10/02 13:01:59 damien Exp $ */
/*-
* Copyright (c) 2005
@@ -926,6 +926,13 @@ ural_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status)
/* node is no longer needed */
ieee80211_release_node(ic, ni);
+ /*
+ * In HostAP mode, ieee80211_input() will enqueue packets in if_snd
+ * without calling if_start().
+ */
+ if (!IFQ_IS_EMPTY(&ifp->if_snd) && !(ifp->if_flags & IFF_OACTIVE))
+ ural_start(ifp);
+
splx(s);
MGETHDR(data->m, M_DONTWAIT, MT_DATA);