aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/bcm43xx/bcm43xx_main.c
AgeCommit message (Collapse)AuthorFilesLines
2008-03-13the scheduled bcm43xx removalAdrian Bunk1-4281/+0
Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: <Larry.Finger@lwfinger.net> Cc: <stefano.brivio@polimi.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28bcm43xx annotationsAl Viro1-20/+20
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10[BCM43XX]: Change radio hardware switch status printk from debug to regularLarry Finger1-2/+2
Some distros ship bcm43xx with debugging printout disabled. For those BCM43xx devices with radio on/off switches, this makes it impossible to know if the radio is on or off. This patch changes a pair of debug printk's into ordinary printk's. It also changes the message that prints when the radio is initialized to the off state as the old message seems to confuse users. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Nuke SET_MODULE_OWNER macro.Ralf Baechle1-1/+0
It's been a useless no-op for long enough in 2.6 so I figured it's time to remove it. The number of people that could object because they're maintaining unified 2.4 and 2.6 drivers is probably rather small. [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ] Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-09-14[PATCH] bcm43xx: Fix cancellation of work queue crashesLarry Finger1-8/+20
A crash upon booting that is caused by bcm43xx has been reported [1] and found to be due to a work queue being reinitialized while work on that queue is still pending. This fix modifies the shutdown of work queues and prevents periodic work from being requeued during shutdown. With this patch, no more crashes on reboot were observed by the original reporter. I do not get that particular failure on my system; however, when running a large number of ifdown/ifup sequences, my system would kernel panic with the 'caps lock' light blinking at roughly a 1 Hz rate. In addition, there were infrequent failures in the firmware that resulted in 'IRQ READY TIMEOUT' errors. With this patch, no more of the first type of failure occur, and incidence of the second type is greatly reduced. [1] http://bugzilla.kernel.org/show_bug.cgi?id=8937 Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-11PCI: Change all drivers to use pci_device->revisionAuke Kok1-4/+2
Instead of all drivers reading pci config space to get the revision ID, they can now use the pci_device->revision member. This exposes some issues where drivers where reading a word or a dword for the revision number, and adding useless error-handling around the read. Some drivers even just read it for no purpose of all. In devices where the revision ID is being copied over and used in what appears to be the equivalent of hotpath, I have left the copy code and the cached copy as not to influence the driver's performance. Compile tested with make all{yes,mod}config on x86_64 and i386. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Acked-by: Dave Jones <davej@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-08[PATCH] bcm43xx: Remove dead configuration variable CONFIG_947XXLarry Finger1-81/+0
The CONFIG_BCM947XX configuration variable was designed for use by the embedded device used by the OpenWRT project. The device has been shifted to the ssb driver in bcm43xx-mac80211 and will not be used with SoftMAC. Accordingly, this "dead" configuration variable is removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28[PATCH] bcm43xx:Eliminate some 'G Mode Enable' magic numbersLarry Finger1-2/+2
In code manipulating the TM State Low register of 802.11 cores, two different magic numbers are used to reference the 'G Mode Enable' bit. One of these, 0x20000000, is clear, but the other, (0x800 << 18), is not. This patch replaces both types with a defined constant. In addition, two bits in the TM State High registers are given definitions to help in following the code. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-10[PATCH] bcm43xx: Fix 802.11b/g scan limits to match regulatory reqsLarry Finger1-1/+19
In 802.11b/g mode, bcm43xx actively scans channels 1-14 no matter what locale has been set, either in the sprom or by the locale option. This behaviorviolates regulatory rules everywhere in the world except Japan. This patch changes the default range to the correct value if the locale has been set, and to channels 1-13 if no locale has been set. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-03-07[PATCH] bcm43xx: Fix assertion failures in interrupt handlerPavel Roskin1-3/+3
In the bcm43xx interrupt handler, sanity checks are wrongly done before the verification that the interrupt is for the bcm43xx. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-27[PATCH] bcm43xx: fix for 4309Stefano Brivio1-2/+3
BCM4309 devices aren't working properly as A PHYs aren't supported yet, but we probe 802.11a cores anyway. This fixes it, while still allowing for A PHY code to be developed in the future. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-17Merge branch 'upstream' into upstream-jgarzikJohn W. Linville1-12/+8
Conflicts: net/ieee80211/softmac/ieee80211softmac_module.c net/ieee80211/softmac/ieee80211softmac_wx.c
2007-02-14[PATCH] bcm43xx: Fix for 4311 and 02/07/07 specification changesLarry Finger1-5/+5
The specifications for the bcm43xx driver have been modified. This patch incorporates these changes in the code, which results in the BCM4311 and BCM4312 working. The name of one of the PHY parameters, previously known as "version", has been changed to "analog", short for "analog core version" . Signed-off-by: Larry Finger<Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-14[PATCH] bcm43xx: Ignore ampdu status reportsMichael Buesch1-5/+3
If bcm43xx were to process an afterburner (ampdu) status response, Linux would oops. The ampdu and intermediate status bits are properly named. 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>
2007-02-14[PATCH] bcm43xx: Janitorial change - remove two unused variablesLarry Finger1-2/+0
Two bit-field values are extracted from the sprom data and never used. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-09Merge branch 'upstream' of ↵Jeff Garzik1-10/+15
master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream
2007-02-09[PATCH] bcm43xx: Check error returns in initialization routinesLarry Finger1-5/+14
A number of the calls in the initialization routines fail to check the returned value for errors. This patch adds the necessary checks and logs any errors found when appropriate. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-07[PATCH] bcm43xx: Enable fwpostfix in nondebug bcm43xxMichael Buesch1-5/+1
The in-kernel bcm43xx driver only works with V3 firmware, whereas the experimental version that incorporates the d80211 stack requires V4 firmware. In bcm43xx-d80211, the fwpostfix module parameter is used to differentiate between the versions. In bcm43xx-softmac, this module parameter is only enabled when debugging is on. This patch makes the module parameter available unconditionaly, and should ease the future transition from softmac to d80211. 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>
2007-02-05[PATCH] bcm43xx: Interrogate hardware-enable switch and update LEDsLarry Finger1-9/+27
The current bcm43xx driver ignores any wireless-enable switches on mini-PCI and mini-PCI-E cards. This patch implements a new routine to interrogate the radio hardware enabled bit in the interface, logs the initial state and any changes in the switch (if debugging enabled), activates the LED to show the state, and changes the periodic work handler to provide 1 second response to switch changes and to account for changes in the periodic work specs. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-01-18[PATCH] bcm43xx: Fix failure to deliver PCI-E interruptsLarry Finger1-4/+7
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 Howells1-87/+120
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 Drake1-6/+0
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 Finger1-10/+5
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 Finger1-34/+7
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 Brivio1-37/+106
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 Finger1-0/+2
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 Howells1-9/+11
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 Bunk1-2/+2
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 Buesch1-0/+18
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 Buesch1-1/+15
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 Finger1-19/+6
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 Finger1-1/+5
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 Buesch1-2/+1
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 Howells1-2/+2
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 Finger1-2/+1
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 Finger1-3/+4
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 Finger1-0/+27
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 Finger1-11/+1
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 Finger1-1/+1
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 Finger1-17/+22
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 Finger1-0/+2
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 Finger1-1/+3
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 Buesch1-0/+6
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 Buesch1-36/+49
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. Linville1-1/+1
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 Finger1-0/+1
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. Linville1-8/+8
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-27[PATCH] bcm43xx: init routine rewriteMichael Buesch1-267/+367
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 Buesch1-1/+2
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 Buesch1-1/+1
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 Buesch1-18/+31
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. Linville1-1/+1
2006-07-27[PATCH] softmac: do shared key auth in workqueueDaniel Drake1-1/+1
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 Buesch1-32/+32
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 Finger1-1/+1
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 Drake1-0/+4
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 Buesch1-13/+14
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 Gleixner1-1/+1
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 Buesch1-0/+37
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 Slaby1-5/+16
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 Buesch1-11/+86
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 Buesch1-59/+54
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 Lunz1-6/+7
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. Linville1-3/+3
2006-05-17[PATCH] bcm43xx: associate on 'ifconfig up'David Woodhouse1-3/+3
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 Brivio1-0/+2
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 Brivio1-3/+3
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. Linville1-18/+27
2006-05-05[PATCH] bcm43xx: Fix array overrun in bcm43xx_geo_initMichael Buesch1-17/+26
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 Brivio1-1/+1
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 Buesch1-21/+6
This reduces codesize. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-19[PATCH] bcm43xx: sysfs code cleanupMichael Buesch1-0/+1
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 Buesch1-0/+1
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 Buesch1-3/+9
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 Buesch1-1/+3
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 Buesch1-2/+2
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 Buesch1-2/+8
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 Buesch1-0/+1
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 Buesch1-2/+0
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 Buesch1-0/+3
want it. well... Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: set default attenuation values.Michael Buesch1-6/+3
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: some IRQ handler cleanups.Michael Buesch1-35/+30
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: merge all iwmode code into the set_iwmode function.Michael Buesch1-36/+29
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: fix some gpio register trashing (hopefully :D)Michael Buesch1-38/+33
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: remove check for mmio length, as it differs among ↵Michael Buesch1-26/+4
platforms. (especially embedded) Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: Do boardflags workarounds for specific boards.Michael Buesch1-0/+9
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: Remove the workaround in dummy_transmission,Michael Buesch1-7/+0
as it causes more trouble than it solves Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: reduce the size of bcm43xx_private by removing unneeded ↵Michael Buesch1-124/+114
members. Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: receive TX status on MMIO or DMA unconditionally regarding ↵Michael Buesch1-12/+7
the 80211 core rev. Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: fix some stuff, add a few missing mmiowb(), remove dead code.Michael Buesch1-24/+52
This may workaround the XMIT ERRORs some people are getting. Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: Remove the mmio access printing facility overhead.Michael Buesch1-35/+0
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: Abstract the locking mechanism.Michael Buesch1-35/+40
This is the starting point to make the driver out-of-order-MMIO-stores safe. There are more mmiowb() needed. Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: Set both, the DMAmask and the coherent DMAmask.Michael Buesch1-3/+6
This has a potential to fix the >1G bug. But I can not test that, yet. Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: Add sysfs attributes for device specific tunables.Michael Buesch1-0/+4
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: Move TX/RX related functions to its own file. Add basic ↵Michael Buesch1-429/+1
RTS/CTS code. Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: add assert(bcm->initialized) to periodic_tasks_setup().Michael Buesch1-0/+1
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: move initialized = 1 to the end of init_board.Michael Buesch1-4/+6
Note that the periodic work has to be started with initialized==1 Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: Workaround init_board vs IRQ race.Michael Buesch1-6/+13
The proper fix for this is to move IRQ enabling to the end of init_board. But this is nontrivial and needs to be done with care. Stay with this cheap workaround for now. Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: split the channel helper functions, so that they can be ↵Michael Buesch1-2/+2
used without a valid running core. Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: make bcm43xx_sprom_crc() static.Michael Buesch1-1/+1
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: Move sprom lowlevel reading/writing to its own functions.Michael Buesch1-16/+77
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: Code cleanups. This removes various "inline" statements and ↵Michael Buesch1-168/+113
reduces codesize. Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: rewrite and simplify the periodic task handling.Michael Buesch1-123/+71
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: fix LED code.Michael Buesch1-1/+1
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: Partially fix PIO code. Add Kconfig option for PIO or DMA ↵Michael Buesch1-28/+41
mode (or both). Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: heavily increase mac_suspend timeout.Michael Buesch1-7/+4
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: fix txpower reporting in WE.Michael Buesch1-0/+4
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: basic ethtool supportMichael Buesch1-0/+2
This patch contains the beginnings of ethtool support for bcm43xx. It only implements get_drvinfo and get_link, but that's enough for ifplugd to use ethtool to know whether we're associated or not and then start or stop dhcp as necessary. Signed-off-by: Jason Lunz <lunz@falooley.org> Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: Remove function bcm43xx_channel_is_allowed()Michael Buesch1-165/+1
Geographical restriction should become part of the 80211 stack, so every driver does not have to duplicate it. Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: Add more initvals sanity checks and error out, if one ↵Michael Buesch1-19/+43
sanity check fails. Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: Fix makefile. Remove all the "out-of-tree" stuff.Michael Buesch1-6/+5
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] bcm43xx: sync with svn.berlios.deMichael Buesch1-4/+3
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27[PATCH] wireless: import bcm43xx sourcesJohn W. Linville1-0/+4597
Import the bcm43xx driver from the upstream sources here: ftp://ftp.berlios.de/pub/bcm43xx/snapshots/bcm43xx/bcm43xx-20060123.tar.bz2 Signed-off-by: John W. Linville <linville@tuxdriver.com>