linux.git
20 months agostaging: rtl8192e: Remove unused variables priv->reset_count and reset_cnt
Philipp Hortmann [Sun, 1 Oct 2023 13:45:21 +0000 (15:45 +0200)]
staging: rtl8192e: Remove unused variables priv->reset_count and reset_cnt

Remove unused variables priv->reset_count, reset_cnt and reset_cnt_highpwr
as those are always 0. All equations result accordingly. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/27adae9b824a522280485b3d16f14893bf99da4c.1696165351.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove unused variable is_silent_reset
Philipp Hortmann [Sun, 1 Oct 2023 13:45:13 +0000 (15:45 +0200)]
staging: rtl8192e: Remove unused variable is_silent_reset

ieee->is_silent_reset is set to false and never changed. All
equations result accordingly. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/124d8f91db347e0e35184b356ba4ec39f52871cb.1696165351.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove unused parameter from _rtl92e_up()
Philipp Hortmann [Sun, 1 Oct 2023 13:45:07 +0000 (15:45 +0200)]
staging: rtl8192e: Remove unused parameter from _rtl92e_up()

Remove unused parameter is_silent_reset from _rtl92e_up().

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/24f221c44beae8e6fbf895f82fe04b082f8679d5.1696165351.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove unused parameter from _rtl92e_sta_up()
Philipp Hortmann [Sun, 1 Oct 2023 13:44:59 +0000 (15:44 +0200)]
staging: rtl8192e: Remove unused parameter from _rtl92e_sta_up()

Remove unused parameter is_silent_reset from _rtl92e_sta_up().

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/105beac3b04bd73267b3e30e6b944b381dcfa8a1.1696165351.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove unused variable reset_in_progress
Philipp Hortmann [Sun, 1 Oct 2023 13:44:54 +0000 (15:44 +0200)]
staging: rtl8192e: Remove unused variable reset_in_progress

priv->reset_in_progress is set to false and never changed. All
equations result accordingly. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/25259d69b955472a74725f3665238fb6daee76b4.1696165351.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove unused variable rst_progress
Philipp Hortmann [Sun, 1 Oct 2023 13:44:35 +0000 (15:44 +0200)]
staging: rtl8192e: Remove unused variable rst_progress

priv->rst_progress is set to RESET_TYPE_NORESET and never changed. All
equations are true. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/21f4ab4eff53cce0debcd113c2dc1718dc713aeb.1696165351.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove broken function _rtl92e_if_silent_reset()
Philipp Hortmann [Sun, 1 Oct 2023 13:44:28 +0000 (15:44 +0200)]
staging: rtl8192e: Remove broken function _rtl92e_if_silent_reset()

When the function _rtl92e_if_silent_reset() is called the variable
priv->rst_progress is set to RESET_TYPE_SILENT.
Since priv->up is always true the function is left at "if (priv->up) {"
without resetting. Now the function _rtl92e_if_silent_reset() is like
deactivated because the equation at the very beginning is false:
"if (priv->rst_progress == RESET_TYPE_NORESET) {"
This leads to a state where the driver hangs in the reset state and
cannot go forward.
In 30% of the cases the wlan is disconnected and cannot reconnect. The
rest of the time it continues working but no reset is done at all.
Further requests for reset are ignored. Remove broken function
_rtl92e_if_silent_reset() and remove return value of
_rtl92e_if_check_reset() to avoid compiler warnings.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/8b1b04b512b5691968a49308fdc052973fbe5032.1696165351.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove RESET_TYPE_NORMAL
Philipp Hortmann [Sun, 1 Oct 2023 13:44:20 +0000 (15:44 +0200)]
staging: rtl8192e: Remove RESET_TYPE_NORMAL

ResetType == RESET_TYPE_NORMAL is always false. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e951e39f0d75fb6baf8beb37e8c5fed05365078d.1696165351.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove dead code from _rtl92e_if_check_reset()
Philipp Hortmann [Sun, 1 Oct 2023 13:44:06 +0000 (15:44 +0200)]
staging: rtl8192e: Remove dead code from _rtl92e_if_check_reset()

The return value of _rtl92e_tx_check_stuck() and _rtl92e_rx_check_stuck()
can only be RESET_TYPE_SILENT or RESET_TYPE_NORESET. This functions are
only used in _rtl92e_if_check_reset(). In _rtl92e_if_check_reset() the
return values are checked for RESET_TYPE_NORMAL which cannot occur.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/5f29332205dd76896e981fa627925d62a6bf7f63.1696165351.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove ibss_maxjoin_chal
Philipp Hortmann [Sun, 1 Oct 2023 13:43:59 +0000 (15:43 +0200)]
staging: rtl8192e: Remove ibss_maxjoin_chal

Remove ibss_maxjoin_chal as it is just set and never evaluated.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/7c5d512a69e5832263a0a2e8f4ea3608fe286a09.1696165351.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: ks7010: disable bh on tx_dev_lock
Chengfeng Ye [Tue, 26 Sep 2023 16:13:23 +0000 (16:13 +0000)]
staging: ks7010: disable bh on tx_dev_lock

As &priv->tx_dev.tx_dev_lock is also acquired by xmit callback which
could be call from timer under softirq context, use spin_lock_bh()
on it to prevent potential deadlock.

hostif_sme_work()
--> hostif_sme_set_pmksa()
--> hostif_mib_set_request()
--> ks_wlan_hw_tx()
--> spin_lock(&priv->tx_dev.tx_dev_lock)

ks_wlan_start_xmit()
--> hostif_data_request()
--> ks_wlan_hw_tx()
--> spin_lock(&priv->tx_dev.tx_dev_lock)

Signed-off-by: Chengfeng Ye <dg573847474@gmail.com>
Link: https://lore.kernel.org/r/20230926161323.41928-1-dg573847474@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: vt6655: Type encoding info dropped from variable "byRFType"
Pavan Bobba [Thu, 21 Sep 2023 12:08:37 +0000 (17:38 +0530)]
staging: vt6655: Type encoding info dropped from variable "byRFType"

variable name "byRFType" updated like below:

a.type encoding info dropped from name
b.camelcase name replaced by snakecase

Issue found by checkpatch

Signed-off-by: Pavan Bobba <opensource206@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ZQwyRXFHA9hTLcyv@ubuntu.myguest.virtualbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: remove bogus __packed annotations
Arnd Bergmann [Mon, 25 Sep 2023 15:54:04 +0000 (17:54 +0200)]
staging: rtl8192e: remove bogus __packed annotations

The rtllib_rxb structure contains a pointer, so this is not a hardware
structure but could benefit from loading the pointer in a single
instruction rather than assembling it from four or eight individual
bytes.

Both structures are allocated as part of larger structure that
already enforce at least a 4-byte alignment, so there is no
reason to ever have to deal with misaligned definitions.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230925155413.471287-2-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Resolve circular locking with rx_pkt_pending_timer
Philipp Hortmann [Sun, 24 Sep 2023 19:51:10 +0000 (21:51 +0200)]
staging: rtl8192e: Resolve circular locking with rx_pkt_pending_timer

Resolve circular locking from reorder_spinlock with rx_pkt_pending_timer.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/08ff2088b0264bef60142ca35f7198dd8afa963c.1695582999.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Unlock mutex for one line in rtllib_stop_protocol()
Philipp Hortmann [Sun, 24 Sep 2023 19:51:02 +0000 (21:51 +0200)]
staging: rtl8192e: Unlock mutex for one line in rtllib_stop_protocol()

The following command uses the mutex ieee->wx_mutex:
cancel_delayed_work_sync(&ieee->associate_retry_wq)
Therefore it cannot be canceled with ieee->wx_mutex locked.
rtllib_stop_protocol() is always called with ieee->wx_mutex locked so
according line can be unlocked.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ffe60e8f6e29197f331e239ab38154da97c743be.1695582999.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove mutex from rtllib_softmac_free()
Philipp Hortmann [Sun, 24 Sep 2023 19:50:55 +0000 (21:50 +0200)]
staging: rtl8192e: Remove mutex from rtllib_softmac_free()

The following commands use the mutex ieee->wx_mutex:
cancel_delayed_work_sync(&ieee->associate_retry_wq)
cancel_delayed_work_sync(&ieee->associate_procedure_wq)
cancel_work_sync(&ieee->wx_sync_scan_wq)
Therefore they cannot be canceled with ieee->wx_mutex locked. As the
work functions are executed time shifted during normal operation of the
driver, proper locking can only be done inside the functions.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/a5308876bd8fabcb5f8b25d14dbad2c1f68ce59f.1695582999.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Put kfree() to end of rtllib_softmac_free()
Philipp Hortmann [Sun, 24 Sep 2023 19:50:49 +0000 (21:50 +0200)]
staging: rtl8192e: Put kfree() to end of rtllib_softmac_free()

To reverse order of initialization put kfree() to the end of
rtllib_softmac_free().

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/85b63c62780356af91c30cc63280c5f59cd29210.1695582999.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove rtllib_stop_send_beacons
Philipp Hortmann [Fri, 22 Sep 2023 13:30:00 +0000 (15:30 +0200)]
staging: rtl8192e: Remove rtllib_stop_send_beacons

rtllib_start_send_beacons() is removed so no need for
rtllib_stop_send_beacons() anymore.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/17c5545102ad8f50ca320af17aafa555f8caec2d.1695387832.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove delayed_work start_ibss_wq
Philipp Hortmann [Fri, 22 Sep 2023 13:29:53 +0000 (15:29 +0200)]
staging: rtl8192e: Remove delayed_work start_ibss_wq

Remove delayed_work start_ibss_wq and the related functions which are not
needed anymore.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/805447a41feffb9da7d82830868dc1d47f9aa737.1695387832.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove mode IW_MODE_ADHOC from rtllib_softmac.c
Philipp Hortmann [Fri, 22 Sep 2023 13:29:47 +0000 (15:29 +0200)]
staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtllib_softmac.c

Remove unsupported mode IW_MODE_ADHOC from rtllib_softmac.c.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/4259c06deaf2e3f3cc615e8c55bcf6f70ce4e277.1695387832.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove mode IW_MODE_ADHOC from rtl_cam.c
Philipp Hortmann [Fri, 22 Sep 2023 13:29:41 +0000 (15:29 +0200)]
staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtl_cam.c

Remove unsupported mode IW_MODE_ADHOC from rtl_cam.c.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/143345585dfcc0e920b2ba5fa614f626ab3ad8ee.1695387832.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove mode IW_MODE_ADHOC from rtl_core.c
Philipp Hortmann [Fri, 22 Sep 2023 13:29:35 +0000 (15:29 +0200)]
staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtl_core.c

Remove unsupported mode IW_MODE_ADHOC from rtl_core.c and further files.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/7b9a4790238081736e6530135309e53d36f28574.1695387832.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove mode IW_MODE_ADHOC from rtllib_rx.c
Philipp Hortmann [Fri, 22 Sep 2023 13:29:28 +0000 (15:29 +0200)]
staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtllib_rx.c

Remove unsupported mode IW_MODE_ADHOC from rtllib_rx.c and all related
functions and structs.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/5400c68e17b86b1170ac997fae3fe1fb09220af8.1695387832.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Remove mode IW_MODE_ADHOC from rtllib_tx.c
Philipp Hortmann [Fri, 22 Sep 2023 13:29:21 +0000 (15:29 +0200)]
staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtllib_tx.c

Remove unsupported mode IW_MODE_ADHOC from rtllib_tx.c, rtl819x_TSProc.c,
rtl819x_HTProc.c, r8192E_dev.c

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/59564ce06fc0a23fd26304b8ecd585abd5ddd82f.1695387832.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agoStaging: rtl8192e: Rename variable StatusCode
Tree Davies [Thu, 21 Sep 2023 03:25:15 +0000 (20:25 -0700)]
Staging: rtl8192e: Rename variable StatusCode

Rename variable StatusCode to status_code to fix checkpatch warning Avoid
CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230921032515.96152-12-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agoStaging: rtl8192e: Rename function TSInitialize
Tree Davies [Thu, 21 Sep 2023 03:25:14 +0000 (20:25 -0700)]
Staging: rtl8192e: Rename function TSInitialize

Rename function TSInitialize to rtllib_ts_init to fix checkpatch warning Avoid
CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230921032515.96152-11-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agoStaging: rtl8192e: Rename function GetTs()
Tree Davies [Thu, 21 Sep 2023 03:25:13 +0000 (20:25 -0700)]
Staging: rtl8192e: Rename function GetTs()

Rename function GetTs to rtllib_get_ts to fix checkpatch warning Avoid
CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230921032515.96152-10-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agoStaging: rtl8192e: Rename variable Policy
Tree Davies [Thu, 21 Sep 2023 03:25:12 +0000 (20:25 -0700)]
Staging: rtl8192e: Rename variable Policy

Rename variable Policy to policy to fix checkpatch warning Avoid
CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230921032515.96152-9-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agoStaging: rtl8192e: Rename variable pStatusCode
Tree Davies [Thu, 21 Sep 2023 03:25:11 +0000 (20:25 -0700)]
Staging: rtl8192e: Rename variable pStatusCode

Rename variable pStatusCode to status_code to fix checkpatch warning Avoid
CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230921032515.96152-8-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agoStaging: rtl8192e: Rename variable Addr
Tree Davies [Thu, 21 Sep 2023 03:25:10 +0000 (20:25 -0700)]
Staging: rtl8192e: Rename variable Addr

Rename variable Addr to addr to fix checkpatch warning Avoid
CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230921032515.96152-7-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agoStaging: rtl8192e: Rename variable pPendingBA
Tree Davies [Thu, 21 Sep 2023 03:25:09 +0000 (20:25 -0700)]
Staging: rtl8192e: Rename variable pPendingBA

Rename variable pPendingBA to pending_ba to fix checkpatch warning Avoid
CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230921032515.96152-6-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agoStaging: rtl8192e: Rename variable Dst
Tree Davies [Thu, 21 Sep 2023 03:25:08 +0000 (20:25 -0700)]
Staging: rtl8192e: Rename variable Dst

Rename variable Dst to dst to fix checkpatch warning Avoid
CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230921032515.96152-5-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agoStaging: rtl8192e: Rename variable pPendingBa
Tree Davies [Thu, 21 Sep 2023 03:25:07 +0000 (20:25 -0700)]
Staging: rtl8192e: Rename variable pPendingBa

Rename variable pPendingBa to pending_ba to fix checkpatch warning Avoid
CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230921032515.96152-4-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agoStaging: rtl8192e: Rename variable pAdmittedBa
Tree Davies [Thu, 21 Sep 2023 03:25:06 +0000 (20:25 -0700)]
Staging: rtl8192e: Rename variable pAdmittedBa

Rename variable pAdmittedBa to admitted_ba to fix checkpatch warning Avoid
CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230921032515.96152-3-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agoStaging: rtl8192e: Rename variable Time
Tree Davies [Thu, 21 Sep 2023 03:25:05 +0000 (20:25 -0700)]
Staging: rtl8192e: Rename variable Time

Rename variable Time to time to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230921032515.96152-2-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Fix compiler warning truncated writing of iwe.u.name
Philipp Hortmann [Mon, 18 Sep 2023 16:43:10 +0000 (18:43 +0200)]
staging: rtl8192e: Fix compiler warning truncated writing of iwe.u.name

iwe.u.name and proto_name have both 16 bytes of space. But when writing
to iwe.u.name the first 10 bytes are used by the fixed string
"IEEE802.11". Evaluating the code shows that only the following strings
can occur in proto_name: "N-24G", "g", "b", "bg". Therefore it is
sufficient to shorten proto_name to 6 bytes.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309171733.Gl96cmYd-lkp@intel.com/
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/2caafb8628880570725385e87150c47689474fc4.1695054044.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8192e: Fix alignment of structs in rtllib.h to two
Philipp Hortmann [Mon, 18 Sep 2023 16:43:04 +0000 (18:43 +0200)]
staging: rtl8192e: Fix alignment of structs in rtllib.h to two

Fix alignment of structs to even addresses to support all architectures.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309171733.Gl96cmYd-lkp@intel.com/
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/3140277dca915a1af9f66b1e7b4b47f5c7f6cd77.1695054044.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 months agostaging: rtl8723bs: hal: Fix codespell-reported spelling mistakes
Bragatheswaran Manickavel [Sun, 17 Sep 2023 13:49:40 +0000 (19:19 +0530)]
staging: rtl8723bs: hal: Fix codespell-reported spelling mistakes

They are appear to be spelling mistakes,
Initially identified in a codespell report and never been addressed so far.

./rtl8723b_phycfg.c:156: Threre ==> There, three
./rtl8723b_phycfg.c:283: Condig ==> Config
./rtl8723b_phycfg.c:328: Tranceiver ==> Transceiver

Signed-off-by: Bragatheswaran Manickavel <bragathemanick0908@gmail.com>
Link: https://lore.kernel.org/r/20230917134940.2746-1-bragathemanick0908@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: vme_user: Fix various comment formatting issues including comment content
Jonathan Bergh [Thu, 14 Sep 2023 20:07:33 +0000 (22:07 +0200)]
staging: vme_user: Fix various comment formatting issues including comment content

Fixed various issues relating to comments including:
    * Lines with '*' in block comments which should be aligned and
      were not
    * Corrected comments where closing multiline comment identifier
      ran over into second newline spuriously
    * Corrected comment content to correctly reflect hexadecimal for
      the offsets rather than integers

Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
Link: https://lore.kernel.org/r/20230914200732.47659-1-bergh.jonathan@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: vme_user: Remove spurious newlines between define statements
Jonathan Bergh [Thu, 14 Sep 2023 20:05:37 +0000 (22:05 +0200)]
staging: vme_user: Remove spurious newlines between define statements

Removed spurious newlines in define statements so that defines which
should be grouped together for readability are grouped as such.

Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
Link: https://lore.kernel.org/r/20230914200536.47619-1-bergh.jonathan@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: vt6655: Type encoding info dropped from array name "byVT3253B0_"
Pavan Bobba [Wed, 13 Sep 2023 11:53:12 +0000 (17:23 +0530)]
staging: vt6655: Type encoding info dropped from array name "byVT3253B0_"

Array names starting with "byVT3253B0_" updated like below:

a.type encoding info dropped from names
b.camelcase names replaced by snakecase

Issue found by checkpatch

Signed-off-by: Pavan Bobba <opensource206@gmail.com>
Link: https://lore.kernel.org/r/ZQGiqA2GoDp/WiPK@ubuntu.myguest.virtualbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: vme_user: Remove unused (commented) code causing unnecessary checkpatch...
Jonathan Bergh [Sun, 3 Sep 2023 15:06:23 +0000 (17:06 +0200)]
staging: vme_user: Remove unused (commented) code causing unnecessary checkpatch warning

Removed unused/commented code from vme_fake.c which was causing spurious
checkpatch warnings.

Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
Link: https://lore.kernel.org/r/20230903150623.571984-1-bergh.jonathan@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: octeon: remove typedef in structs cvmx_pip_port_status_t and cvmx_pko_port_s...
Oliver Crumrine [Mon, 28 Aug 2023 15:39:11 +0000 (11:39 -0400)]
staging: octeon: remove typedef in structs cvmx_pip_port_status_t and cvmx_pko_port_status_t

Remove typedef in structs cvmx_pip_port_status_t and cvmx_pko_port_status_t,
and rename all instances to cvmx_pip_port_status, and cvmx_pko_port_status,
respectively

Signed-off-by: Oliver Crumrine <ozlinux@hotmail.com>
Link: https://lore.kernel.org/r/PH7PR11MB76434462A6563C5FBDEE51A8BCE0A@PH7PR11MB7643.namprd11.prod.outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: octeon: remove typedef in enum cvmx_pko_status_t
Oliver Crumrine [Mon, 28 Aug 2023 15:39:10 +0000 (11:39 -0400)]
staging: octeon: remove typedef in enum cvmx_pko_status_t

Remove typedef in enum cmvx_pko_status_t, and rename all instances to
cvmx_pko_status

Signed-off-by: Oliver Crumrine <ozlinux@hotmail.com>
Link: https://lore.kernel.org/r/PH7PR11MB7643430B9516797F3870936FBCE0A@PH7PR11MB7643.namprd11.prod.outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: octeon: remove typedef in struct cvmx_pko_lock_t
Oliver Crumrine [Mon, 28 Aug 2023 15:39:09 +0000 (11:39 -0400)]
staging: octeon: remove typedef in struct cvmx_pko_lock_t

Remove typedef in struct cvmx_pko_lock_t, and rename all instances to
cvmx_pko_lock

Signed-off-by: Oliver Crumrine <ozlinux@hotmail.com>
Link: https://lore.kernel.org/r/PH7PR11MB764333C6FB367FBF1C676B43BCE0A@PH7PR11MB7643.namprd11.prod.outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: octeon: remove typedef in enum cvmx_pow_wait_t
Oliver Crumrine [Mon, 28 Aug 2023 15:39:08 +0000 (11:39 -0400)]
staging: octeon: remove typedef in enum cvmx_pow_wait_t

Remove typedef in enum cvmx_pow_wait_t, and rename all instances to
cvmx_pow_wait

Signed-off-by: Oliver Crumrine <ozlinux@hotmail.com>
Link: https://lore.kernel.org/r/PH7PR11MB7643299EE41E05AD6D736416BCE0A@PH7PR11MB7643.namprd11.prod.outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: octeon: remove typedef in enum cvmx_helper_interface_mode_t
Oliver Crumrine [Mon, 28 Aug 2023 15:39:07 +0000 (11:39 -0400)]
staging: octeon: remove typedef in enum cvmx_helper_interface_mode_t

Remove typedef in enum cvmx_helper_interface_mode_t, and rename all instances
to cvmx_helper_interface_mode

Signed-off-by: Oliver Crumrine <ozlinux@hotmail.com>
Link: https://lore.kernel.org/r/PH7PR11MB7643DEB4401AA83A0578087CBCE0A@PH7PR11MB7643.namprd11.prod.outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: octeon: remove typedef in enum cvmx_spi_mode_t
Oliver Crumrine [Mon, 28 Aug 2023 15:39:06 +0000 (11:39 -0400)]
staging: octeon: remove typedef in enum cvmx_spi_mode_t

Remove typedef in enum cvmx_spi_mode_t, and rename all instances to
cvmx_spi_mode

Signed-off-by: Oliver Crumrine <ozlinux@hotmail.com>
Link: https://lore.kernel.org/r/PH7PR11MB764333BA75F5760600A4D08EBCE0A@PH7PR11MB7643.namprd11.prod.outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: vme_user: fix check unnecessary space after a cast in vme_fake.c
Alexon Oliveira [Sun, 27 Aug 2023 19:32:55 +0000 (16:32 -0300)]
staging: vme_user: fix check unnecessary space after a cast in vme_fake.c

Fixed all CHECK: No space is necessary after a cast
as reported by checkpatch to adhere to the Linux kernel
coding-style guidelines.

Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com>
Link: https://lore.kernel.org/r/603976b29ad4d9a0e4cbd8452ff674ec70a227a8.1693164540.git.alexondunkan@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: vme_user: fix check unnecessary blank lines in vme_fake.c
Alexon Oliveira [Sun, 27 Aug 2023 19:32:54 +0000 (16:32 -0300)]
staging: vme_user: fix check unnecessary blank lines in vme_fake.c

Fixed all CHECK: Blank lines aren't necessary before a close brace '}'
as reported by checkpatch to adhere to the Linux kernel
coding-style guidelines.

Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com>
Link: https://lore.kernel.org/r/dde6f13f92a7cb17e01aceaeabe790656078326e.1693164540.git.alexondunkan@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: vme_user: fix check lines not ending with '(' in vme_fake.c
Alexon Oliveira [Sun, 27 Aug 2023 19:32:52 +0000 (16:32 -0300)]
staging: vme_user: fix check lines not ending with '(' in vme_fake.c

Fixed all CHECK: Lines should not end with a '('
as reported by checkpatch to adhere to the Linux kernel
coding-style guidelines.

Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com>
Link: https://lore.kernel.org/r/9f3e2facdc4d5e612dc00830c2da0fb19c20f2c5.1693164540.git.alexondunkan@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: vme_user: fix check alignment of open parenthesis in vme_fake.c
Alexon Oliveira [Sun, 27 Aug 2023 19:32:50 +0000 (16:32 -0300)]
staging: vme_user: fix check alignment of open parenthesis in vme_fake.c

Fixed all CHECK: Alignment should match open parenthesis
as reported by checkpatch to adhere to the Linux kernel
coding-style guidelines.

Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com>
Link: https://lore.kernel.org/r/639fc19f5c5bce6557a813728b28c299c5134ecf.1693164540.git.alexondunkan@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Replace frame control constants with IEEE80211_FCTL_*
Philipp Hortmann [Fri, 15 Sep 2023 16:09:57 +0000 (18:09 +0200)]
staging: rtl8192e: Replace frame control constants with IEEE80211_FCTL_*

Replace frame control fields with IEEE80211_FCTL_* to avoid proprietary
constant names.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/24d195f60ab9aa1d419c81b749c3d64dc8f643e3.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Replace usage of RTLLIB_FCTL_DSTODS with function
Philipp Hortmann [Fri, 15 Sep 2023 16:09:50 +0000 (18:09 +0200)]
staging: rtl8192e: Replace usage of RTLLIB_FCTL_DSTODS with function

Replace usage of RTLLIB_FCTL_DSTODS with function ieee80211_has_a4() to
avoid proprietary code and to increase readability. To achieve this goal
it was required to change a parameter of function rtllib_rx_data_filter().

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/69f72a352b8129bcc6610c1355a41d966abf24d8.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Replace control subframe types with IEEE80211_STYPE_*
Philipp Hortmann [Fri, 15 Sep 2023 16:09:42 +0000 (18:09 +0200)]
staging: rtl8192e: Replace control subframe types with IEEE80211_STYPE_*

Replace control and data subframe types RTLLIB_STYPE_* with
IEEE80211_STYPE_* to avoid proprietary constant names.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/970555ba76dcf3b9896c51aab8ff333a95f12225.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Replace management subframe types with IEEE80211_STYPE_*
Philipp Hortmann [Fri, 15 Sep 2023 16:09:36 +0000 (18:09 +0200)]
staging: rtl8192e: Replace management subframe types with IEEE80211_STYPE_*

Replace management subframe types RTLLIB_STYPE_* with IEEE80211_STYPE_*
to avoid proprietary constant names.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/35ff2758b79f8dadb1d864f3f6d948a76179ad36.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Remove struct rtllib_pspoll_hdr
Philipp Hortmann [Fri, 15 Sep 2023 16:09:30 +0000 (18:09 +0200)]
staging: rtl8192e: Remove struct rtllib_pspoll_hdr

Replace struct rtllib_pspoll_hdr with struct ieee80211_pspoll to avoid
proprietary code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/a4bd004fcbba81f96fd09f5adec5f029e2de3d6d.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Remove struct rtllib_hdr_4addrqos
Philipp Hortmann [Fri, 15 Sep 2023 16:09:25 +0000 (18:09 +0200)]
staging: rtl8192e: Remove struct rtllib_hdr_4addrqos

Replace struct rtllib_hdr_4addrqos with struct ieee80211_qos_hdr_4addr to
avoid proprietary code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e146191ec1781a3989b318316fe9d8cdb330a52a.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Remove struct rtllib_hdr_3addrqos
Philipp Hortmann [Fri, 15 Sep 2023 16:09:18 +0000 (18:09 +0200)]
staging: rtl8192e: Remove struct rtllib_hdr_3addrqos

Replace struct rtllib_hdr_3addrqos with struct ieee80211_qos_hdr to avoid
proprietary code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/f9c52f9822075476d491b2f1061af51a4b818f3a.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Remove struct rtllib_hdr_4addr
Philipp Hortmann [Fri, 15 Sep 2023 16:09:12 +0000 (18:09 +0200)]
staging: rtl8192e: Remove struct rtllib_hdr_4addr

Replace struct rtllib_hdr_4addr with struct ieee80211_hdr to avoid
proprietary code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/532a589e017bb6edefe60fc2ea402f541eb237ed.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Replace struct rtllib_hdr_4addr in rtllib_crypt*.c
Philipp Hortmann [Fri, 15 Sep 2023 16:07:43 +0000 (18:07 +0200)]
staging: rtl8192e: Replace struct rtllib_hdr_4addr in rtllib_crypt*.c

Replace struct rtllib_hdr_4addr with struct ieee80211_hdr to avoid
proprietary code in rtllib_crypt_tkip.c and rtllib_crypt_ccmp.c.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/6bbbe6617e62fb9e04b4bc23f8bac6c31befcfa8.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Remove unused struct rtllib_hdr and two enums
Philipp Hortmann [Fri, 15 Sep 2023 16:07:36 +0000 (18:07 +0200)]
staging: rtl8192e: Remove unused struct rtllib_hdr and two enums

Remove struct rtllib_hdr, enum rt_ps_mode and enum fw_cmd_io_type as those
are not used.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/4bdb5e4d604eb3bd46c7853ad6d9a60f6208dd4a.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Replace struct rtllib_hdr_3addr in structs of rtllib.h
Philipp Hortmann [Fri, 15 Sep 2023 16:07:30 +0000 (18:07 +0200)]
staging: rtl8192e: Replace struct rtllib_hdr_3addr in structs of rtllib.h

Replace struct rtllib_hdr_3addr with struct ieee80211_hdr_3addr to avoid
proprietary struct in structs of rtllib.h.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e327712027b022561759d7cadcf51bf8274ab05a.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Replace struct rtllib_hdr_3addr in r8192E_dev.c
Philipp Hortmann [Fri, 15 Sep 2023 16:07:23 +0000 (18:07 +0200)]
staging: rtl8192e: Replace struct rtllib_hdr_3addr in r8192E_dev.c

Replace struct rtllib_hdr_3addr with struct ieee80211_hdr_3addr to avoid
proprietary struct in r8192E_dev.c, rtllib_tx.c and in functions of
rtllib.h.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/8e5901c4ecb0961374610f627deb6a6ad9bc53df.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Replace struct rtllib_hdr_3addr in rtllib_softmac.c
Philipp Hortmann [Fri, 15 Sep 2023 16:07:03 +0000 (18:07 +0200)]
staging: rtl8192e: Replace struct rtllib_hdr_3addr in rtllib_softmac.c

Replace struct rtllib_hdr_3addr with struct ieee80211_hdr_3addr to avoid
proprietary struct.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/8e385d0810132086ce44d295c47d3798960a391b.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Replace struct rtllib_hdr_3addr in rtl819x_BAProc.c
Philipp Hortmann [Fri, 15 Sep 2023 16:07:10 +0000 (18:07 +0200)]
staging: rtl8192e: Replace struct rtllib_hdr_3addr in rtl819x_BAProc.c

Replace struct rtllib_hdr_3addr with struct ieee80211_hdr_3addr to avoid
proprietary struct.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/aa6d81b6a8bc0f126d174ccbee25fd93d072fa59.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Replace struct rtllib_hdr_3addr in rtllib_rx.c
Philipp Hortmann [Fri, 15 Sep 2023 16:06:54 +0000 (18:06 +0200)]
staging: rtl8192e: Replace struct rtllib_hdr_3addr in rtllib_rx.c

Replace struct rtllib_hdr_3addr with struct ieee80211_hdr_3addr to avoid
proprietary struct.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/4d5409433c681557f8187b13f0bbf124a662ff96.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Replace struct rtllib_hdr_1addr with ieee80211_hdr
Philipp Hortmann [Fri, 15 Sep 2023 16:06:46 +0000 (18:06 +0200)]
staging: rtl8192e: Replace struct rtllib_hdr_1addr with ieee80211_hdr

Replace struct rtllib_hdr_1addr with struct ieee80211_hdr to avoid
proprietary struct.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/84aa25fec8e29199970df37b1671f0252d12374e.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Remove rtllib_get_payload()
Philipp Hortmann [Tue, 12 Sep 2023 19:28:53 +0000 (21:28 +0200)]
staging: rtl8192e: Remove rtllib_get_payload()

rtllib_process_action() is only called in one place with management
frames. Frame is passed over to rtllib_get_payload() which passes it to
rtllib_get_hdrlen(). In rtllib_get_hdrlen() all management frames
return with hdrlen = RTLLIB_3ADDR_LEN. Therefore the switch in
rtllib_get_payload() is useless and dead code. The condition act == NULL
cannot occur and can also be removed. Then rtllib_hdr_2addr is not used
anymore and can be removed as well.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/3ef288fb819f50da3eb9291522067babaa57f532.1694546301.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Replace rtl92e_enable_irq with rtl92e_irq_enable
Philipp Hortmann [Tue, 12 Sep 2023 19:28:45 +0000 (21:28 +0200)]
staging: rtl8192e: Replace rtl92e_enable_irq with rtl92e_irq_enable

Replace rtl92e_enable_irq with rtl92e_irq_enable to increase readability.
priv->irq_enabled = 1 was set in both functions.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/6e8167402d279299e3ccf3468021abb0699d0e8e.1694546300.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Replace rtl92e_disable_irq with rtl92e_irq_disable
Philipp Hortmann [Tue, 12 Sep 2023 19:28:37 +0000 (21:28 +0200)]
staging: rtl8192e: Replace rtl92e_disable_irq with rtl92e_irq_disable

Replace rtl92e_disable_irq with rtl92e_irq_disable to increase
readability. priv->irq_enabled = 0 was set in both functions.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/07c7312d1571e23ee382d47095931d68ba194551.1694546300.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Use standard function in softmac_mgmt_xmit()
Philipp Hortmann [Tue, 12 Sep 2023 19:28:31 +0000 (21:28 +0200)]
staging: rtl8192e: Use standard function in softmac_mgmt_xmit()

Use standard function ieee80211_is_beacon() to avoid proprietary code to
identify beacon and to increase readability in softmac_mgmt_xmit() and
_rtl92e_translate_rx_signal_stats()

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/bd648e8e3c9c93c7944b72778ef7288973d8386e.1694546300.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Use standard function in rtllib_rx_check_duplicate()
Philipp Hortmann [Tue, 12 Sep 2023 19:28:25 +0000 (21:28 +0200)]
staging: rtl8192e: Use standard function in rtllib_rx_check_duplicate()

Use standard function ieee80211_is_beacon() to avoid proprietary code and
to increase readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b74b6ef5e266504b9e3d84495bcd8fe4978b4ded.1694546300.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Use standard function in rtllib_process_probe_response()
Philipp Hortmann [Tue, 12 Sep 2023 19:28:18 +0000 (21:28 +0200)]
staging: rtl8192e: Use standard function in rtllib_process_probe_response()

Replace proprietary is_beacon() with ieee80211_is_beacon() and
proprietary "WLAN_FC_GET_STYPE(frame_ctl) == RTLLIB_STYPE_PROBE_RESP"
with standard function to increase readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ad24a52c045d6638103f4263b811c87d18cb3e97.1694546300.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Use standard ieee80211 function in rtllib_rx_mgt()
Philipp Hortmann [Tue, 12 Sep 2023 19:28:11 +0000 (21:28 +0200)]
staging: rtl8192e: Use standard ieee80211 function in rtllib_rx_mgt()

Replace WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl)) and comparison
with standard function to avoid proprietary code and to increase
readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/26cb0a7758186090a618a134c21e237594bbc525.1694546300.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Remove useless equation in debug output
Philipp Hortmann [Tue, 12 Sep 2023 19:28:05 +0000 (21:28 +0200)]
staging: rtl8192e: Remove useless equation in debug output

When "switch (WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl)))" results
in "case RTLLIB_STYPE_BEACON:" there is no need to calculate this again
inside "case" and when a frame is a beacon there is no need to print the
frame identifier again as it is explicit.
Same for PROBE RESPONSE and PROBE REQUEST. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/f3c8deddac66d11c41ba720e4048aba37e41e885.1694546300.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: rtl8192e: Remove unsupported mode IW_MODE_ADHOC
Philipp Hortmann [Sun, 27 Aug 2023 13:27:04 +0000 (15:27 +0200)]
staging: rtl8192e: Remove unsupported mode IW_MODE_ADHOC

Remove unsupported mode IW_MODE_ADHOC because this mode is only partially
coded in the driver.

rtllib_rx_mgt() can only handle probe requests in IW_MODE_ADHOC and no
authentication or association frames.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230827132704.GA12506@matrix-ESPRIMO-P710
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agostaging: vme_user: Use list_for_each_entry() helper
Jinjie Ruan [Wed, 23 Aug 2023 07:14:37 +0000 (15:14 +0800)]
staging: vme_user: Use list_for_each_entry() helper

Convert list_for_each() to list_for_each_entry() so that the
slave/master/dma/handler/lm_pos list_head pointer and list_entry()
call are no longer needed, which can reduce a few lines
of code. No functional changed.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230823071437.450460-1-ruanjinjie@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable pTS in function rtllib_rx_InfraAdhoc()
Tree Davies [Fri, 25 Aug 2023 14:08:47 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable pTS in function rtllib_rx_InfraAdhoc()

Rename variable pTS in function rtllib_rx_InfraAdhoc() to ts
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-17-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable pRxTS in function rtllib_rx_check_duplicate()
Tree Davies [Fri, 25 Aug 2023 14:08:46 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable pRxTS in function rtllib_rx_check_duplicate()

Rename variable pRxTS in function rtllib_rx_check_duplicate() to ts
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-16-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable pTS in function RxReorderIndicatePacket()
Tree Davies [Fri, 25 Aug 2023 14:08:45 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable pTS in function RxReorderIndicatePacket()

Rename variable pTS in function RxReorderIndicatePacket() to ts
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-15-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable pTS in function rtllib_FlushRxTsPendingPkts()
Tree Davies [Fri, 25 Aug 2023 14:08:44 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable pTS in function rtllib_FlushRxTsPendingPkts()

Rename variable pTS in function rtllib_FlushRxTsPendingPkts() to ts
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-14-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable pTS in function AddReorderEntry()
Tree Davies [Fri, 25 Aug 2023 14:08:43 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable pTS in function AddReorderEntry()

Rename variable pTS in function AddReorderEntry() to ts
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-13-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable pTS in function prototype rtllib_FlushRxTsPendingP...
Tree Davies [Fri, 25 Aug 2023 14:08:42 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable pTS in function prototype rtllib_FlushRxTsPendingPkts()

Rename variable pTS in function prototype rtllib_FlushRxTsPendingPkts()
to ts, to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-12-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable pRxTS in function RemoveTsEntry()
Tree Davies [Fri, 25 Aug 2023 14:08:41 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable pRxTS in function RemoveTsEntry()

Rename variable pRxTS in function RemoveTsEntry() to ts
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-11-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable tmp in function GetTs()
Tree Davies [Fri, 25 Aug 2023 14:08:40 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable tmp in function GetTs()

Rename variable tmp in function GetTs() to ts in order
to make the name consistent with other references of type
struct rx_ts_record.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-10-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable pRxTS in function TSInitialize()
Tree Davies [Fri, 25 Aug 2023 14:08:39 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable pRxTS in function TSInitialize()

Rename variable pRxTS in function TSInitialize() to rxts
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-9-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable pTS in function ResetRxTsEntry()
Tree Davies [Fri, 25 Aug 2023 14:08:38 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable pTS in function ResetRxTsEntry()

Rename variable pTS in function ResetRxTsEntry() to ts
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-8-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable pRxTs in function RxPktPendingTimeout()
Tree Davies [Fri, 25 Aug 2023 14:08:37 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable pRxTs in function RxPktPendingTimeout()

Rename variable pRxTs in function RxPktPendingTimeout() to ts
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-7-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable pRxTs in function rtllib_rx_ba_inact_timeout()
Tree Davies [Fri, 25 Aug 2023 14:08:36 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable pRxTs in function rtllib_rx_ba_inact_timeout()

Rename varialbe pRxTs in function rtllib_rx_ba_inact_timeout() to ts
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-6-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable pRxTs in function rtllib_ts_init_del_ba()
Tree Davies [Fri, 25 Aug 2023 14:08:35 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable pRxTs in function rtllib_ts_init_del_ba()

Rename variable pRxTs in function rtllib_ts_init_del_ba() to ts
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-5-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable pRxTs in function rtllib_rx_DELBA()
Tree Davies [Fri, 25 Aug 2023 14:08:34 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable pRxTs in function rtllib_rx_DELBA()

Rename variable pRxTs in function rtllib_rx_DELBA() to ts
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-4-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable pTS in function rtllib_rx_ADDBAReq()
Tree Davies [Fri, 25 Aug 2023 14:08:33 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable pTS in function rtllib_rx_ADDBAReq()

Rename variable pTS in function rtllib_rx_ADDBAReq() to ts
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-3-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoStaging: rtl8192e: Rename variable pRxTs in function rx_ts_delete_ba()
Tree Davies [Fri, 25 Aug 2023 14:08:32 +0000 (07:08 -0700)]
Staging: rtl8192e: Rename variable pRxTs in function rx_ts_delete_ba()

Rename variable pRxTs in function rx_ts_delete_ba() to ts
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230825140847.501113-2-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 months agoLinux 6.6-rc1
Linus Torvalds [Sun, 10 Sep 2023 23:28:41 +0000 (16:28 -0700)]
Linux 6.6-rc1

21 months agoMerge tag 'topic/drm-ci-2023-08-31-1' of git://anongit.freedesktop.org/drm/drm
Linus Torvalds [Sun, 10 Sep 2023 18:55:26 +0000 (11:55 -0700)]
Merge tag 'topic/drm-ci-2023-08-31-1' of git://anongit.freedesktop.org/drm/drm

Pull drm ci scripts from Dave Airlie:
 "This is a bunch of ci integration for the freedesktop gitlab instance
  where we currently do upstream userspace testing on diverse sets of
  GPU hardware. From my perspective I think it's an experiment worth
  going with and seeing how the benefits/noise playout keeping these
  files useful.

  Ideally I'd like to get this so we can do pre-merge testing on PRs
  eventually.

  Below is some info from danvet on why we've ended up making the
  decision and how we can roll it back if we decide it was a bad plan.

  Why in upstream?

   - like documentation, testcases, tools CI integration is one of these
     things where you can waste endless amounts of time if you
     accidentally have a version that doesn't match your source code

   - but also like the above, there's a balance, this is the initial cut
     of what we think makes sense to keep in sync vs out-of-tree,
     probably needs adjustment

   - gitlab supports out-of-repo gitlab integration and that's what's
     been used for the kernel in drm, but it results in per-driver
     fragmentation and lots of duplicated effort. the simple act of
     smashing an arbitrary winner into a topic branch already started
     surfacing patches on dri-devel and sparking good cross driver team
     discussions

  Why gitlab?

   - it's not any more shit than any of the other CI

   - drm userspace uses it extensively for everything in userspace, we
     have a lot of people and experience with this, including
     integration of hw testing labs

   - media userspace like gstreamer is also on gitlab.fd.o, and there's
     discussion to extend this to the media subsystem in some fashion

  Can this be shared?

   - there's definitely a pile of code that could move to scripts/ if
     other subsystem adopt ci integration in upstream kernel git. other
     bits are more drm/gpu specific like the igt-gpu-tests/tools
     integration

   - docker images can be run locally or in other CI runners

  Will we regret this?

   - it's all in one directory, intentionally, for easy deletion

   - probably 1-2 years in upstream to see whether this is worth it or a
     Big Mistake. that's roughly what it took to _really_ roll out solid
     CI in the bigger userspace projects we have on gitlab.fd.o like
     mesa3d"

* tag 'topic/drm-ci-2023-08-31-1' of git://anongit.freedesktop.org/drm/drm:
  drm: ci: docs: fix build warning - add missing escape
  drm: Add initial ci/ subdirectory

21 months agoMerge tag 'x86-urgent-2023-09-10' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 10 Sep 2023 17:39:31 +0000 (10:39 -0700)]
Merge tag 'x86-urgent-2023-09-10' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Fix preemption delays in the SGX code, remove unnecessarily
  UAPI-exported code, fix a ld.lld linker (in)compatibility quirk and
  make the x86 SMP init code a bit more conservative to fix kexec()
  lockups"

* tag 'x86-urgent-2023-09-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/sgx: Break up long non-preemptible delays in sgx_vepc_release()
  x86: Remove the arch_calc_vm_prot_bits() macro from the UAPI
  x86/build: Fix linker fill bytes quirk/incompatibility for ld.lld
  x86/smp: Don't send INIT to non-present and non-booted CPUs

21 months agoMerge tag 'perf-urgent-2023-09-10' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 10 Sep 2023 17:34:46 +0000 (10:34 -0700)]
Merge tag 'perf-urgent-2023-09-10' of git://git./linux/kernel/git/tip/tip

Pull x86 perf event fix from Ingo Molnar:
 "Work around a firmware bug in the uncore PMU driver, affecting certain
  Intel systems"

* tag 'perf-urgent-2023-09-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/uncore: Correct the number of CHAs on EMR

21 months agoMerge tag 'perf-tools-for-v6.6-1-2023-09-05' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sun, 10 Sep 2023 03:06:17 +0000 (20:06 -0700)]
Merge tag 'perf-tools-for-v6.6-1-2023-09-05' of git://git./linux/kernel/git/perf/perf-tools

Pull perf tools updates from Arnaldo Carvalho de Melo:
 "perf tools maintainership:

   - Add git information for perf-tools and perf-tools-next trees and
     branches to the MAINTAINERS file. That is where development now
     takes place and myself and Namhyung Kim have write access, more
     people to come as we emulate other maintainer groups.

  perf record:

   - Record kernel data maps when 'perf record --data' is used, so that
     global variables can be resolved and used in tools that do data
     profiling.

  perf trace:

   - Remove the old, experimental support for BPF events in which a .c
     file was passed as an event: "perf trace -e hello.c" to then get
     compiled and loaded.

     The only known usage for that, that shipped with the kernel as an
     example for such events, augmented the raw_syscalls tracepoints and
     was converted to a libbpf skeleton, reusing all the user space
     components and the BPF code connected to the syscalls.

     In the end just the way to glue the BPF part and the user space
     type beautifiers changed, now being performed by libbpf skeletons.

     The next step is to use BTF to do pretty printing of all syscall
     types, as discussed with Alan Maguire and others.

     Now, on a perf built with BUILD_BPF_SKEL=1 we get most if not all
     path/filenames/strings, some of the networking data structures,
     perf_event_attr, etc, i.e. systemwide tracing of nanosleep calls
     and perf_event_open syscalls while 'perf stat' runs 'sleep' for 5
     seconds:

      # perf trace -a -e *nanosleep,perf* perf stat -e cycles,instructions sleep 5
         0.000 (   9.034 ms): perf/327641 perf_event_open(attr_uptr: { type: 0 (PERF_TYPE_HARDWARE), size: 136, config: 0 (PERF_COUNT_HW_CPU_CYCLES), sample_type: IDENTIFIER, read_format: TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING, disabled: 1, inherit: 1, enable_on_exec: 1, exclude_guest: 1 }, pid: 327642 (perf), cpu: -1, group_fd: -1, flags: FD_CLOEXEC) = 3
         9.039 (   0.006 ms): perf/327641 perf_event_open(attr_uptr: { type: 0 (PERF_TYPE_HARDWARE), size: 136, config: 0x1 (PERF_COUNT_HW_INSTRUCTIONS), sample_type: IDENTIFIER, read_format: TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING, disabled: 1, inherit: 1, enable_on_exec: 1, exclude_guest: 1 }, pid: 327642 (perf-exec), cpu: -1, group_fd: -1, flags: FD_CLOEXEC) = 4
             ? (           ): gpm/991  ... [continued]: clock_nanosleep())               = 0
        10.133 (           ): sleep/327642 clock_nanosleep(rqtp: { .tv_sec: 5, .tv_nsec: 0 }, rmtp: 0x7ffd36f83ed0) ...
             ? (           ): pool-gsd-smart/3051  ... [continued]: clock_nanosleep())   = 0
        30.276 (           ): gpm/991 clock_nanosleep(rqtp: { .tv_sec: 2, .tv_nsec: 0 }, rmtp: 0x7ffcc6f73710) ...
       223.215 (1000.430 ms): pool-gsd-smart/3051 clock_nanosleep(rqtp: { .tv_sec: 1, .tv_nsec: 0 }, rmtp: 0x7f6e7fffec90) = 0
        30.276 (2000.394 ms): gpm/991  ... [continued]: clock_nanosleep())               = 0
      1230.814 (           ): pool-gsd-smart/3051 clock_nanosleep(rqtp: { .tv_sec: 1, .tv_nsec: 0 }, rmtp: 0x7f6e7fffec90) ...
      1230.814 (1000.404 ms): pool-gsd-smart/3051  ... [continued]: clock_nanosleep())   = 0
      2030.886 (           ): gpm/991 clock_nanosleep(rqtp: { .tv_sec: 2, .tv_nsec: 0 }, rmtp: 0x7ffcc6f73710) ...
      2237.709 (1000.153 ms): pool-gsd-smart/3051 clock_nanosleep(rqtp: { .tv_sec: 1, .tv_nsec: 0 }, rmtp: 0x7f6e7fffec90) = 0
             ? (           ): crond/1172  ... [continued]: clock_nanosleep())            = 0
      3242.699 (           ): pool-gsd-smart/3051 clock_nanosleep(rqtp: { .tv_sec: 1, .tv_nsec: 0 }, rmtp: 0x7f6e7fffec90) ...
      2030.886 (2000.385 ms): gpm/991  ... [continued]: clock_nanosleep())               = 0
      3728.078 (           ): crond/1172 clock_nanosleep(rqtp: { .tv_sec: 60, .tv_nsec: 0 }, rmtp: 0x7ffe0971dcf0) ...
      3242.699 (1000.158 ms): pool-gsd-smart/3051  ... [continued]: clock_nanosleep())   = 0
      4031.409 (           ): gpm/991 clock_nanosleep(rqtp: { .tv_sec: 2, .tv_nsec: 0 }, rmtp: 0x7ffcc6f73710) ...
        10.133 (5000.375 ms): sleep/327642  ... [continued]: clock_nanosleep())          = 0

      Performance counter stats for 'sleep 5':

             2,617,347      cycles
             1,855,997      instructions                     #    0.71  insn per cycle

           5.002282128 seconds time elapsed

           0.000855000 seconds user
           0.000852000 seconds sys

  perf annotate:

   - Building with binutils' libopcode now is opt-in (BUILD_NONDISTRO=1)
     for licensing reasons, and we missed a build test on
     tools/perf/tests makefile.

     Since we now default to NDEBUG=1, we ended up segfaulting when
     building with BUILD_NONDISTRO=1 because a needed initialization
     routine was being "error checked" via an assert.

     Fix it by explicitly checking the result and aborting instead if it
     fails.

     We better back propagate the error, but at least 'perf annotate' on
     samples collected for a BPF program is back working when perf is
     built with BUILD_NONDISTRO=1.

  perf report/top:

   - Add back TUI hierarchy mode header, that is seen when using 'perf
     report/top --hierarchy'.

   - Fix the number of entries for 'e' key in the TUI that was
     preventing navigation of lines when expanding an entry.

  perf report/script:

   - Support cross platform register handling, allowing a perf.data file
     collected on one architecture to have registers sampled correctly
     displayed when analysis tools such as 'perf report' and 'perf
     script' are used on a different architecture.

   - Fix handling of event attributes in pipe mode, i.e. when one uses:

   perf record -o - | perf report -i -

     When no perf.data files are used.

   - Handle files generated via pipe mode with a version of perf and
     then read also via pipe mode with a different version of perf,
     where the event attr record may have changed, use the record size
     field to properly support this version mismatch.

  perf probe:

   - Accessing global variables from uprobes isn't supported, make the
     error message state that instead of stating that some minimal
     kernel version is needed to have that feature. This seems just a
     tool limitation, the kernel probably has all that is needed.

  perf tests:

   - Fix a reference count related leak in the dlfilter v0 API where the
     result of a thread__find_symbol_fb() is not matched with an
     addr_location__exit() to drop the reference counts of the resolved
     components (machine, thread, map, symbol, etc). Add a dlfilter test
     to make sure that doesn't regresses.

   - Lots of fixes for the 'perf test' written in shell script related
     to problems found with the shellcheck utility.

   - Fixes for 'perf test' shell scripts testing features enabled when
     perf is built with BUILD_BPF_SKEL=1, such as 'perf stat' bpf
     counters.

   - Add perf record sample filtering test, things like the following
     example, that gets implemented as a BPF filter attached to the
     event:

       # perf record -e task-clock -c 10000 --filter 'ip < 0xffffffff00000000'

   - Improve the way the task_analyzer test checks if libtraceevent is
     linked, using 'perf version --build-options' instead of the more
     expensinve 'perf record -e "sched:sched_switch"'.

   - Add support for riscv in the mmap-basic test. (This went as well
     via the RiscV tree, same contents).

  libperf:

   - Implement riscv mmap support (This went as well via the RiscV tree,
     same contents).

  perf script:

   - New tool that converts perf.data files to the firefox profiler
     format so that one can use the visualizer at
     https://profiler.firefox.com/. Done by Anup Sharma as part of this
     year's Google Summer of Code.

     One can generate the output and upload it to the web interface but
     Anup also automated everything:

       perf script gecko -F 99 -a sleep 60

   - Support syscall name parsing on arm64.

   - Print "cgroup" field on the same line as "comm".

  perf bench:

   - Add new 'uprobe' benchmark to measure the overhead of uprobes
     with/without BPF programs attached to it.

   - breakpoints are not available on power9, skip that test.

  perf stat:

   - Add #num_cpus_online literal to be used in 'perf stat' metrics, and
     add this extra 'perf test' check that exemplifies its purpose:

   TEST_ASSERT_VAL("#num_cpus_online",
                         expr__parse(&num_cpus_online, ctx, "#num_cpus_online") == 0);
   TEST_ASSERT_VAL("#num_cpus", expr__parse(&num_cpus, ctx, "#num_cpus") == 0);
   TEST_ASSERT_VAL("#num_cpus >= #num_cpus_online", num_cpus >= num_cpus_online);

  Miscellaneous:

   - Improve tool startup time by lazily reading PMU, JSON, sysfs data.

   - Improve error reporting in the parsing of events, passing YYLTYPE
     to error routines, so that the output can show were the parsing
     error was found.

   - Add 'perf test' entries to check the parsing of events
     improvements.

   - Fix various leak for things detected by -fsanitize=address, mostly
     things that would be freed at tool exit, including:

       - Free evsel->filter on the destructor.

       - Allow tools to register a thread->priv destructor and use it in
         'perf trace'.

       - Free evsel->priv in 'perf trace'.

       - Free string returned by synthesize_perf_probe_point() when the
         caller fails to do all it needs.

   - Adjust various compiler options to not consider errors some
     warnings when building with broken headers found in things like
     python, flex, bison, as we otherwise build with -Werror. Some for
     gcc, some for clang, some for some specific version of those, some
     for some specific version of flex or bison, or some specific
     combination of these components, bah.

   - Allow customization of clang options for BPF target, this helps
     building on gentoo where there are other oddities where BPF targets
     gets passed some compiler options intended for the native build, so
     building with WERROR=0 helps while these oddities are fixed.

   - Dont pass ERR_PTR() values to perf_session__delete() in 'perf top'
     and 'perf lock', fixing some segfaults when handling some odd
     failures.

   - Add LTO build option.

   - Fix format of unordered lists in the perf docs
     (tools/perf/Documentation)

   - Overhaul the bison files, using constructs such as YYNOMEM.

   - Remove unused tokens from the bison .y files.

   - Add more comments to various structs.

   - A few LoongArch enablement patches.

  Vendor events (JSON):

   - Add JSON metrics for Yitian 710 DDR (aarch64). Things like:

   EventName, BriefDescription
   visible_window_limit_reached_rd, "At least one entry in read queue reaches the visible window limit.",
   visible_window_limit_reached_wr, "At least one entry in write queue reaches the visible window limit.",
   op_is_dqsosc_mpc        , "A DQS Oscillator MPC command to DRAM.",
   op_is_dqsosc_mrr        , "A DQS Oscillator MRR command to DRAM.",
   op_is_tcr_mrr        , "A Temperature Compensated Refresh(TCR) MRR command to DRAM.",

   - Add AmpereOne metrics (aarch64).

   - Update N2 and V2 metrics (aarch64) and events using Arm telemetry
     repo.

   - Update scale units and descriptions of common topdown metrics on
     aarch64. Things like:
       - "MetricExpr": "stall_slot_frontend / (#slots * cpu_cycles)",
       - "BriefDescription": "Frontend bound L1 topdown metric",
       + "MetricExpr": "100 * (stall_slot_frontend / (#slots * cpu_cycles))",
       + "BriefDescription": "This metric is the percentage of total slots that were stalled due to resource constraints in the frontend of the processor.",

   - Update events for intel: meteorlake to 1.04, sapphirerapids to
     1.15, Icelake+ metric constraints.

   - Update files for the power10 platform"

* tag 'perf-tools-for-v6.6-1-2023-09-05' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (217 commits)
  perf parse-events: Fix driver config term
  perf parse-events: Fixes relating to no_value terms
  perf parse-events: Fix propagation of term's no_value when cloning
  perf parse-events: Name the two term enums
  perf list: Don't print Unit for "default_core"
  perf vendor events intel: Fix modifier in tma_info_system_mem_parallel_reads for skylake
  perf dlfilter: Avoid leak in v0 API test use of resolve_address()
  perf metric: Add #num_cpus_online literal
  perf pmu: Remove str from perf_pmu_alias
  perf parse-events: Make common term list to strbuf helper
  perf parse-events: Minor help message improvements
  perf pmu: Avoid uninitialized use of alias->str
  perf jevents: Use "default_core" for events with no Unit
  perf test stat_bpf_counters_cgrp: Enhance perf stat cgroup BPF counter test
  perf test shell stat_bpf_counters: Fix test on Intel
  perf test shell record_bpf_filter: Skip 6.2 kernel
  libperf: Get rid of attr.id field
  perf tools: Convert to perf_record_header_attr_id()
  libperf: Add perf_record_header_attr_id()
  perf tools: Handle old data in PERF_RECORD_ATTR
  ...

21 months agoMerge tag '6.6-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sun, 10 Sep 2023 02:56:23 +0000 (19:56 -0700)]
Merge tag '6.6-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - six smb3 client fixes including ones to allow controlling smb3
   directory caching timeout and limits, and one debugging improvement

 - one fix for nls Kconfig (don't need to expose NLS_UCS2_UTILS option)

 - one minor spnego registry update

* tag '6.6-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
  spnego: add missing OID to oid registry
  smb3: fix minor typo in SMB2_GLOBAL_CAP_LARGE_MTU
  cifs: update internal module version number for cifs.ko
  smb3: allow controlling maximum number of cached directories
  smb3: add trace point for queryfs (statfs)
  nls: Hide new NLS_UCS2_UTILS
  smb3: allow controlling length of time directory entries are cached with dir leases
  smb: propagate error code of extract_sharename()