summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211
Commit message (Collapse)AuthorAgeFilesLines
* brcm80211: move under broadcom vendor directoryKalle Valo2015-11-18114-109728/+0
| | | | | | | Part of reorganising wireless drivers directory and Kconfig. Note that I had to edit Makefiles from subdirectories to use the new location. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcm80211: Add support for brcm4371Eric Caruso2015-10-213-0/+12
| | | | | | | | This is a new Broadcom chip and we should be able to recognize it. Signed-off-by: Eric Caruso <ejcaruso@google.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: Properly set carrier state of netdev.Hante Meuleman2015-10-213-6/+31
| | | | | | | | | | | | Use the netif_carrier api to correctly set carrier state on the different modes. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: Remove unused state AP creating.Hante Meuleman2015-10-212-5/+0
| | | | | | | | Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: Move brcmf_c_preinit_dcmds prototype to correct file.Hante Meuleman2015-10-213-3/+4
| | | | | | | | Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: Add dump_station support to cfg80221 ops.Hante Meuleman2015-10-214-0/+45
| | | | | | | | | | | With this feature it becomes possible to request a station assoc list. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: Add RSSI information to get_station.Hante Meuleman2015-10-211-0/+23
| | | | | | | | Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: Fix station info rate information.Hante Meuleman2015-10-211-4/+4
| | | | | | | | | | | | | Txrate and rxrate in get_station got assigned first with value in kbps and then divided by 100 to get it in 100kbps unit. The problem with that is that type of rate is u16 which resulted in incorrect values for high data rate values. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: Rework p2p attach, use single method for p2p dev creation.Hante Meuleman2015-10-214-85/+40
| | | | | | | | | | | | | When module param p2pon is used a p2p device is created at init. This patch reworks how this is done by using the same method as for a dynamically (by user space) created p2p device. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: remove conversational commentArend van Spriel2015-10-211-3/+0
| | | | | | | | | | Removing a comment that was only useful during the review of the change that introduced it and which should never have been submitted. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: rename firmware_path to alternative_fw_pathFranky Lin2015-10-211-1/+1
| | | | | | | | | | | | | | In brcmfmac the module parameter "firmware_path" is used as an alternative relative path under the search path used by firmware_class or ueventhelper. Rename the parameter to alternative_fw_path to avoid confusion. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: Fix race condition between USB probe/load and disconnect.Hante Meuleman2015-10-211-3/+26
| | | | | | | | | | | | | | When a USB device gets disconnected due to for example removal then it is possible that it is still in the loading phase due to the asynchronous load routines. These routines can then possible access memory which has been freed. Fix this by mutex locking the device init phase. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: expose device memory to devcoredump subsystemArend van Spriel2015-10-217-11/+181
| | | | | | | | | | | | Upon PSM watchdog event received from firmware the driver will obtain a memory snapshot of the device and expose it to user-space through the devcoredump framework. This will trigger a uevent. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* Merge tag 'wireless-drivers-next-for-davem-2015-10-09' of ↵David S. Miller2015-10-1223-322/+540
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== Major changes: iwlwifi * some debugfs improvements * fix signedness in beacon statistics * deinline some functions to reduce size when device tracing is enabled * filter beacons out in AP mode when no stations are associated * deprecate firmwares version -12 * fix a runtime PM vs. legacy suspend race * one-liner fix for a ToF bug * clean-ups in the rx code * small debugging improvement * fix WoWLAN with new firmware versions * more clean-ups towards multiple RX queues; * some rate scaling fixes and improvements; * some time-of-flight fixes; * other generic improvements and clean-ups; brcmfmac * rework code dealing with multiple interfaces * allow logging firmware console using debug level * support for BCM4350, BCM4365, and BCM4366 PCIE devices * fixed for legacy P2P and P2P device handling * correct set and get tx-power ath9k * add support for Outside Context of a BSS (OCB) mode mwifiex * add USB multichannel feature ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * brcmfmac: include linux/atomic.hHauke Mehrtens2015-09-291-0/+1
| | | | | | | | | | | | | | | | | | | | brcmfmac uses atomic_or() and other atomic_* functions, but does not include linux/atomic.h. This file gets included by some other header file so this normally does not cause problems. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Accept events when TDLS is used in combination with p2p.Hante Meuleman2015-09-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | TDLS events are mapped back to primary interface but when p2p is in use then this fails because the check was incorrect by checking bsscfg number. Which can be different when a p2p device has been created. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Fix TDLS setup by properly handling p2p noif.Hante Meuleman2015-09-293-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | There is a workaround needed for p2p device setup which breaks tdls functionality. This patch fixes that by properly signalling fweh that p2p device setup is ongoing. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Add support for the BCM4365 and BCM4366 PCIE devices.Hante Meuleman2015-09-293-10/+131
| | | | | | | | | | | | | | | | | | | | | | This patch adds support for the BCM4365 and BCM4366 11ac Wave2 PCIE devices. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Fix race condition bug when deleting p2p interface.Hante Meuleman2015-09-291-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When p2p device interface gets deleted by deinitialising discovery it will result in an event which removes the interface, but that is also done by delete p2p interface code. This results in race condition which sometimes results in lockup/crash. With this patch the delete device interface will wait for the event (with timeout) removing the possible race condition. Also on the stop device call from cfg80211 the deinitialisation of the discovery device should be avoided as it can result in a similar situation. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Add module parameter to disable features.Hante Meuleman2015-09-291-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For debugging purpose it is very handy to be able to disable features. It has happened a few times that new features turned out not always being properly detected for all devices/firmwares. Making it possible to disable the feature with a module parameter will make testing/debugging easier. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Fix p2p bug for older firmwares.Hante Meuleman2015-09-291-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Some devices with older firmwares are reporting new p2p device interface with the wrong type. Accept this type to get p2p working for these devices. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Only handle p2p_stop_device if vif is validHante Meuleman2015-09-291-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | In some situations it is possible that vif has been removed while cfg80211 invokes the p2p_stop_device handler. This will result in crash. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Deleting of p2p device is leaking memory.Hante Meuleman2015-09-293-20/+32
| | | | | | | | | | | | | | | | | | | | | | | | When a p2p device gets deleted, the memory for the vif is not being released. This is solved by reorganizing the cleanup path and properly freeing the memory. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Workaround in change vif for wpa_supplicant support.Hante Meuleman2015-09-291-12/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | Different wpa_supplicants have different behavior and expectations regarding the change_virtual_intf behavior. This patch implements a workaround for the different versions and possible brcmfmac configuration. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Make p2pon module param always available.Hante Meuleman2015-09-291-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | p2pon module param is currently under define BRCMDBG. Though it is a needed option for older versions of the wpa_supplicant which do not support the P2P_DEVICE interface. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Fix bug in flowring management.Hante Meuleman2015-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The hash index stored in the flowrings is of type u16 but gets stored in u8. This can result in incorrect indexing and possibly result in crashes. This patch fixes the type. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Inform p2p module about p2pon through APIHante Meuleman2015-09-295-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | When the p2pon module param is used then p2p attach will initialize p2p device iface in the firmware, but it is doing that by checking data. It is cleaner to pass the p2pon information to p2p by API. This information is also needed for other patch. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Only assign primary netdev to if2bss array.Hante Meuleman2015-09-291-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | The if2bss allows for translation of ifidx to bssidx which has a 1:n relation. Therefor only the first (primary) netdev should be assigned in this array. This fixes the p2pon=1 module param usage. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Fix set and get tx-power functions.Hante Meuleman2015-09-291-111/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementation of tx-power (get and set) related functions are still assuming mW interface. This is wrong as functions use dbm (or mbm) nowadays. As a result a tx power configuration could result in wrong power configuration. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Add support for the BCM4350 PCIE device.Hante Meuleman2015-09-293-0/+12
| | | | | | | | | | | | | | | | | | | | | | This patch adds support fo the BRCM4350 2x2 11ac PCIE device. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Fix exception handling.Hante Meuleman2015-09-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | In some exception situations the ifp->vif was not properly assigned which could result in crash. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: Reset PCIE devices after recognition.Hante Meuleman2015-09-293-21/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When PCIE type devices are being FW reloaded without being properly reset then the device ends up in a locked state, requiring the device to be completely powered down. This patch adds a reset through watchdog at the moment the device (cores) has been recognized. This will solve warm reboot issues. Cc: Rafal Milecki <zajec5@gmail.com> Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: introduce brcmf_net_detach() functionArend van Spriel2015-09-292-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of error during brcmf_bus_start() the network interfaces were freed using free_netdev(). However, the interfaces may have additional memory allocated which is not freed. The netdev has destructor set to brcmf_cfg80211_free_netdev() which frees the additional memory if allocated and call free_netdev(). The brcmf_net_detach() either calls brcmf_cfg80211_free_netdev() directly or uses unregister_netdev() when struct net_device::reg_state indicates the netdev was registered. Reported-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: change prototype for brcmf_fws_hdrpull()Arend van Spriel2015-09-293-17/+12
| | | | | | | | | | | | | | | | | | | | | | Instead of passing ifidx and drvr just pass struct brcmf_if pointer which holds both parameters. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: remove ifidx parameter from brcmf_fws_txstatus_suppressed()Arend van Spriel2015-09-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | The brcmf_fws_txstatus_suppressed() function prototype specifies an ifidx parameter which is not used within the function implementation. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: add dedicated debug level for firmware console loggingArend van Spriel2015-09-293-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both PCIe and SDIO devices have the possibility to log the firmware console output in kernel log. For PCIe it is logged when PCIE debug level is enabled. For SDIO it is logged when user specifies a non-zero console interval through debugfs. This patch tries to make it a bit more consistent. The firmware console output is only logged when FWCON debug level is enabled. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Pontus Fuchs <pontusf@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: add mapping for interface index to bsscfg indexArend van Spriel2015-09-292-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Because the P2P Device interface in firmware uses the same interface index as the primary interface we use the bsscfg index as index in the struct brcmf_pub::iflist. However, in the data path we get the interface index and not the bsscfg index. So we need a mapping of interface index to bsscfg index, which can be determined upon handle adding the interface. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: pass struct brcmf_if instance in brcmf_txfinalize()Arend van Spriel2015-09-294-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | Most call sites of brcmf_txfinalize already have struct brcmf_if instance so pass that to brcmf_txfinalize() as the function needs it anyway. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: use brcmf_get_ifp() to map ifidx to struct brcmf_if instanceArend van Spriel2015-09-296-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | The knowledge on how to map the interface index to a struct brcmf_if instance is in brcmf_get_ifp() so use that function when only the interface index is known instead of accessing brcmf_pub::iflist directly. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: correct detection of p2pdev interface eventArend van Spriel2015-09-293-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The p2pdev interface is setup in firmware resulting in a interface event. This event has role and no-if flag. When role is p2p client and no-if flag is set it indicates that this is the p2pdev interface. This info is used in handling the event and adding interface in the driver. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: only call brcmf_cfg80211_detach() when attach was successfulArend van Spriel2015-09-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In brcmf_bus_start() the function brcmf_cfg80211_attach() is called which may fail. If this happens we should not call brcmf_cfg80211_detach() in the failure path as it will result in NULL pointer dereference: brcmf_fweh_activate_events: Set event_msgs error (-5) brcmf_bus_start: failed: -5 brcmf_sdio_firmware_callback: dongle is not responding BUG: unable to handle kernel NULL pointer dereference at 0000000000000068 IP: [<ffffffff811e8f08>] kernfs_find_ns+0x18/0xd0 PGD 0 Oops: 0000 [#1] SMP Modules linked in: brcmfmac(O) brcmutil(O) cfg80211 auth_rpcgss CPU: 1 PID: 45 Comm: kworker/1:1 Tainted: G O Hardware name: Dell Inc. Latitude E6410/07XJP9, BIOS A07 02/15/2011 Workqueue: events request_firmware_work_func task: ffff880036c09ac0 ti: ffff880036dd4000 task.ti: ffff880036dd4000 RIP: 0010:[<ffffffff811e8f08>] [<ffffffff811e8f08>] kernfs_find_ns+0x18/0xd0 RSP: 0018:ffff880036dd7a28 EFLAGS: 00010246 RAX: ffff880036c09ac0 RBX: 0000000000000000 RCX: 000000007fffffff RDX: 0000000000000000 RSI: ffffffff816578b9 RDI: 0000000000000000 RBP: ffff880036dd7a48 R08: 0000000000000000 R09: ffff880036c0b340 R10: 00000000000002ec R11: ffff880036dd7b08 R12: ffffffff816578b9 R13: 0000000000000000 R14: ffffffff816578b9 R15: ffff8800c6c87000 FS: 0000000000000000(0000) GS:ffff88012bc40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 0000000000000068 CR3: 0000000001a0b000 CR4: 00000000000006e0 Stack: 0000000000000000 ffffffff816578b9 0000000000000000 ffff8800c0d003c8 ffff880036dd7a78 ffffffff811e8ff5 0000000ffffffff1 ffffffff81a9b060 ffff8800c789f880 ffff8800c0d00000 ffff880036dd7a98 ffffffff811ebe0d Call Trace: [<ffffffff811e8ff5>] kernfs_find_and_get_ns+0x35/0x60 [<ffffffff811ebe0d>] sysfs_unmerge_group+0x1d/0x60 [<ffffffff81404ef2>] dpm_sysfs_remove+0x22/0x60 [<ffffffff813f9db9>] device_del+0x49/0x240 [<ffffffff815da768>] rfkill_unregister+0x58/0xc0 [<ffffffffa06bd91b>] wiphy_unregister+0xab/0x2f0 [cfg80211] [<ffffffffa0742fe3>] brcmf_cfg80211_detach+0x23/0x50 [brcmfmac] [<ffffffffa074d986>] brcmf_detach+0x86/0xe0 [brcmfmac] [<ffffffffa0757de8>] brcmf_sdio_remove+0x48/0x120 [brcmfmac] [<ffffffffa0758ed9>] brcmf_sdiod_remove+0x29/0xd0 [brcmfmac] [<ffffffffa0759031>] brcmf_ops_sdio_remove+0xb1/0x110 [brcmfmac] [<ffffffffa001c267>] sdio_bus_remove+0x37/0x100 [mmc_core] [<ffffffff813fe026>] __device_release_driver+0x96/0x130 [<ffffffff813fe0e3>] device_release_driver+0x23/0x30 [<ffffffffa0754bc8>] brcmf_sdio_firmware_callback+0x2a8/0x5d0 [brcmfmac] [<ffffffffa074deaf>] brcmf_fw_request_nvram_done+0x15f/0x5e0 [brcmfmac] [<ffffffff8140142f>] ? devres_add+0x3f/0x50 [<ffffffff810642b5>] ? usermodehelper_read_unlock+0x15/0x20 [<ffffffff81400000>] ? platform_match+0x70/0xa0 [<ffffffff8140f400>] request_firmware_work_func+0x30/0x60 [<ffffffff8106828c>] process_one_work+0x14c/0x3d0 [<ffffffff8106862a>] worker_thread+0x11a/0x450 [<ffffffff81068510>] ? process_one_work+0x3d0/0x3d0 [<ffffffff8106d692>] kthread+0xd2/0xf0 [<ffffffff8106d5c0>] ? kthread_create_on_node+0x180/0x180 [<ffffffff815ed35f>] ret_from_fork+0x3f/0x70 [<ffffffff8106d5c0>] ? kthread_create_on_node+0x180/0x180 Code: e9 40 fe ff ff 48 89 d8 eb 87 66 0f 1f 84 00 00 00 00 00 66 66 66 66 90 55 48 89 e5 41 56 49 89 f6 41 55 49 89 d5 31 d2 41 54 53 <0f> b7 47 68 48 8b 5f 48 66 c1 e8 05 83 e0 01 4d 85 ed 0f b6 c8 RIP [<ffffffff811e8f08>] kernfs_find_ns+0x18/0xd0 RSP <ffff880036dd7a28> CR2: 0000000000000068 ---[ end trace 87d6ec0d3fe46740 ]--- Reported-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: change parameters for brcmf_remove_interface()Arend van Spriel2015-09-295-10/+11
| | | | | | | | | | | | | | | | | | | | Just pass the interface to be removed, ie. the struct brcmf_if instance. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: make brcmf_proto_hdrpull() return struct brcmf_if instanceArend van Spriel2015-09-295-28/+37
| | | | | | | | | | | | | | | | | | | | | | Avoid spreading the ifidx in the driver, but have it return the struct brcmf_if instance. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * brcmfmac: consolidate ifp lookup in driver coreArend van Spriel2015-09-294-26/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | In rx path the firmware provide an interface index which is used to map to a struct brcmf_if instance. However, this involves some trick that is done in two places. This is changed by having driver core providing brcmf_get_ifp() function. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | Merge tag 'mac80211-next-for-davem-2015-10-05' of ↵David S. Miller2015-10-071-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== For the current cycle, we have the following right now: * many internal fixes, API improvements, cleanups, etc. * full AP client state tracking in cfg80211/mac80211 from Ayala * VHT support (in mac80211) for mesh * some A-MSDU in A-MPDU support from Emmanuel * show current TX power to userspace (from Rafał) * support for netlink dump in vendor commands (myself) ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | mac80211: allow to transmit A-MSDU within A-MPDUEmmanuel Grumbach2015-09-221-1/+1
| |/ | | | | | | | | | | | | | | | | Advertise the capability to send A-MSDU within A-MPDU in the AddBA request sent by mac80211. Let the driver know about the peer's capabilities. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | net: brcm80211: fix range checkAndrzej Hajda2015-09-221-1/+1
|/ | | | | | | | | | | | | Unsigned minus constant is still unsigned so checking its sign makes no sense. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* brcmfmac: Add support for host platform NVRAM loading.Hante Meuleman2015-08-251-15/+24
| | | | | | | | | | | | | | | | Host platforms such as routers supported by OpenWRT can support NVRAM reading directly from internal NVRAM store. With this patch the nvram load routines will fall back to this method when there is no nvram file and support is available in the kernel. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: bump highest event number for 4339 firmwareArend van Spriel2015-08-251-4/+6
| | | | | | | | | | | | | | | | The event mask length is determined by the highest event number that is specified in the driver. When this length is shorter than firmware expects setting event mask will fail and device becomes pretty useless. This issue was reported with bcm4339 firmware that was recently released. Reported-by: Pontus Fuchs <pontusf@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Pontus Fuchs <pontusf@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* brcmfmac: block the correct flowring when backup queue overflowFranky Lin2015-08-251-3/+7
| | | | | | | | | | | | | | brcmf_flowring_block blocks the last active flowring under the same interface instead of the one provided by caller. This could lead to a dead lock of netif stop if there are more than one flowring under the interface and the traffic is high enough so brcmf_flowring_enqueue can not unblock the ring right away. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
OpenPOWER on IntegriCloud