aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/bcm43xx/bcm43xx_main.c
AgeCommit message (Collapse)Author
2006-10-16[PATCH] bcm43xx-softmac: Fix system hang for x86-64 with >1GB RAMLarry Finger
The bcm43xx-softmac software currently fails when running on x86_64 systems with more than 1GB RAM and one of the card variants with 30-bit DMA addressing. This patch uses the address extension bits in the hardware to set the correct DMA mask for the specific card in use. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-10-16[PATCH] bcm43xx-softmac: check returned value from pci_enable_deviceLarry Finger
Linus's tree now has a configuration option that prints a warning whenever the returned value of any routine is ignored. This patch fixes the only such warning for bcm43xx. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-10-16[PATCH] bcm43xx: fix race condition in periodic work handlerMichael Buesch
There is a potential race condition in the periodic_work_handler routine of bcm43xx-softmac. In addition to fixing this condition, the size of code is reduced by moving the mutex lock outside the if. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-09-25[PATCH] bcm43xx: fix netdev watchdog timeoutsLarry Finger
The setup for running long periodic work has a bug that leads to netdev watchdog tx timeouts. This change eliminates the timeouts. Signed-off-by: Michael Buesch <mb@bu3sch.de> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-09-25[PATCH] bcm43xx-softmac: improve wrong firmware messageLarry Finger
An error message is changed to a printk as the original dprintk would be optimized away if debugging were not enabled. If the error is triggered, a more meaningful message is returned. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-09-11[PATCH] bcm43xx: Add firmware version printoutLarry Finger
This patch prints microcode revision, patchlevel, date and time to KERN_INFO. Also, version 4.xx microcodes (rev>0x128) will be rejected by the driver, because they still do not work. Signed-off-by: Martin Langer <martin-langer@gmx.de> Acked-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-09-11[PATCH] bcm43xx: remove dead statistics codeLarry Finger
This patch removes code that was make obsolete when the wireless statistics in bcm43xx-softmac were changed, but was overlooked at that time. The value of bcm->stats.link_quality computed here is never used. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-09-11[PATCH] bcm43xx: Correct out of sequence initialization stepLarry Finger
This patch fixes an out of sequence step in the bcm43xx_init_board routine for bcm43xx-softmac. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-09-11[PATCH] bcm43xx-softmac: Init, shutdown and restart fixesLarry Finger
This fixes various bugs in the init and shutdown code that would lead to lockups and crashes. Signed-Off-By: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-08-29[PATCH] bcm43xx - set correct value in mac_suspended for ifdown/ifup sequenceLarry Finger
When bcm43xx-softmac is given an ifdown/ifup sequence, the value for bcm->mac_suspended ends up wrong, which leads to a large number of assert(bcm->mac_suspended>=0) messages. This one-line patch fixes this problem. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-Off-By: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-08-29[PATCH] bcm43xx: return correct hard_start_xmit error codeLarry Finger
hard_start_xmit should return a NETIF_TX_FOO error code. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-Off-By: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-08-29[PATCH] bcm43xx: re-add bcm43xx_rng_init() callMichael Buesch
Calls to bcm43xx_rng_init() and bcm43xx_rng_exit() got lost due to merge trouble. Re-add them. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-08-29[PATCH] bcm43xx: >1G and 64bit DMA supportMichael Buesch
This is a rewrite of the bcm43xx DMA engine. It adds support for >1G of memory (for chips that support the extension bits) and 64-bit DMA (for chips that support it). Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-31[PATCH] bcm43xx: reduce mac_suspend delay loop countJohn W. Linville
Drop the mac_suspend loop count to reduce the maximum delay to 10ms. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-31[PATCH] bcm43xx: add missing mac_suspended initializationLarry Finger
Fix-up missing mac_suspended initialization which resulted from Linville's sloppy patch mangling. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-27[PATCH] bcm43xx: fix-up build breakage from merging patches out of orderJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-27[PATCH] bcm43xx: init routine rewriteMichael Buesch
Rewrite of the bcm43xx initialization routines. This fixes several issues: * up-down-up-down-up... stale data issue (May fix some DHCP issues) * Fix the init vs IRQ handler race (and remove the workaround) * Fix init for cards with multiple cores (APHY) As softmac has no internal PHY handling (unlike dscape), this adds the file "phymode" to sysfs. The active PHY can be selected by writing either a, b or g to this file. Current PHY can be determined by reading from it. * Fix the controller restart code. Controller restart can now also be triggered through echo 1 > /debug/bcm43xx/ethX/restart Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-27[PATCH] bcm43xx: fix mac_suspend refcountMichael Buesch
This fixes mac_suspend reference counting for ifconfig up ifconfig down ifconfig up Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-27[PATCH] bcm43xx: lower mac_suspend udelayMichael Buesch
Microoptimization: This reduces the udelay in bcm43xx_mac_suspend. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-27[PATCH] bcm43xx: suspend MAC while executing long pworkMichael Buesch
Suspend MAC (and make MAC-suspend refcounting) when doing long periodic work. On long periodic work, we disable IRQs on the device, so we don't want the MAC to stay operating and probably miss packets due do non-delivery of interrupts. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-27Merge branch 'upstream-fixes' into upstreamJohn W. Linville
2006-07-27[PATCH] softmac: do shared key auth in workqueueDaniel Drake
Johann Uhrmann reported a bcm43xx crash and Michael Buesch tracked it down to a problem with the new shared key auth code (recursive calls into the driver) This patch (effectively Michael's patch with a couple of small modifications) solves the problem by sending the authentication challenge response frame from a workqueue entry. I also removed a lone \n from the bcm43xx messages relating to authentication mode - this small change was previously discussed but not patched in. Signed-off-by: Daniel Drake <dsd@gentoo.org> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-10[PATCH] bcm43xx: opencoded lockingMichael Buesch
As many people don't seem to like the locking "obfuscation" in the bcm43xx driver, this patch removes it. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-10[PATCH] bcm43xx-softmac: Fix an off-by-one condition in handle_irq_noiseLarry Finger
An assert statement near the start of handle_irq_noise in the softmac version of bcm43xx_main.c is there to protect against out of bound addressing using variable bcm->noisecalc.nr_samples. The arrays in question have a dimension of 8, thus the value must be < 8. Signed-Off-By: Larry.Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-05[PATCH] bcm43xx: enable shared key authenticationDaniel Drake
I recently patched softmac to enable shared key authentication. This small patch will enable crazy or unfortunate bcm43xx users to use this new capability. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-05[PATCH] bcm43xx: workaround init_board vs. IRQ raceMichael Buesch
Place the Init-vs-IRQ workaround before any card register access, because we might not have the wireless core mapped at all times in init. So this will result in a Machine Check caused by a bus error. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-02[PATCH] irq-flags: drivers/net: Use the new IRQF_ constantsThomas Gleixner
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26[PATCH] Add bcm43xx HW RNG supportMichael Buesch
Signed-off-by: Michael Buesch <mb@bu3sch.de> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-15[PATCH] pci: bcm43xx avoid pci_find_deviceJiri Slaby
bcm43xx avoid pci_find_device Change pci_find_device to safer pci_get_device with support for more devices. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-15[PATCH] bcm43xx: preemptible periodic workMichael Buesch
Make the heavy periodic work preemptible to avoid disabling local IRQs for several msecs. Signed-off-by: Michael Buesch <mb@buesch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-15[PATCH] bcm43xx: redesign lockingMichael Buesch
Redesign the bcm43xx locking. This is pre-work to get a preemptible periodic work handler. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-05[PATCH] bcm43xx: quiet down log spam from set_securityJason Lunz
The debug logging in bcm43xx_ieee80211_set_security() is pretty noisy. Make it more silent. Signed-off-by: Jason Lunz <lunz@falooley.org> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-17Merge branch 'upstream-fixes' into upstreamJohn W. Linville
2006-05-17[PATCH] bcm43xx: associate on 'ifconfig up'David Woodhouse
I still need this hack to work around the fact that softmac doesn't attempt to associate when we bring the device up... Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05[PATCH] bcm43xx: add PCI ID for bcm4319Stefano Brivio
Add PCI ID for bcm4319. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05[PATCH] bcm43xx: fix whitespaceStefano Brivio
Fix whitespace. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05Merge branch 'upstream-fixes' into upstreamJohn W. Linville
2006-05-05[PATCH] bcm43xx: Fix array overrun in bcm43xx_geo_initMichael Buesch
The problem here is that the bcm34xx driver and the ieee80211 stack do not agree on what channels are possible for 802.11a. The ieee80211 stack only wants channels between 34 and 165, while the bcm43xx driver accepts anything from 0 to 200. I made the bcm43xx driver comply with the ieee80211 stack expectations, by using the proper constants. Signed-off-by: Jean Delvare <jdelvare@suse.de> [mb]: Reduce stack usage by kzalloc-ing ieee80211_geo Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05[PATCH] bcm43xx: check for valid MAC address in SPROMStefano Brivio
Check for valid MAC address in SPROM fields instead of relying on PHY type while setting the MAC address in the networking subsystem, as some devices have multiple PHYs. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24[PATCH] bcm43xx: use pci_iomap() for convenience.Michael Buesch
This reduces codesize. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-19[PATCH] bcm43xx: sysfs code cleanupMichael Buesch
This cleans up the bcm43xx sysfs code and makes it compliant with the unwritten sysfs rules (at least I hope so). Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-19[PATCH] bcm43xx: set trans_start on TX to prevent bogus timeoutsMichael Buesch
Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: don't set the channel on a device, which is down.Michael Buesch
Initial patch by David Woodhouse and Michael Marineau. Locking fix by me. Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: sync GPHY init with the specs.Michael Buesch
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: fix the remaining sparse warnings.Michael Buesch
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: remove some compilerwarnings.Michael Buesch
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: fix "include" issues on some platforms.Michael Buesch
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: get rid of "/* vim: ..." lines at the end of several files.Michael Buesch
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: add useless and broken statistics stuff. People seem to ↵Michael Buesch
want it. well... Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>