summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/b43/main.c
AgeCommit message (Collapse)Author
2013-01-07b43: Fix firmware loading when driver is built into the kernelLarry Finger
Recent versions of udev cause synchronous firmware loading from the probe routine to fail because the request to user space would time out. The original fix for b43 (commit 6b6fa58) moved the firmware load from the probe routine to a work queue, but it still used synchronous firmware loading. This method is OK when b43 is built as a module; however, it fails when the driver is compiled into the kernel. This version changes the code to load the initial firmware file using request_firmware_nowait(). A completion event is used to hold the work queue until that file is available. This driver reads several firmware files - the remainder can be read synchronously. On some test systems, the async read fails; however, a following synch read works, thus the async failure falls through to the sync try. Reported-and-Tested by: Felix Janda <felix.janda@posteo.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> (V3.4+) Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-12-10b43: fix tx path skb leaksFelix Fietkau
ieee80211_free_txskb() needs to be used instead of dev_kfree_skb_any for tx packets passed to the driver from mac80211 Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@vger.kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-10-29Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/mwifiex/cfg80211.c
2012-10-24b43: Fix oops on unload when firmware not foundLarry Finger
When b43 fails to find firmware when loaded, a subsequent unload will oops due to calling ieee80211_unregister_hw() when the corresponding register call was never made. Commit 2d838bb608e2d1f6cb4280e76748cb812dc822e7 fixed the same problem for b43legacy. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Tested-by: Markus Kanet <dvmailing@gmx.eu> Cc: Stable <stable@vger.kernel.org> [V3.3.0+ (the patch will need to be refactored)] Cc: Markus Kanet <dvmailing@gmx.eu> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-10-19bcma: add an extra pcie core structHauke Mehrtens
The BCM4706 has two PCIe host controller on the bcma bus. For PCIe client mode it is assumed that there is only one PCIe controller so the PCIe driver, like b43 and brcmsmac are accessing the first PCIe controller when they want to issue a operation on the host controller. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-08-24Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
2012-08-21Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: drivers/net/wireless/mac80211_hwsim.c
2012-08-15Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
2012-08-06b43: be more user friendly with PHY infoRafał Miłecki
First of all, use PHY names instead of magic numbers. It should make configuring kernel easier in case of not enabled PHY type support. Secondly, always print info about PHY. This is really basic info about hardware and quite important for the support level. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-08-06b43: rename host flags definesRafał Miłecki
There are more than 3 registers on new hardware. Host flags handling has to be rewritten, as we can't use u128 type to handle all 5 regs. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-08-02b43: fix logic in GPIO initRafał Miłecki
Add some comments by the way Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-31mac80211: move TX station pointer and restructure TXThomas Huehn
Remove the control.sta pointer from ieee80211_tx_info to free up sufficient space in the TX skb control buffer for the upcoming Transmit Power Control (TPC). Instead, the pointer is now on the stack in a new control struct that is passed as a function parameter to the drivers' tx method. Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de> Signed-off-by: Alina Friedrichsen <x-alina@gmx.net> Signed-off-by: Felix Fietkau <nbd@openwrt.org> [reworded commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-07-20Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
2012-07-17b43: fix crash with OpenFWWFJohannes Berg
b43 with open firmware crashes mac80211 because it changes the number of queues at runtime which, while it was never really supported, now crashes mac80211 due to the new hardware queue logic. Fix this by detecting open vs. proprietary fw earlier and registering with mac80211 with the right number of queues. Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Cc: stable@vger.kernel.org (depends on commit a6f38ac3) Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-24Fix typo in printed messagesAnatol Pomozov
Coult -> Could Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-06-08b43: do not call ieee80211_unregister_hw if we are not registredOleksij Rempel
this patch fixes kernel Oops on "rmmod b43" if firmware was not loaded: BUG: unable to handle kernel NULL pointer dereference at 0000000000000088 IP: [<ffffffff8104e988>] drain_workqueue+0x25/0x142 PGD 153ac6067 PUD 153b82067 PMD 0 Oops: 0000 [#1] SMP Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16ssb: remove rev from boardinfoHauke Mehrtens
Previously the rev contained the revision read from the pci config space and was used as board_rev in the wireless drivers. This is wrong the board_rev is only fetched from the sprom accordingly to the open source part of the Broadcom SDK and brcmsmac. This patch removes the rev from the boardinfo structure and uses the board_rev attribute from sprom instead. This attribute is filled by PCI, PCMCIA, SDIO and SoC code. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Tested-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: drivers/net/ethernet/intel/e1000e/param.c drivers/net/wireless/iwlwifi/iwl-agn-rx.c drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c drivers/net/wireless/iwlwifi/iwl-trans.h Resolved the iwlwifi conflict with mainline using 3-way diff posted by John Linville and Stephen Rothwell. In 'net' we added a bug fix to make iwlwifi report a more accurate skb->truesize but this conflicted with RX path changes that happened meanwhile in net-next. In e1000e a conflict arose in the validation code for settings of adapter->itr. 'net-next' had more sophisticated logic so that logic was used. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-27b43: only reload config after successful initializationSeth Forshee
Commit 2a19032 (b43: reload phy and bss settings after core restarts) introduced an unconditional call to b43_op_config() at the end of b43_op_start(). When firmware fails to load this can wedge the system. There's no need to reload the configuration after a failed initialization anyway, so only make the call if initialization was successful. BugLink: http://bugs.launchpad.net/bugs/950295 Cc: Felix Fietkau <nbd@openwrt.org> Cc: <stable@vger.kernel.org> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10b43: claim support for IBSS RSNAntonio Quartulli
The driver now claims to support IBSS/RSN. Group key configuration in hardware is skipped. Software encryption is used for multicast communications. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-13b43: Load firmware from a work queue and not from the probe routineLarry Finger
Recent changes in udev are causing problems for drivers that load firmware from the probe routine. As b43 has such a structure, it must be changed. As this driver loads more than 1 firmware file, changing to the asynchronous routine request_firmware_nowait() would be complicated. In this implementation, the probe routine starts a queue that calls the firmware loading routines. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05b43: prevent firmware on bcm5354 from taking over wrong GPIO pinsHauke Mehrtens
When using the bcm5354 (Soc with integrated LP-PHY Wifi) with a recent firmware >= 478.104 it runs out of memory after a very short time in OpenWrt after doing an active scan or any thing else where packages are send. This was cased by a gpio misconfiguration, the firmware triggered the GPIO pins used for buttons on some devices and that caused an other driver (OpenWrt diag) listening for these buttons irqs to send many messages to the user space. This patch fixes the bug for my devices (Asus WL-520GU) and makes it work with firmware 666.2. Now the firmware just uses LED GPIO pin number 1 and not the button pins any more. This is the GPIO Pin layout used on my device, see [0]. GPIO pin layout: pin# name type 0 power led 1 wlan led 2 reset button 3 ses buttom This is the nvram configuration output of "nvram show |grep gpio" related nvram configuration: wl0gpio2=11 wl0gpio3=11 wl0gpio0=11 wl0gpio1=0x02 reset_gpio=2 [0]: https://dev.openwrt.org/browser/trunk/package/broadcom-diag/src/diag.c Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-01Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2012-01-24b43: add maskset helpersRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-18b43: add option to avoid duplicating device support with brcmsmacJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-13wireless: b43: fix Oops on card eject during transferGuennadi Liakhovetski
An Oops has once been observed, when the SDIO card had been ejected during IO. The PC value shows, that the dev pointer in b43_op_stop() was NULL. (I moved the NULL check before the lock, based upon a suggestion from Julian Calaby <julian.calaby@gmail.com>. -- JWL) Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-03Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem Conflicts: drivers/net/wireless/b43/dma.c drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
2011-12-19net: fix assignment of 0/1 to bool variables.Rusty Russell
DaveM said: Please, this kind of stuff rots forever and not using bool properly drives me crazy. Joe Perches <joe@perches.com> gave me the spatch script: @@ bool b; @@ -b = 0 +b = false @@ bool b; @@ -b = 1 +b = true I merely installed coccinelle, read the documentation and took credit. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-19b43: avoid packet losses in the dma worker code.francesco.gringoli@ing.unibs.it
Following Rafal request, we verified that on "modern" CPUs using one or more workers is equivalent. Here is patch V3 that addresses the packet loss bug in the dma engine using only one worker. ------- This patch addresses a bug in the dma worker code that keeps draining packets even when the hardware queues are full. In such cases packets can not be passed down to the device and are erroneusly dropped by the code. This problem was already discussed here http://www.mail-archive.com/b43-dev@lists.infradead.org/msg01413.html and acknowledged by Michael. Number of hardware queues is now defined in b43.h (B43_QOS_QUEUE_NUM). Acknowledgements to Riccardo Paolillo <riccardo.paolillo@gmail.com> and Michele Orru <michele.orru@hotmail.it> Signed-off-by: Francesco Gringoli <francesco.gringoli@ing.unibs.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-31drivers/net: change moduleparam.h to module.h as required.Paul Gortmaker
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-03mac80211: pass vif param to conf_tx() callbackEliad Peller
tx params should be configured per interface. add ieee80211_vif param to the conf_tx callback, and change all the drivers that use this callback. The following spatch was used: @rule1@ struct ieee80211_ops ops; identifier conf_tx_op; @@ ops.conf_tx = conf_tx_op; @rule2@ identifier rule1.conf_tx_op; identifier hw, queue, params; @@ conf_tx_op ( - struct ieee80211_hw *hw, + struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue, const struct ieee80211_tx_queue_params *params) {...} Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27b43: update dummy transmissionRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27b43: add missing MMIO definesRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27mac80211: add ieee80211_vif param to tsf functionsEliad Peller
TSF can be kept per vif. Add ieee80211_vif param to set/get/reset_tsf, and move the debugfs entries to the per-vif directory. Update all the drivers that implement these callbacks. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-20Merge branch 'master' of git://git.infradead.org/users/linville/wirelessJohn W. Linville
Conflicts: drivers/net/wireless/iwlwifi/iwl-pci.c drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c drivers/net/wireless/rt2x00/rt2800usb.c drivers/net/wireless/wl12xx/main.c
2011-09-19b43: Fix beacon problem in ad-hoc modeManual Munz
In ad-hoc mode, driver b43 does not issue beacons. Signed-off-by: Manual Munz <freifunk@somakoma.de> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14b43: add my copyrights and myself as the module authorRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-13b43: LCN-PHY: minor fixesRafał Miłecki
The biggest change is reversing order of reading 32-bit table value. MMIO dumps has shown it's done that way for LCN-PHY. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29b43: Fix swatch warningLarry Finger
Swatch reports the following warning for main.c: CHECK drivers/net/wireless/b43/main.c drivers/net/wireless/b43/main.c +4115 b43_wireless_core_stop(7) warn: variable dereferenced before check 'dev' After analysis, this is not a bug, but a false warning. Nonetheless, a cleanup is in order to prevent some future janitor proposing the wrong fix, as I did in my original patch. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-26b43: drop Kconfig option of forcing PIO modeRafał Miłecki
We have module param called use_pio which is much easier to use. Cc: Larry Finger <larry.finger@lwfinger.net> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24b43/legacy: Remove firmware IDsMichael Büsch
This removes the "FWxx" ID strings from the b43 and b43legacy drivers. They were once used to match a specific driver revision to a set of firmware files. However, this is hardly useful today. Additionally, the IDs are not updated and maintained properly, so they might mislead users. Signed-off-by: Michael Buesch <m@bues.ch> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24b43: warn when forcing PIO modeRafał Miłecki
We have resolved all the known issues with DMA mode, however some users (or distros) are still forcing PIO mode by config files. Without debugging enabled it's not noticable at all. Add the warning for them. Cc: Gregory Bellier <gregory.bellier@gmail.com> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22b43: include HT-PHY in some common codeRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22b43: support new TX header, noticed to be used by 598.314+ fwRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22b43: use enum for firmware header formatRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22b43: reload phy and bss settings after core restartsFelix Fietkau
b43_op_config and b43_op_bss_info_changed apply many settings by directly writing to hardware registers. These settings are lost as soon as the core is restarted and the initvals are reloaded. This was discovered because restarting hostapd led to the beacon interval getting set to ~33s (see https://dev.openwrt.org/ticket/8033 for more information). Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09b43: add core rev 17 used on bcma SoC.Hauke Mehrtens
This ieee80211 core was found on a Netgear wndr3400. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08b43: remove wireless extensions inclusionsJohannes Berg
linux/wireless.h and net/iw_handler.h headers are for wireless extensions only, so mac80211 drivers shouldn't be including them. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-27Merge branch 'for-davem' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
2011-07-26Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem