<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/staging/rtl8192u, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/staging/rtl8192u?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/staging/rtl8192u?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-05-19T15:42:53Z</updated>
<entry>
<title>staging: rtl8192u: remove null check after call container_of()</title>
<updated>2022-05-19T15:42:53Z</updated>
<author>
<name>Haowen Bai</name>
<email>baihaowen@meizu.com</email>
</author>
<published>2022-05-16T10:22:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=902d75058129aa33c899e08c97d4f5cda8d047eb'/>
<id>urn:sha1:902d75058129aa33c899e08c97d4f5cda8d047eb</id>
<content type='text'>
container_of() will never return NULL, so remove useless code.

Signed-off-by: Haowen Bai &lt;baihaowen@meizu.com&gt;
Link: https://lore.kernel.org/r/1652696533-18011-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: rtl8192u: make const array queuetopipe const, reduces object code size</title>
<updated>2022-05-19T15:40:44Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2022-05-07T18:34:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=20e7ac6f74bc1142f9f9ca0fa46a13d6c3b4cebb'/>
<id>urn:sha1:20e7ac6f74bc1142f9f9ca0fa46a13d6c3b4cebb</id>
<content type='text'>
Don't populate the const array queuetopipe on the stack, instead make it
static.  Also makes the object code smaller.

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Link: https://lore.kernel.org/r/20220507183414.26633-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: rtl8192u: Fix signedness bug in ieee80211_check_auth_response()</title>
<updated>2022-04-22T14:48:31Z</updated>
<author>
<name>Haowen Bai</name>
<email>baihaowen@meizu.com</email>
</author>
<published>2022-04-22T02:10:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=89c734e1980259e439f3c57f1e63729dc0038740'/>
<id>urn:sha1:89c734e1980259e439f3c57f1e63729dc0038740</id>
<content type='text'>
The ieee80211_check_auth_response() function has a signedness bug because
it's a declared as a u16 but it return -ENOMEM.  When you look at it more
closely it returns a mix of error codes including 0xcafe, -ENOMEM, and
a-&gt;status which is WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG.  This is a mess.

Clean it up to just return standard kernel error codes.  We can print
out the a-&gt;status before returning a regular error code.  The printks
in the caller need to be adjusted as well.

Signed-off-by: Haowen Bai &lt;baihaowen@meizu.com&gt;
Link: https://lore.kernel.org/r/1650593435-9017-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: rtl8192u: change get_key functions to return 0 instead of -1</title>
<updated>2022-04-22T14:41:28Z</updated>
<author>
<name>Rebecca Mckeever</name>
<email>remckee0@gmail.com</email>
</author>
<published>2022-04-20T12:23:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=17c8129e06241b635c7945d109eec498301628d3'/>
<id>urn:sha1:17c8129e06241b635c7945d109eec498301628d3</id>
<content type='text'>
Currently, these three get_key functions return -1 when the provided len
value is less a specific key length value, which can result in buffer
overflow depending on how the returned value is used. These functions are
used in three places in ieee80211/ieee80211_wx.c:

  ieee80211_wx_get_encode() :
    The behavior of this function will be unchanged.

  ieee80211_wx_get_encode_ext() :
    The result of the get_key function is written to ext-&gt;key_len,
    resulting in a buffer overflow if the result is negative.

  ieee80211_wx_set_encode() :
    The behavior of this function will change. When len is less than the
    key length value, it will set a default key of all 0.

Suggested-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Rebecca Mckeever &lt;remckee0@gmail.com&gt;
Link: https://lore.kernel.org/r/Yl/7QPKXer7YtXOs@bertie
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: staging: rtl8192u: Fix deadlock in ieee80211_beacons_stop()</title>
<updated>2022-04-20T16:47:22Z</updated>
<author>
<name>Duoming Zhou</name>
<email>duoming@zju.edu.cn</email>
</author>
<published>2022-04-17T13:54:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=806c7b53414934ba2a39449b31fd1a038e500273'/>
<id>urn:sha1:806c7b53414934ba2a39449b31fd1a038e500273</id>
<content type='text'>
There is a deadlock in ieee80211_beacons_stop(), which is shown below:

   (Thread 1)              |      (Thread 2)
                           | ieee80211_send_beacon()
ieee80211_beacons_stop()   |  mod_timer()
 spin_lock_irqsave() //(1) |  (wait a time)
 ...                       | ieee80211_send_beacon_cb()
 del_timer_sync()          |  spin_lock_irqsave() //(2)
 (wait timer to stop)      |  ...

We hold ieee-&gt;beacon_lock in position (1) of thread 1 and use
del_timer_sync() to wait timer to stop, but timer handler
also need ieee-&gt;beacon_lock in position (2) of thread 2.
As a result, ieee80211_beacons_stop() will block forever.

This patch extracts del_timer_sync() from the protection of
spin_lock_irqsave(), which could let timer handler to obtain
the needed lock.

Signed-off-by: Duoming Zhou &lt;duoming@zju.edu.cn&gt;
Link: https://lore.kernel.org/r/20220417135407.109536-1-duoming@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: rtl8192u: compare strcmp result to zero</title>
<updated>2022-04-20T16:45:50Z</updated>
<author>
<name>Rebecca Mckeever</name>
<email>remckee0@gmail.com</email>
</author>
<published>2022-04-16T10:24:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bb5369edbab8363a8a9a0c9ba59cb85020accb68'/>
<id>urn:sha1:bb5369edbab8363a8a9a0c9ba59cb85020accb68</id>
<content type='text'>
Add " == 0" to the condition in both else if branches to address a
possible bug. strcmp returns 0 when its arguments are equal, which
evaluates to false, often leading to errors when used in if statements.

Currently, the statement in the first else if branch does not execute
when its arguments are equal, but it does execute when crypt-&gt;ops-&gt;name
equals any string other than "WEP" or "TKIP".

Similarly, the second else if branch does not execute when its arguments
are equal, and it only executes when crypt-&gt;ops-&gt;name equals "TKIP".
The else branch never executes.

It is unlikely that this is working as intended.

Reviewed-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Rebecca Mckeever &lt;remckee0@gmail.com&gt;
Link: https://lore.kernel.org/r/20220416102434.97567-1-remckee0@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: rtl8192u: make read-only array EWC11NHTCap static const</title>
<updated>2022-04-14T16:21:55Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2022-04-14T10:36:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bed6d200f8ca38e1ecbdd8fb7e0564884002abd1'/>
<id>urn:sha1:bed6d200f8ca38e1ecbdd8fb7e0564884002abd1</id>
<content type='text'>
Don't populate the read-only array EWC11NHTCap on the stack but instead
make it static const. Also makes the object code a little smaller.
Remove comment.

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Link: https://lore.kernel.org/r/20220414103650.297396-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging/rtl8192e,ieee80211: replace ps tasklet with work</title>
<updated>2022-04-12T13:53:51Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>dave@stgolabs.net</email>
</author>
<published>2022-04-11T15:16:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f96f8ae08d33eeae65581b6dbf25d12e307e7b2c'/>
<id>urn:sha1:f96f8ae08d33eeae65581b6dbf25d12e307e7b2c</id>
<content type='text'>
Tasklets have long been deprecated as being too heavy on the system
by running in irq context - and this is not a performance critical
path. If a higher priority process wants to run, it must wait for
the tasklet to finish before doing so.

rtllib_sta_ps() and ieee80211_sta_ps() will now run in process context
and have further concurrency (tasklets being serialized among themselves),
but this is done holding the ieee-&gt;lock, so it should be fine.

Signed-off-by: Davidlohr Bueso &lt;dave@stgolabs.net&gt;
Link: https://lore.kernel.org/r/20220411151620.129178-7-dave@stgolabs.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: rtl8192u: use min_t/max_t macros instead of if else</title>
<updated>2022-04-08T13:43:36Z</updated>
<author>
<name>Rebecca Mckeever</name>
<email>remckee0@gmail.com</email>
</author>
<published>2022-04-08T01:12:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f8ab914705853aa7a971977121c493fc244adb04'/>
<id>urn:sha1:f8ab914705853aa7a971977121c493fc244adb04</id>
<content type='text'>
Replace if else statement with min_t or max_t macros to increase
readability and conform to Linux kernel coding style. The _t versions
of the macros must be used to avoid applying typeof to the bit fields
pPeerHTCap-&gt;MaxRxAMPDUFactor, and pPeerHTCap-&gt;MPDUDensity.

Using u32 assures the reader that the value with not be truncated
without having to look up the types of the variables involved.
Found with minmax coccinelle script.

Reviewed-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Rebecca Mckeever &lt;remckee0@gmail.com&gt;
Link: https://lore.kernel.org/r/65518c0b366bf199903c6c530774c61ba6087165.1649378587.git.remckee0@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: rtl8192u: replace ternary statement with if and assignment</title>
<updated>2022-04-08T13:43:35Z</updated>
<author>
<name>Rebecca Mckeever</name>
<email>remckee0@gmail.com</email>
</author>
<published>2022-04-08T01:12:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=49ce1b1fbca89e8c4b1cbbd7064b26f7b9d1a365'/>
<id>urn:sha1:49ce1b1fbca89e8c4b1cbbd7064b26f7b9d1a365</id>
<content type='text'>
Replace ternary statement with an if statement followed by an assignment
to increase readability and make error handling more obvious.
Found with minmax coccinelle script.

Reviewed-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Rebecca Mckeever &lt;remckee0@gmail.com&gt;
Link: https://lore.kernel.org/r/36059ec66a2f3d58a8e339aa4f262772eabd3ef0.1649378587.git.remckee0@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
