aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath
AgeCommit message (Collapse)Author
2015-09-24wcn36xx: add locking around ring buffer accessesBob Copeland
Signed-off-by: Bob Copeland <me@bobcopeland.com>
2015-09-24Migrate the wifi driver from old smd driver to new smd driver.Yin, Fengwei
Signed-off-by: Yin, Fengwei <fengwei.yin@linaro.org> Conflicts: arch/arm64/boot/dts/qcom/msm8916.dtsi
2015-09-24Update the initialization sequence to enable DB410c.Yin, Fengwei
The soc on DB410c board is not same as MTP8916. It doesn't support 48M operation frequency. Signed-off-by: Yin, Fengwei <fengwei.yin@linaro.org>
2015-09-24Set the dma mask for platform device which is not created from DT.Yin, Fengwei
Signed-off-by: Yin, Fengwei <fengwei.yin@linaro.org>
2015-09-24ARM64 has requirement that all the dma operations has assigned devices. ↵Yin, Fengwei
Otherwise, following message shown and dma allocation fails: WARNING: CPU: 0 PID: 954 at arch/arm64/mm/dma-mapping.c:106 __dma_alloc+0x24c/0x258() Use an actual device structure for DMA allocation Modules linked in: wcn36xx wcn36xx_platform CPU: 0 PID: 954 Comm: ifconfig Not tainted 4.0.0+ #14 Hardware name: Qualcomm Technologies, Inc. MSM 8916 MTP (DT) Call trace: [<ffffffc000089904>] dump_backtrace+0x0/0x124 [<ffffffc000089a38>] show_stack+0x10/0x1c [<ffffffc000627114>] dump_stack+0x80/0xc4 [<ffffffc0000b2e64>] warn_slowpath_common+0x98/0xd0 [<ffffffc0000b2ee8>] warn_slowpath_fmt+0x4c/0x58 [<ffffffc00009487c>] __dma_alloc+0x248/0x258 [<ffffffbffc009270>] wcn36xx_dxe_allocate_mem_pools+0xc4/0x108 [wcn36xx] [<ffffffbffc0079c4>] wcn36xx_start+0x38/0x240 [wcn36xx] [<ffffffc0005f161c>] ieee80211_do_open+0x1b0/0x9a4 [<ffffffc0005f1e68>] ieee80211_open+0x58/0x68 [<ffffffc00051693c>] __dev_open+0xb0/0x120 [<ffffffc000516c10>] __dev_change_flags+0x88/0x150 [<ffffffc000516cf4>] dev_change_flags+0x1c/0x5c [<ffffffc000570950>] devinet_ioctl+0x644/0x6f0 Signed-off-by: Yin, Fengwei <fengwei.yin@linaro.org>
2015-09-24Got workable wireless driver.Yin, Fengwei
Signed-off-by: Yin, Fengwei <fengwei.yin@linaro.org>
2015-09-24wcn36xx: add later fw capabilitiesAndy Green
wcn3620 prima firmware exposes more capabilities than known about in the mainline driver, they're reported as "unknown" at probe. This adds the extra capabilities so they can at least be reported correctly. Signed-off-by: Andy Green <andy.green@linaro.org>
2015-09-24net wireless wcn36xx adapt wcnss platform to select module by DTAndy Green
Simplify the resource handling and use DT to indicate which chip type we are dealing with Signed-off-by: Andy Green <andy.green@linaro.org>
2015-09-24net wireless wcn36xx add wcnss platform codeEugene Krasnikov
AG modified to remove regulator handling not needed on msm8916-qrd Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com> Signed-off-by: Andy Green <andy.green@linaro.org>
2015-09-24wcn3620: use new response format for wcn3620 remove_bsskeyAndy Green
On wcn3620, firmware response to remove_bsskey uses the new, larger "v2" format Signed-off-by: Andy Green <andy.green@linaro.org>
2015-09-24wcn3620: use new response format for wcn3620 trigger_baAndy Green
On wcn3620, firmware response to trigger_ba uses the new, larger "v2" format Signed-off-by: Andy Green <andy.green@linaro.org>
2015-09-24wcn36xx: handle new hal response formatAndy Green
wcn3620 has a new message structure for the reply to some hal commands. This patch adds the struct and helper routine that uses it if the chip is wcn3620, or falls back to the old helper routine. We don't know what to do with the candidate list he sends back, but we can at least accept and ignore it nicely instead of dying. Signed-off-by: Andy Green <andy.green@linaro.org>
2015-09-24wcn36xx: remove powersaving for wcn3620Andy Green
WCN3620 powersaving mode is not stable. Disable it if we're on a wcn3620 chip type. Signed-off-by: Andy Green <andy.green@linaro.org>
2015-09-24wcn36xx: swallow two wcn3620 IND messagesAndy Green
WCN3620 can asynchronously send two new kinds of indication message, since we can't handle them just accept them quietly. v2: used one break for both in the second stanza Signed-off-by: Andy Green <andy.green@linaro.org>
2015-09-24wcn36xx: introduce WCN36XX_HAL_AVOID_FREQ_RANGE_INDAndy Green
WCN3620 firmware introduces a new async indication, we need to add it as a known message type so we can accept it Signed-off-by: Andy Green <andy.green@linaro.org>
2015-09-24wcn36xx: use 3680 dxe regs for 3620Andy Green
Between 3620, 3660 and 3680, only 3660 has a different dxe register Signed-off-by: Andy Green <andy.green@linaro.org>
2015-09-24wcn36xx: get chip type from platform opsAndy Green
Autodetecting the chip type does not work well. Stop attempting to do it and require a platform op that tells us what the chip is. Signed-off-by: Andy Green <andy.green@linaro.org>
2015-09-24wcn36xx: add wcn3620 chip type definitionAndy Green
Convert the list of chip types to an enum, add the default UNKNOWN type and a type for WCN3620 chip Signed-off-by: Andy Green <andy.green@linaro.org>
2015-09-10drivers/net/wireless/ath/wil6210: use seq_hex_dump() to dump buffersAndy Shevchenko
Instead of custom approach let's use recently introduced seq_hex_dump() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Joe Perches <joe@perches.com> Cc: Tadeusz Struk <tadeusz.struk@intel.com> Cc: Helge Deller <deller@gmx.de> Cc: Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-09-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds
Pull networking updates from David Miller: "Another merge window, another set of networking changes. I've heard rumblings that the lightweight tunnels infrastructure has been voted networking change of the year. But what do I know? 1) Add conntrack support to openvswitch, from Joe Stringer. 2) Initial support for VRF (Virtual Routing and Forwarding), which allows the segmentation of routing paths without using multiple devices. There are some semantic kinks to work out still, but this is a reasonably strong foundation. From David Ahern. 3) Remove spinlock fro act_bpf fast path, from Alexei Starovoitov. 4) Ignore route nexthops with a link down state in ipv6, just like ipv4. From Andy Gospodarek. 5) Remove spinlock from fast path of act_gact and act_mirred, from Eric Dumazet. 6) Document the DSA layer, from Florian Fainelli. 7) Add netconsole support to bcmgenet, systemport, and DSA. Also from Florian Fainelli. 8) Add Mellanox Switch Driver and core infrastructure, from Jiri Pirko. 9) Add support for "light weight tunnels", which allow for encapsulation and decapsulation without bearing the overhead of a full blown netdevice. From Thomas Graf, Jiri Benc, and a cast of others. 10) Add Identifier Locator Addressing support for ipv6, from Tom Herbert. 11) Support fragmented SKBs in iwlwifi, from Johannes Berg. 12) Allow perf PMUs to be accessed from eBPF programs, from Kaixu Xia. 13) Add BQL support to 3c59x driver, from Loganaden Velvindron. 14) Stop using a zero TX queue length to mean that a device shouldn't have a qdisc attached, use an explicit flag instead. From Phil Sutter. 15) Use generic geneve netdevice infrastructure in openvswitch, from Pravin B Shelar. 16) Add infrastructure to avoid re-forwarding a packet in software that was already forwarded by a hardware switch. From Scott Feldman. 17) Allow AF_PACKET fanout function to be implemented in a bpf program, from Willem de Bruijn" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1458 commits) netfilter: nf_conntrack: make nf_ct_zone_dflt built-in netfilter: nf_dup{4, 6}: fix build error when nf_conntrack disabled net: fec: clear receive interrupts before processing a packet ipv6: fix exthdrs offload registration in out_rt path xen-netback: add support for multicast control bgmac: Update fixed_phy_register() sock, diag: fix panic in sock_diag_put_filterinfo flow_dissector: Use 'const' where possible. flow_dissector: Fix function argument ordering dependency ixgbe: Resolve "initialized field overwritten" warnings ixgbe: Remove bimodal SR-IOV disabling ixgbe: Add support for reporting 2.5G link speed ixgbe: fix bounds checking in ixgbe_setup_tc for 82598 ixgbe: support for ethtool set_rxfh ixgbe: Avoid needless PHY access on copper phys ixgbe: cleanup to use cached mask value ixgbe: Remove second instance of lan_id variable ixgbe: use kzalloc for allocating one thing flow: Move __get_hash_from_flowi{4,6} into flow_dissector.c ixgbe: Remove unused PCI bus types ...
2015-08-26Merge ath-next from ath.gitKalle Valo
Major changes in ath10k: * add spectral scan support for qca99x0 * add qca6164 support
2015-08-26ath10k: fix compilation warnings in wmi phyerr pull functionRaja Mani
Below compilation warnings are observed in gcc version 4.8.2. Even though it's not seen in bit older gcc versions (for ex, 4.7.3), It's good to fix it by changing format specifier from %d to %zd in wmi pull phyerr functions. wmi.c: In function 'ath10k_wmi_op_pull_phyerr_ev': wmi.c:3567:8: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=] left_len, sizeof(*phyerr)); ^ wmi.c: In function 'ath10k_wmi_10_4_op_pull_phyerr_ev': wmi.c:3612:8: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=] left_len, sizeof(*phyerr)); ^ Fixes: 991adf71a6cd ("ath10k: refactor phyerr event handlers") Fixes: 2b0a2e0d7c2f ("ath10k: handle 10.4 firmware phyerr event") Signed-off-by: Raja Mani <rmani@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-26ath10k: add qca6164 supportMichal Kazior
This adds additional 0x0041 PCI Device ID definition to ath10k for QCA6164 which is a 1 spatial stream sibling of the QCA6174 (which is 2 spatial stream chip). The QCA6164 needs a dedicated board.bin file which is different than the one used for QCA6174. If the board.bin is wrong the device will crash early while trying to boot firmware. The register dump will look like this: ath10k_pci 0000:02:00.0: firmware register dump: ath10k_pci 0000:02:00.0: [00]: 0x05010000 0x000015B3 0x000A012D 0x00955B31 ... Note the value 0x000A012D. Special credit goes to Alan Liu <alanliu@qca.qualcomm.com> for providing support help which enabled me to come up with this patch. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-26ath10k: add spectral scan support for 10.4 fwRaja Mani
To enable/configure spectral scan parameters in 10.4 firmware, existing wmi spectral related functions can be reused. Link those functions in 10.4 wmi ops table. In addition, adjust bin size (only when size is 68 bytes) before reporting bin samples to user space. The background for this adjustment is that qca99x0 reports bin size as 68 bytes (64 bytes + 4 bytes) in report mode 2. First 64 bytes carries in-band tones (-32 to +31) and last 4 byte carries band edge detection data (+32) mainly used in radar detection purpose. Additional last 4 bytes are stripped to make bin size valid one. This bin size adjustment will happen only for qca99x0, all other chipsets will report proper bin sizes (64/128) without extra 4 bytes being added at the end. The changes are validated in qca99x0 using 10.4 firmware. Signed-off-by: Raja Mani <rmani@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-26ath10k: fix dma_mapping_error() handlingMichal Kazior
The function returns 1 when DMA mapping fails. The driver would return bogus values and could possibly confuse itself if DMA failed. Fixes: 767d34fc67af ("ath10k: remove DMA mapping wrappers") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-26ath10k: add missing mutex unlock on failpathMichal Kazior
Kernel would complain about leaving a held lock after going back to userspace and would subsequently deadlock. Fixes: e04cafbc38c7 ("ath10k: fix peer limit enforcement") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-25ath9k_htc: do ani shortcalibratio if we got -ETIMEDOUTOleksij Rempel
current code will handle -ETIMEDOUT as success which is probalbly wrong. According to this comment I assume it is safe to handle -ETIMEDOUT as false: drivers/net/wireless/ath/ath9k/calib.c 290 /* 291 * We timed out waiting for the noisefloor to load, probably due to an 292 * in-progress rx. Simply return here and allow the load plenty of time 293 * to complete before the next calibration interval. We need to avoid 294 * trying to load -50 (which happens below) while the previous load is 295 * still in progress as this can cause rx deafness. Instead by returning 296 * here, the baseband nf cal will just be capped by our present 297 * noisefloor until the next calibration timer. 298 */ Since no other error wariants are present, this patch is checking only for (ret <= 0). Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-08-20Merge tag 'wireless-drivers-next-for-davem-2015-08-19' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== Major changes: ath10k: * add support for qca99x0 family of devices * improve performance of tx_lock * add support for raw mode (802.11 frame format) and software crypto engine enabled via a module parameter ath9k: * add fast-xmit support wil6210: * implement TSO support * support bootloader v1 and onwards iwlwifi: * Deprecate -10.ucode * Clean ups towards multiple Rx queues * Add support for longer CMD IDs. This will be required by new firmwares since we are getting close to the u8 limit. * bugfixes for the D0i3 power state * Add basic support for FTM * polish the Miracast operation * fix a few power consumption issues * scan cleanup * fixes for D0i3 system state * add paging for devices that support it * add again the new RBD allocation model * add more options to the firmware debug system * add support for frag SKBs in Tx ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20ath5k: use DECLARE_EWMAJohannes Berg
This reduces code size slightly (at least on x86/64) while also removing memory consumption by two unsigned long values for each ath5k device. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-19ath10k: free collected fw stats memory if .pull_fw_stats failsRaja Mani
If .pull_fw_stats() fails for some reason while processing fw stats event, collected pdev/vdev/peer stats just before the failure should be freed. This is unlikely to happen, just code review catch. Signed-off-by: Raja Mani <rmani@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-19ath10k: ensure pktlog disable cmd reaches fw before pdev suspendRaja Mani
Found incorrect sequence in ath10k_core_stop() where wmi pktlog disable cmd is passed from ath10k_debug_stop() to firmware immediately after wmi pdev suspend cmd. Firmware will not accept any wmi cmd after receiving wmi pdev suspend cmd. Fix this issue in ath10k_core_stop() by moving ath10k_debug_stop() just before sending pdev suspend cmd. So that pktlog disable cmd will get passed before pdev suspend cmd. Signed-off-by: Raja Mani <rmani@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-18ath9k: add correct MAC/BB name for ar9561Miaoqing Pan
MAC/BB name is"????" if the MAC/BB is unknown. Signed-off-by: Miaoqing Pan <miaoqing@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-08-17ath10k: fill in wmi 10.4 command handlers for addba/delba debug commandsVasanthakumar Thiagarajan
WMI 10.4 uses the same command interface as QCA988X for addba/delba debug wmi commands. Fill wmi_10_4_ops table with the functions used for QCA988X for these commands. With this change, the following debugfs entries can be used to configure the aggregation mode and to send addba request, addba response and delba respectively in manual aggregation mode for QCA99X0 chip. /sys/kernel/debug/ieee80211/phyX/netdev:wlanX/stations/XX:XX:XX:XX:XX:XX/aggr_mode /sys/kernel/debug/ieee80211/phyX/netdev:wlanX/stations/XX:XX:XX:XX:XX:XX/addba /sys/kernel/debug/ieee80211/phyX/netdev:wlanX/stations/XX:XX:XX:XX:XX:XX/addba_resp /sys/kernel/debug/ieee80211/phyX/netdev:wlanX/stations/XX:XX:XX:XX:XX:XX/delba Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-17ath10k: handle 10.4 firmware phyerr eventRaja Mani
Header format of 10.4 firmware phyerr event is not alligned with pre 10.4 firmware. Introduce new wmi handlers to parse 10.4 firmware specific phyerror event header. With changes covered in this patch, radar detection works on qca9x0 hw 2.0 which uses 10.4 firmware. Signed-off-by: Raja Mani <rmani@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-17ath10k: refactor phyerr event handlersRaja Mani
Existing phyerr event handlers directly uses phyerr header format (ie, struct wmi_phyerr and struct wmi_phyerr_event) in the code exactly on how firmware packs it. This is the problem in 10.4 fw specific phyerr event handling where it uses different phyerror header format. Before adding 10.4 specific handler, little bit of refactor is done in existing phyerr handlers. Two new abstracted structures (struct wmi_phyerr_ev_hdr_arg and struct wmi_phyerr_ev_arg) are introduced to remove dependency of using firmware specific header format in the code. So that firmware specific phyerror handlers can populate values to abstracted structures and the following code can use abstracted struct for further operation. .pull_phyerr_hdr is added newly to pull common phyerr header info like tsf, buf_len, number of phyerr packed. Existing .pull_phyerr handler is changed and called to parse every sub phyerrs in the event. Validated these refactoring on qca988x hw2.0 using fw 10.2.4 version. Signed-off-by: Raja Mani <rmani@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-17wil6210: match wait_for_completion_timeout return typeNicholas Mc Guire
Return type of wait_for_completion_timeout is unsigned long not int. As remain is exclusively used for wait_for_completion_timeout here its type is simply changed to unsigned long. API conformance testing for completions with coccinelle spatches are being used to locate API usage inconsistencies: ./drivers/net/wireless/ath/wil6210/wmi.c:827 int return assigned to unsigned long Patch was compile tested with x86_64_defconfig + CONFIG_ATH_CARDS=m, CONFIG_WIL6210=m Patch is against 4.1-rc3 (localversion-next is -next-20150514) Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-17ath10k: split ap/ibss wep key install processMichal Kazior
Apparently it's not safe to install both pairwise and groupwise keys on AP vdevs as it can cause traffic to stop working in some multi-vif (WPA+WEP) cases. Fixes: ce90b27128c2 ("ath10k: fix multiple key static wep with ibss") Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-17ath10k: add cycle/rx_clear counters frequency to hw_paramsVasanthakumar Thiagarajan
The frequency at which cycle/rx_clear counters are running might change from one target type to another. QCA99X0 is running the counters at 150Mhz while QCA9888X and QCA6174 are running at 88Mhz. Add a new entry to hw_params to store the target specific frequency and use it in msecs conversion. This change fixes inconsistent channel active/busy time. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-17ath10k: fix invalid survey reporting for QCA99X0Vasanthakumar Thiagarajan
There are three WMI_CHAN_INFO events reported per channel in QCA99X0 firmware. First one is a notification at the begining of the channel dwell time with cmd_flag as CHAN_INFO_START(cmd_flag = 0), second one is a notification at the end of the dwell time with cmd_flag CHAN_INFO_PRE_COMPLETE (cmd_flag = 2) and the third is the indication with CHAN_INFO_COMPLETE (cmd_flag = 1) which is the last indication for the channel. Since there is a new state before the completion, the handler is to fixed so that the counts are deducted from the ones reported with CHAN_INFO_START rather than the ones reported with CHAN_INFO_PRE_COMPLETE. Without this fix there will be lots of 0 msecs reported as active and busy time. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-17ath10k: wake up queue upon vif creationMichal Kazior
Vif's vdev_id is used as queue number. However due to the tx pausing design in ath10k it was possible for a new interface to be created with its tx queue stopped (via ieee80211_stop_queues). This could in turn leave the interface inoperable until ath10k_mac_tx_unlock() was called. This problem only affected multi-vif scenarios when new interfaces were created some time later after other interfaces have been running for some time and had Tx queue full at some point prior. Possible manifestation of the bug was authentication timeout for a client vif. Fixes: 96d828d45e16 ("ath10k: rework tx queue locking") Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-17ath10k: wake up offchannel queue properlyMichal Kazior
Once HTT Tx queue got full offchannel queue was stopped and never woken up again. This broke, e.g. P2P. This could be reproduced after running a lot of traffic enough to saturate 100% of the driver Tx queue and then trying to send offchannel traffic. Fixes: 96d828d45e16 ("ath10k: rework tx queue locking") Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-17Merge ath-next from ath.git. Major changes in ath10k:Kalle Valo
* add support for qca99x0 family of devices * improve performance of tx_lock * add support for raw mode (802.11 frame format) and software crypto engine enabled via a module parameter wil6210: * implement TSO support * support bootloader v1 and onwards
2015-08-13ath9k: match wait_for_completion_timeout return typeNicholas Mc Guire
Return type of wait_for_completion_timeout is unsigned long not int. As time_left is exclusively used for wait_for_completion_timeout here its type is simply changed to unsigned long. API conformance testing for completions with coccinelle spatches are being used to locate API usage inconsistencies: ./drivers/net/wireless/ath/ath9k/link.c:197 int return assigned to unsigned long Patch was compile tested with x86_64_defconfig + CONFIG_ATH_CARDS=m, Patch is against 4.1-rc3 (localversion-next is -next-20150514) Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-08-13ath9k_htc: wmi: match wait_for_completion_timeout return typeNicholas Mc Guire
Return type of wait_for_completion_timeout is unsigned long not int. As time_left is exclusively used for wait_for_completion_timeout here its type is simply changed to unsigned long. API conformance testing for completions with coccinelle spatches are being used to locate API usage inconsistencies: ./drivers/net/wireless/ath/ath9k/wmi.c:331 int return assigned to unsigned long Patch was compile tested with x86_64_defconfig + CONFIG_ATH_CARDS=m, CONFIG_ATH9K_HTC=m Patch is against 4.1-rc3 (localversion-next is -next-20150514) Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-08-13ath9k_htc: drv_init: match wait_for_completion_timeout return typeNicholas Mc Guire
Return type of wait_for_completion_timeout is unsigned long not int. As time_left is exclusively used for wait_for_completion_timeout here its type is simply changed to unsigned long. API conformance testing for completions with coccinelle spatches are being used to locate API usage inconsistencies: ./drivers/net/wireless/ath/ath9k/htc_drv_init.c:81 int return assigned to unsigned long Patch was compile tested with x86_64_defconfig + CONFIG_ATH_CARDS=m, CONFIG_ATH9K_HTC=m Patch is against 4.1-rc3 (localversion-next is -next-20150514) Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-08-13ath9k_htc: match wait_for_completion_timeout return typeNicholas Mc Guire
Return type of wait_for_completion_timeout is unsigned long not int. As time_left is exclusively used for wait_for_completion_timeout here its type is simply changed to unsigned long. API conformance testing for completions with coccinelle spatches are being used to locate API usage inconsistencies: ./drivers/net/wireless/ath/ath9k/htc_hst.c:171 int return assigned to unsigned long ./drivers/net/wireless/ath/ath9k/htc_hst.c:277 int return assigned to unsigned long ./drivers/net/wireless/ath/ath9k/htc_hst.c:206 int return assigned to unsigned long Patch was compile tested with x86_64_defconfig + CONFIG_ATH_CARDS=m, CONFIG_ATH9K_HTC=m Patch is against 4.1-rc3 (localversion-next is -next-20150514) Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-08-13ath10k: fix peer limit enforcementMichal Kazior
Firmware peer entries are involved in internal firmware vdev structures. This was not accounted for and could lead firmware to crash due to asking it to do more than it could. Fixes: 039a0051ec1a ("ath10k: allocate fw resources for iface combinations") Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-13ath10k: don't remove peer that doesn't existMichal Kazior
If peer creation failed during offchannel Tx the driver attempted to delete the peer nonetheless. This caused the ar->num_peers counter to be incorrectly decremented. This subsequently could cause the counter to drop below 0 and also eventually lead to firmware crash because host would think there are less peer entries created in firmware then there really were. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-13ath10k: fix hw reconfig on wow failureMichal Kazior
When WoWLAN resume fails with retval 1 mac80211 will attempt to reconfig the device in a similar manner when hw restart is requested. This wasn't handled properly and yielded call trace warnings and the device ended up not working. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-08-13ath10k: initialize fw_features varMichal Kazior
If firmware did not have any feature flags set the var would be left with values found on the stack (i.e. garbage) yielding print string like this: (...) features \xffffffa6m:^R\xfffffffbԂ\xffffffc4^E Fixes: b27bc5a40f91 ("ath10k: dump fw features during probing") Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>