aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/bcm43xx/bcm43xx_main.c
AgeCommit message (Collapse)Author
2007-01-18[PATCH] bcm43xx: Fix failure to deliver PCI-E interruptsLarry Finger
The PCI-E modifications to bcm43xx do not set up the interrupt vector correctly. Tested with BCM4311 (PCI-E) on x86_64 and BCM4306 (PCI) on i386. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-05Merge branch 'master' of ↵David Howells
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: drivers/infiniband/core/iwcm.c drivers/net/chelsio/cxgb2.c drivers/net/wireless/bcm43xx/bcm43xx_main.c drivers/net/wireless/prism54/islpci_eth.c drivers/usb/core/hub.h drivers/usb/input/hid-core.c net/core/netpoll.c Fix up merge failures with Linus's head and fix new compilation failures. Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-02[PATCH] ieee80211: Provide generic get_stats implementationDaniel Drake
bcm43xx and ipw2100 currently duplicate the same simplistic get_stats handler. Additionally, zd1211rw requires the same handler to fix a bug where all stats are reported as 0. This patch adds a generic implementation to the ieee80211 layer, which drivers are free to override. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02[PATCH] bcm43xx: Remove useless core enable/disable messagesLarry Finger
In the softmac version of bcm43xx, the core scan logs whether each core is enabled or disabled. This information is useless as one of the next steps is to enable all cores. This patch removes this output from the log. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02[PATCH] bcm43xx: remove badness variable and related routineLarry Finger
When the periodic work function in bcm43xx was converted for voluntary preemption to reduce latency, a new function was created to estimate the "badness" of each step, and this quantity was used to determine if preemption should be enabled when periodic work was undertaken. This concept was quite useful while debugging of periodic work was in progress. Now that this routine seems to be working correctly, it is time to simplify the code. This patch keeps the functionality intact, but simplifies the code. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02[PATCH] bcm43xx: add PCI-E codeStefano Brivio
The current bcm43xx driver does not contain code to handle PCI-E interfaces such as the BCM4311 and BCM4312. This patch, originally written by Stefano Brivio adds the necessary code to enable these interfaces. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02[PATCH] bcm43xx: output proper link quality with scansLarry Finger
The bcm43xx-softmac driver fails to set two quantities needed for iwlist to compute wireless quality when scanning. As a result, userland programs using the quality to determine the best connection fail. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-11-22WorkStruct: make allyesconfigDavid Howells
Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-07[PATCH] bcm43xx: Add error checking in bcm43xx_sprom_write()Adrian Bunk
The Coverity checker noted that these "if (err)"'s couldn't ever be true. It seems the intention was to check the return values of the bcm43xx_pci_write_config32()'s? Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-11-07[PATCH] bcm43xx: Drain TX status before starting IRQsMichael Buesch
Drain the Microcode TX-status-FIFO before we enable IRQs. This is required, because the FIFO may still have entries left from a previous run. Those would immediately fire after enabling IRQs and would lead to an oops in the DMA TXstatus handling 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-10-31[PATCH] bcm43xx: Fix low-traffic netdev watchdog TX timeoutsMichael Buesch
This fixes a netdev watchdog timeout problem. The software needs to call netif_tx_disable before running the hardware calibration code. The problem condition can be shown by the following timegraph. |---5secs - ~10 jiffies time---|---|OOPS ^ ^ last real TX periodic work stops netif At OOPS, the following happens: The watchdog timer triggers, because the timeout of 5secs is over. The watchdog first checks for stopped TX. _Usually_ TX is only stopped from the TX handler to indicate a full TX queue. But this is different. We need to stop TX here, regardless of the TX queue state. So the watchdog recognizes the stopped device and assumes it is stopped due to full TX queues (Which is a _wrong_ assumption in this case). It then tests how far the last TX has been in the past. If it's more than 5secs (which is the case for low or no traffic), it will fire a TX timeout. 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-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>