aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2019-02-12ath10k: report tx airtime provided by fwManikanta Pubbisetty6-5/+86
If supported, update transmit airtime in mac80211 with the airtime values reported by the firmware. TX airtime of the PPDU is reported via HTT data TX completion indication message. A new service flag 'WMI_SERVICE_REPORT_AIRTIME' is added to advertise the firmware support. For firmwares which do not support this feature, TX airtime is calculated in the driver using TX bitrate. Hardwares tested : QCA9984 Firmwares tested : 10.4-3.6.1-00841 Signed-off-by: Manikanta Pubbisetty <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-12ath10k: add dynamic vlan supportManikanta Pubbisetty3-2/+31
Multicast/broadcast traffic destined for a particular vlan group will always be encrypted in software. To enable dynamic VLANs, it requires driver support for sending software encrypted packets. In ath10k, sending software encrypted frames is allowed only when we insmod the driver with cryptmode param set to 1, this configuration disables hardware crypto and enables RAW mode implicitly. Since, enabling raw mode has performance impact, this cannot be considered as an ideal solution for supporting VLANs in the driver. As an alternative take, in this approach, cryptographic keys for unicast traffic (per peer PTKs) and keys for non-vlan group traffic will be configured in hardware, allowing hardware encryption for unicast and non-vlan group traffic. Only vlan group traffic will be encrypted in software and pushed to the target with encap mode set to RAW in the TX descriptors. Not all firmwares can support this type of key configuration(having few keys installed in hardware and few only in software); for this purpose a new WMI service flag "WMI_SERVICE_PER_PACKET_SW_ENCRYPT" is introduced to advertise this support. Also, adding the logic required to send sw encrypted frames in raw mode. Hardwares Tested : QCA9984, QCA988X Firmwares Tested : 10.4-3.5.3-00057, 10.2.4-1.0-00042 Signed-off-by: Manikanta Pubbisetty <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-12ath10k: add support to configure ftm responder rolePradeep Kumar Chitrapu4-0/+45
Configure fine timing measurement (FTM) responder role from the ftm_responder bss param sent by mac80211. With FTM functionality offloaded to firmware, adding the interface allows userspace to enable or disable FTM responder functionality. ath10k disables it at the time of interface creation. Supported FW: 10.4 Tested on IPQ4019 with firmware: 10.4-3.2.1.1-00022 Signed-off-by: Pradeep Kumar Chitrapu <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-12ath10k: report estimated frame transmit airtime to improve fairnessKan Yan4-3/+61
The airtime of a transmitted frame will be estimated from last used tx rate which the firmware reports with the peer stats feature (WMI_SERVICE_PEER_STATS). The airtime is computed on the tx path and it will be reported to mac80211 upon tx completion. This change is based on Kan's orginal commit in Chromium tree ("CHROMIUM: ath10k: Implementing airtime fairness based TX scheduler") ref: https://chromium-review.googlesource.com/588190 Tested on QCA4019 with firmware version 10.4-3.2.1.1-00015 Tested on QCA9984 with firmware version 10.4-3.9.0.1-00005 Signed-off-by: Kan Yan <[email protected]> [[email protected]: ported only the airtime computation] Signed-off-by: Rajkumar Manoharan <[email protected]> [[email protected]: Rebase to mac80211-next, add test note] Signed-off-by: Toke Høiland-Jørgensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-12ath10k: migrate to mac80211 txq schedulingToke Høiland-Jørgensen5-61/+54
ath10k maintains common txqs list for all stations. This txq management can be removed by migrating to mac80211 txq APIs and let mac80211 handle txqs reordering based on reported airtime. By doing this, txq fairness maintained in ath10k i.e processing N frames per txq is removed. By adapting to mac80211 APIs, ath10k will support mac80211 based airtime fairness algorithm. Tested on QCA4019 with firmware version 10.4-3.2.1.1-00015 Tested on QCA9984 with firmware version 10.4-3.9.0.1-00005 Tested-by: Venkateswara Naralasetty <[email protected]> Co-developed-by: Rajkumar Manoharan <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: Toke Høiland-Jørgensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-12ath9k: Switch to mac80211 TXQ scheduling and airtime APIsToke Høiland-Jørgensen7-276/+75
This moves the ath9k driver to use the mac80211 TXQ scheduling and airtime accounting APIs, removing the corresponding state tracking inside the driver. Signed-off-by: Toke Høiland-Jørgensen <[email protected]> [[email protected]: fixed checkpatch error and warnings] Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-12ath10k: fix line length warning in ath10k_ce_alloc_dest_ring()Kalle Valo1-1/+2
Commit 750afb08ca71 ("cross-tree: phase out dma_zalloc_coherent()") introduced a new checkpatch warning: drivers/net/wireless/ath/ath10k/ce.c:1602: line over 90 characters Signed-off-by: Kalle Valo <[email protected]>
2019-02-11ath10k: fix shadow register implementation for WCN3990Rakesh Pillai2-14/+14
WCN3990 supports shadow registers write operation support for copy engine for regular operation in powersave mode. Since WCN3990 is a 64-bit target, the shadow register implementation needs to be done in the copy engine handlers for 64-bit target. Currently the shadow register implementation is present in the 32-bit target handlers of copy engine. Fix the shadow register copy engine write operation implementation for 64-bit target(WCN3990). Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Fixes: b7ba83f7c414 ("ath10k: add support for shadow register for WNC3990") Signed-off-by: Rakesh Pillai <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-11ath10k: enable Factory Test Mode for WCN3990Rakesh Pillai9-14/+31
The support to put WCN3990 firmware into Factory test mode is not present currently. The WCN3990 firmware can operate in Factory test mode based on the mode it receives in the wlan enable message from the host driver. When the host driver is started in testmode send the operating mode as UTF mode, to the WCN3990 firmware, in the wlan enable message to start the firmware in Factory test mode. Tested on: WCN3990 Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1. Signed-off-by: Rakesh Pillai <[email protected]> Reviewed-by: Brian Norris <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-11ath10k: pci: use mutex for diagnostic window CE pollingBrian Norris2-26/+18
The DIAG copy engine is only used via polling, but it holds a spinlock with softirqs disabled. Each iteration of our read/write loops can theoretically take 20ms (two 10ms timeout loops), and this loop can be run an unbounded number of times while holding the spinlock -- dependent on the request size given by the caller. As of commit 39501ea64116 ("ath10k: download firmware via diag Copy Engine for QCA6174 and QCA9377."), we transfer large chunks of firmware memory using this mechanism. With large enough firmware segments, this becomes an exceedingly long period for disabling soft IRQs. For example, with a 500KiB firmware segment, in testing QCA6174A, I see 200 loop iterations of about 50-100us each, which can total about 10-20ms. In reality, we don't really need to block softirqs for this duration. The DIAG CE is only used in polling mode, and we only need to hold ce_lock to make sure any CE bookkeeping is done without screwing up another CE. Otherwise, we only need to ensure exclusion between ath10k_pci_diag_{read,write}_mem() contexts. This patch moves to use fine-grained locking for the shared ce_lock, while adding a new mutex just to ensure mutual exclusion of diag read/write operations. Tested on QCA6174A, firmware version WLAN.RM.4.4.1-00132-QCARMSWPZ-1. Fixes: 39501ea64116 ("ath10k: download firmware via diag Copy Engine for QCA6174 and QCA9377.") Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-11ath10k: request credit report if flow control enabled on epGovind Singh1-1/+2
FW credit flow control is enabled for only WMI ctrl service(CE3) but credit update is requested unconditionally on all HTC services as part of HTC tx in CE3/CE0/CE4. This is causing WOW failure as FW is not expecting credit report request on other end-points(CE0/CE4). Request credit report only on those endpoints where credit flow control is enabled. Testing: Tested on WCN3990 HW. Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1. Signed-off-by: Govind Singh <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-11ath10k: disable interface pause wow config for integrated chipsetGovind Singh11-18/+31
wow pause iface config controls the PCI D0/D3-WOW cases for pcie bus state. Firmware does not expects WOW_IFACE_PAUSE_ENABLED config for bus/link that cannot be suspended ex:snoc and does not trigger common subsystem shutdown. Disable interface pause wow config for integrated chipset(WCN3990) for correct WOW configuration in the firmware. Testing: Tested on WCN3990 HW. Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1. Signed-off-by: Govind Singh <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-11ath10k: enable bus layer suspend/resume for WCN3990Govind Singh1-0/+45
Register snoc bus layer suspend/resume PM ops and configure the wakeup source(CE2) for the device. Testing: Tested on WCN3990 HW. Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1. Signed-off-by: Govind Singh <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-11ath10k: implement set_base_macaddr to fix rx-bssid mask in multiple APs confChristian Lamparter4-0/+50
Many integrated QCA9984 WiFis in various IPQ806x platform routers from various vendors (Netgear R7800, ZyXEL NBG6817, TP-LINK C2600, etc.) have either blank, bogus or non-unique MAC-addresses in their calibration data. As a result, OpenWrt utilizes a discouraged binary calibration data patching method that allows to modify the device's MAC-addresses right at the source. This is because the ath10k' firmware extracts the MAC address from the supplied radio/calibration data and issues a response to the ath10k linux driver. Which was designed to take the main MAC in ath10k_wmi_event_ready(). Part of the "setting an alternate MAC" issue was already tackled by a patch from Brian Norris: commit 9d5804662ce1 ("ath10k: retrieve MAC address from system firmware if provided") by allowing the option to specify an alternate MAC-address with the established device_get_mac_address() function which extracts the right address from DeviceTree/fwnode mac-address or local-mac-address properties and saves it for later. However, Ben Greear noted that the Qualcomm's ath10k firmware is liable to not properly calculate its rx-bssid mask in this case. This can cause issues in the popluar "multiple AP with a single ath10k instance" configurations. To improve MAC address handling, Felix Fietkau suggested to call pdev_set_base_macaddr_cmdid before bringing up the first vif and use the first vif MAC address there. Which is in ath10k_core_start(). This patch implement Felix Fietkau's request to "call pdev_set_base_macaddr_cmdid before bringing up the first vif". The pdev_set_base_macaddr_cmdid is already declared for all devices and version. The driver just needed the support code for this function. Tested on: QCA9880/CUS223, firmwares: 10.2.4.13-2, 10.2.4.70.44, 10.2.4-1.0-00041 QCA9887/MR33 firmware:10.2.4-1.0-00033 QCA4019/RT-AC58U firmware: 10.4-3.4-00104, 10.4-3.5.3-00057 QCA9984/R7800 firmware: Candela Technologies (CT) Firmware BugLink: https://lists.openwrt.org/pipermail/openwrt-devel/2018-November/014595.html Fixes: 9d5804662ce1 ("ath10k: retrieve MAC address from system firmware if provided") Cc: Brian Norris <[email protected]> Cc: Ben Greear <[email protected]> Cc: Felix Fietkau <[email protected]> Cc: Mathias Kresin <[email protected]> Signed-off-by: Christian Lamparter <[email protected]> Tested-by: Brian Norris <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-11ath10k: update GCMP & GCMP-256 cipher suite number for WCN3990Abhishek Ambure5-17/+65
TLV based firmware ex. QCA6174, WCN3990 expects key cipher value set to 9 while non-TLV firmware expects key cipher value set to 8 for enabling GCMP and GCMP-256 cipher suites. To fix this problem, attach the key cipher suite values based on wmi version. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Signed-off-by: Abhishek Ambure <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-11ath10k: assign 'n_cipher_suites = 11' for WCN3990 to enable WPA3Abhishek Ambure1-1/+1
Hostapd uses CCMP, GCMP & GCMP-256 as 'wpa_pairwise' option to run WPA3. In WCN3990 firmware cipher suite numbers 9 to 11 are for CCMP, GCMP & GCMP-256. To enable CCMP, GCMP & GCMP-256 cipher suites in WCN3990 firmware, host sets 'n_cipher_suites = 11' while initializing hardware parameters. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Signed-off-by: Abhishek Ambure <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-11virt_wifi: Remove REGULATORY_WIPHY_SELF_MANAGEDCody Schuffelen1-1/+0
REGULATORY_WIPHY_SELF_MANAGED as set here breaks NL80211_CMD_GET_REG, because it expects the wiphy to do regulatory management. Since virt_wifi does not do regulatory management, this triggers a WARN_ON in NL80211_CMD_GET_REG and fails the netlink command. Removing REGULATORY_WIPHY_SELF_MANAGED fixes the problem and the virtual wireless network continues to work. Signed-off-by: Cody Schuffelen <[email protected]> Acked-by: Alistair Strachan <[email protected]> Acked-by: Greg Hartman <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2019-02-08Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller6-37/+35
An ipvlan bug fix in 'net' conflicted with the abstraction away of the IPV6 specific support in 'net-next'. Similarly, a bug fix for mlx5 in 'net' conflicted with the flow action conversion in 'net-next'. Signed-off-by: David S. Miller <[email protected]>
2019-02-08rsi: fix indentation issue with a code blockColin Ian King1-8/+8
There is a block of code that is indented at the wrong level. Fix this with extra tabbing. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-08qtnfmac: enable WPA3 SAE supportSergey Matyukevich5-2/+145
In the case of SAE AP, drivers offload authentication to user-space software, e.g. hostapd. For FullMAC drivers the procedure is as follows. If auth_type is SAE and user space indicates external authentication capability, then driver requests authentication offload to user-space software using cfg80211_external_auth_request call. From that point, auth frame exchange is performed transparently for driver: user-space software sends/receives mgmt frames using mgmt_tx/mgmt_frame_register cfg80211 callbacks. As soon as authenitcation is completed, user-space software notifies driver about its status using external_auth cfg80211 callback. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-08qtnfmac: enable WPA3 OWE supportSergey Matyukevich2-43/+102
In the case of OWE, STA should be able to pass DH IEs from AP assoc responses to wpa_s for processing. For this purpose DH IEs are received from firmware in BSS_JOIN events and passed to wireless core and then to wpa_s as additional optional rsp_ies parameter for cfg80211_connect_result. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-08rsi: fix for wowlan wakeup failureSiva Rebbagondla1-0/+4
During wowlan regression tests, sometimes radio is not waking up for wowlan packet in coex mode. This is because of power save is enabled by default in case of coex mode greater than one. Hence, disable power save in coex mode to avoid radio loss. Signed-off-by: Siva Rebbagondla <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-08rsi: resolve power save issue after S4 resumeSiva Rebbagondla3-1/+10
We are redownloading the firmware after S4 restore and observed in stress test that mac80211 sometimes gives power save request after resume which causes the firmware in bad state. mac_ops_resumed flag is added to skip that request until initialisation is done and Keeping power save state is NONE. Signed-off-by: Siva Rebbagondla <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-08rsi: fix wowlan wakeup issue for hibernate(S4)Siva Rebbagondla2-3/+6
At SDIO restore ieee80211_restart_hw() is getting called to restart all MAC operations. This step is not required. Returning 1 from mac80211_resume() will serve this purpose. Signed-off-by: Siva Rebbagondla <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-08rsi: add hci detach for hibernation and poweroffSiva Rebbagondla2-0/+25
As we missed to detach HCI, while entering power off or hibernation, an extra hci interface gets created whenever system is woken up, to avoid this we added hci_detach() in rsi_disconnect(), rsi_freeze(), and rsi_shutdown() functions which are invoked for these tests. This patch fixes the issue Signed-off-by: Siva Rebbagondla <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-08rsi: Add debug support for wowlan wakeup confirmationSiva Rebbagondla1-0/+29
When a wowlan magic-packet has received to wake up the device, currently driver is not taking care of what kind of packet has received. This patch will add debug support for wakeup reason in driver. Signed-off-by: Siva Rebbagondla <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-08rtlwifi: remove set but not used variable 'cmd_seq'YueHaibing1-2/+1
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/base.c: In function 'rtl_c2h_content_parsing': drivers/net/wireless/realtek/rtlwifi/base.c:2313:13: warning: variable 'cmd_seq' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing <[email protected]> Acked-by: Ping-Ke Shih <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-08mwifiex: don't print error message on coex eventStefan Agner1-1/+1
The BT coex event is not an error condition. Don't print an error message in this case. The same even in sta_event.c prints a message using the debug level already. Signed-off-by: Stefan Agner <[email protected]> Reviewed-by: Brian Norris <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-08brcmfmac: support monitor frames with the hardware/ucode headerRafał Miłecki3-1/+62
So far there were two monitor frame formats: 1) 802.11 frames (with frame (sub)type & all addresses) 2) 802.11 frames with the radiotap header Testing the latest FullMAC firmwares for 4366b1/4366c0 resulted in discovering a new format being used. It seems (almost?) identical to the one known from ucode used in SoftMAC devices which is most likely the same codebase anyway. While new firmwares will /announce/ radiotap header support using the "rtap" fw capability string it seems no string was added for the new ucode header format. All above means that: 1) We need new format support when dealing with a received frame 2) A new feature bit & mapping quirks have to be added manually As for now only an empty radiotap is being created. Adding support for extracting some info (band, channel, signal, etc.) is planned for the future. Signed-off-by: Rafał Miłecki <[email protected]> Acked-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-08brcmfmac: fix typosMatteo Croce4-4/+4
Fix spelling mistakes in brcmfmac: "lenght" -> "length". The typos are also in the special comment blocks which translates to documentation. Signed-off-by: Matteo Croce <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-08brcmfmac: add bphy_err() and use it in the cfg80211.cRafał Miłecki2-224/+282
This new macro uses wiphy_err() which: 1) Should be the best choice with wiphy already created 2) Uses dev_err() which allows identifying error-affected device Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-08brcmfmac: pass bus to the __brcmf_err() in pcie.cRafał Miłecki2-23/+38
This enables dev_err() usage (instead of pr_err()) in the __brcmf_err(). It makes error messages more meaningful and is important for debugging errors/bugs on systems with multiple brcmfmac supported devices. All bus files should follow & get updated similarly (soon). Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-08brcmfmac: modify __brcmf_err() to take bus as a parameterRafał Miłecki3-7/+17
So far __brcmf_err() was using pr_err() which didn't allow identifying device that was affected by an error. It's crucial for systems with more than 1 device supported by brcmfmac (a common case for home routers). This change allows passing struct brcmf_bus to the __brcmf_err(). That struct has been agreed to be the most common one. It allows accessing struct device easily & using dev_err() printing helper. Signed-off-by: Rafał Miłecki <[email protected]> Acked-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-08mac80211_hwsim: Declare support for Multi-BSSIDJouni Malinen1-0/+1
This can be used to test cfg80211 support for Multi-BSSID scan result parsing. Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2019-02-08Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.gitKalle Valo7-54/+64
The series "[PATCH 0/2] mt76x0: initialize per-channel max_power" depends on commit d04ca383860b ("mt76x0u: fix suspend/resume"), so merge wireless-drivers into wireless-drivers-next to get that.
2019-02-08Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.gitKalle Valo29-75/+606
ath.git patches for 5.1. Major changes: ath10k * change QMI interface to support the new (and backwards incompatible) interface from HL3.1 and used in recent HL2.0 branch firmware releases ath * add new country codes for US
2019-02-07mt76x0u: fix suspend/resumeStanislaw Gruszka1-17/+29
We need to reset MCU and do other initializations on resume otherwise MT7610U device will fail to initialize, what cause system hung due to USB requests timeouts. Patch fixes 4.19 -> 4.20 regression. Cc: [email protected] # 4.20+ Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-07ath: regd: add extra US coutry codesOever Gonzalez2-0/+4
This patch adds several country codes to the regd.h and regd_common.h files in order to support devices like the Linksys EA6350v3, whose country codes are not present in the original list. Without this patch, all devices whose manufacturer programmed any of these code in their EEPROM will not work. The values for CTRY_UNITED_STATES2 and CTRY_UNITED_STATES3 were taken from a post by Sven Eckelmann <[email protected]>: <http://lists.infradead.org/pipermail/ath10k/2017-August/010014.html> Signed-off-by: Oever Gonzalez <[email protected]> Signed-off-by: Christian Lamparter <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-07ath: move spin_lock_bh to spin_lock in taskletZhiwei Jiang1-3/+3
as you are already in a tasklet, it is unnecessary to call spin_lock_bh, because softirq already disable BH. Signed-off-by: Zhiwei Jiang <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-07ath9k: do not return invalid pointers as a *dentryGreg Kroah-Hartman1-0/+3
When calling debugfs functions, they can now return error values if something went wrong. If that happens, return a NULL as a *dentry to the relay core instead of passing it an illegal pointer. The relay core should be able to handle an illegal pointer, but add this check to be safe. Cc: Kalle Valo <[email protected]> Cc: QCA ath9k Development <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-07ath10k: fill tx_duration for each peer in Tx stats per STASurabhi Vishnoi1-0/+3
Firmware sends the tx_duration for each in HTT_T2H_MSG_TYPE_PEER_STATS msg. Fill the tx_duration sent by firmware in the tx stats information per STA. Tested HW: WCN3990 Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1, WLAN.HL.2.0-01617-QCAHLSWMTPLZ-1 Signed-off-by: Surabhi Vishnoi <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-07ath10k: add a condition to fill the LDPC capability correctlySurabhi Vishnoi2-1/+4
The firmware advertises the LDPC support information for HT in HT capability info in the wmi service ready event. To provide granularity, firmware now advertises WMI_HT_CAP_RX_LDPC and WMI_HT_CAP_TX_LDPC separately. To support LDPC, host should also check for WMI_HT_CAP_RX_LDPC and WMI_HT_CAP_TX_LDPC in HT capabilities. Add a condition to existing logic in host to know whether firmware supports LDPC or not. Tested HW: WCN3990 Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1, WLAN.HL.2.0-01617-QCAHLSWMTPLZ-1 Signed-off-by: Surabhi Vishnoi <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-07ath10k: reduce transmit msdu countAlagu Sankar3-2/+7
Reduce the transmit MSDU count for SDIO, to match with the descriptors as used by the firmware. This also acts as a high watermark level for transmit. Too many packets to the firmware results in transmit overflow interrupt. It only affect SDIO chip, it will not cause functionaly changes to other hardware. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00005-QCARMSWP-1. Signed-off-by: Alagu Sankar <[email protected]> Signed-off-by: Wen Gong <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-07ath10k: do not return invalid pointers as a *dentryGreg Kroah-Hartman1-0/+3
When calling debugfs functions, they can now return error values if something went wrong. If that happens, return a NULL as a *dentry to the relay core instead of passing it an illegal pointer. The relay core should be able to handle an illegal pointer, but add this check to be safe. Cc: Kalle Valo <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-07ath10k: snoc: remove set but not used variable 'ar_snoc'YueHaibing1-2/+0
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/ath/ath10k/snoc.c: In function 'ath10k_snoc_tx_pipe_cleanup': drivers/net/wireless/ath/ath10k/snoc.c:681:22: warning: variable 'ar_snoc' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing <[email protected]> Reviewed-by: Brian Norris <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-07ath10k: sdio: add .owner fieldBrian Norris1-1/+4
sdio_register_driver() doesn't do this for us, unlike (for example) platform_driver_register(). This is important for helping track module-to-device relationships. Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-07ath10k: change swap mail box check after htc readyWen Gong3-15/+38
The swap box flag of firmware is not set before htc ready, then it will not set swap box flag in ath10k driver, and it will let swap box setting not same between firmware and ath10k driver, then it will trigger firmware assert failure. Check the flag and set swap box after htc ready will fix the firmware assert failure. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00005-QCARMSWP-1. Signed-off-by: Wen Gong <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-07ath10k: fix hw-restart crash inject mode for WCN3990Rakesh Pillai1-1/+10
The hw-restart crash inject mode is a special mode, where there is no crash generated in the firmware, but instead the driver restarts the firmware. In order to restart WCN3990 firmware, the driver needs to send qmi_wlan_disable message followed by the qmi_wlan_enable message to the WCN3990 firmware. Currently the qmi_wlan_disable message is not sent to the WCN3990 firmware when hw-restart crash is injected, which causes the firmware to crash when the driver sends qmi_wlan_enable message during ath10k_restart. Send qmi_wlan_disable to the WCN3990 firmware when the hw-restart crash is injected via debugfs. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Signed-off-by: Rakesh Pillai <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-07ath10k: fix dma unmap direction for management framesRakesh Pillai2-4/+4
The management frames transmitted are dma mapped with direction TO_DEVICE, but incorrectly mapped with direction FROM_DEVICE during tx complete and error cases. Fix the direction of dma during dma unmap of the transmitted management frames. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Fixes: 38a1390e02b7 ("ath10k: dma unmap mgmt tx buffer if wmi cmd send fails") Signed-off-by: Rakesh Pillai <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-07ath10k: Enable bundle tx compl for management frames in WCN3990Rakesh Pillai2-1/+3
WCN3990 sends tx completion of multiple management frames bundled together in a single event, if the host driver exposes the support to handle this bundled tx completion event. This reduces the number of WMI events which are sent to the host driver by the target. Set the BUNDLE_TX_COMPL flag in the host capability flags when host sends the wmi init command, to indicate the host capability to handle bundled tx completion for management frames. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Signed-off-by: Rakesh Pillai <[email protected]> Signed-off-by: Kalle Valo <[email protected]>