simonb
c26e70ad3c
White space nit.
2003-11-06 22:30:09 +00:00
simonb
00ea35b3b3
Fix gcc332 uninitialised bogon.
2003-11-05 23:39:21 +00:00
petrov
334dcc0296
Do not set HMEDEBUG as default mode.
2003-11-03 20:30:14 +00:00
ichiro
8b115395c7
Fix uninitialized variable warnings
2003-11-03 03:05:25 +00:00
wiz
c5670263e0
Fix some typos. From Tom Cosgrove via jmc@openbsd.
2003-11-02 11:07:44 +00:00
wiz
218b6186ff
deferred, not deffered. Inspired by Tom Cosgrove.
2003-11-02 10:50:40 +00:00
wiz
d88f7b1d62
boundary, not boundry. Inspired by Tom Cosgrove.
2003-11-02 10:31:06 +00:00
dyoung
6892b91b88
No need to check which state we're changing FROM when we deactivate
...
the scan callout.
2003-11-02 02:14:33 +00:00
dyoung
313961b974
Get a clue from ath(4) and move the ieee80211_new_state() calls in
...
atw_init to one place.
2003-11-02 02:05:15 +00:00
dyoung
3800e8585a
Fix thinko that breaks IBSS merges in atw(4). sc->sc_opmode !=
...
ic->ic_opmode!
2003-11-02 01:58:22 +00:00
dyoung
76db6bfa8c
Use ieee80211_find_rxnode to attribute Rx packets to the write
...
ieee80211_node. This reduces code duplication. It will help us
support passive scanning and rate adaptation.
2003-11-02 01:55:40 +00:00
dyoung
45f756f520
Mark the available channels using the ic_channels table instead of
...
setting bits in ic_chan_avail, which is the responsibility of
ieee80211_ifattach. I cannot believe the previous code worked.
2003-11-02 01:39:22 +00:00
dyoung
f64ab7b2a4
Get the ieee80211_node for management packets from the rcvif field.
2003-11-02 00:55:46 +00:00
dyoung
bf9644d3d3
Fix bugs in power-saving:
...
Use a power-saving station's ieee80211_node, which is stored in
the rcvif field.
Do not free a node if it is put onto the power-saving queue.
2003-11-02 00:22:49 +00:00
dyoung
e3bc096fe4
Bug fix: in wi_cfg_txrate, do not divide the 802.11 rate by 2 and
...
take off the flags before giving it to wi_write_txrate.
Also add a useful debug message to wi_write_txrate.
2003-11-01 23:57:05 +00:00
tsutsui
614e6d4de9
Cleanup MI mk48txx(4) todclock driver:
...
- Prepare mk48txxvar.h and leave only register definitions in mk48txxreg.h.
- Define struct mk48txx_softc as usual devices and allocate necessary
members like struct todr_chip_handle in it.
- Change mk48txx_attach(), mk48txx_nvwr() and mk48txx_nvrd() to take
struct mk48txx_softc.
2003-11-01 22:41:42 +00:00
tsutsui
ab09fdd80e
Rename flag NO_CENTURY_ADJUST -> MC146818_NO_CENT_ADJUST to avoid conflicts.
2003-11-01 21:58:43 +00:00
jdolecek
467746e275
avoid strong words; use 'screw' instead
2003-11-01 17:00:49 +00:00
briggs
e6f9248f47
Use aprint_*(9) instead of printf() in attach routines.
2003-10-31 21:25:09 +00:00
reinoud
22f94d4a8e
Rollback
2003-10-31 14:22:48 +00:00
reinoud
a0f1b459d6
Make it compile under gcc 2.95 again. Without the patch it gives an `might
...
be used uninitialised' warning.
2003-10-31 13:47:00 +00:00
reinoud
382038b55b
Make it compile under gcc 2.95 again. I guess the initialisers were
...
stripped in the NULL = 0 -> NULL = (void *) 0 conversion.
2003-10-31 13:43:15 +00:00
matt
ab3d7937b5
Fix uninitialized warning.
2003-10-30 21:19:02 +00:00
simonb
b6abb6ab1d
Remove some assigned-to but otherwise unused variables.
2003-10-30 01:58:17 +00:00
bouyer
f974ecc32b
Remove check for the error register value at probe time. There have been report
...
on -current-users of some drives not returning the proper value here.
This shouldn't affect the probe time for the common cases.
2003-10-29 22:09:41 +00:00
bouyer
14cd9d8cff
freese->freeze, as pointed out by Frederick Bruck.
2003-10-29 22:05:15 +00:00
bouyer
ef9a315b24
- test if we have some work to do before tsleep() in the kernel thread,
...
in case the previous loop scheduled some more work to do (e.g. reset)
- use queue_freese to block the queue when a reset is pending too
- Avoid using WDCF_TH_RUN in some place that can be called from callout.
If the kernel thread is tsleep()ing somewhere, we may come here with
WDCF_TH_RUN set while being in the callout context. Fix a panic() in
tsleep() reported by Chuck Silvers.
- Use AT_WAIT instead of WDCF_TH_RUN wdcwait(), as we may not be in the
channel's thread context but still be able to tsleep(). Fix queue_freese
panics for WDC_CAPABILITY_NOIRQ controllers (port-mac68k/23208 by
Frederick Bruck).
2003-10-29 21:44:41 +00:00
tsutsui
18b32ac5ba
Switch arc to use MI mc146818 tod driver.
2003-10-29 18:17:49 +00:00
tsutsui
21ebbd9f3e
Add a bogus initializer to appease gcc's uninitialized warning.
...
XXX osiop_checkintr() should be rewritten.
2003-10-29 18:03:22 +00:00
tsutsui
cb187dc1a7
Fix bogus GCC uninitialized variable warning.
2003-10-29 18:01:20 +00:00
tsutsui
a17f7ef138
Eliminate an uninitialized variable warning.
2003-10-29 17:45:55 +00:00
tsutsui
159c103f63
Fix think-o about century handling in settime function.
2003-10-29 17:41:36 +00:00
tsutsui
2ba8cd8f89
Add MI driver for mc146818 based time-of-day clock with todr(9) support.
2003-10-29 17:00:40 +00:00
mycroft
3b7d66667e
Return EINVAL rather than stepping off a null pointer.
2003-10-29 02:31:55 +00:00
mycroft
46ef74d63c
Recode to remove bogus initializer.
2003-10-29 01:21:38 +00:00
mycroft
0b179751bd
XXX: gcc
2003-10-29 01:12:23 +00:00
mycroft
9d009e4f2a
Remove bogus initializer, and fix a typo in a loop variable instead.
2003-10-29 00:48:15 +00:00
mycroft
3741fa9860
Kill another bogus initializer.
2003-10-28 22:22:28 +00:00
matt
ebe74b9e7f
fix bogus GCC uninitialized variable warning. Use TAILQ_FOREACH.
2003-10-28 18:35:06 +00:00
christos
05f07448b6
Another possibly uninitialized lasttx
2003-10-26 19:11:33 +00:00
christos
93af726cde
Don't return random garbage in the default case; return the smallest ring
...
descriptor instead.
2003-10-26 18:20:43 +00:00
fvdl
e645b8b032
Add definitions for 8139C+ and 8169 chips. Not used yet. From FreeBSD.
2003-10-25 23:48:45 +00:00
christos
9269644881
Fix uninitialized variable warning.
2003-10-25 21:33:04 +00:00
christos
d2705ee1d2
make this compile again. I should really rename the FreeBSD KASSERT to
...
KASSERT2 or something.
2003-10-25 21:32:44 +00:00
christos
987510aee5
KASSERT takes 2 arguments here.
2003-10-25 19:41:44 +00:00
christos
b3ae88ff5d
Fix uninitialized variable warning.
2003-10-25 19:12:08 +00:00
christos
8bfd5e3292
Fix uninitialized variable warnings
2003-10-25 18:34:14 +00:00
simonb
7e135f3a2e
Make this compile with older gcc.
2003-10-25 13:45:07 +00:00
christos
21027e6048
more uninitialized variables
2003-10-25 08:37:00 +00:00
christos
551bd8b829
fix uninitialized variables
2003-10-25 08:30:46 +00:00
mycroft
f253f37fb0
In wi_newstate(), read the BSSID into a temporary buffer that has guaranteed
...
alignment. Fixes a really obscure failure mode on Alpha, and panics on other
machines.
2003-10-24 23:58:22 +00:00
briggs
7dc8540d52
Avoid a race condition that could allow a removable controller (such as
...
a compact flash card) to lock the atabus thread if it gets detached during
the probe process.
2003-10-22 23:59:00 +00:00
christos
ddccf85c50
support for NE2000_TYPE_AX88790 from
...
Yong-Jhen Hong yongjhen at alqualonde dot org
2003-10-22 00:12:36 +00:00
simonb
7feb1a91fa
Remove return after panic().
2003-10-21 06:22:16 +00:00
yamt
65995a9aa2
don't swap powerhook and shutdownhook.
2003-10-21 01:00:57 +00:00
fvdl
5f1e7fa5f8
Correct NULL abuse.
2003-10-21 00:57:47 +00:00
fvdl
86c363960e
Correct NULL abuse.
2003-10-21 00:25:59 +00:00
dyoung
ab4a574ce1
Don't take the 802.11 header off of a frame until after we've given
...
it to the driver's BPF tap.
2003-10-19 22:00:54 +00:00
simonb
9833c17169
Remove some unreachable code with the comment "To shut up compiler"
...
that neither gcc 2.95.3 or 3.3.1 complains about if that bit of code
is missing...
2003-10-19 01:49:03 +00:00
simonb
59fb31d7cc
Remove unreachable break after return and goto statements.
2003-10-19 01:44:48 +00:00
tsutsui
fd5c63296f
Fix some attach messages for new ahc(4).
2003-10-18 07:44:51 +00:00
dyoung
5dca575ce1
ieee80211_newstate() wants for ic->ic_state to equal the previous
...
state, so do not update ic->ic_state in wi_newstate() before calling
ieee80211_newstate(). Instead, update ic->ic_state when we do not
let ieee80211_newstate() run.
2003-10-17 03:58:23 +00:00
dyoung
d531221c67
Prepare for wi rate adaptation. Add wi_write_txrate, which only
...
writes a hardware register when the data rate selection actually
changes. Add wi_cfg_txrate, which writes the data rate selection
regardless.
Name some fields in the wi Tx buffer which we will use for rate
adaptation.
Name the Prism "Alternate Retry Count" RID, WI_RID_ALT_RETRY_COUNT.
2003-10-16 10:57:35 +00:00
dyoung
50daf0a217
The upper & lower bounds on wi RSSI are completely bogus, AFAICT.
2003-10-16 10:38:07 +00:00
dyoung
7c0b454d52
Cosmetic change: shorten 6 lines to 2.
2003-10-16 10:04:14 +00:00
dyoung
1ff3c191c9
Fix WEP transmission, too. From FreeBSD/Sam Leffler.
2003-10-16 09:31:08 +00:00
dyoung
bcde77e394
ath(4) failed to detect when the number of DMA segments exceeded
...
the number of descriptors, because of a disparity between the
bus_dmamap_load_mbuf implementation in FreeBSD and NetBSD. Now I
cover up the difference using ath_dmamap_load_mbuf.
Thanks Enami Tsugutomo for diagnosing this.
2003-10-16 09:13:30 +00:00
ichiro
581dfca276
add {shutdownhook,powerhook}disestablish()
2003-10-16 07:55:18 +00:00
itojun
a4a1466cb5
add $NetBSD$
2003-10-15 23:23:39 +00:00
enami
73473f6883
Return 0 on SIOC{ADD,DEL}MULTI.
2003-10-15 22:41:22 +00:00
itojun
d587f445de
s/printf/DPRINTF/ for ath_rate_ctl()
2003-10-15 22:19:31 +00:00
bouyer
70b50b0608
Make sure chp->atabus is initialised, and wakeup the right address when
...
shutting down the kernel thread.
2003-10-15 20:29:26 +00:00
bouyer
ea6912c52d
- don't ignore last bit when checking for floating bus value on slave
...
device; some ATAPI devices as master will report 0x7f in all registers
for slave before reset
- For the same reason, remove the er1 check.
Makes slave device with a "strange" ATAPI master probe again.
Problem reported and fix tested by Gary Duzan on current-users.
2003-10-15 20:26:33 +00:00
bouyer
3d6919754d
Clear chp->ch_drive[i].drive_flags if we didn't find a driver for the
...
drive.
2003-10-15 19:54:30 +00:00
dyoung
e86c830f2a
Fix WEP reception.
2003-10-15 11:40:07 +00:00
simonb
662c7128cd
Re-order a little so that there's no unreachable code in this block.
2003-10-15 07:18:17 +00:00
enami
8823a8da9a
Port multicast handling to NetBSD. Addresses PR23151.
2003-10-15 03:04:03 +00:00
dyoung
f2a9708c75
Do not index arrays using enum constants, since enums can be
...
re-ordered and extended. Instead, use a switch-statement or a
key->value table with appropriate bounds-checking.
2003-10-14 23:13:44 +00:00
ichiro
f4f7b1ae5c
add support ath on cardbus
...
- implement power management
2003-10-14 17:47:03 +00:00
dyoung
031c2c9baa
Why don't I make up my mind? No need to left-shift the country
...
codes when I right-shift the country-code register! Fixes a bug
reported by Dan Carosone: regulatory domain "ETSI" registered as
domain "Spain/Other", so he could only tune channels 10 and 11.
2003-10-13 16:35:49 +00:00
dyoung
2295b27590
Install athioctl.h, defining ioctls for Atheros 802.11a/b/g radios.
2003-10-13 08:29:48 +00:00
dyoung
372fd2b92a
Adapt atw(4) to the new 802.11 layer.
...
Simplify atw_start, atw_newstate.
Synchronize access to atw_start by bracketing the call to
ieee80211_next_scan in atw_next_scan with splnet()/splx().
2003-10-13 08:22:19 +00:00
dyoung
e31cc884ed
Adapt awi(4) to the new 802.11 layer.
2003-10-13 08:10:48 +00:00
dyoung
ef743c64b6
Switch wi(4) to the new 802.11 layer.
2003-10-13 08:07:21 +00:00
dyoung
2459b02669
Switch an(4) to using the header files in the new 802.11 layer.
2003-10-13 06:45:32 +00:00
dyoung
a71225fe22
NetBSD/FreeBSD compatibility changes NetBSD, especially
...
locking, mbuf
2003-10-13 05:34:30 +00:00
dyoung
ae577fc6ea
Miscellaneous changes for NetBSD compatibility.
2003-10-13 05:23:07 +00:00
dyoung
b495f27bbd
A compatibility layer to smooth differences between NetBSD and
...
FreeBSD for ath(4).
XXX Nobody with FreeBSD has signed off on this, so it may change
XXX or go away entirely.
2003-10-13 05:16:20 +00:00
bouyer
c298ea9fc9
Remove block that has been pasted twice. Pointed out by Alexander Yurchenko.
2003-10-12 19:28:50 +00:00
fvdl
7a26a8b8f5
Don't zap the lower 16 bits of the command/status register when clear
...
error bits.
2003-10-10 15:15:44 +00:00
briggs
85edb66218
Properly clear any latched errors before re-enabling SERR/PERR for PCI-X
...
in ahd_reset().
2003-10-10 15:02:08 +00:00
bouyer
0ea3fa883e
Remove the check for WAIT+POLL+READ case in __wdccommand_start(),
...
this case is already handled in __wdccommand_intr().
Pointed out by Charles M. Hannum.
2003-10-09 18:40:19 +00:00
bouyer
7719e83c8b
Following Matt Thomas's request, rename ata attribute to ata_hl, and
...
wdc_base to ata. We can now have
atabus* at ata?
in kernel config files.
2003-10-08 20:57:59 +00:00
pk
ded7383371
In isp_fc_worker() reduce the timeout value used to poll for the link
...
status from 10 seconds to 250 milli seconds for the second and subsequent
attempts to determine the link status. This prevents unnecessary long
stalls after the device attach routines have completed.
Tested on a dual port QLogic 3212. Approved by mjacob@feral.com .
2003-10-08 19:51:01 +00:00
fvdl
61834e8959
Cap the transfer size at MAXPHYS, the driver won't get bigger requests
...
than that. Allocating 16M per SCB is silly (as pointed out by
Frederick Bruckman).
2003-10-08 17:38:31 +00:00
bouyer
99d6009c2a
Make the ATA mid-layer appears as atabus, as proposed in
...
http://mail-index.netbsd.org/tech-kern/2003/09/25/0006.html
This adds a device (atabus) between IDE controllers and wd or atapibus, to
have each ATA channel show up in the device tree. Later there will be atabus
devices in /dev, so that we can do IOCTL on them.
Each atabus has its own kernel thread, to handle operations that needs polling,
e.g. reset and others.
Device probing on each bus it defered to the atabus thread creation.
This allows to do the reset and basic device probes in parallel, which reduce
boot time on systems with several pciide controllers.
2003-10-08 10:58:12 +00:00
mycroft
32856df936
We really don't need to do 2 resets in wdc_channel_attach() -- the one done
...
by wdcprobe() is enough.
2003-10-08 08:47:58 +00:00
fvdl
f4f3bc1663
OR in ahc->sc_dmaflags when passed to bus_dmamap_create() in ahc_alloc_scbs(),
...
in order to pass _ISADMA_32BIT if needed. Should fix SCB allocation
failure for 2842 VL cards.
2003-10-07 19:11:13 +00:00
martin
9e16642238
Adapt to recent PRI changes.
2003-10-07 19:02:36 +00:00
dyoung
c3139592cc
Initial import of ath(4) from FreeBSD.
2003-10-07 05:27:17 +00:00