summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2005-08-27 06:40:18 +0000
committerderaadt <deraadt@openbsd.org>2005-08-27 06:40:18 +0000
commit0467e5573f2c4eb62579997bd31d1d86295dfee9 (patch)
tree840d7553ef613636fbab407bf588ac196beac913
parentPut in missing parenthesis and thus always pass (diff)
downloadwireguard-openbsd-0467e5573f2c4eb62579997bd31d1d86295dfee9.tar.xz
wireguard-openbsd-0467e5573f2c4eb62579997bd31d1d86295dfee9.zip
backout unapproved diff
-rw-r--r--distrib/alpha/common/Makefile.inc4
-rw-r--r--etc/root/root.mail2
-rw-r--r--sbin/dhclient/dhclient.c5
-rw-r--r--share/man/man8/dhcp.84
-rw-r--r--sys/dev/ic/ral.c37
-rw-r--r--sys/dev/usb/if_ral.c26
6 files changed, 26 insertions, 52 deletions
diff --git a/distrib/alpha/common/Makefile.inc b/distrib/alpha/common/Makefile.inc
index 38c15f683fa..de6dcf478ff 100644
--- a/distrib/alpha/common/Makefile.inc
+++ b/distrib/alpha/common/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.10 2005/08/26 18:38:12 henning Exp $
+# $OpenBSD: Makefile.inc,v 1.11 2005/08/27 06:40:51 deraadt Exp $
TOP= ${.CURDIR}/..
@@ -22,7 +22,7 @@ INSTALLBOOT?= /usr/mdec/installboot -v
XNAME?= floppy
FLOPPY?= ${XNAME}${REV}.fs
FLOPPYBLKS?= 2880
-FLOPPYTYPE?= floppy3
+FLOPPYTYPE?= floppyx
BOOT?= /usr/mdec/boot
BOOTXX?= /usr/mdec/bootxx
diff --git a/etc/root/root.mail b/etc/root/root.mail
index 208a939f423..88b37c7de83 100644
--- a/etc/root/root.mail
+++ b/etc/root/root.mail
@@ -1,4 +1,4 @@
-From deraadt@do-not-reply.openbsd.org Sat Nov 1 11:48:48 MST 2005
+From deraadt@do-not-reply.openbsd.org Sat Nov 1 11:48:48 MST 2005
Return-Path: root
Date: Nov 1 11:48:48 MST 2005
From: deraadt@do-not-reply.openbsd.org (Theo de Raadt)
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 9463af31dad..a9ab6a9ec5a 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.79 2005/08/25 19:08:50 henning Exp $ */
+/* $OpenBSD: dhclient.c,v 1.80 2005/08/27 06:40:18 deraadt Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -2113,8 +2113,7 @@ check_option(struct client_lease *l, int option)
if (!res_hnok(sbuf)) {
warning("Bogus Host Name option %d: %s (%s)", option,
sbuf, opbuf);
- l->options[option].len = 0;
- free(l->options[option].data);
+ return (0);
}
return (1);
case DHO_PAD:
diff --git a/share/man/man8/dhcp.8 b/share/man/man8/dhcp.8
index d54d1f87264..0aea32a1b5a 100644
--- a/share/man/man8/dhcp.8
+++ b/share/man/man8/dhcp.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: dhcp.8,v 1.18 2005/08/25 16:38:02 henning Exp $
+.\" $OpenBSD: dhcp.8,v 1.19 2005/08/27 06:43:13 deraadt Exp $
.\"
.\"
.\" Copyright (c) 1999 Aaron Campbell
@@ -109,7 +109,7 @@ daemon at boot-time and listen for DHCP requests on the local network.
To start it manually, execute the following commands:
.Pp
.Dl # touch /var/db/dhcpd.leases
-.Dl # /usr/sbin/dhcpd [netif1 netif2 ...]
+.Dl # /usr/sbin/dhcpd -q [netif1 netif2 ...]
.It
Ensure the kernel has been compiled with BPF (Berkeley Packet Filter) support
and at least one
diff --git a/sys/dev/ic/ral.c b/sys/dev/ic/ral.c
index b859e3ed469..99665fdf303 100644
--- a/sys/dev/ic/ral.c
+++ b/sys/dev/ic/ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ral.c,v 1.57 2005/08/25 20:28:11 damien Exp $ */
+/* $OpenBSD: ral.c,v 1.58 2005/08/27 06:42:03 deraadt Exp $ */
/*-
* Copyright (c) 2005
@@ -99,7 +99,7 @@ void ral_decryption_intr(struct ral_softc *);
void ral_rx_intr(struct ral_softc *);
void ral_beacon_expire(struct ral_softc *);
void ral_wakeup_expire(struct ral_softc *);
-int ral_ack_rate(struct ieee80211com *, int);
+int ral_ack_rate(int);
uint16_t ral_txtime(int, int, uint32_t);
uint8_t ral_plcp_signal(int);
void ral_setup_tx_desc(struct ral_softc *, struct ral_tx_desc *,
@@ -910,18 +910,6 @@ ral_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
case IEEE80211_S_RUN:
ral_set_chan(sc, ic->ic_bss->ni_chan);
- /* update basic rate set */
- if (ic->ic_curmode == IEEE80211_MODE_11B) {
- /* 11b basic rates: 1, 2Mbps */
- RAL_WRITE(sc, RAL_ARSP_PLCP_1, 0x3);
- } else if (IEEE80211_IS_CHAN_5GHZ(ic->ic_bss->ni_chan)) {
- /* 11a basic rates: 6, 12, 24Mbps */
- RAL_WRITE(sc, RAL_ARSP_PLCP_1, 0x150);
- } else {
- /* 11g basic rates: 1, 2, 5.5, 11, 6, 12, 24Mbps */
- RAL_WRITE(sc, RAL_ARSP_PLCP_1, 0x15f);
- }
-
if (ic->ic_opmode != IEEE80211_M_MONITOR) {
ral_set_bssid(sc, ic->ic_bss->ni_bssid);
ral_update_slot(sc);
@@ -1473,16 +1461,14 @@ ral_intr(void *arg)
#define RAL_ACK_SIZE 14 /* 10 + 4(FCS) */
#define RAL_CTS_SIZE 14 /* 10 + 4(FCS) */
-
-#define RAL_SIFS 10 /* us */
-#define RAL_RXTX_TURNAROUND 10 /* us */
+#define RAL_SIFS 10
/*
* Return the expected ack rate for a frame transmitted at rate `rate'.
* XXX: this should depend on the destination node basic rate set.
*/
int
-ral_ack_rate(struct ieee80211com *ic, int rate)
+ral_ack_rate(int rate)
{
switch (rate) {
/* CCK rates */
@@ -1491,7 +1477,7 @@ ral_ack_rate(struct ieee80211com *ic, int rate)
case 4:
case 11:
case 22:
- return (ic->ic_curmode == IEEE80211_MODE_11B) ? 4 : rate;
+ return 4;
/* OFDM rates */
case 12:
@@ -1593,7 +1579,7 @@ ral_setup_tx_desc(struct ral_softc *sc, struct ral_tx_desc *desc,
desc->flags |= htole32(RAL_TX_OFDM);
desc->physaddr = htole32(physaddr);
- desc->wme = htole16(RAL_AIFSN(3) | RAL_LOGCWMIN(4) | RAL_LOGCWMAX(6));
+ desc->wme = htole16(RAL_LOGCWMAX(8) | RAL_LOGCWMIN(3) | RAL_AIFSN(2));
/*
* Fill PLCP fields.
@@ -1834,7 +1820,7 @@ ral_tx_data(struct ral_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
int rtsrate, ackrate;
rtsrate = IEEE80211_IS_CHAN_5GHZ(ni->ni_chan) ? 12 : 4;
- ackrate = ral_ack_rate(ic, rate);
+ ackrate = ral_ack_rate(rate);
dur = ral_txtime(m0->m_pkthdr.len + 4, rate, ic->ic_flags) +
ral_txtime(RAL_CTS_SIZE, rtsrate, ic->ic_flags) +
@@ -1967,7 +1953,7 @@ ral_tx_data(struct ral_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) {
flags |= RAL_TX_ACK;
- dur = ral_txtime(RAL_ACK_SIZE, ral_ack_rate(ic, rate),
+ dur = ral_txtime(RAL_ACK_SIZE, ral_ack_rate(rate),
ic->ic_flags) + RAL_SIFS;
*(uint16_t *)wh->i_dur = htole16(dur);
}
@@ -2410,10 +2396,11 @@ ral_update_slot(struct ral_softc *sc)
slottime = (ic->ic_curmode == IEEE80211_MODE_11A) ? 9 : 20;
/* define the MAC slot boundaries */
- sifs = RAL_SIFS - RAL_RXTX_TURNAROUND;
+ sifs = RAL_SIFS;
pifs = sifs + slottime;
difs = sifs + 2 * slottime;
- eifs = (ic->ic_curmode == IEEE80211_MODE_11B) ? 364 : 60;
+ eifs = sifs + ral_txtime(RAL_ACK_SIZE,
+ (ic->ic_curmode == IEEE80211_MODE_11A) ? 12 : 2, 0) + difs;
tmp = RAL_READ(sc, RAL_CSR11);
tmp = (tmp & ~0x1f00) | slottime << 8;
@@ -2666,7 +2653,7 @@ ral_init(struct ifnet *ifp)
IEEE80211_ADDR_COPY(ic->ic_myaddr, LLADDR(ifp->if_sadl));
ral_set_macaddr(sc, ic->ic_myaddr);
- /* set basic rate set (will be updated later) */
+ /* set supported basic rates (1, 2, 6, 12, 24) */
RAL_WRITE(sc, RAL_ARSP_PLCP_1, 0x153);
ral_set_txantenna(sc, 1);
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c
index 1f40972d6e1..87ef6434f7e 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.42 2005/08/25 20:28:19 damien Exp $ */
+/* $OpenBSD: if_ral.c,v 1.43 2005/08/27 06:42:27 deraadt Exp $ */
/*-
* Copyright (c) 2005
@@ -119,7 +119,7 @@ Static void ural_txeof(usbd_xfer_handle, usbd_private_handle,
usbd_status);
Static void ural_rxeof(usbd_xfer_handle, usbd_private_handle,
usbd_status);
-Static int ural_ack_rate(struct ieee80211com *, int);
+Static int ural_ack_rate(int);
Static uint16_t ural_txtime(int, int, uint32_t);
Static uint8_t ural_plcp_signal(int);
Static void ural_setup_tx_desc(struct ural_softc *,
@@ -736,18 +736,6 @@ ural_task(void *arg)
case IEEE80211_S_RUN:
ural_set_chan(sc, ic->ic_bss->ni_chan);
- /* update basic rate set */
- if (ic->ic_curmode == IEEE80211_MODE_11B) {
- /* 11b basic rates: 1, 2Mbps */
- ural_write(sc, RAL_TXRX_CSR11, 0x3);
- } else if (IEEE80211_IS_CHAN_5GHZ(ic->ic_bss->ni_chan)) {
- /* 11a basic rates: 6, 12, 24Mbps */
- ural_write(sc, RAL_TXRX_CSR11, 0x150);
- } else {
- /* 11g basic rates: 1, 2, 5.5, 11, 6, 12, 24Mbps */
- ural_write(sc, RAL_TXRX_CSR11, 0x15f);
- }
-
if (ic->ic_opmode != IEEE80211_M_MONITOR)
ural_set_bssid(sc, ic->ic_bss->ni_bssid);
@@ -959,7 +947,7 @@ skip: /* setup a new transfer */
* XXX: this should depend on the destination node basic rate set.
*/
Static int
-ural_ack_rate(struct ieee80211com *ic, int rate)
+ural_ack_rate(int rate)
{
switch (rate) {
/* CCK rates */
@@ -968,7 +956,7 @@ ural_ack_rate(struct ieee80211com *ic, int rate)
case 4:
case 11:
case 22:
- return (ic->ic_curmode == IEEE80211_MODE_11B) ? 4 : rate;
+ return 4;
/* OFDM rates */
case 12:
@@ -1069,7 +1057,7 @@ ural_setup_tx_desc(struct ural_softc *sc, struct ural_tx_desc *desc,
if (RAL_RATE_IS_OFDM(rate))
desc->flags |= htole32(RAL_TX_OFDM);
- desc->wme = htole16(RAL_AIFSN(3) | RAL_LOGCWMIN(4) | RAL_LOGCWMAX(6));
+ desc->wme = htole16(RAL_LOGCWMAX(5) | RAL_LOGCWMIN(3) | RAL_AIFSN(2));
/*
* Fill PLCP fields.
@@ -1306,7 +1294,7 @@ ural_tx_data(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
flags |= RAL_TX_ACK;
flags |= RAL_TX_RETRY(7);
- dur = ural_txtime(RAL_ACK_SIZE, ural_ack_rate(ic, rate),
+ dur = ural_txtime(RAL_ACK_SIZE, ural_ack_rate(rate),
ic->ic_flags) + RAL_SIFS;
*(uint16_t *)wh->i_dur = htole16(dur);
}
@@ -2020,7 +2008,7 @@ ural_init(struct ifnet *ifp)
/* we're ready! */
ural_write(sc, RAL_MAC_CSR1, RAL_HOST_READY);
- /* set basic rate set (will be updated later) */
+ /* set supported basic rates (1, 2, 6, 12, 24) */
ural_write(sc, RAL_TXRX_CSR11, 0x153);
error = ural_bbp_init(sc);