Commit Graph

3595 Commits

Author SHA1 Message Date
dyoung bb016ff89a Only drain the transmit queue if we are idling the transmit section. 2004-06-23 09:41:54 +00:00
dyoung ff69458fef After we wait for the MAC's transmit section to idle, drain the
transmit queue and cancel the watchdog timer.  This ends the annoying
"atw0: transmit timeout" messages that disrupted my WiFi tonight.
2004-06-23 09:27:59 +00:00
dyoung 60565a3dfb Fix a commit-o: handle all cases in the switch-statement. 2004-06-23 09:05:50 +00:00
dyoung 4e2ccd85f7 The ADM8211C uses a different BBP type-number for RFMD parts than
the original ADM8211.
2004-06-23 08:13:29 +00:00
dyoung 7d226b79b8 Don't skip the reset! atw was not getting reset at device attachment.
atw seems to work better now that it gets this right: for one thing,
the RSSI can be seen to change as I walk around the office with my
laptop.

Thanks to Todd C. Miller for pointing out my mistake.
2004-06-23 08:12:28 +00:00
dyoung 1a4ea7342a Fix typo: change ATW_RFTYPE_RFMD and family to ATW_BBPTYPE_RFMD.
This does not make any functional difference: each manufacturer's
RF type-number is the same as its BBP type-number.
2004-06-23 08:05:01 +00:00
thorpej bddc74072e Define and use pcmciabuscf_controller as an alias for
cf_loc[PCMCIABUSCF_CONTROLLER] and pcmciabuscf_socket
as an alias for cf_loc[PCMCIABUSCF_SOCKET].
2004-06-20 18:09:46 +00:00
thorpej 221edc1cb1 Define and use zsccf_channel as an alias for cf_loc[ZSCCF_CHANNEL]. 2004-06-20 18:07:35 +00:00
dyoung 43dcf72c5f Finally, refactor wi_media_change and ieee80211_media_change.
ieee80211_media_change handles a lot more conditions than
wi_media_change did.

This helps with the second bug mentioned in kern/25604, which causes
"SIOCSIFMEDIA: Invalid argument."
2004-06-06 05:32:17 +00:00
dyoung 86fed42ae8 In ad hoc mode, ignore the MAC's link up/down indication, since it
does not appear to be reliable.
2004-06-06 04:38:33 +00:00
dyoung 9494e60fdb No need to detect and exit on short 802.11 packets, since
ieee80211_input will do that (and tap the packet).
2004-06-05 07:12:45 +00:00
mycroft a4135d1d48 Only downgrade modes due to an actual CRC error. Downgrading on other errors
is anti-social -- especially given that there's no way to upgrade again short
of rebooting.

Also, downgrade UDMA modes more slowly.  It's entirely possible that they're
using an 80-wire cable, but it's just too long for the higher modes, or there
is minor crosstalk.
2004-06-01 19:32:30 +00:00
mrg a596504c46 - update URLs for sigmatel.
- add entry for "SigmaTel STAC9758/59" (seen on a new emuxki card)
2004-06-01 13:35:59 +00:00
dyoung 4d9e630e22 Don't set a frame's WEP bits, the 802.11 layer already has. 2004-05-31 11:42:00 +00:00
dyoung 17bc2a623e Define several new registers for the ADM8211C/CR parts. Improve
old register descriptions.
2004-05-31 11:40:56 +00:00
dyoung ee1c094dae No need for ath_start to set the WEP bit in the frame header, the
802.11 layer does it for us.
2004-05-31 11:39:39 +00:00
dyoung ac60cbd35f It's only necessary to set do_encrypt in one place, so do that. 2004-05-31 11:28:48 +00:00
dyoung 3e45584fea Cosmetic: fix comment typo, change bit-test style. 2004-05-31 11:28:03 +00:00
dyoung 4d6f61112f Name the shift, txpower << 2 -> LSHIFT(txpower, RF3000_GAINCTL_TXVGC_MASK). 2004-05-31 10:49:32 +00:00
dyoung ab84dc7c5f Wrap a line. Remove a useless comment. 2004-05-31 09:05:01 +00:00
dyoung 97c923cdc2 Describe Tx/Rx state a little better using clue from the ADM8211C/CR
datasheet.
2004-05-31 09:00:24 +00:00
dyoung e4e9f15d6a Use bpf_mtap2. 2004-05-31 08:52:53 +00:00
toshii b5fa366e57 Minor clean ups. No functional change.
- use RTK_RX_DESC_CNT where appropriate
  - remove unused members
2004-05-30 03:43:26 +00:00
christos fd8537e01d fix another scrolling use that leaked. 2004-05-29 02:04:56 +00:00
christos 1143925e65 move scroll function definition last. 2004-05-28 22:38:28 +00:00
christos 7208404c41 PR/19925: David Ferlier: Add scrolling support to wscons. 2004-05-28 21:42:29 +00:00
toshii 02598e7452 A couple of changes for adding re(4) (Realtek gigabit ethernet):
- add necessary members in rtk_softc
  - make functions used by re(4) non-static
2004-05-28 15:21:32 +00:00
mycroft 0a5a28eeae Write the registers in the proscribed order -- sector,cyllo,cylhi (LSB first
for LBA).  This make no difference with real devices, but the funky IDE
analyzer can't search properly if the order is wrong.
2004-05-27 16:47:35 +00:00
thorpej aeb454bce4 Clean-up of use of "precomp". It is used as "features" everywhere, so
rename the fields in wdc_command as appropriate.
2004-05-27 02:23:12 +00:00
thorpej 46986953d0 In wdcccommand(), load wd_features, not wd_precomp, with the features
provided by callers.

From Jordan Rhody @ Wasabi.
2004-05-27 02:09:26 +00:00
thorpej 2ecdd552dc Add the notion of "shadow registers" to the wdc driver. These shadow
registers are registers that overlap with others on many controllers, but
which may actually be distinct on some controllers.  Right now, the two
shadows are:

- wd_status (usually overlaps wd_command)
- wd_features (usually overlaps wd_error)

Add a new helper function, wdc_init_shadow_regs(), used to initialize
the shadow register handles on controllers where they do actually overlap.

Partially from Jordan Rhody @ Wasabi Systems, Inc.
2004-05-25 20:42:40 +00:00
atatat 16122fe06c Remaining sysctl descriptions under hw subtree (ath and bge) 2004-05-25 04:38:36 +00:00
bouyer 5c594e4cc4 Add a delay(5000) between the ATAPI_SOFT_RESET and the channel reset.
Some ATAPI device never get out of busy if touched too fast after a reset.
Delay value from atapi_wdc.c; fix problem reported by Nicolas Joly on
current-users.
2004-05-24 20:45:30 +00:00
bouyer eea7ca5986 Rmove a redundant BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE, and fix
another one (POST -> PRE)
2004-05-20 20:57:50 +00:00
bouyer 516871a573 Add support for the Ignore Wide Residue SCSI message. 2004-05-17 20:12:34 +00:00
bouyer 83478e12f3 when an unexpected disconnect occurs only compute the resid; do the
real save data pointers when we get the message (or rather, at disconnect
time following the message).
Factor out code to do this, and to deal with xs->resid, in siop_common.c.
2004-05-17 18:37:02 +00:00
bouyer 76fa396c1d Properly compute xs->resid, instead of assuming it'll always be 0 when
a command is done.
2004-05-17 11:10:24 +00:00
thorpej 56906b900a Patch from HITOSHI Osada:
* Add PAUSE-related event counters.
* Return flow control bits in fxp_mii_mediastatus().
2004-05-16 02:59:04 +00:00
thorpej 7e156484d4 Patch from HITOSHI Osada:
* Newer chips do not need the receiver lock-up workaround; detect when it
  is required.
2004-05-16 02:41:46 +00:00
bouyer bf4920bc20 In wdcprobe1(), protect the register writability test with splbio().
What we do here seems to trigger interrupts on some pcmcia adapters, which
cause the kernel to hang.
Add some WDCDEBUG_PRINT((), DEBUG_PROBE).
Avoid touching registers of nonexistent drives, once we know which drive is
or is not here.

This makes the "IBM PCMCIA Portable CD-ROM Drive" (external CD drive with
PCMCIA adapter) work.
2004-05-15 17:15:09 +00:00
bouyer 879d21cebe Add a delay(10) after re-enabling interrupts in the control register.
Some controllers/drives (e.g. SataLink 3114 with WD Raptor) require
it. Should fix kern/23808 by Chris Gilbert, patch suplied by Chris Gilbert
on tech-kern, extended to all places enabling interrupts by me.
2004-05-08 15:03:32 +00:00
pk 4b19351352 On reset, clear state flags and the msgout queue and notify the upper layer. 2004-05-03 12:25:34 +00:00
thorpej cdac01064e Rename the COM16650 option to COM_16650, for consistency with other
com variant options.
2004-05-01 19:03:59 +00:00
thorpej dfc7fe9bbe Wait just a little longer for console output to finish when we're
attaching the console uart.
2004-05-01 06:12:18 +00:00
dyoung 0e7143de53 Sync with FreeBSD. Again, I lazily pull from the FreeBSD commit
log.

----------------------------
update copyright notice for 2004
----------------------------
add new statistics

Obtained from:	madwifi
----------------------------
update radiotap support to reflect recent changes:

o move tx taps from ath_start to ath_tx_start so lots more
  state is available to tap
o add tx flags
o add tx rate
o add tx power (constant for the moment)
o add tx antenna state
2004-04-30 23:59:55 +00:00
dyoung 149917ef8b Sync with FreeBSD. Here are the changes FreeBSD has made:
----------------------------
do proper subclassing of node free+copy; the previous hack falls apart when
the 802.11 layer does useful work

Obtained from:	madwifi
----------------------------
transmit beacon frames directly instead of defering them to a swi; there
was too much delay

Obtained from:	madwifi
----------------------------
update copyright notice for 2004
----------------------------
radiotap updates:

o force little-endian byte order for header
o pad header to 32-bit boundary to guard against applications that assume
  packet data alignment
2004-04-30 23:59:52 +00:00
dyoung 4c4f215885 From FreeBSD. Lots has changed. I lazily yank text from the
FreeBSD commit log:

----------------------------
use correct malloc type to allocate struct ieee80211_node's

Noticed by:	phk
----------------------------
do proper subclassing of node free+copy; the previous hack falls apart when
the 802.11 layer does useful work

Obtained from:	madwifi
----------------------------
transmit beacon frames directly instead of defering them to a swi; there
was too much delay

Obtained from:	madwifi
----------------------------
update copyright notice for 2004
----------------------------
check more quickly (and directly) if an interrupt is pending; this reduces
work done in ath_intr when the irq is shared

Obtained from:	madwifi
----------------------------
cleanup descriptor allocation if attach fails

Obtained from:	madwifi
----------------------------
remove use IEEE80211_C_RCVMGT
----------------------------
radiotap updates:

o force little-endian byte order for header
o pad header to 32-bit boundary to guard against applications that assume
  packet data alignment
----------------------------
Don't announce MAC addresses twice.
(ieee80211_ifattach() calls ether_ifattach().)
----------------------------
Make this compile on amd64.

"I'll cope" by:  sam
----------------------------
When draining the tx queue reclaim any node references held in packets.
This fixes a problem when operating as an AP where clients would get
stuck in the node table because the reference count never went to zero.
----------------------------
When ath_hal_stoptxdma returns an error dma is still likely stopped
so don't just stop trying to send a beacon frame or we'll be more likely
to lose sync.  This only seems to happen on some older chips.
----------------------------
use ath_reset instead of ath_init when recovering from a watchdog timeout:
resetting the hardware is sufficient, no need to reset the 802.11 fsm
----------------------------
make hw.ath.debug a tunable
----------------------------
make hw.ath.outdoor and hw.ath.countrycode tunables
----------------------------
split debugging messages up into classes;
ah_debug is now treated as a bit vector
----------------------------
update radiotap support to reflect recent changes:

o move tx taps from ath_start to ath_tx_start so lots more
  state is available to tap
o add tx flags
o add tx rate
o add tx power (constant for the moment)
o add tx antenna state
----------------------------
o eliminate widespread on-stack mbuf use for bpf by introducing
  a new bpf_mtap2 routine that does the right thing for an mbuf
  and a variable-length chunk of data that should be prepended.
o while we're sweeping the drivers, use u_int32_t uniformly when
  when prepending the address family (several places were assuming
  sizeof(int) was 4)
o return M_ASSERTVALID to BPF_MTAP* now that all stack-allocated
  mbufs have been eliminated; this may better be moved to the bpf
  routines
2004-04-30 23:59:48 +00:00
briggs 8f451cfae0 When we are recovering from a resource exhaustion on receive, make sure
that the RU is stopped before issuing an RU_START.
Fix suggested by Takahiro Kambe in PR kern/10622.
2004-04-28 15:25:45 +00:00
briggs 3d68e2f46f Back out revision 1.82. It seems to cause a number of device timeouts
on x86 boxes.  There must be a better way to deal with this that works
well for everyone.  In the meantime, back out to the version that works
for more people.
2004-04-28 03:37:58 +00:00
itojun aca4c091d3 sprintf -> snprintf 2004-04-22 00:17:10 +00:00