aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wil6210/pcie_bus.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-01-26cfg80211: avoid holding the RTNL when calling the driverJohannes Berg1-0/+2
Currently, _everything_ in cfg80211 holds the RTNL, and if you have a slow USB device (or a few) you can get some bad lock contention on that. Fix that by re-adding a mutex to each wiphy/rdev as we had at some point, so we have locking for the wireless_dev lists and all the other things in there, and also so that drivers still don't have to worry too much about it (they still won't get parallel calls for a single device). Then, we can restrict the RTNL to a few cases where we add or remove interfaces and really need the added protection. Some of the global list management still also uses the RTNL, since we need to have it anyway for netdev management, but we only hold the RTNL for very short periods of time here. Link: https://lore.kernel.org/r/20210122161942.81df9f5e047a.I4a8e1a60b18863ea8c5e6d3a0faeafb2d45b2f40@changeid Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> [marvell driver issues] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-10-31wil6210: add SPDX license identifiersLior David1-12/+1
Change all files to add SPDX license identifiers and remove license text. This is only an administrative change, there is no change in actual license or copyright for any file. Signed-off-by: Lior David <liord@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-09-23ath: Use dev_get_drvdata where possibleChuhong Yuan1-4/+2
Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-09-12wil6210: ignore reset errors for FW during probeLior David1-3/+1
There are special kinds of FW such as WMI only which are used for testing, diagnostics and other specific scenario. Such FW is loaded during driver probe and the driver disallows enabling any network interface, to avoid operational issues. In many cases it is used to debug early versions of FW with new features, which sometimes fail on startup. Currently when such FW fails to load (for example, because of init failure), the driver probe would fail and shutdown the device making it difficult to debug the early failure. To fix this, ignore load failures in WMI only FW and allow driver probe to succeed, making it possible to continue and debug the FW load failure. Signed-off-by: Lior David <liord@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-06-27wil6210: clear FW and ucode log addressMaya Erez1-0/+1
Clear the FW and ucode log address on device initialization to allow user space app identify when the address was set by FW/ucode and it can start read. Signed-off-by: Tzahi Sabo <stzahi@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-05-03wil6210: add printout of platform capabilitiesDedy Lansky1-0/+2
Add logging of the platform capabilities after retrieving it from the platform driver. Signed-off-by: Dedy Lansky <dlansky@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-04-03wil6210: check mid is validAhmad Masri1-2/+2
Check that the mid is valid and that it does not exceed the memory size allocated to vifs array. Signed-off-by: Ahmad Masri <amasri@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-08-28wil6210: set edma variables only for Talyn-MB devicesMaya Erez1-0/+1
use_rx_hw_reordering is already set to true in wil_set_capabilities for Talyn-MB devices. Remove its setting from wil_priv_init to prevent its activation for older chips. Similarly, move the setting of use_compressed_rx_status to wil_set_capabilities. Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31wil6210: set default 3-MSIAlexei Avshalom Lazar1-2/+2
Single MSI is the current default configuration. With multiple MSI interrupts configuration, Tx/Rx processing could run in parallel on different CPU cores and allow better balance between the cores. Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31wil6210: support Talyn specific board fileMaya Erez1-1/+1
FW file name for Talyn device can be different from the default name. In such a case use a corresponding board file name. If such a board file is not present FW download procedure will fail. Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31wil6210: add 3-MSI supportAlexei Avshalom Lazar1-14/+46
Extend MSI support to 3-MSI in order to load balance the tx\rx interrupts between different cores. use_msi module parameter has changed to n_msi. Usage: - Set n_msi to 0 for using INTx - Set n_msi to 1 for using single MSI - Set n_msi to 3 for using 3-MSI In 3-MSI configuration MSI 0 is used for TX interrupts, MSI 1 is used for RX interrupts and MSI 2 is used for MISC interrupts. Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31wil6210: support Talyn specific FW fileMaya Erez1-0/+8
FW file name for Talyn device is different from the default name. This patch searches for Talyn specific FW file name and fallback to the default FW file in case it is not present. Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-02wil6210: add support for enhanced DMA RX data flowsGidon Studinski1-0/+1
Enhanced DMA RX data path is handled using a single RX descriptor ring for all VIFs. Multiple RX status rings are supported, to allow RSS and multi MSI support. The driver gets the RX completions via the RX status rings. The RX status message includes the completed RX buffer ID, which points to the allocated SKB. The enhanced DMA RX data flow supports RX chaining, where multiple SKBs are merged into a single packet. Enhanced DMA HW supports RX HW reorder offload, enabled by default for Talyn-MB. amsdu_en debugfs entry was added to allow control MSDU aggregation. Use the following command to disable AMSDU (enabled by default): echo 0 > amsdu_en Signed-off-by: Gidon Studinski <gidons@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-02wil6210: initialize TX and RX enhanced DMA ringsGidon Studinski1-20/+27
Enhanced DMA design includes the following rings: - Single RX descriptor ring is used for all VIFs - Multiple RX status rings are supported, to allow RSS - TX descriptor ring is allocated per connection - A single TX status ring is used for all TX descriptor rings This patch initializes and frees the above descriptor and status rings. The RX SKBs are handled by a new entity of RX buffers manager, which handles RX buffers, each one points to an allocated SKB. During Rx completion processing, the driver extracts a buffer ID which is used as an index to the buffers array. After the SKB is freed the buffer is moved from the 'active' list to the 'free' list, indicating it can be used for another descriptor. During Rx refill, SKBs are allocated and attached to 'free' buffers. Those buffers are attached to new descriptors and moved to the 'active' list. New debugfs entries were added to allow edma configuration: Run the following command to configure the number of status rings: echo NUM_OF_STATUS_RINGS > num_rx_status_rings Run the following command to use extended RX status message for additional debug fields from HW: echo 0 > compressed_rx_status Run the following command to control the size of the TX status ring: echo TX_STATUS_RING_ORDER > tx_status_ring_order The status ring size will be 1 << tx_status_ring_order Run the following command to control the size of the RX status ring: echo RX_STATUS_RING_ORDER > rx_status_ring_order Due to HW constrains RX sring order should be bigger than RX ring order The status ring size will be 1 << rx_status_ring_order Run the following command to change the number of RX buffer IDs: echo RX_BUFF_ID_COUNT > rx_buff_id_count Signed-off-by: Gidon Studinski <gidons@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-02wil6210: add support for Talyn-MB (Talyn ver 2.0) deviceMaya Erez1-1/+10
Add changes to support initialization of Talyn-MB wil6210 device: - Add definition for Talyn-MB new JTAG id - Define talyn_mb_fw_mapping array - Add Talyn-MB reset sequence Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-02-27wil6210: multiple VIFs support for connections and data pathLior David1-6/+12
Track the connection status per-VIF. The data path code is also updated to support multiple VIFs. This includes RX and TX VRING management, NAPI poll loops, RX reordering and related code. Power management code used to check if the main interface is up or based on connection state of the main interface, adapt this code to take all VIFs into account. Signed-off-by: Lior David <liord@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-02-27wil6210: multiple VIFs support for start/stop APLior David1-1/+1
Add support for multiple VIFs in the cfg80211 operations start_ap, stop_ap and change_beacon. This change allows starting multiple APs using virtual interfaces. The data path and most other operations are still working only on the main interface. Signed-off-by: Lior David <liord@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-02-27wil6210: add support for adding and removing virtual interfacesLior David1-7/+32
Add generic support in cfg80211 operations add_virtual_intf and del_virtual_intf for adding/removing VIFs of any interface type, and fix change_virtual_intf to allow changing the interface type of a VIF. Previously these operations only worked for the P2P_DEVICE interface which is not a real VIF(it is management-only and shares radio with the main interface). Currently the interface combination is validated, the VIF is added/removed in the firmware and the appropriate net/wireless device is also added/removed. Added minimal support for proper interface up/down and module unload but most operations still work only on the main interface. Signed-off-by: Lior David <liord@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-02-27wil6210: infrastructure for multiple virtual interfacesLior David1-2/+2
Simple infrastructure changes for supporting multiple virtual interfaces (multiple VIFs). It is still not possible to add new VIFs so the only VIF belongs to the main interface. Main changes: 1. Add MAC ID(mid) argument to wmi_send and wmi_call to allow invoking WMI commands on different VIFs. 2. Similarly, in WMI event handler look at the mid reported by FW and extract VIF structure (currently only for main interface). All WMI event handlers operate on wil6210_vif structure so they know on which VIF they were called. 3. Trivial changes to use wil6210_vif structure and MID throughout the code. 4. Various changes to logging to report MID. More complete multiple VIFs support will be added gradually in next patches. Signed-off-by: Lior David <liord@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-25wil6210: enlarge FW mac_rgf_ext section for Sparrow D0Lior David1-3/+9
Sparrow D0 chips have slightly larger mac_rgf_ext section in order to support extra features such as multiple virtual interfaces. Signed-off-by: Lior David <liord@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-25wil6210: fix random failure to bring network interface upLior David1-0/+8
Currently when we want to bring the interface up, we first reset the device which causes the boot loader to run. Then we halt the device CPU, load FW image and resume the device CPU. There are some boot loader versions which perform redundant memory accesses even when idle. Halting the device CPU while boot loader access memory can cause the device memory controller to get stuck, the FW will fail to load and the network interface will not come up. For such boot loaders implement a workaround where we freeze the boot loader before halting the device CPU, so it will not perform any memory accesses. Signed-off-by: Lior David <liord@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-25wil6210: support flashless deviceDedy Lansky1-2/+6
Talyn device supports boot without flash. Driver detects flashless device and in this case waits for ready indication from HW machine (instead of bootloader ready indication). Also in this case, MAC address is retrieved from OTP. Signed-off-by: Dedy Lansky <dlansky@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-25wil6210: add support for Talyn AHB address mapMaya Erez1-2/+16
Talyn memory has changed, areas were increased and shifted to new locations. Use the appropriate address map according to the device JTAG ID. Signed-off-by: Dedy Lansky <dlansky@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-25wil6210: recognize Talyn JTAG IDMaya Erez1-0/+4
Add Talyn JTAG ID to the list of valid IDs and identify this device as Talyn. Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-25wil6210: add Talyn PCIe device IDMaya Erez1-0/+2
PCIe device ID has changed in Talyn. Add this ID to wil6210_pcie_ids list to allow recognition of Talyn device. Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09wil6210: add platform capabilities bitmapMaya Erez1-0/+10
Add get_capa callback to platform ops to allow reading the platform capabilities. Supported capabilities: - Keeping 11ad connection during suspend - T_POWER_ON 0 support - Usage of external clock Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09wil6210: support 40bit DMA addressesLazar Alexei1-11/+15
Add the option to support 40bit addresses since some platforms may not support 48bits but support 40bits Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-12-27wil6210: fix build warnings without CONFIG_PMArnd Bergmann1-17/+8
The #ifdef checks are hard to get right, in this case some functions should have been left inside a CONFIG_PM_SLEEP check as seen by this message: drivers/net/wireless/ath/wil6210/pcie_bus.c:489:12: error: 'wil6210_pm_resume' defined but not used [-Werror=unused-function] drivers/net/wireless/ath/wil6210/pcie_bus.c:484:12: error: 'wil6210_pm_suspend' defined but not used [-Werror=unused-function] Using an __maybe_unused is easier here, so I'm replacing all the other #ifdef in this file as well for consistency. Fixes: 94162666cd51 ("wil6210: run-time PM when interface down") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-12-02wil6210: update statistics for suspendLazar Alexei1-6/+14
Currently the statistics show how many successful/failed suspend/resume operations the system had. Update the statistics by splitting each successful/failed suspend/resume operations to radio on/off. Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-12-02wil6210: fix PCIe bus mastering in case of interface downLazar Alexei1-9/+15
In case of interface down, radio is turned off but PCIe mastering is not cleared. This can cause unexpected PCIe access to the shutdown device. Fix this by clearing PCIe mastering also in case interface is down Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-12-02wil6210: refresh FW capabilities during interface upLior David1-12/+1
FW capabilities are currently retrieved only during module initialization, but userspace can replace the firmware while interface is down, so refresh the FW capabilities when interface is up (after FW is loaded) to ensure driver functionality matches the loaded FW. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-12-02wil6210: run-time PM when interface downLazar Alexei1-8/+36
Allow run-time suspend when interface is down, keep card alive when interface is up. If driver is in wmi only or debug_fw mode run-time PM won't suspend. Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-08-08wil6210: support FW RSSI reportingDedy Lansky1-0/+3
New FW supports reporting RSSI signal in dBm. Report RSSI to kernel in case FW has this capability. Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-06-21wil6210: add support for PCIe D3hot in system suspendMaya Erez1-16/+34
In order to preserve the connection in suspend/resume flow, wil6210 host allows going to PCIe D3hot state in suspend, instead of performing a full wil6210 device reset. This requires the platform ability to initiate wakeup in case of RX data. To check that, a new platform API is added. In addition, add cfg80211 suspend/resume callbacks implementation. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-06-21wil6210: prevent platform callbacks after uninitDedy Lansky1-4/+9
After calling platform_ops.uninit() it is still possible to invoke platform callbacks. To prevent this, zero platform_ops right after invoking uninit. Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-05-23wil6210: support devices with different PCIe bar sizeMaya Erez1-7/+10
wil6210 devices can have different PCIe bar size, hence get the bar size from PCIe device instead of using a constant bar size. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-05-23wil6210: add option to load FTM FWHamad Kadmany1-5/+13
Module parameter allows to load specific FW used for FTM testing. Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-03-09wil6210: set dma mask to reflect device capabilityHamad Kadmany1-0/+16
device supports 48bit addresses, reflect that by setting the dma mask accordingly. Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-27wil6210: convert symbolic permissions to octal permissionsMaya Erez1-1/+1
Symbolic permissions are no longer recommended. This patch changes the symbolic permissions in wil6210 driver to octal permissions. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-27wil6210: support new WMI-only FW capabilityDedy Lansky1-3/+7
WMI_ONLY FW is used for testing in production. It cannot be used for scan/connect, etc. In case FW reports this capability, driver will not allow interface up. Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-27wil6210: remove __func__ from debug printoutsLazar Alexei1-8/+6
__func__ is automatically added to printouts by dynamic debug mechanism and by wil_info/wil_err macros. Remove __func__ from debug printouts to avoid duplication. Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-27wil6210: support loading dedicated image for sparrow-plus devicesLazar Alexei1-8/+28
Driver may be used in platforms where some use sparrow cards while other use sparrow-plus cards, where different FW image is needed. Add the capability to load dedicated FW image in case sparrow-plus card is detected and fallback to default image if such does not exist. Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-08-31wil6210: extract firmware capabilities from FW fileLior David1-0/+4
When driver is loaded, extract a capabilities record from the FW file. This record contains bits indicating which optional features are supported by this FW. The driver can use this information to determine which functionality to support and/or expose to user space. The extraction is done before wiphy structure is registered, because the capabilities can affect information published by the this structure. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-08-19wil6210: fix stop p2p device handlingMaya Erez1-1/+4
fix stop p2p device handling to identify between search and listen and update the upper layers with the appropriate notification. The stop of p2p radio operations also needs to be performed in __wil_down. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-05-28wil6210: add pm_notify handlingMaya Erez1-2/+66
Adding pm_notify to allow the following: 1. Check if suspend is allowed in an earlier stage to prevent starting the suspend procedure in case it is not allowed 2. Notify the platform driver on the suspend request Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-03-07wil6210: P2P_DEVICE virtual interface supportLior David1-0/+1
Added support for the P2P_DEVICE virtual interface. This interface is intended for P2P management operations such as discovery and GO negotiation. Normally it is implemented by drivers to allow a separate interface for P2P management with its own MAC address, but for 11ad drivers it is needed to support P2P search, since it cannot otherwise be separated from normal scan. Since we only support a single interface/MAC address, we can't easily separate between primary and P2P_DEVICE interfaces. For example when a management packet arrives we can't tell for which interface it is intended. To work around this, we store a pointer to the interface where the last "radio operation" was triggered such as scan or remain on channel, and we forward management packets and scan results to this interface. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-01-07wil6210: support for platform specific crash recoveryLior David1-2/+28
Added a simple interface for platform to perform crash recovery. When firmware crashes, wil driver can notify the platform which can trigger a crash recovery process. During the process the platform can request a ram dump from the wil driver as well as control when firmware recovery will start. This interface allows the platform to implement a more advanced crash recovery, for example to reset dependent subsystems in proper order, or to provide its own notifications during the recovery process. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-10-09wil6210: fix warning in system power management codeVladimir Kondratiev1-1/+1
Fix compilation warning where CONFIG_PM defined while CONFIG_PM_SLEEP is not defined Report follows: tree: git://github.com/kvalo/ath pending head: 941145fc5e5afbb120271e5dfaf37213ddb55807 commit: df596be39294d9712e5d568063a48448031e0a9f [37/39] wil6210: system power management config: xtensa-allyesconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout df596be39294d9712e5d568063a48448031e0a9f # save the attached .config to linux build tree make.cross ARCH=xtensa All warnings (new ones prefixed by >>): >> drivers/net/wireless/ath/wil6210/pcie_bus.c:264:12: warning: 'wil6210_suspend' defined but not used [-Wunused-function] static int wil6210_suspend(struct device *dev, bool is_runtime) ^ >> drivers/net/wireless/ath/wil6210/pcie_bus.c:291:12: warning: 'wil6210_resume' defined but not used [-Wunused-function] static int wil6210_resume(struct device *dev, bool is_runtime) ^ Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-06wil6210: system power managementVladimir Kondratiev1-0/+69
Support for the system suspend/resume. In preparation for the run-time PM, implementation made run-time PM friendly: common for system and run-time PM code factored out as generic functions, albeit is_runtime parameter value is always false currently. For debug purposes, "PM" debug category introduced. Policy: AP-like interface can't be suspended; otherwise suspend is allowed. Hardware brought down if interface was up. Connection, if existed, get lost. Interface will be brought up upon resume if it was up before suspend. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-06wil6210: use inline functions for register accessVladimir Kondratiev1-1/+1
Replace macros like "R", "W", "S", "C", defined multiple times, with inline functions "wil_[rwsc]". Use "readl" and "writel" instead of "ioread32" and "iowrite32" since it is granted that memory transactions are used, not port ones like IN/OUT Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>