summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/main.c
Commit message (Collapse)AuthorAgeFilesLines
* b43: Automatically probe for opensource firmwareMichael Buesch2009-01-291-43/+111
| | | | | | | | | | | | | | | | | First probe for proprietary firmware and then probe for opensource firmware. This way around it's a win-win situation. 1) If proprietary fw is available, it will work. 2) If opensource firmware is available, but no proprietary (Distros can only ship open fw) it might work. 3) If both open and proprietary are available, it will work, because it selects the proprietary. We currently don't prefer the open fw in this case, because it doesn't work on all devices. It would introduce a regression otherwise. The remaining FIXMEs in this patch are harmless, because they only matter on multiband devices, which are not implemented yet anyway. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: restrict to 32 legacy ratesJohannes Berg2009-01-291-1/+1
| | | | | | | | | | Since the standards only define 12 legacy rates, 32 is certainly a sane upper limit and we don't need to use u64 everywhere. Add sanity checking that no more than 32 rates are registered and change the variables to u32 throughout. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Eliminate compilation warning in b43_op_set_keyLarry Finger2009-01-291-1/+4
| | | | | | | | | | | | | | A recent pull from wireless testing generates the following warning: CC [M] drivers/net/wireless/b43/main.o drivers/net/wireless/b43/main.c: In function ‘b43_op_set_key’: drivers/net/wireless/b43/main.c:3636: warning: pointer type mismatch in conditional expression This fix was suggested by Johannes Berg <johannes@sipsolutions.net>. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: clean up set_key callbackJohannes Berg2009-01-291-4/+9
| | | | | | | | | | | | | | The set_key callback now seems rather odd, passing a MAC address instead of a station struct, and a local address instead of a vif struct. Change that. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Bob Copeland <me@bobcopeland.com> [ath5k] Acked-by: Ivo van Doorn <ivdoorn@gmail.com> [rt2x00] Acked-by: Christian Lamparter <chunkeey@web.de> [p54] Tested-by: Kalle Valo <kalle.valo@nokia.com> [iwl3945] Tested-by: Samuel Ortiz <samuel@sortiz.org> [iwl3945] Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Change schedule for old-fw support removalMichael Buesch2009-01-291-3/+7
| | | | | | | | | The scheduled date for the removal of old fw support was in July 2008. However, we're not going to remove the support unless it causes a major headache. So change the schedule from "July 2008" to "when it causes headaches". Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43/ssb: Add SPROM8 extraction and LP-PHY detectionMichael Buesch2009-01-291-0/+12
| | | | | | | | | This adds detection code for the LP-PHY and SPROM extraction code for version 8, which is needed by the LP-PHY and newer N-PHY. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: detect N PHY revision/radioJohannes Berg2009-01-291-2/+2
| | | | | | | Does nothing unless you enable the hidden N PHY config. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ssb/b43: add new N PHY deviceJohannes Berg2009-01-291-0/+1
| | | | | | | | This is used on my macbook. N PHY, obviously nothing works yet, but we can detect the chip with this patch. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Use 64bit atomic register access for TSFMichael Buesch2009-01-291-69/+20
| | | | | | | | On modern b43 devices with core rev >=3, the hardware guarantees us an atomic 64bit read/write of the TSF, if we access the lower 32bits first. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Fixup set_key handlingMichael Buesch2009-01-291-16/+20
| | | | | | | | | This fixes the key handling for mac80211's new key->flags. It also adds TX locking to the set_key handler and adds a comment why this is required. This doesn't fix any known bugs. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: fix "‘gmode’ may be used uninitialized" warningJohn W. Linville2009-01-131-1/+1
| | | | | | | drivers/net/wireless/b43/main.c: In function ‘b43_op_config’: drivers/net/wireless/b43/main.c:3264: warning: ‘gmode’ may be used uninitialized Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Add key memory dumpingMichael Buesch2008-12-191-2/+51
| | | | | | | | | This adds an option to dump all crypto related memory to the kernel log. Obviously, it should not be enabled on productive systems. ;) Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Fix some MAC lockingMichael Buesch2008-12-191-42/+8
| | | | | | | | | This fixes some locking w.r.t. the lower MAC (firmware). It also removes a lot of ancient IRQ-locking that's not needed anymore. We simply suspend the MAC. That's easier and causes less trouble. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: implement short slot and basic rate handlingJohannes Berg2008-11-101-12/+99
| | | | | | | | | This implements proper short slot handling and adds code to program the hardware for the correct response rates derived from the basic rate set for the current BSS. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43/legacy: remove SSID codeJohannes Berg2008-11-101-21/+0
| | | | | | | | | | | The SSID programmed into the device is used by the ucode only to reply to probe requests, a functionality we disable anyway because it doesn't fit with the mac80211/hostapd programming model. Therefore, it isn't useful to program the SSID into device. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211/drivers: rewrite the rate control APIJohannes Berg2008-10-311-1/+1
| | | | | | | | | | | | So after the previous changes we were still unhappy with how convoluted the API is and decided to make things simpler for everybody. This completely changes the rate control API, now taking into account 802.11n with MCS rates and more control, most drivers don't support that though. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: make retry limits part of hw configJohannes Berg2008-10-311-37/+23
| | | | | | | | Instead of having a separate callback, use the HW config callback with a new flag to change retry limits. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: introduce hw config change flagsJohannes Berg2008-10-311-1/+2
| | | | | | | | | | | | | | This makes mac80211 notify the driver which configuration actually changed, e.g. channel etc. No driver changes, this is just plumbing, driver authors are expected to act on this if they want to. Also remove the HW CONFIG debug printk, it's incorrect, often we configure something else. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: kill hw.conf.antenna_sel_{rx,tx}Johannes Berg2008-10-311-22/+3
| | | | | | | Never actually used. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* net: convert print_mac to %pMJohannes Berg2008-10-271-3/+2
| | | | | | | | | | | | This converts pretty much everything to print_mac. There were a few things that had conflicts which I have just dropped for now, no harm done. I've built an allyesconfig with this and looked at the files that weren't built very carefully, but it's a huge patch. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* mac80211: add multi-rate retry supportFelix Fietkau2008-10-061-0/+1
| | | | | | | | | This patch adjusts the rate control API to allow multi-rate retry if supported by the driver. The ieee80211_hw struct specifies how many alternate rate selections the driver supports. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Increase loop tries in do_dummy_txLarry Finger2008-09-301-1/+1
| | | | | | | | | | | One of the spin-on-condition loops in routine do_dummy_tx always exits before the condition is satisfied. The hardware might be left in an inconsistent state that might be the cause of the PHY transmission errors seen by some users. 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>
* b43: Fix Bluetooth Coexistence SPROM programming error for HP 12f8 version ↵Larry Finger2008-09-301-0/+1
| | | | | | | | | | of BCM4306 Yet another BCM4306 card with the Bluetooth Coexistence SPROM programming error has been found. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Fix Bluetooth coexistence SPROM coding error for Motorola 7010 variant ↵Larry Finger2008-09-301-1/+2
| | | | | | | | | | of BCM4306 An additional BCM4306 has been found with the Bluetooth coexistence SPROM coding error. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: share STA information with driverJohannes Berg2008-09-151-2/+3
| | | | | | | | | | | This patch changes mac80211 to share some more data about stations with drivers. Should help iwlwifi and ath9k when they get around to updating, and might also help with implementing rate control algorithms without internals. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: use nl80211 interface typesJohannes Berg2008-09-151-19/+19
| | | | | | | | | | There's really no reason for mac80211 to be using its own interface type defines. Use the nl80211 types and simplify the configuration code a bit: there's no need to translate them any more now. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Remove QoS update workqueueMichael Buesch2008-09-111-42/+23
| | | | | | | We don't need the workqueue anymore, as we can now sleep in the callback. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Fix QoS defaultsMichael Buesch2008-09-111-11/+45
| | | | | | | | | This fixes the initialization of the default QoS parameters. This got broken by "wireless: fix warnings from QoS patch". Reported-by: Lorenzo Nava Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Replace hardcoded Analog switchMichael Buesch2008-09-081-1/+2
| | | | | | | | Replace a hardcoded Analog switch (which breaks on N-PHY) by a call to the switch_analog PHY operation. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Move Analog switching into phy codeMichael Buesch2008-09-081-20/+3
| | | | | | | This moves the Analog switching code into the PHY files. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Split PHY alloc and initMichael Buesch2008-09-051-14/+22
| | | | | | | | This splits the PHY allocation from the PHY init. This is needed in order to properly support Analog handling. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Move code from nphy.* to phy_n.*Michael Buesch2008-09-051-1/+1
| | | | | | | | | Sourcecode files for PHY code are named by phy_XXX.{c,h} where XXX is the PHY type. Move the N-PHY code to match the other files. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: keep track of supported interface modesLuis R. Rodriguez2008-09-051-0/+7
| | | | | | | | | | | | | | | | It is obviously good for userspace to know up front which interface modes a given piece of hardware might support (even if adding such an interface might fail later because of concurrency issues), so let's make cfg80211 aware of that. For good measure, disallow adding interfaces in all other modes so drivers don't forget to announce support for one mode when they add it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Stephen Blackheath <tramp.enshrine.stephen@blacksapphire.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Rewrite TX power adjustmentMichael Buesch2008-08-291-5/+13
| | | | | | | | | | | | | | | This patch rewrites the TX power recalculation algorithms to scale better with changed enviromnent. If there's low TX traffic, the power will be checked against the desired values every 60 seconds. If there is high TX traffic, the check is redone every 2 seconds. This improves the reaction times a lot and confuses the rate control less. It will also reduce the time it initially takes to tune to a new TX power value. With the old algorithm it could take about 30 to 45 seconds to settle to a new power value. This will happen in about two to four seconds now. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Implement dynamic PHY APIMichael Buesch2008-08-291-130/+42
| | | | | | | | | | | | | This patch implements a dynamic "ops" based PHY API. This is needed in order to conveniently support future PHY types to avoid the "switch"-hell. This patch does not change any functionality. It just moves lots of code from one place to another and adjusts it for the changed data structures. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* removed unused #include <version.h>Huang Weiyi2008-08-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | The drivers below do not use LINUX_VERSION_CODE nor KERNEL_VERSION. drivers/net/wireless/ath5k/base.c drivers/net/wireless/b43/main.c drivers/net/wireless/ipw2100.c drivers/net/wireless/ipw2200.c drivers/net/wireless/iwlwifi/iwl-3945.c drivers/net/wireless/iwlwifi/iwl-4965.c drivers/net/wireless/iwlwifi/iwl-5000.c drivers/net/wireless/iwlwifi/iwl-agn.c drivers/net/wireless/iwlwifi/iwl-core.c drivers/net/wireless/iwlwifi/iwl-eeprom.c drivers/net/wireless/iwlwifi/iwl-hcmd.c drivers/net/wireless/iwlwifi/iwl-power.c drivers/net/wireless/iwlwifi/iwl3945-base.c This patch removes the said #include <version.h>. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Fix for another Bluetooth Coexistence SPROM Programming error for BCM4306Larry Finger2008-08-181-0/+1
| | | | | | | | | | | | In trying to help users on the Ubuntu Bugzilla, I discovered another BCM4306 with the Bluetooth Coexistence programming error in the SPROM. This patch is contingent on the one that added the Linksys device with subdevice code of 0x0014. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Fix for SPROM coding error in Linksys WMP54G (BCM4306/3)Larry Finger2008-08-181-0/+1
| | | | | | | | | | The Linksys WMP54G (BCM4306/3) card in a PCI format has an SPROM coding error and needs the fix found for several other cards. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@kernel.org> [2.6.25.x, 2.6.26.x] Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: remove IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE flagJohannes Berg2008-07-291-2/+1
| | | | | | | I forgot this in the previous patch that made it unused. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: fix warnings from QoS patchJohannes Berg2008-07-151-40/+7
| | | | | | | | | | | When I removed the special "default" meaning from the QoS parameters, I forgot to update drivers and this lead to warnings because some drivers were checking for the special values and putting in defaults. This fixes that by removing the default special-casing completely. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* mac80211: revamp beacon configurationJohannes Berg2008-07-141-28/+20
| | | | | | | | | | | | | This patch changes mac80211's beacon configuration handling to never pass skbs to the driver directly but rather always require the driver to use ieee80211_beacon_get(). Additionally, it introduces "change flags" on the config_interface() call to enable drivers to figure out what is changing. Finally, it removes the beacon_update() driver callback in favour of having IBSS beacon delivered by ieee80211_beacon_get() as well. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵David S. Miller2008-06-281-17/+69
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-next-2.6
| * b43: Add debugfs firmware debugging knobMichael Buesch2008-06-271-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | This adds a firmware debugging knob to debugfs. With this knob it's possible to enable advanced runtime firmware checks. For now it only implements one sanity check for the mac-suspend. In future there'll probably be more. If CONFIG_B43_DEBUG is disabled, these checks will collapse to nothing. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * b43: Add simple firmware watchdogMichael Buesch2008-06-271-0/+15
| | | | | | | | | | | | | | | | | | This adds a simple firmware watchdog for the opensource firmware. This will check every 15 seconds, if the firmware zeroed out the watchdog register. The firmware will do this in its eventloop. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * b43: Add debugfs files for random SHM accessMichael Buesch2008-06-261-17/+41
| | | | | | | | | | | | | | | | | | This adds debugfs files for random SHM access. This is needed in order to implement firmware and driver debugging scripts in userspace. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵David S. Miller2008-06-281-4/+8
|\ \ | |/ |/| | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl4965-base.c
| * b43: Do not return TX_BUSY from op_txMichael Buesch2008-06-251-4/+8
| | | | | | | | | | | | | | | | | | | | Never return TX_BUSY from op_tx. It doesn't make sense to return TX_BUSY, if we can not transmit the packet. Drop the packet and return TX_OK. This will fix the resume hang. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵David S. Miller2008-06-161-6/+10
|\ \ | |/ | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/rt2x00/Kconfig drivers/net/wireless/rt2x00/rt2x00usb.c net/sctp/protocol.c
| * b43: Fix noise calculation WARN_ONMichael Buesch2008-06-131-6/+10
| | | | | | | | | | | | | | | | | | | | | | This removes a WARN_ON that is responsible for the following koops: http://www.kerneloops.org/searchweek.php?search=b43_generate_noise_sample The comment in the patch describes why it's safe to simply remove the check. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵David S. Miller2008-06-101-16/+54
|\ \ | |/ | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/tg3.c drivers/net/wireless/rt2x00/rt2x00dev.c net/mac80211/ieee80211_i.h
OpenPOWER on IntegriCloud