linux-2.6-block.git
8 months agostaging: vme_user: make vme_user_sysfs_class constant
Greg Kroah-Hartman [Thu, 5 Oct 2023 13:45:24 +0000 (15:45 +0200)]
staging: vme_user: make vme_user_sysfs_class constant

Now that the driver core allows for struct class to be in read-only
memory, making all 'class' structures to be declared at build time
placing them into read-only memory, instead of having to be dynamically
allocated at load time.

Link: https://lore.kernel.org/r/2023100523-throwback-oak-a164@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: fieldbus: make controller_class constant
Greg Kroah-Hartman [Thu, 5 Oct 2023 13:43:53 +0000 (15:43 +0200)]
staging: fieldbus: make controller_class constant

Now that the driver core allows for struct class to be in read-only
memory, making all 'class' structures to be declared at build time
placing them into read-only memory, instead of having to be dynamically
allocated at load time.

Cc: Sven Van Asbroeck <TheSven73@gmail.com>
Link: https://lore.kernel.org/r/2023100552-entrench-dingbat-093a@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: bcm2835-audio: Register bcm2835-audio with vchiq_bus_type
Umang Jain [Sat, 23 Sep 2023 14:32:00 +0000 (20:02 +0530)]
staging: bcm2835-audio: Register bcm2835-audio with vchiq_bus_type

Similar to how bcm2385-camera device is registered, register the
bcm2835-audio with vchiq_bus_type as well.

Since we moved away bcm2835-audio from platform driver/device,
we have to set the DMA mask explicitly. Set the DMA mask at probe
time.

Meanwhile at it, change the name and module alias from "bcm2835_audio"
to "bcm2835-audio" to be consistent with bcm2835-camera device. This
does not brings any functional change as '-' and '_' are
interchangeable as per modprobe man pages.

Also, drop vchiq_register_child() helper which is no longer
needed after this patch.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20230923143200.268063-7-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: bcm2835-camera: Register bcm2835-camera with vchiq_bus_type
Umang Jain [Sat, 23 Sep 2023 14:31:59 +0000 (20:01 +0530)]
staging: bcm2835-camera: Register bcm2835-camera with vchiq_bus_type

Register the bcm2835-camera with the vchiq_bus_type instead of using
platform driver/device.

Since we moved away bcm2835-camera from platform driver/device,
we have to set the DMA mask explicitly. Set the DMA mask at probe
time.

Also the VCHIQ firmware doesn't support device enumeration, hence
one has to maintain a list of devices to be registered in the interface.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20230923143200.268063-6-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: vc04_services: vchiq_arm: Register vchiq_bus_type
Umang Jain [Sat, 23 Sep 2023 14:31:58 +0000 (20:01 +0530)]
staging: vc04_services: vchiq_arm: Register vchiq_bus_type

Register the vchiq_bus_type bus with the vchiq interface.
The bcm2835-camera and bcm2835_audio will be registered to this bus type
going ahead.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Link: https://lore.kernel.org/r/20230923143200.268063-5-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: vc04_services: vchiq_arm: Add new bus type and device type
Umang Jain [Sat, 23 Sep 2023 14:31:57 +0000 (20:01 +0530)]
staging: vc04_services: vchiq_arm: Add new bus type and device type

The devices that the vchiq interface registers (bcm2835-audio,
bcm2835-camera) are implemented and exposed by the VC04 firmware.
The device tree describes the VC04 itself with the resources required
to communicate with it through a mailbox interface. However, the
vchiq interface registers these devices as platform devices. This
also means the specific drivers for these devices are getting
registered as platform drivers. This is not correct and a blatant
abuse of platform device/driver.

Add a new bus type, vchiq_bus_type and device type (struct vchiq_device)
which will be used to migrate child devices that the vchiq interfaces
creates/registers from the platform device/driver.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20230923143200.268063-4-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: vc04_services: bcm2835-audio: Explicitly set DMA mask
Umang Jain [Sat, 23 Sep 2023 14:31:56 +0000 (20:01 +0530)]
staging: vc04_services: bcm2835-audio: Explicitly set DMA mask

In the following patches, vchiq_arm will be migrated to create and use
its own bus and all the vchiq drivers (bcm2835-camera, bcm2835-audio)
will be registered to it. Since the platform driver/device model
internally sets the DMA mask for its registered devices, we would have
to do it ourself when we remove the platform driver/device registration
for vchiq devices.

This patch explicitly sets the DMA mask to bcm2835-audio so as not
to introduce a regression when we move away from platform
device/driver model.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20230923143200.268063-3-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: vc04_services: bcm2835-camera: Explicitly set DMA mask
Umang Jain [Sat, 23 Sep 2023 14:31:55 +0000 (20:01 +0530)]
staging: vc04_services: bcm2835-camera: Explicitly set DMA mask

In the following patches, vchiq_arm will be migrated to create and use
its own bus and all the vchiq drivers (bcm2835-camera, bcm2835-audio)
will be registered to it. Since the platform driver/device model
internally sets the DMA mask for its registered devices, we would have
to do it ourself when we remove the platform driver/device registration
for vchiq devices.

This patch explicitly sets the DMA mask to bcm2835-camera so as not
to introduce a regression when we move away from platform
device/driver model.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20230923143200.268063-2-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove constant variable bToOtherSTA
Philipp Hortmann [Tue, 3 Oct 2023 19:34:17 +0000 (21:34 +0200)]
staging: rtl8192e: Remove constant variable bToOtherSTA

Remove variable bToOtherSTA as it is set to 0 and unchanged. The equations
result accordingly. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ecfcd8bff80d98a4e9a2797535a274625607c699.1696360404.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove constant variable net_promiscuous_md
Philipp Hortmann [Tue, 3 Oct 2023 19:34:07 +0000 (21:34 +0200)]
staging: rtl8192e: Remove constant variable net_promiscuous_md

Remove variable net_promiscuous_md as it is set to 0 and unchanged. The
equations result accordingly. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/84a9865f763feeaaa51ce9abecf76c848e13580e.1696360404.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove constant variable promiscuous_on
Philipp Hortmann [Tue, 3 Oct 2023 19:34:01 +0000 (21:34 +0200)]
staging: rtl8192e: Remove constant variable promiscuous_on

Remove variable promiscuous_on as it is set to 0 and unchanged. The
equation results accordingly. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/07936bcc6a426d6f6d74bece2970ab6028abef44.1696360404.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove constant variable fltr_src_sta_frame
Philipp Hortmann [Tue, 3 Oct 2023 19:33:55 +0000 (21:33 +0200)]
staging: rtl8192e: Remove constant variable fltr_src_sta_frame

Remove variable fltr_src_sta_frame as it is set to 0 and unchanged. The
equation results accordingly. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/1a37a8be464bb25531657aa7c868201676d7abb6.1696360404.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove function _rtl92e_wx_get_promisc_mode()
Philipp Hortmann [Tue, 3 Oct 2023 19:33:47 +0000 (21:33 +0200)]
staging: rtl8192e: Remove function _rtl92e_wx_get_promisc_mode()

Remove function _rtl92e_wx_get_promisc_mode() as this functionality is
not commonly used and the tool to access it is deprecated.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/8b1735a3f249b1cf73189e98a07e134c5cd50974.1696360404.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove function _rtl92e_wx_set_promisc_mode()
Philipp Hortmann [Tue, 3 Oct 2023 19:33:41 +0000 (21:33 +0200)]
staging: rtl8192e: Remove function _rtl92e_wx_set_promisc_mode()

Remove function _rtl92e_wx_set_promisc_mode() as this functionality is
not commonly used and the tool to access it is deprecated.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/d318afeae38f14db36da9f2b229ff61535b815c8.1696360404.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove unused parameter mesh_flag
Philipp Hortmann [Tue, 3 Oct 2023 19:33:33 +0000 (21:33 +0200)]
staging: rtl8192e: Remove unused parameter mesh_flag

Remove unused parameter mesh_flag of function
rtllib_softmac_start_protocol().

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/3daa591db70978b305e4a1db7353fd96574d5591.1696360403.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove unused variable raw_tx
Philipp Hortmann [Tue, 3 Oct 2023 19:33:27 +0000 (21:33 +0200)]
staging: rtl8192e: Remove unused variable raw_tx

Remove unused variable raw_tx as it is just set to 0 and not used.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/7ab7606ba836746d28afdb72914fb4e05824dac8.1696360403.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove function rtllib_start_monitor_mode()
Philipp Hortmann [Tue, 3 Oct 2023 19:33:19 +0000 (21:33 +0200)]
staging: rtl8192e: Remove function rtllib_start_monitor_mode()

Remove equation with raw_tx in function rtllib_start_monitor_mode() as it
is always false. rtllib_start_monitor_mode() is then empty and can be
removed as well.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/0031b5f9150851e5ec86a56c1ffad5488fa065f4.1696360403.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove equation in function rtllib_xmit_inter()
Philipp Hortmann [Tue, 3 Oct 2023 19:33:12 +0000 (21:33 +0200)]
staging: rtl8192e: Remove equation in function rtllib_xmit_inter()

Remove equation with raw_tx in function rtllib_xmit_inter() as it is
always true.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/970cd327eaecab8565e7486bbf62e1440a3b44b7.1696360403.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove function _rtl92e_wx_set_rawtx()
Philipp Hortmann [Tue, 3 Oct 2023 19:33:05 +0000 (21:33 +0200)]
staging: rtl8192e: Remove function _rtl92e_wx_set_rawtx()

Remove function _rtl92e_wx_set_rawtx() as this functionality is not
commonly used and the tool to access it is deprecated.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/96196bf0f45934e8e49f1d185165e2a36f5bca7d.1696360403.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agoStaging: rtl8192e: Rename variable pBA
Tree Davies [Tue, 3 Oct 2023 03:18:49 +0000 (20:18 -0700)]
Staging: rtl8192e: Rename variable pBA

Rename variable pBA to ba to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Link: https://lore.kernel.org/r/20231003031849.176743-4-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agoStaging: rtl8192e: Rename variable bCurrentHTSupport
Tree Davies [Tue, 3 Oct 2023 03:18:48 +0000 (20:18 -0700)]
Staging: rtl8192e: Rename variable bCurrentHTSupport

Rename variable bCurrentHTSupport to current_ht_support to fix checkpatch
warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Link: https://lore.kernel.org/r/20231003031849.176743-3-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agoStaging: rtl8192e: Rename variable pTSInfo
Tree Davies [Tue, 3 Oct 2023 03:18:47 +0000 (20:18 -0700)]
Staging: rtl8192e: Rename variable pTSInfo

Rename variable pTSInfo to ts_info to fix checkpatch warning Avoid
CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Link: https://lore.kernel.org/r/20231003031849.176743-2-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove constant parameter from rtllib_stop_protocol()
Philipp Hortmann [Mon, 2 Oct 2023 17:53:56 +0000 (19:53 +0200)]
staging: rtl8192e: Remove constant parameter from rtllib_stop_protocol()

Remove constant parameter shutdown of function rtllib_stop_protocol().
shutdown is always true. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/7eebcd3a8637b686331e34532136df3e7760f869.1696266965.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove unused/constant parameter mesh_flag and shutdown
Philipp Hortmann [Mon, 2 Oct 2023 17:53:45 +0000 (19:53 +0200)]
staging: rtl8192e: Remove unused/constant parameter mesh_flag and shutdown

Remove parameters mesh_flag and shutdown of function
rtllib_softmac_stop_protocol(). mesh_flag is unused. shutdown is always
true.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/5a8f87165b10fd93e3e2fad83ff3380c9f4f22b2.1696266965.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove unused variable rfc_txpowertrackingindex
Philipp Hortmann [Mon, 2 Oct 2023 17:53:38 +0000 (19:53 +0200)]
staging: rtl8192e: Remove unused variable rfc_txpowertrackingindex

rfc_txpowertrackingindex is initialized to 0 and unchanged. Remove dead
code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20a1f7b8297e93e2f0e593f3ddd772ff10d1fecb.1696266965.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove unused variable rate_adaptive_disabled
Philipp Hortmann [Mon, 2 Oct 2023 17:53:32 +0000 (19:53 +0200)]
staging: rtl8192e: Remove unused variable rate_adaptive_disabled

rate_adaptive_disabled is initialized to 0 and unchanged. The equation
results accordingly. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/31ba05bce9966dfac15cac15aa0e79cf36fad27f.1696266964.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove unused variable last_ratr
Philipp Hortmann [Mon, 2 Oct 2023 17:53:26 +0000 (19:53 +0200)]
staging: rtl8192e: Remove unused variable last_ratr

last_ratr is written but never evaluated. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/2b91a8f4ec6184c2f16b8f65bdf65c69a4d17458.1696266964.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove unused function rtl92e_cam_restore()
Philipp Hortmann [Mon, 2 Oct 2023 17:53:20 +0000 (19:53 +0200)]
staging: rtl8192e: Remove unused function rtl92e_cam_restore()

rtl92e_cam_restore() is unused. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/4375f7909fe717555adca1338506fb6d4dad142e.1696266964.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove unused function rtl92e_dm_restore_state()
Philipp Hortmann [Mon, 2 Oct 2023 17:53:15 +0000 (19:53 +0200)]
staging: rtl8192e: Remove unused function rtl92e_dm_restore_state()

Remove rtl92e_dm_restore_state() as it is unused. Remove called functions
_rtl92e_dm_tx_power_reset_recovery() and
_rtl92e_dm_bb_initialgain_restore() as well.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/be2293f1e50993ae473130403b6150d04427576e.1696266964.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 months agostaging: rtl8192e: Remove unused function rtl92e_dm_backup_state()
Philipp Hortmann [Mon, 2 Oct 2023 17:53:08 +0000 (19:53 +0200)]
staging: rtl8192e: Remove unused function rtl92e_dm_backup_state()

rtl92e_dm_backup_state() is unused. Remove dead code.

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

Remove r8192_private_handler _rtl92e_wx_force_reset() as driver does not
reset. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/8447643122088ff03dab65ac15e5e5199603008d.1696165351.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>