aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/quantenna
AgeCommit message (Collapse)AuthorFilesLines
2017-11-10qtnfmac: configure and start AP interface with a single commandIgor Mitsyanko4-52/+47
Current logic artificially divides "start AP" procedure into three stages: - generic interface configuration (security, channel etc) - IE's processing - enable AP mode on interface This separation would not allow to do a proper device configuration as first stage needs to use information from IEs that are processed on a second stage. Which means first and second stages have to be meged. In that case there is no point anymore to keep third stage either, so merge all three into a single command. This new command carries all the same info as contained in "struct cfg80211_ap_settings". Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-11-10qtnfmac: convert "Append IEs" command to QTN_TLV_ID_IE_SET usageIgor Mitsyanko3-34/+10
Data contained within "Append IEs" command (QLINK_CMD_MGMT_SET_APPIE) duplicates QTN_TLV_ID_IE_SET TLV. Convert the command to use that TLV instead. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-11-10qtnfmac: SCAN results: retreive frame type information from "IE set" TLVIgor Mitsyanko2-22/+14
"IE set" TLV carries the same information as qlink_event_scan_result::frame_type. Convert the event to make use of TLV and drop frame_type member. While at it, make qlink_event_scan_result structure alignement-safe. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-11-10qtnfmac: extend "IE set" TLV to include frame type infoIgor Mitsyanko3-30/+80
Specifying frame type for "IE set" TLV will allow to use several TLVs in a single message. Modify users accordingly. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-11-10qtnfmac: get rid of PHYMODE capabilities flagsIgor Mitsyanko4-14/+2
Supported WiFi operation modes are now identified per-band based on HT/VHT capabilities of each band. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-11-10qtnfmac: initialize HT/VHT caps "can override" masksIgor Mitsyanko4-9/+12
Information on which HT/VHT capabilities can be overridden is reported per-MAC by wireless device. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-11-10qtnfmac: use per-band HT/VHT info from wireless deviceIgor Mitsyanko5-59/+84
HT/VHT capabilities must be reported per each band supported by a radio, not for all bands on a radio. Furthermore, driver better not assume any capabilities and just use whetever is reported by device itself. To support this, convert "get channels" command into "get band info" command. Difference is that it may also carry HT/VHT capabilities along with channels information. While at it, also add "num_bitrates" field to "get band info" command, for future use. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-11-04Merge tag 'wireless-drivers-next-for-davem-2017-11-03' of ↵David S. Miller7-19/+70
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.15 Mostly fixes this time, but also few new features. Major changes: wil6210 * remove ssid debugfs file rsi * add WOWLAN support for suspend, hibernate and shutdown states ath10k * add support for CCMP-256, GCMP and GCMP-256 ciphers on hardware where it's supported (QCA99x0 and QCA4019) ==================== Signed-off-by: David S. Miller <[email protected]>
2017-11-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-0/+1
Files removed in 'net-next' had their license header updated in 'net'. We take the remove from 'net-next'. Signed-off-by: David S. Miller <[email protected]>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman1-0/+1
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <[email protected]> Reviewed-by: Philippe Ombredanne <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-10-30qtnfmac: advertise support of inactivity timeoutIgor Mitsyanko3-4/+17
Wireless device may implement a logic to kick-out STA due to inactivity for a certain period of time. This feature needs to be advertised to higher layers if supported. Timeout value is still taken from parameters to START_AP command, nothing changes here. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-10-30qtnfmac: modify full Tx queue recoverySergey Matyukevich4-5/+37
Current recovery approach is to wake s/w Tx queues for skb->dev netdevice. However this approach doesn't cover the case when h/w queue is full of packets from a single wireless interface. Suppose xmit attempt from the second wireless interface fails due to failed reclaim. Then the second interface will not have a chance to recover even if subsequent reclaims succeed. Possible solution is to attempt to wake all the s/w queues belonging to driver interfaces. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-10-30qtnfmac: drop nonexistent function declarationSergey Matyukevich1-3/+0
Function qtnf_classify_skb_no_mbss has been used for debug during early stage of development. Drop its declaration. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-10-30qtnfmac: enable registration of more mgmt framesSergey Matyukevich1-1/+11
Support registration for more mgmt frame types for debug and monitoring purposes. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-10-30qtnfmac: modify full Tx queue error reportingSergey Matyukevich1-1/+1
Under heavy load it is normal that h/w Tx queue is almost full all the time and reclaim should be done before transmitting next packet. Warning still should be reported as well as s/w Tx queues should be stopped in the case when reclaim failed. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-10-27qtnfmac: Convert timers to use timer_setup()Kees Cook2-5/+4
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Kalle Valo <[email protected]> Cc: Igor Mitsyanko <[email protected]> Cc: Avinash Patil <[email protected]> Cc: Sergey Matyukevich <[email protected]> Cc: Kamlesh Rath <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-10-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.gitKalle Valo5-6/+19
Mark Brown reported that there are conflicts in iwlwifi between the two trees so fix those now.
2017-10-13qtnfmac: do not cache current channel info in driver's stateIgor Mitsyanko3-8/+2
Linux Wireless device structure already has current channel information that can be used when needed. Start using it. Since driver's channel info is not used anymore, remove it. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-10-13qtnfmac: make encryption info a part of CONNECT command.Igor Mitsyanko2-25/+22
Encryption info is a constant part of STA settings, no point to pass it as an optional TLV. Remove QTN_TLV_ID_CRYPTO type as it's not used anymore. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-10-13qtnfmac: do not cache BSS state in per-VIF structureIgor Mitsyanko3-66/+42
This cached state is used only once immediately after it is initilized, except for BSSID value that is used for events processing. There is no reason in keeping unused data in driver's state. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-10-13qtnfmac: get rid of QTNF_STATE_AP_START flagIgor Mitsyanko4-45/+2
QTNF_STATE_AP_START usage is redundant and imposes additional state synchronization maintenance. We may as well leave state checking to network card and upper layers (cfg80211, nl80211 and userspace). Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-10-13qtnfmac: get rid of QTNF_STATE_AP_CONFIGIgor Mitsyanko3-12/+0
QTNF_STATE_AP_CONFIG is redundant and its usage can be safely removed. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-10-13qtnfmac: pass channel definition to WiFi card on START_AP commandIgor Mitsyanko5-22/+62
Introduce "channel definition" TLV containing full channel description (center frequence for both segments + BW) and pass it to wireless card in a payload to START_AP command. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-10-13qtnfmac: pass all AP settings to wireless card for processingIgor Mitsyanko4-43/+101
Modify QLINK START_AP command payload to pass all AP settings contained within struct cfg80211_ap_settings. Make most of settings a constant part of "config AP" command instead of passing it as an optional TLVs. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-10-13qtnfmac: do not cache AP settings in driver structuresIgor Mitsyanko3-41/+25
Cached AP setings are passed to WiFi card right after they are initialized and are never used for anything else. There is no point in keeping them in driver state. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-09-25qtnfmac: do not report channel changes until wiphy is registeredIgor Mitsyanko1-0/+3
Wireless device may send "channel changed" event before driver registered this device with wireless core, which will result in warnings. Once device is registered, higher layer will query channel info manually using .get_channel callback. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-09-25qtnfmac: remove unused mac::status fieldIgor Mitsyanko3-8/+0
There are no users of this field and it can safely be removed. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-09-25qtnfmac: do not cache CSA chandef infoIgor Mitsyanko4-22/+1
It is never used for anything useful, and all logic is handled by either WiFi card or higher layers. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-09-25qtnfmac: pass VIF info to SendChannel commandIgor Mitsyanko3-4/+5
Do not assume whether wireless device can or can not handle switching several interfaces on a single radio to different channels. Device will handle it itself and will return appropriate error code. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-09-25qtnfmac: let wifi card handle channel switch request to the same chanIgor Mitsyanko1-5/+0
No reason to verify channel switch request in driver, it can simply be forwarded to wireless device. Device can perform required checks and return appropriate error code, and driver may not even have information on current operational channel. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-09-25qtnfmac: do not cache channel info from "connect" commandIgor Mitsyanko2-16/+5
This makes no sense because real operational channel is choosen based on AP operation, not on what STA is configured to. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-09-25qtnfmac: retrieve current channel info from EPIgor Mitsyanko4-21/+64
Do not try to cache current operational channel info in driver, this is a potential source of synchronization issues + driver does not really need that info. Introduce GET_CHANNEL command and process it appropriately. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-09-25qtnfmac: make "Channel change" event report full channel infoIgor Mitsyanko4-18/+85
Specifically, it has to report center frequency, secondary center frequency (for 80+80) and BW. Introduce channel definition structure to qlink and modify channel change event processing function accordingly. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-09-25qtnfmac: convert channel width from bitfiled to simple enumIgor Mitsyanko2-16/+16
This will allow to use qlink channel width values to specify BW setting corresponding to enum nl80211_chan_width. Current user is converted to apply BIT() macro manually to each individual qlink_channel_width enumeration value. Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-09-20qtnfmac: cancel scans on wireless interface changesSergey Matyukevich3-5/+9
Cancel active scans and deactivate firmware scan watchdog timer when wireless interface configuration is changed. The usecases include wireless interface mode change, interface down, AP stop, virtual interface removal. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-09-20qtnfmac: lock access to h/w in tx pathSergey Matyukevich2-1/+10
Fix tx path regression. Lock should be held when queuing packets to h/w fifos in order to properly handle configurations with multiple enabled interfaces. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-31qtnfmac: implement 64-bit dma supportSergey Matyukevich3-16/+65
Use 64-bit dma for hosts with CONFIG_ARCH_DMA_ADDR_T_64BIT enabled. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-31qtnfmac: fix free_xfer_buffer cleanupSergey Matyukevich1-2/+2
Check if skb tracking arrays has been already allocated. This additional check handles the case when init partially failed. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-31qtnfmac: modify qtnf_map_bar not to return NULLSergey Matyukevich1-4/+6
NULL is not a special type of success here but a error pointer. So it makes sense to check against NULL in qtnf_map_bar and return error code. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-31qtnfmac: module param sanity checkSergey Matyukevich1-2/+15
Linux built-in circ_buf implementation assumes that that the circular buffer length is a power of 2. Make sure that rx and tx descriptor queue lengths are power-of-2. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-31qtnfmac: drop -D__CHECK_ENDIAN from cflagsSergey Matyukevich1-4/+0
Flag -D__CHECK_ENDIAN was wrong: it should be -D__CHECK_ENDIAN__ instead. However now this flag is enabled by default, so it can be removed. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17qtnfmac: modify tx reclaim lockingSergey Matyukevich2-13/+8
Perform additional reclaim from qtnf_pcie_data_tx. Lock tx_lock serves only reclaim synchronization purposes. Rename it accordingly and improve granularity moving this lock to qtnf_pcie_data_tx_reclaim. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17qtnfmac: introduce counter for Rx underflow eventsSergey Matyukevich4-2/+17
Introduce counter for Rx underflow events. Export this counter via debugfs. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17qtnfmac: switch to kernel circ_buf implementationSergey Matyukevich2-80/+136
Current code for both Rx and Tx queue management is a custom and incomplete circular buffer implementation. It makes a lot of sense to switch to kernel built-in circ_buf implementation. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17qtnfmac: decrease default Tx queue sizeSergey Matyukevich1-1/+1
Avoid extra buffering in driver by default. Use max hardware Tx queue size. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17qtnfmac: skb2rbd_attach cleanupSergey Matyukevich1-18/+13
Update PCIE_HDP_TX_HOST_Q_WR_PTR register in skb2rbd_attach as a part of procedure of passing new Rx buffer to hardware. Sync up all the the qtnf_rx_bd descriptor updates before passing Rx buffer to hardware. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17qtnfmac: use __netdev_alloc_skb_ip_alignSergey Matyukevich1-4/+1
Replace __dev_alloc_skb and explicit NET_IP_ALIGN alignment by built-in __netdev_alloc_skb_ip_align function. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17qtnfmac: switch to napi_gro_receiveSergey Matyukevich1-1/+1
Use napi_gro_receive() rather than netif_receive_skb() to improve performance when GRO is enabled. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17qtnfmac: remove unused qtnf_rx_frame declarationSergey Matyukevich1-1/+0
Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-03net: qtnfmac: constify pci_device_id.Arvind Yadav1-1/+1
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by <linux/pci.h> work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <[email protected]> Reviewed-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>