<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/net/mac802154/tx.c, branch v6.6.134</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.134</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.134'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-07-25T07:50:52+00:00</updated>
<entry>
<title>net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()</title>
<updated>2024-07-25T07:50:52+00:00</updated>
<author>
<name>Yunshui Jiang</name>
<email>jiangyunshui@kylinos.cn</email>
</author>
<published>2024-05-31T08:07:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cf3f20313a54e32ac4e75d885b276d0781e70cbf'/>
<id>urn:sha1:cf3f20313a54e32ac4e75d885b276d0781e70cbf</id>
<content type='text'>
[ Upstream commit b8ec0dc3845f6c9089573cb5c2c4b05f7fc10728 ]

mac802154 devices update their dev-&gt;stats fields locklessly. Therefore
these counters should be updated atomically. Adopt SMP safe DEV_STATS_INC()
and DEV_STATS_ADD() to achieve this.

Signed-off-by: Yunshui Jiang &lt;jiangyunshui@kylinos.cn&gt;
Message-ID: &lt;20240531080739.2608969-1-jiangyunshui@kylinos.cn&gt;
Signed-off-by: Stefan Schmidt &lt;stefan@datenfreihafen.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mac802154: Add MLME Tx locked helpers</title>
<updated>2023-01-03T18:45:44+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2023-01-03T16:56:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dd18096256c89612e3eb858de748c29d10e8f3e7'/>
<id>urn:sha1:dd18096256c89612e3eb858de748c29d10e8f3e7</id>
<content type='text'>
These have the exact same behavior as before, except they expect the
rtnl to be already taken (and will complain otherwise). This allows
performing MLME transmissions from different contexts.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Acked-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Link: https://lore.kernel.org/r/20230103165644.432209-6-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt &lt;stefan@datenfreihafen.org&gt;
</content>
</entry>
<entry>
<title>net: mac802154: Fix a Tx warning check</title>
<updated>2022-06-27T08:57:32+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2022-06-17T19:29:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fbdaa5ba6bd6955f7e7f9228e4d815cc5e43fe5b'/>
<id>urn:sha1:fbdaa5ba6bd6955f7e7f9228e4d815cc5e43fe5b</id>
<content type='text'>
The purpose of the netif_is_down() helper was to ensure that the network
interface used was still up when performing the transmission. What it
actually did was to check if _all_ interfaces were up. This was not
noticed at that time because I did not use interfaces at all before
discussing with Alexander Aring about how to handle coordinators
properly.

Drop the helper and call netif_running() on the right sub interface
object directly.

Fixes: 4f790184139b ("net: mac802154: Add a warning in the slow path")
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Acked-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Link: https://lore.kernel.org/r/20220617192914.1275611-1-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt &lt;stefan@datenfreihafen.org&gt;
</content>
</entry>
<entry>
<title>mac802154: fix atomic_dec_and_test checks</title>
<updated>2022-06-14T08:23:51+00:00</updated>
<author>
<name>Alexander Aring</name>
<email>aahringo@redhat.com</email>
</author>
<published>2022-06-13T04:37:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c1c78d0182fcbfe953bf5a0c3e71204d176b887'/>
<id>urn:sha1:6c1c78d0182fcbfe953bf5a0c3e71204d176b887</id>
<content type='text'>
We need to call wake_up() when hold_txs reaches zero. The semantic of
atomic_dec_and_test() is that it returns true when it's zero.

Fixes: f0feb3490473 ("net: mac802154: Introduce a tx queue flushing mechanism")
Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/r/20220613043735.1039895-3-aahringo@redhat.com
Signed-off-by: Stefan Schmidt &lt;stefan@datenfreihafen.org&gt;
</content>
</entry>
<entry>
<title>net: mac802154: Add a warning in the slow path</title>
<updated>2022-06-10T07:48:41+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2022-05-19T15:05:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4f790184139beb8b35a1f4f9a4b6731c6eef1763'/>
<id>urn:sha1:4f790184139beb8b35a1f4f9a4b6731c6eef1763</id>
<content type='text'>
In order to be able to detect possible conflicts between the net
interface core and the ieee802154 core, let's add a warning in the slow
path: we want to be sure that whenever we start an asynchronous MLME
transmission (which can be fully asynchronous) the net core somehow
agrees that this transmission is possible, ie. the device was not
stopped. Warning in this case would allow us to track down more easily
possible issues with the MLME logic if we ever get reports.

Unlike in the hot path, such a situation cannot be handled.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Acked-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Link: https://lore.kernel.org/r/20220519150516.443078-12-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt &lt;stefan@datenfreihafen.org&gt;
</content>
</entry>
<entry>
<title>net: mac802154: Add a warning in the hot path</title>
<updated>2022-06-10T07:48:41+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2022-05-19T15:05:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2b13db13af50a5dcdb944723c828915a50f0c3b2'/>
<id>urn:sha1:2b13db13af50a5dcdb944723c828915a50f0c3b2</id>
<content type='text'>
We should never start a transmission after the queue has been stopped.

But because it might work we don't kill the function here but rather
warn loudly the user that something is wrong.

Set a flag when the queue should remain stopped. Reset this flag when
the queue actually gets restarded. Just check this value to know if a
transmission is legitimate, warn if it is not.

Turn the flags variable into an unsigned long to allow the use of atomic
helpers on it.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Acked-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Link: https://lore.kernel.org/r/20220519150516.443078-11-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt &lt;stefan@datenfreihafen.org&gt;
</content>
</entry>
<entry>
<title>net: mac802154: Introduce a synchronous API for MLME commands</title>
<updated>2022-06-10T07:48:40+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2022-05-19T15:05:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ddd9ee7cda122ac55571b8b11b51ef1e71918b63'/>
<id>urn:sha1:ddd9ee7cda122ac55571b8b11b51ef1e71918b63</id>
<content type='text'>
This is the slow path, we need to wait for each command to be processed
before continuing so let's introduce an helper which does the
transmission and blocks until it gets notified of its asynchronous
completion. This helper is going to be used when introducing scan
support.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Acked-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Link: https://lore.kernel.org/r/20220519150516.443078-10-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt &lt;stefan@datenfreihafen.org&gt;
</content>
</entry>
<entry>
<title>net: mac802154: Introduce a tx queue flushing mechanism</title>
<updated>2022-06-10T07:48:40+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2022-05-19T15:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f0feb34904735ffa21fe7b0c50f9f9527ec74b7a'/>
<id>urn:sha1:f0feb34904735ffa21fe7b0c50f9f9527ec74b7a</id>
<content type='text'>
Right now we are able to stop a queue but we have no indication if a
transmission is ongoing or not.

Thanks to recent additions, we can track the number of ongoing
transmissions so we know if the last transmission is over. Adding on top
of it an internal wait queue also allows to be woken up asynchronously
when this happens. If, beforehands, we marked the queue to be held and
stopped it, we end up flushing and stopping the tx queue.

Thanks to this feature, we will soon be able to introduce a synchronous
transmit API.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Acked-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Link: https://lore.kernel.org/r/20220519150516.443078-9-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt &lt;stefan@datenfreihafen.org&gt;
</content>
</entry>
<entry>
<title>net: mac802154: Create a hot tx path</title>
<updated>2022-06-10T07:48:40+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2022-05-19T15:05:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=226730e1aa2844b6e5499a6fe6bea4db17a894a8'/>
<id>urn:sha1:226730e1aa2844b6e5499a6fe6bea4db17a894a8</id>
<content type='text'>
Let's rename the current Tx path to show that this is the "hot" Tx
path. We will soon introduce a slower Tx path for MLME commands.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Acked-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Link: https://lore.kernel.org/r/20220519150516.443078-7-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt &lt;stefan@datenfreihafen.org&gt;
</content>
</entry>
<entry>
<title>net: mac802154: Bring the ability to hold the transmit queue</title>
<updated>2022-06-10T07:48:40+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2022-05-19T15:05:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=20a19d1df3e4079cbaa045ec89bbefb831d4705d'/>
<id>urn:sha1:20a19d1df3e4079cbaa045ec89bbefb831d4705d</id>
<content type='text'>
Create a hold_txs atomic variable and increment/decrement it when
relevant, ie. when we want to hold the queue or release it: currently
all the "stopped" situations are suitable, but very soon we will more
extensively use this feature for MLME purposes.

Upon release, the atomic counter is decremented and checked. If it is
back to 0, then the netif queue gets woken up. This makes the whole
process fully transparent, provided that all the users of
ieee802154_wake/stop_queue() now call ieee802154_hold/release_queue()
instead.

In no situation individual drivers should call any of these helpers
manually in order to avoid messing with the counters. There are other
functions more suited for this purpose which have been introduced, such
as the _xmit_complete() and _xmit_error() helpers which will handle all
that for them.

One advantage is that, as no more drivers call the stop/wake helpers
directly, we can safely stop exporting them and only declare the
hold/release ones in a header only accessible to the core.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Acked-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Link: https://lore.kernel.org/r/20220519150516.443078-6-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt &lt;stefan@datenfreihafen.org&gt;
</content>
</entry>
</feed>
