[PATCH 2/2] ath10k: Don't iterate over not-sdata-in-driver interfaces.

2020-09-22 Thread greearb
From: Ben Greear This fixes possible crash scenario where interfaces that were not set up in the driver yet might still be iterated over. When originally debugged on the ath10k-ct driver, the crash looked like this: kernel BUG at /home/greearb/git/linux-4.7.dev.y/drivers/net/wireless/ath

[PATCH 1/2] mac80211: Support not iterating over not-sdata-in-driver ifaces

2020-09-22 Thread greearb
From: Ben Greear Allow drivers to request that interface-iterator does NOT iterate over interfaces that are not sdata-in-driver. This will allow us to fix crashes in ath10k (and possibly other drivers). To summarize Johannes' explanation: Consider add interface wlan0 add interface wlan1

[PATCH v2] ath10k: Per-chain rssi should sum the secondary channels

2019-12-17 Thread greearb
From: Ben Greear This makes per-chain RSSI be more consistent between HT20, HT40, HT80. Instead of doing precise log math for adding dbm, I did a rough estimate, it seems to work good enough. Tested on ath10k-ct 9984 firmware. Signed-off-by: Ben Greear --- v2: Should fix wave-1 rssi

[PATCH] ath10k: Per-chain rssi should sum the secondary channels

2019-12-16 Thread greearb
From: Ben Greear This makes per-chain RSSI be more consistent between HT20, HT40, HT80. Instead of doing precise log math for adding dbm, I did a rough estimate, it seems to work good enough. Tested on ath10k-ct 9984 firmware. Signed-off-by: Ben Greear ---

[PATCH] ath10k: Fix setting txpower to zero.

2019-12-12 Thread greearb
From: Ben Greear Do not ignore 0 txpower setting unless the vif is of type p2p. This should fix regression in: commit 88407beb1b1462f706a1950a355fd086e1c450b6 Author: Ryan Hsu Date: Tue Dec 13 14:55:19 2016 -0800 ath10k: fix incorrect txpower set by P2P_DEVICE interface Tested

[PATCH v2] ath10k: fix use-after-free of netbufs_ring

2018-08-01 Thread greearb
netbufs_ring: 7e01aa60 [ 133.625808] WARNING: CPU: 3 PID: 289 at /home/greearb/git/linux-4.16.dev.y/drivers/net/wireless/ath/ath10k/htt_rx.c:304 ath10k_htt_rx_free+0x33e/0x7] [ 133.625810] Modules linked in: bonding veth vrf 8021q garp mrp stp llc fuse macvlan pktgen nfsv3 nfs fscache

[PATCH] ath10k: fix use-after-free of netbufs_ring

2018-07-31 Thread greearb
From: Ben Greear When firmware crashes in certain ways, it appears to crash the kernel often. One of the problems is some way to access the netbufs_ring after it is freed. I am not sure exactly how that happens, but setting it to NULL fixes the problem. The splat looked like this when I was

[PATCH] ath10k: Protect against buggy firmware.

2018-07-30 Thread greearb
From: Ben Greear While testing some buggy wave-2 firmware, I was seeing full kernel crashes. Adding this additional check keeps the kernel from crashing. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/htt_rx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH v3 2/3] ath10k: Don't try un-supported idle_ps_config command.

2018-07-26 Thread greearb
From: Ben Greear The warning the the logs does not give user a clue as to what command is failing, so it is worth it to check for un-supported command before trying the call. And add return-code to survey error message. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/mac.c | 14

[PATCH v3 3/3] ath10k: Support survey dump for ath10k-ct 10.1 firmware.

2018-07-26 Thread greearb
From: Ben Greear Recent ath10k-ct 10.1 firmware supports survey results, and advertises the appropriate service flags. This confuses the ath10k driver because the 10.1 wmi commands are not set up for survey information. So, this patch adds support for handling survey information. Example

[PATCH v3 1/3] ath10k: Add ath10k-ct firmware feature flags and descriptions.

2018-07-26 Thread greearb
From: Ben Greear These feature flags are used by ath10k-ct firmware. Add these so we can use them in future patches and so there are no warnings about feature flags on loading ath10k-ct firmware. Signed-off-by: Ben Greear --- No significant changes since v2 (though I rebased against latest

[RFC] ath10k: Support configuring firmware tx-retry counter.

2018-07-16 Thread greearb
From: Ben Greear Firmware already supports this, so just enable the path to configure the vdev parameter. One potential issue: The firmware (10.1 at least) defaults to 2, and the mac80211 stack defaults to 4. So applying this patch would change the firmware behaviour regardless of user

[PATCH v2] ath10k: fix vdev-start timeout on error

2018-07-13 Thread greearb
From: Ben Greear The vdev-start-response message should cause the completion to fire, even in the error case. Otherwise, the user still gets no useful information and everything is blocked until the timeout period. Add some warning text to print out the invalid status code to aid debugging,

[PATCH] ath10k: fix vdev-start timeout on error

2018-07-13 Thread greearb
From: Ben Greear The vdev-start-response message should cause the completion to fire, even in the error case. Otherwise, the user still gets no useful information and everything is blocked until the timeout period. Add some warning text to print out the invalid status code to aid debugging.

[PATCH] ath10k: Don't allow tx logic when state is not ON.

2018-06-20 Thread greearb
as: (gdb) l *(ath10k_htt_tx_32+0x18ba) 0x74a9a is in ath10k_htt_tx_32 (/home/greearb/git/linux-4.16.dev.y/drivers/net/wireless/ath/ath10k/htt_tx.c:1257). 1252 sizeof(struct htt_msdu_ext_desc)); 1253frags = (struct htt_data_tx_desc_frag

[PATCH] ath10k: Protect ath10k_htt_rx_ring_free with rx_ring.lock

2018-06-07 Thread greearb
From: Ben Greear While debugging driver crashes related to a buggy firmware crashing under load, I noticed that ath10k_htt_rx_ring_free could be called without being under lock. I'm not sure if this is the root cause of the crash or not, but it seems prudent to protect it. Signed-off-by: Ben

[PATCH v2 2/3] ath10k: Don't try un-supported idle_ps_config command.

2018-05-14 Thread greearb
From: Ben Greear The warning the the logs does not give user a clue as to what command is failing, so it is worth it to check for un-supported command before trying the call. And add return-code to survey error message. Signed-off-by: Ben Greear

[PATCH v2 3/3] ath10k: Support survey dump for ath10k-ct 10.1 firmware.

2018-05-14 Thread greearb
From: Ben Greear Recent ath10k-ct 10.1 firmware supports survey results, and advertises the appropriate service flags. This confuses the ath10k driver because the 10.1 wmi commands are not set up for survey information. So, this patch adds support for handling survey

[PATCH v2 1/3] ath10k: Add ath10k-ct firmware feature flags and descriptions.

2018-05-14 Thread greearb
From: Ben Greear These feature flags are used by ath10k-ct firmware. Add these so we can use them in future patches and so there are no warnings about feature flags on loading ath10k-ct firmware. Signed-off-by: Ben Greear --- v2: Fix warings

[PATCH 3/3] ath10k: Support survey dump for ath10k-ct 10.1 firmware.

2018-05-11 Thread greearb
From: Ben Greear Recent ath10k-ct 10.1 firmware supports survey results, and advertises the appropriate service flags. This confuses the ath10k driver because the 10.1 wmi commands are not set up for survey information. So, this patch adds support for handling survey

[PATCH 1/3] ath10k: Add ath10k-ct firmware feature flags and descriptions.

2018-05-11 Thread greearb
From: Ben Greear These feature flags are used by ath10k-ct firmware. Add these so we can use them in future patches and so there are no warings about feature flags on loading ath10k-ct firmware. Signed-off-by: Ben Greear ---

[PATCH 2/3] ath10k: Don't try un-supported idle_ps_config command.

2018-05-11 Thread greearb
From: Ben Greear The warning the the logs does not give user a clue as to what command is failing, so it is worth it to check for un-supported command before trying the call. And add return-code to survey error message. Signed-off-by: Ben Greear

[PATCH v2 3/3] ath10k: Support ethtool gstats2 API.

2018-04-19 Thread greearb
From: Ben Greear Skip a firmware stats update when calling code indicates the stats refresh is not needed. Signed-off-by: Ben Greear --- v2: Convert to new flag name, attempt to fix build when there is not DEBUGFS enabled for ath10k.

[PATCH v2 2/3] mac80211: Add support for ethtool gstats2 API.

2018-04-19 Thread greearb
From: Ben Greear This enables users to request fewer stats to be refreshed in cases where firmware does not need to be probed. Signed-off-by: Ben Greear --- v2: No changes. include/net/mac80211.h| 6 ++ net/mac80211/driver-ops.h |

[PATCH 1/3] ethtool: Support ETHTOOL_GSTATS2 command.

2018-04-17 Thread greearb
From: Ben Greear This is similar to ETHTOOL_GSTATS, but it allows you to specify flags. These flags can be used by the driver to decrease the amount of stats refreshed. In particular, this helps with ath10k since getting the firmware stats can be slow. Signed-off-by:

[PATCH 3/3] ath10k: Support ethtool gstats2 API.

2018-04-17 Thread greearb
From: Ben Greear Skip a firmware stats update when calling code indicates the stats refresh is not needed. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/debug.c | 18 +++--- drivers/net/wireless/ath/ath10k/debug.h |

[PATCH 2/3] mac80211: Add support for ethtool gstats2 API.

2018-04-17 Thread greearb
From: Ben Greear This enables users to request fewer stats to be refreshed in cases where firmware does not need to be probed. Signed-off-by: Ben Greear --- include/net/mac80211.h| 6 ++ net/mac80211/driver-ops.h | 9 +++--

[RFC] ethtool: Support ETHTOOL_GSTATS2 command.

2018-03-07 Thread greearb
From: Ben Greear This is similar to ETHTOOL_GSTATS, but it allows you to specify a 'level'. This level can be used by the driver to decrease the amount of stats refreshed. In particular, this helps with ath10k since getting the firmware stats can be slow.

[PATCH] ath10k: Clear rx status enc_flags

2018-02-28 Thread greearb
From: Ben Greear Otherwise, rx rate encodings are wrong as SGI flag may be set when it should not be. Maybe other issues as well. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/htt_rx.c | 1 + 1 file changed, 1 insertion(+)

[PATCH] ath10k: Attempt to work around napi_synchronize hang.

2018-02-28 Thread greearb
From: Ben Greear Calling napi_disable twice in a row (w/out starting it and/or without having NAPI active leads to deadlock because napi_disable sets NAPI_STATE_SCHED and NAPI_STATE_NPSVC when it returns, as far as I can tell. So, guard this call to napi_disable. I

[RFC] ath10k: Attempt to work around napi_synchronize hang.

2018-02-27 Thread greearb
From: Ben Greear Calling napi_disable twice in a row (w/out starting it and/or without having NAPI active leads to deadlock because napi_disable sets NAPI_STATE_SCHED and NAPI_STATE_NPSVC when it returns, as far as I can tell. So, guard this call to napi_disable. I

[PATCH v2] ath10k: Support mgt frame per-chain rssi

2018-02-06 Thread greearb
From: Ben Greear This provides per-chain rssi for management frames received over wmi. Signed-off-by: Ben Greear --- v2: Fix 'rssh' typo in commit message. drivers/net/wireless/ath/ath10k/wmi.c | 21 -

[PATCH] ath10k: Support mgt frame per-chain rssi

2018-02-01 Thread greearb
From: Ben Greear This provides per-chain rssh for management frames received over wmi. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/wmi.c | 21 - drivers/net/wireless/ath/ath10k/wmi.h | 1 + 2 files

[PATCH] ath10k: Support use of channel 173

2018-01-02 Thread greearb
From: Ben Greear The India regulatory domain allows CH 173, so add that to the available channel list. I verified basic connectivity between a 9880 and 9984 NIC. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/core.h | 3 ++-

[PATCH] ath10k: Report and display mem use for 10.4, 10.2 firmware.

2018-01-02 Thread greearb
From: Ben Greear The 10.4 'mem' reporting struct had the wrong order vs the 10.2, so just make a new _10_4 specific struct. Save these reported values and make them available via debugfs. Stock 10.4 firmware probably reports zero values for this currently, but they

[PATCH] ath10k: Report rx-timeout errors.

2018-01-02 Thread greearb
From: Ben Greear The rx pdev related stats do not match the 10.4 firmware stats struct. The pdev-rx-timeout field needs to be added. Stock firmware may not actually ever increment that value, but this should at least help the other stats be aligned properly.

[PATCH] ath10k: Fix invalid STS_CAP_OFFSET_MASK.

2017-11-14 Thread greearb
From: Ben Greear The 10.4 firmware defines this as a 3-bit field, as does the mac80211 stack. The 4th bit is defined as CONF_IMPLICIT_BF at least in the firmware header I have seen. This patch fixes the ath10k wmi header to match the firmware. Signed-off-by: Ben

[PATCH] ath10k: Fix offchannel tx failure when no ath10k_mac_tx_frm_has_freq

2017-10-17 Thread greearb
From: Ben Greear This bug appears to have been added between 4.0 (which works for us), and 4.4, which does not work. I think this is because the tx-offchannel logic gets in a loop when ath10k_mac_tx_frm_has_freq(ar) is false, so pkt is never actually sent to the

[PATCH v2] ath10k: Retry pci probe on failure.

2017-10-03 Thread greearb
From: Ben Greear This works around a problem we see when sometimes the wifi NIC does not respond the first time. This seems to happen especially often on some of the 9984 NICs in mid-range platforms. Signed-off-by: Ben Greear --- v2: Change

[PATCH] ath10k: Store coverage-class in case firmware is not booted.

2017-10-03 Thread greearb
From: Ben Greear This way, we can apply the values when the NIC does come up. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/hw.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git

[PATCH] ath10k: Retry pci probe on failure.

2017-09-26 Thread greearb
From: Ben Greear This works around a problem we see when sometimes the wifi NIC does not respond the first time. This seems to happen especially often on some of the 9984 NICs in mid-range platforms. Signed-off-by: Ben Greear ---

[PATCH 1/3] ath10k: Increase BMI timeout.

2017-05-15 Thread greearb
From: Ben Greear When testing a 9888 chipset NIC, I notice it often takes almost 2 seconds, and then many times OTP fails, probably due to the two-second timeout. [ 2269.841842] ath10k_pci :05:00.0: bmi cmd took: 1984 jiffies (HZ: 1000), rv: 0 [ 2273.608185]

[PATCH 2/3] ath10k: Fix napi related crash when otp fails.

2017-05-15 Thread greearb
ed. So, napi is not released. A bit later, maybe, the driver succeeds in loading and then we have a BUG splat. [ cut here ] kernel BUG at /home/greearb/git/linux-4.9.dev.y/include/linux/netdevice.h:515! invalid opcode: [#1] PREEMPT SMP Modules linked in: nf_conntrack_n

[PATCH 3/3] ath10k: Log when longer bmi cmds happen.

2017-05-15 Thread greearb
From: Ben Greear This lets one have a clue that maybe timeouts are happening when we just aren't waiting long enough. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/pci.c | 25 +++-- 1 file changed, 19

[PATCH] ath10k: Configure rxnss_override for 10.4 firmware.

2017-02-10 Thread greearb
From: Ben Greear QCA9984 hardware can do 4x4 at 80Mhz, but only 2x2 at 160Mhz. First, report this to user-space by setting the max-tx-speed and max-rx-speed vht capabilities. Second, if the peer rx-speed is configured, and if we are in 160 or 80+80 mode, and the peer

[PATCH] ath10k: free host-mem with DMA_BIRECTIONAL flag.

2016-12-05 Thread greearb
From: Ben Greear Hopefully this fixes the problem reported by Kalle: Noticed this in my log, but I don't have time to investigate this in detail right now: [ 413.795346] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 414.158755] IPv6: ADDRCONF(NETDEV_CHANGE):

[PATCH 1/2] mac80211: do not iterate active interfaces when in re-configure

2016-12-01 Thread greearb
on-nowait: arvif: 8801ce97e320 ar: (null) arvif->magic: 0x87560001 [ cut here ] kernel BUG at /home/greearb/git/linux-4.7.dev.y/drivers/net/wireless/ath/ath10k/wmi.c:1781! invalid opcode: [#1] PREEMPT SMP KASAN Modules linked in: nf_conntrack_netlink

[PATCH 2/2] ath10k: work-around for stale txq in ar->txqs

2016-12-01 Thread greearb
From: Ben Greear Due to reasons I do not fully understand, when ath10k firmware crashes when trying to bring up lots of vdevs, the ar->txqs may still have references to the txq struct when mac80211 re-adds the network devices. The device add logic was re-initializing

ath10k: wmi-alloc-chunk should use DMA_BIDIRECTIONAL.

2016-11-29 Thread greearb
From: Ben Greear These memory chunks are often used as 'swap' by the NIC, so it will be both reading and writing to these areas. This seems to fix errors like this on my x86-64 machine: kernel: DMAR: DMAR:[DMA Write] Request device [05:00.0] fault addr ff5de000

[PATCH] ath10k: ensure pdev sta kickout threshold is set.

2016-09-02 Thread greearb
From: Ben Greear The station kickout threshold is a pdev value, not per vdev, so it should be set all the time, not just when vdev is an AP. This should fix setting the station kickout threshold when using ibss interfaces. Signed-off-by: Ben Greear

[PATCH 1/3] ath10k: Ensure there are no stale ar->txqs entries.

2016-08-18 Thread greearb
From: Ben Greear I was seeing kernel crashes due to accessing freed memory while debugging a 9984 firmware that was crashing often. This patch fixes the crashes. I am not certain if there is a better way or not. Signed-off-by: Ben Greear ---

[PATCH 3/3] ath10k: Improve logging message.

2016-08-18 Thread greearb
From: Ben Greear Helps to know the sta pointer. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/mac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c

[PATCH 2/3] ath10k: Grab rcu_read_lock before the txqs spinlock.

2016-08-18 Thread greearb
From: Ben Greear I was seeing some spin-lock hangs in this area of the code, and it seems more proper to do the rcu-read-lock outside of the spin lock. I am not sure how much this matters, however. Signed-off-by: Ben Greear ---

[PATCH v2 18/21] ath10k: Note limitation on beaconing vdevs.

2016-05-11 Thread greearb
From: Ben Greear This only pertains to CT firmware, as standard firmware can't do anywhere near this many vdevs anyway. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/mac.c | 16 1 file changed, 16 insertions(+)

[PATCH v2 08/21] ath10k: make firmware text debug messages more verbose.

2016-05-11 Thread greearb
From: Ben Greear There are not many of these messages producted by the firmware, but they are generally fairly useful, so print them at info level. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/wmi.c | 2 +- 1 file changed, 1

[PATCH v2 06/21] ath10k: save firmware stacks upon firmware crash

2016-05-11 Thread greearb
From: Ben Greear Should help debug firmware crashes, and give users a way to provide some useful debug reports to firmware developers. Signed-off-by: Ben Greear Signed-off-by: Kalle Valo ---

[PATCH v2 16/21] ath10k: Support 32+ stations.

2016-05-11 Thread greearb
From: Ben Greear Support up to 32 stations when using CT firmware. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/core.c | 14 +++ drivers/net/wireless/ath/ath10k/hw.h | 6 + drivers/net/wireless/ath/ath10k/mac.c

[PATCH v2 02/21] ath10k: fix typo in logging message

2016-05-11 Thread greearb
From: Ben Greear Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index

[PATCH v2 11/21] ath10k: add fw-powerup-fail to ethtool stats.

2016-05-11 Thread greearb
From: Ben Greear This gives user-space a normal-ish way to detect that firmware has failed to start and that a reboot is probably required. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/core.h | 1 +

[PATCH v2 10/21] ath10k: support logging ath10k_info as KERN_DEBUG

2016-05-11 Thread greearb
From: Ben Greear Helps keep messages off of (serial) console when that is desired. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/debug.c | 5 - drivers/net/wireless/ath/ath10k/debug.h | 6 ++ 2 files changed, 10

[PATCH v2 15/21] ath10k: support CT firmware flag.

2016-05-11 Thread greearb
From: Ben Greear Add placeholder so CT firmware can more easily co-exist with upstream kernel. CT firmware should be backwards compatible with existing kernels, but it also has many new features. Subsequent patches, if acceptable for upstream, can enable and further

[PATCH v2 01/21] ath10k: Fix crash related to printing features.

2016-05-11 Thread greearb
From: Ben Greear This looks like a regression from c4cdf753 (move fw_features to struct ath10k_fw_file) Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 17/21] ath10k: Enable detecting failure to install key in firmware (CT).

2016-05-11 Thread greearb
From: Ben Greear CT firmware has been modified so that it will always return a response message when user requests to add a key, even if the key could not actually be added. Upstream firmware may assert or just not respond in a failure case. This change should be

[PATCH v2 05/21] ath10k: save firmware debug log messages.

2016-05-11 Thread greearb
From: Ben Greear They may be dumped through the firmware dump debugfs file. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/core.h | 18 ++ drivers/net/wireless/ath/ath10k/debug.c | 97 +++-

[PATCH v2 19/21] ath10k: Enable adhoc mode for CT firmware.

2016-05-11 Thread greearb
From: Ben Greear CT firmware can support IBSS mode, so allow users to configure this. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/mac.c | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH v2 12/21] ath10k: Support up to 64 vdevs.

2016-05-11 Thread greearb
From: Ben Greear The (1 << x) - 1 trick won't work when you are trying to fill up all 64 bits, so add special case for that. And, move the limits to the per-nic structure instead of per-driver to allow better dynamic use of the limits. Signed-off-by: Ben Greear

[PATCH v2 13/21] ath10k: Document cycle count related counters.

2016-05-11 Thread greearb
From: Ben Greear They are not necessarily named in an intuitive manner, so at least add some comments to help the next person. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/core.h | 8

[PATCH v2 09/21] ath10k: print fw debug messages in hex.

2016-05-11 Thread greearb
From: Ben Greear This allows user-space tools to decode debug-log messages by parsing dmesg or /var/log/messages. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/debug.c | 72 +

[PATCH v2 03/21] ath10k: Allow changing ath10k debug mask at runtime.

2016-05-11 Thread greearb
From: Ben Greear Using debugfs. More convenient than module options in some cases. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/debug.c | 62 + 1 file changed, 62 insertions(+) diff --git

[PATCH v2 04/21] ath10k: rate-limit packet tx errors

2016-05-11 Thread greearb
From: Ben Greear When firmware crashes, stack can continue to send packets for a bit, and existing code was spamming logs. So, rate-limit the error message for tx failures. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/mac.c |

[PATCH 00/21] ath10k patches, generic and CT firmware related.

2016-05-09 Thread greearb
From: Ben Greear These are against wireless-testing from a few days ago. Here are a bunch of ath10k patches. First one is a crash fix. Next few are at least somewhat useful for generic firmware, and more useful for CT firmware. Much of it is related to better

[PATCH 15/21] ath10k: support CT firmware flag.

2016-05-09 Thread greearb
From: Ben Greear Add placeholder so CT firmware can more easily co-exist with upstream kernel. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/core.c | 1 + drivers/net/wireless/ath/ath10k/core.h | 3 +++ 2 files changed, 4

[PATCH 13/21] ath10k: Document cycle count related counters.

2016-05-09 Thread greearb
From: Ben Greear They are not necessarily named in an intuitive manner, so at least add some comments to help the next person. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/core.h | 8 1 file changed, 4 insertions(+),

[PATCH 05/21] ath10k: save firmware debug log messages.

2016-05-09 Thread greearb
From: Ben Greear They may be dumped through the firmware dump debugfs file. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/core.h | 18 ++ drivers/net/wireless/ath/ath10k/debug.c | 97 +++-

[PATCH 14/21] ath10k: Add tx/rx bytes, cycle counters to ethtool stats.

2016-05-09 Thread greearb
From: Ben Greear The firmware does not offer tx/rx bytes counters, so just keep track of it in the driver. For the cycle counters: Note these counters are since the chip reset, though the counters wrap often. When cycle-counters counter overflows on certain hardware,

[PATCH 01/21] ath10k: Fix crash related to printing features.

2016-05-09 Thread greearb
From: Ben Greear This looks like a regression from c4cdf753 (move fw_features to struct ath10k_fw_file) Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 12/21] ath10k: Support up to 64 vdevs.

2016-05-09 Thread greearb
From: Ben Greear The (1 << x) - 1 trick won't work when you are trying to fill up all 64 bits, so add special case for that. And, move the limits to the per-nic structure instead of per-driver to allow better dynamic use of the limits. Signed-off-by: Ben Greear

[PATCH 17/21] ath10k: Enable detecting failure to install key in firmware (CT).

2016-05-09 Thread greearb
From: Ben Greear CT firmware has been modified so that it will always return a response message when user requests to add a key, even if the key could not actually be added. Upstream firmware may assert or just not respond in a failure case. This change should be

[PATCH 16/21] ath10k: Support 32+ stations.

2016-05-09 Thread greearb
From: Ben Greear Support up to 32 stations when using CT firmware. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/core.c | 14 +++ drivers/net/wireless/ath/ath10k/hw.h | 6 + drivers/net/wireless/ath/ath10k/mac.c

[PATCH 08/21] ath10k: make firmware text debug messages more verbose.

2016-05-09 Thread greearb
From: Ben Greear There are not many of these messages producted by the firmware, but they are generally fairly useful, so print them at info level. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/wmi.c | 2 +- 1 file changed, 1

[PATCH 20/21] ath10k: read firmware crash over ioread32 if CE fails.

2016-05-09 Thread greearb
From: Ben Greear This might work around problem where sometimes host cannot access firmware crash over normal CE transport. Requires CT firmware with matching logic in it's assert handler (-13 and higher releases). Signed-off-by: Ben Greear

[PATCH 21/21] ath10k: Read dbglog buffers over register ping-pong.

2016-05-09 Thread greearb
From: Ben Greear This gives much better debugging capability when debugging crashes in the firmware that cause CE transport loss. (Such as AXI errors). Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/pci.c | 47

[PATCH 09/21] ath10k: print fw debug messages in hex.

2016-05-09 Thread greearb
From: Ben Greear This allows user-space tools to decode debug-log messages by parsing dmesg or /var/log/messages. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/debug.c | 72 +

[PATCH 10/21] ath10k: support logging ath10k_info as KERN_DEBUG

2016-05-09 Thread greearb
From: Ben Greear Helps keep messages off of (serial) console when that is desired. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/debug.c | 5 - drivers/net/wireless/ath/ath10k/debug.h | 6 ++ 2 files changed, 10

[PATCH 19/21] ath10k: Enable adhoc mode for CT firmware.

2016-05-09 Thread greearb
From: Ben Greear CT firmware can support IBSS mode, so allow users to configure this. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/mac.c | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH 03/21] ath10k: Support setting debug mask from driver code.

2016-05-09 Thread greearb
From: Ben Greear Might want to turn off verbose debug as soon as you see a firmware crash, for instance. Helps keep dmesg output from over-running the stuff you care about. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/debug.c

[PATCH 11/21] ath10k: add fw-powerup-fail to ethtool stats.

2016-05-09 Thread greearb
From: Ben Greear This gives user-space a normal-ish way to detect that firmware has failed to start and that a reboot is probably required. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/core.h | 1 +

[PATCH 18/21] ath10k: Note limitation on beaconing vdevs.

2016-05-09 Thread greearb
From: Ben Greear This only pertains to CT firmware, as standard firmware can't do anywhere near this many vdevs anyway. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/mac.c | 16 1 file changed, 16 insertions(+)

[PATCH 06/21] ath10k: save firmware stacks upon firmware crash

2016-05-09 Thread greearb
From: Ben Greear Should help debug firmware crashes, and give users a way to provide some useful debug reports to firmware developers. Signed-off-by: Ben Greear Signed-off-by: Kalle Valo ---

[PATCH 04/21] ath10k: rate-limit packet tx errors

2016-05-09 Thread greearb
From: Ben Greear When firmware crashes, stack can continue to send packets for a bit, and existing code was spamming logs. So, rate-limit the error message for tx failures. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/mac.c |

[PATCH v2 4/5] ath10k: Clean up peer when sta goes away.

2016-04-01 Thread greearb
From: Ben Greear If WMI and/or firmware has issues removing the peer object, then we still need to clean up the peer object in the driver. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/mac.c | 12 ++-- 1 file changed,

[PATCH v2 3/5] ath10k: Add WARN_ON if we over-write peer-map pointer.

2016-04-01 Thread greearb
From: Ben Greear Not sure this can happen, but seems like a reasonable sanity check. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/txrx.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v2 2/5] ath10k: Ensure peer_map references are cleaned up.

2016-04-01 Thread greearb
From: Ben Greear While debugging OS crashes due to firmware crashes, I enabled kasan, and it noticed that peer objects were being used-after-freed. Looks like there are two places we could be leaving stale references in the peer-map, so clean that up. Signed-off-by:

[PATCH v2 5/5] ath10k: Fix deadlock when peer cannot be created.

2016-04-01 Thread greearb
From: Ben Greear We must not attempt to send WMI packets while holding the data-lock, as it may deadlock: BUG: sleeping function called from invalid context at drivers/net/wireless/ath/ath10k/wmi.c:1824 in_atomic(): 1, irqs_disabled(): 0, pid: 2878, name:

[PATCH v2 1/5] ath10k: Ensure txrx-compl-task is stopped when cleaning htt-tx.

2016-04-01 Thread greearb
From: Ben Greear Otherwise, the txrx-compl-task may access some bad memory? Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/htt_tx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c

[PATCH] ath10k: Clean up peer when sta goes away.

2016-03-31 Thread greearb
From: Ben Greear If WMI and/or firmware has issues removing the peer object, then we still need to clean up the peer object in the driver. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/mac.c | 10 -- 1 file changed, 8

[PATCH 3/3] ath10k: Add BUG_ON if we over-write peer-map pointer.

2016-03-31 Thread greearb
From: Ben Greear Not sure this can happen, but seems like a reasonable sanity check. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/txrx.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 1/3] ath10k: Ensure txrx-compl-task is stopped when cleaning htt-tx.

2016-03-31 Thread greearb
From: Ben Greear Otherwise, the txrx-compl-task may access some bad memory? Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/htt_tx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c

[PATCH 2/3] ath10k: Ensure peer_map references are cleaned up.

2016-03-31 Thread greearb
From: Ben Greear While debugging OS crashes due to firmware crashes, I enabled kasan, and it noticed that peer objects were being used-after-freed. Looks like there are two places we could be leaving stale references in the peer-map, so clean that up. Signed-off-by:

[PATCH] wmi: Retry if CE logic is out of buffers.

2016-03-30 Thread greearb
From: Ben Greear I believe the CE tx buffer reaping logic may be able to fall behind in certain cases (lots of serial console logging, lots of WMI messages). Dropping WMI messages is a very serious problem, so it is worth waiting a bit in hopes the tx buffers become

  1   2   >