<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/wireless/ath/ath11k/peer.c, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-05-11T14:11:08Z</updated>
<entry>
<title>wifi: ath11k: fix SAC bug on peer addition with sta band migration</title>
<updated>2023-05-11T14:11:08Z</updated>
<author>
<name>Christian Marangi</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2023-02-09T22:26:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2c00e660d48cb95239c563dffbf00d62812db360'/>
<id>urn:sha1:2c00e660d48cb95239c563dffbf00d62812db360</id>
<content type='text'>
[ Upstream commit 60b7d62ba8cdbd073997bff0f1cdae8d844002c0 ]

Fix sleep in atomic context warning detected by Smatch static checker
analyzer.

Following the locking pattern for peer_rhash_add lock tbl_mtx_lock mutex
always even if sta is not transitioning to another band.
This is peer_add function and a more secure locking should not cause
performance regression.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1

Fixes: d673cb6fe6c0 ("wifi: ath11k: fix peer addition/deletion error on sta band migration")
Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;quic_kvalo@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230209222622.1751-1-ansuelsmth@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>wifi: ath11k: fix peer addition/deletion error on sta band migration</title>
<updated>2022-09-24T13:42:29Z</updated>
<author>
<name>Christian 'Ansuel' Marangi</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2022-09-22T07:35:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d673cb6fe6c03b2be157cc6c5db40481828d282d'/>
<id>urn:sha1:d673cb6fe6c03b2be157cc6c5db40481828d282d</id>
<content type='text'>
This patch try to fix the following error.

Wed Jun  1 22:19:30 2022 kern.warn kernel: [  119.561227] ath11k c000000.wifi: peer already added vdev id 0 req, vdev id 1 present
Wed Jun  1 22:19:30 2022 kern.warn kernel: [  119.561282] ath11k c000000.wifi: Failed to add peer: 28:c2:1f:xx:xx:xx for VDEV: 0
Wed Jun  1 22:19:30 2022 kern.warn kernel: [  119.568053] ath11k c000000.wifi: Failed to add station: 28:c2:1f:xx:xx:xx for VDEV: 0
Wed Jun  1 22:19:31 2022 daemon.notice hostapd: wlan2: STA 28:c2:1f:xx:xx:xx IEEE 802.11: Could not add STA to kernel driver
Wed Jun  1 22:19:31 2022 daemon.notice hostapd: wlan2: STA 28:c2:1f:xx:xx:xx IEEE 802.11: did not acknowledge authentication response
Wed Jun  1 22:19:31 2022 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED 28:c2:1f:xx:xx:xx
Wed Jun  1 22:19:31 2022 daemon.info hostapd: wlan1: STA 28:c2:1f:xx:xx:xx IEEE 802.11: disassociated due to inactivity
Wed Jun  1 22:19:32 2022 daemon.info hostapd: wlan1: STA 28:c2:1f:xx:xx:xx IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)

To repro this:
- Have 2 Wifi with the same bssid and pass on different band (2.4 and
5GHz)
- Enable 802.11r Fast Transaction with same mobility domain
- FT Protocol: FT over the Air
From a openwrt system issue the command (with the correct mac)
ubus call hostapd.wlan1 wnm_disassoc_imminent '{"addr":"28:C2:1F:xx:xx:xx"}'
Notice the log printing the errors.

The cause of this error has been investigated and we found that this is
related to the WiFi Fast Transaction feature. We observed that this is
triggered when the router tells the device to change band. In this case
the device first auth to the other band and then the disconnect path
from the prev band is triggered.
This is problematic with the current rhash implementation since the
addrs is used as key and the logic of "adding first, delete later"
conflicts with the rhash logic.
In fact peer addition will fail since the peer is already added and with
that fixed a peer deletion will cause unitended effect by removing the
peer just added.

Current solution to this is to add additional logic to the peer delete,
make sure we are deleting the correct peer taken from the rhash
table (and fallback to the peer list) and for the peer add logic delete
the peer entry for the rhash list before adding the new one (counting as
an error only when a peer with the same vlan_id is asked to be added).

With this change, a sta can correctly transition from 2.4GHz and 5GHZ
with no drop and no error are printed.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1

Fixes: 7b0c70d92a43 ("ath11k: Add peer rhash table support")
Signed-off-by: Christian 'Ansuel' Marangi &lt;ansuelsmth@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;quic_kvalo@quicinc.com&gt;
Link: https://lore.kernel.org/r/20220603164559.27769-1-ansuelsmth@gmail.com
</content>
</entry>
<entry>
<title>ath11k: Add peer rhash table support</title>
<updated>2022-03-25T10:31:10Z</updated>
<author>
<name>Karthikeyan Periyasamy</name>
<email>quic_periyasa@quicinc.com</email>
</author>
<published>2022-03-23T09:14:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7b0c70d92a435913f6e11d6a248b935697e8a3eb'/>
<id>urn:sha1:7b0c70d92a435913f6e11d6a248b935697e8a3eb</id>
<content type='text'>
When more clients (128) are connected, the UL data traffic
KPI measurement is low compared to single client. This issue
is due to more CPU cycles spent on the peer lookup operation
with more clients. So reduce the peer lookup operation by
modifying the linear based lookup operation into the rhash
based lookup operation. This improve the peak throughput
measurement. Since this is a software algorithm change, it is
applicable for all the platforms.

TCP UL 128 Clients test case Observation (64bit system):
Previous: ~550 Mbps
Now	: ~860 Mbps

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01067-QCAHKSWPL_SILICONZ-1

Signed-off-by: Karthikeyan Periyasamy &lt;quic_periyasa@quicinc.com&gt;
Signed-off-by: Kalle Valo &lt;quic_kvalo@quicinc.com&gt;
Link: https://lore.kernel.org/r/1644036628-5334-1-git-send-email-quic_periyasa@quicinc.com
</content>
</entry>
<entry>
<title>ath11k: Refactor the peer delete</title>
<updated>2022-03-21T10:54:35Z</updated>
<author>
<name>Karthikeyan Periyasamy</name>
<email>quic_periyasa@quicinc.com</email>
</author>
<published>2022-02-28T04:54:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=997dc60f0855b39aec0400511b37d65781da9255'/>
<id>urn:sha1:997dc60f0855b39aec0400511b37d65781da9255</id>
<content type='text'>
Introduce new helper function for peer delete to reuse this logic
in all peer cleanup procedures. Found this in code review.
Also this change is applicable for all the platform.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01067-QCAHKSWPL_SILICONZ-1

Signed-off-by: Karthikeyan Periyasamy &lt;quic_periyasa@quicinc.com&gt;
Signed-off-by: Kalle Valo &lt;quic_kvalo@quicinc.com&gt;
Link: https://lore.kernel.org/r/1646024079-26391-1-git-send-email-quic_periyasa@quicinc.com
</content>
</entry>
<entry>
<title>ath11k: Refactor the fallback routine when peer create fails</title>
<updated>2022-01-11T14:39:15Z</updated>
<author>
<name>Karthikeyan Periyasamy</name>
<email>periyasa@codeaurora.org</email>
</author>
<published>2022-01-10T14:24:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fbed57d897f6ea065c45806959337a6f28d2a94d'/>
<id>urn:sha1:fbed57d897f6ea065c45806959337a6f28d2a94d</id>
<content type='text'>
When there is an error in peer create process from
ath11k_peer_find(), the code attempts to handle a fallback
for peer create. When this fallback fails, the driver returns
the fallback return code rather than actual error code
(-ENOENT). So refactor the fallback routine to return
the actual error code.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01067-QCAHKSWPL_SILICONZ-1

Signed-off-by: Karthikeyan Periyasamy &lt;periyasa@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;quic_kvalo@quicinc.com&gt;
Link: https://lore.kernel.org/r/1640244819-21183-1-git-send-email-quic_periyasa@quicinc.com
</content>
</entry>
<entry>
<title>ath11k: fix 4addr multicast packet tx</title>
<updated>2021-09-16T09:15:40Z</updated>
<author>
<name>Karthikeyan Periyasamy</name>
<email>periyasa@codeaurora.org</email>
</author>
<published>2021-07-20T21:31:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e20cfa3b62aeb1b5fc5ffa86a007af97f9954767'/>
<id>urn:sha1:e20cfa3b62aeb1b5fc5ffa86a007af97f9954767</id>
<content type='text'>
In 4addr, AP wired backbone to STA wired backbone ping fails due to ARP
request not getting answered. Here 4addr ARP multicast packet is sent in
3addr, so that 4addr STA not honouring the 3addr ARP multicast packet.
Fix this issue by sending out multicast packet in 4addr format, firmware
expects peer meta flag instead of vdev meta flag in Tx descriptor.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01641-QCAHKSWPL_SILICONZ-1

Signed-off-by: Karthikeyan Periyasamy &lt;periyasa@codeaurora.org&gt;
Signed-off-by: Jouni Malinen &lt;jouni@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210720213147.90042-2-jouni@codeaurora.org
</content>
</entry>
<entry>
<title>ath11k: Update tx descriptor search index properly</title>
<updated>2021-02-09T07:22:52Z</updated>
<author>
<name>Karthikeyan Periyasamy</name>
<email>periyasa@codeaurora.org</email>
</author>
<published>2021-02-08T11:32:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4b965be536eefdd16ca0a88120fee23f5b92cd16'/>
<id>urn:sha1:4b965be536eefdd16ca0a88120fee23f5b92cd16</id>
<content type='text'>
Tx descriptor search index field should be updated with hw peer id
and not by AST Hash as per the HW/FW recommendation. Incorrect search
index causes throughput degradation in all scenario for all the
platforms. so updated the search index field with hw peer id, which
is a common change applicable for all the platforms. Also no need of these
configuration for non station type. seen 10% throughput increase in WDS
traffic with this change.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01492-QCAHKSWPL_SILICONZ-1

Signed-off-by: Karthikeyan Periyasamy &lt;periyasa@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1612410960-9120-1-git-send-email-periyasa@codeaurora.org
</content>
</entry>
<entry>
<title>ath11k: start vdev if a bss peer is already created</title>
<updated>2020-12-17T06:47:06Z</updated>
<author>
<name>Carl Huang</name>
<email>cjhuang@codeaurora.org</email>
</author>
<published>2020-12-11T05:13:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aa44b2f3ecd41f90b7e477158036648a49d21a32'/>
<id>urn:sha1:aa44b2f3ecd41f90b7e477158036648a49d21a32</id>
<content type='text'>
For QCA6390, bss peer must be created before vdev is to start. This
change is to start vdev if a bss peer is created. Otherwise, ath11k
delays to start vdev.

This fixes an issue in a case where HT/VHT/HE settings change between
authentication and association, e.g., due to the user space request
to disable HT.

Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1

Signed-off-by: Carl Huang &lt;cjhuang@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20201211051358.9191-1-cjhuang@codeaurora.org
</content>
</entry>
<entry>
<title>ath11k: peer delete synchronization with firmware</title>
<updated>2020-11-24T16:04:34Z</updated>
<author>
<name>Ritesh Singh</name>
<email>ritesi@codeaurora.org</email>
</author>
<published>2020-11-24T15:59:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=690ace20ff790f443c3cbaf12e1769e4eb0072db'/>
<id>urn:sha1:690ace20ff790f443c3cbaf12e1769e4eb0072db</id>
<content type='text'>
Peer creation in firmware fails, if last peer deletion
is still in progress.
Hence, add wait for the event after deleting every peer
from host driver to synchronize with firmware.

Signed-off-by: Ritesh Singh &lt;ritesi@codeaurora.org&gt;
Signed-off-by: Maharaja Kennadyrajan &lt;mkenna@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1605514143-17652-3-git-send-email-mkenna@codeaurora.org
</content>
</entry>
<entry>
<title>ath11k: remove useless info messages</title>
<updated>2020-06-23T07:51:56Z</updated>
<author>
<name>Kalle Valo</name>
<email>kvalo@codeaurora.org</email>
</author>
<published>2020-06-16T14:00:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=21b1a5a4c34cff5e62499523728f59de5e38fde5'/>
<id>urn:sha1:21b1a5a4c34cff5e62499523728f59de5e38fde5</id>
<content type='text'>
ath11k should not be spamming these to the logs. If these are important they
should be debug messages, but I just remove them for now.

Compile tested only.

Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1592316055-24958-10-git-send-email-kvalo@codeaurora.org
</content>
</entry>
</feed>
