Re: [PATCH] drivers: staging: qlge: Fixed an alignment issue.

2021-03-17 Thread Dan Carpenter
On Tue, Mar 16, 2021 at 09:26:34PM +0530, Anish Udupa wrote:
> The * of the comment was not aligned properly. Ran checkpatch and
> found the warning. Resolved it in this patch.
> 
> Signed-off-by: Anish Udupa 
> ---
>  drivers/staging/qlge/qlge_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/qlge/qlge_main.c 
> b/drivers/staging/qlge/qlge_main.c
> index 5516be3af898..bfd7217f3953 100644
> --- a/drivers/staging/qlge/qlge_main.c
> +++ b/drivers/staging/qlge/qlge_main.c
> @@ -3816,7 +3816,7 @@ static int qlge_adapter_down(struct qlge_adapter *qdev)
>   qlge_tx_ring_clean(qdev);
> 
>   /* Call netif_napi_del() from common point.
> - */
> + */

This has already been fixed upstream.  You should be working against
linux-next or staging-next.

https://lore.kernel.org/driverdev-devel/20210216101945.187474-1-duche...@gmail.com/

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: wimax: i2400m: Mundane typo fix in the file driver.c

2021-03-17 Thread Bhaskar Chowdhury


s/procesing/processing/

Signed-off-by: Bhaskar Chowdhury 
---
 drivers/staging/wimax/i2400m/driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wimax/i2400m/driver.c 
b/drivers/staging/wimax/i2400m/driver.c
index f5186458bb3d..8091106212f9 100644
--- a/drivers/staging/wimax/i2400m/driver.c
+++ b/drivers/staging/wimax/i2400m/driver.c
@@ -96,7 +96,7 @@ MODULE_PARM_DESC(barkers,
  *
  * This function just verifies that the header declaration and the
  * payload are consistent and then deals with it, either forwarding it
- * to the device or procesing it locally.
+ * to the device or processing it locally.
  *
  * In the i2400m, messages are basically commands that will carry an
  * ack, so we use i2400m_msg_to_dev() and then deliver the ack back to
--
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


staging: rtl8723bs: remove unused code blocks completed?

2021-03-17 Thread Fabio Aiuto
Hi,

I'm trying to search other unused code blocks:

grep -r '^\(#ifdef \|#if defined(\|#ifndef \)CONFIG_' drivers/staging/rtl8723bs/

drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:#if defined(CONFIG_WEXT_PRIV)
drivers/staging/rtl8723bs/include/drv_conf.h:#ifndef CONFIG_RTW_HIQ_FILTER
drivers/staging/rtl8723bs/include/autoconf.h:#ifndef CONFIG_WIRELESS_EXT

all blocks left are checked by existing defines.
Could we apply this?

thank you,

fabio

diff --git a/drivers/staging/rtl8723bs/TODO b/drivers/staging/rtl8723bs/TODO
index 45065fd3fd5d..afa620ceb2d8 100644
--- a/drivers/staging/rtl8723bs/TODO
+++ b/drivers/staging/rtl8723bs/TODO
@@ -1,5 +1,4 @@
 TODO:
-- find and remove code blocks guarded by never set CONFIG_FOO defines
 - find and remove remaining code valid only for 5 GHz. Most of the obvious
   ones have been removed, but things like channel > 14 still exist.
 - find and remove any code for other chips that is left over
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


staging: rtl8723bs: remove unused code blocks completed?

2021-03-17 Thread Fabio Aiuto
Hi,

I'm trying to search other unused code blocks:

grep -r '^\(#ifdef \|#if defined(\|#ifndef \)CONFIG_' drivers/staging/rtl8723bs/

drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:#if defined(CONFIG_WEXT_PRIV)
drivers/staging/rtl8723bs/include/drv_conf.h:#ifndef CONFIG_RTW_HIQ_FILTER
drivers/staging/rtl8723bs/include/autoconf.h:#ifndef CONFIG_WIRELESS_EXT

all blocks left are checked by existing defines.
Could we apply this?

thank you,

fabio

diff --git a/drivers/staging/rtl8723bs/TODO b/drivers/staging/rtl8723bs/TODO
index 45065fd3fd5d..afa620ceb2d8 100644
--- a/drivers/staging/rtl8723bs/TODO
+++ b/drivers/staging/rtl8723bs/TODO
@@ -1,5 +1,4 @@
 TODO:
-- find and remove code blocks guarded by never set CONFIG_FOO defines
 - find and remove remaining code valid only for 5 GHz. Most of the obvious
   ones have been removed, but things like channel > 14 still exist.
 - find and remove any code for other chips that is left over
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: staging: rtl8723bs: remove unused code blocks completed?

2021-03-17 Thread Greg KH
On Wed, Mar 17, 2021 at 10:59:32AM +0100, Fabio Aiuto wrote:
> Hi,
> 
> I'm trying to search other unused code blocks:
> 
> grep -r '^\(#ifdef \|#if defined(\|#ifndef \)CONFIG_' 
> drivers/staging/rtl8723bs/
> 
> drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM)
> drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM)
> drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:#if defined(CONFIG_WEXT_PRIV)
> drivers/staging/rtl8723bs/include/drv_conf.h:#ifndef CONFIG_RTW_HIQ_FILTER
> drivers/staging/rtl8723bs/include/autoconf.h:#ifndef CONFIG_WIRELESS_EXT
> 
> all blocks left are checked by existing defines.
> Could we apply this?

Sure, looks good, submit this as a real patch with this information in
the changelog and I"ll be glad to take it.

thanks,
greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: remove unused code blocks completed

2021-03-17 Thread Fabio Aiuto
Remove related item in TODO list

---

searched for other unused code blocks:

grep -r '^\(#ifdef \|#if defined(\|#ifndef \)CONFIG_' \
drivers/staging/rtl8723bs/

drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:#if defined(CONFIG_WEXT_PRIV)
drivers/staging/rtl8723bs/include/drv_conf.h:#ifndef CONFIG_RTW_HIQ_FILTER
drivers/staging/rtl8723bs/include/autoconf.h:#ifndef CONFIG_WIRELESS_EXT

all blocks left are checked by existing defines.

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/TODO | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/TODO b/drivers/staging/rtl8723bs/TODO
index 45065fd3fd5d..afa620ceb2d8 100644
--- a/drivers/staging/rtl8723bs/TODO
+++ b/drivers/staging/rtl8723bs/TODO
@@ -1,5 +1,4 @@
 TODO:
-- find and remove code blocks guarded by never set CONFIG_FOO defines
 - find and remove remaining code valid only for 5 GHz. Most of the obvious
   ones have been removed, but things like channel > 14 still exist.
 - find and remove any code for other chips that is left over
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: comedi: das800: fix request_irq() warn

2021-03-17 Thread Ian Abbott

On 16/03/2021 22:42, Tong Zhang wrote:

request_irq() wont accept a name which contains slash so we need to
repalce it with something else -- otherwise it will trigger a warning
and the entry in /proc/irq/ will not be created
since the .name might be used by userspace and we don't want to break
userspace, so we are changing the parameters passed to request_irq()

Suggested-by: Ian Abbott 
Signed-off-by: Tong Zhang 
---
  drivers/staging/comedi/drivers/das800.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/das800.c 
b/drivers/staging/comedi/drivers/das800.c
index 2881808d6606..bc08324f422f 100644
--- a/drivers/staging/comedi/drivers/das800.c
+++ b/drivers/staging/comedi/drivers/das800.c
@@ -668,7 +668,7 @@ static int das800_attach(struct comedi_device *dev, struct 
comedi_devconfig *it)
dev->board_name = board->name;
  
  	if (irq > 1 && irq <= 7) {

-   ret = request_irq(irq, das800_interrupt, 0, dev->board_name,
+   ret = request_irq(irq, das800_interrupt, 0, "das800",
  dev);
if (ret == 0)
dev->irq = irq;



Looks good (apart from the minor spelling niggle spotted by Dan 
Carpenter), thanks!


Reviewed-by: Ian Abbott 

--
-=( Ian Abbott  || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 00/13] Add HANTRO G2/HEVC decoder support for IMX8MQ

2021-03-17 Thread Benjamin Gaignard
The IMX8MQ got two VPUs but until now only G1 has been enabled.
This series aim to add the second VPU (aka G2) and provide basic 
HEVC decoding support.

To be able to decode HEVC it is needed to add/update some of the
structures in the uapi. In addition of them one HANTRO dedicated
control is required to inform the driver of the numbre of bits to skip
at the beginning of the slice header.
The hardware require to allocate few auxiliary buffers to store the
references frame or tile size data.

The driver has been tested with fluster test suite stream.
For example with this command: ./fluster.py run -ts JCT-VC-HEVC_V1 -d 
GStreamer-H.265-V4L2SL-Gst1.0
 
This series depends of the reset rework posted here: 
https://www.spinics.net/lists/arm-kernel/msg878440.html

Finally the both VPUs will have a node the device-tree and be
independent from v4l2 point of view.

A branch with all the dev is available here:
https://gitlab.collabora.com/benjamin.gaignard/for-upstream/-/commits/upstream_g2_v5

version 5:
 - use syscon instead of VPU reset driver.
 - Do not break kernel/DT backward compatibility.
 - Add documentation for dedicated Hantro control.
 - Fix the remarks done by Ezequeil (typo, comments, unused function)
 - Run v4l2-compliance without errors (see below).
 - Do not add field to distinguish version, check postproc reg instead

version 4:
- Split the changes in hevc controls in 2 commits to make them easier to
  review.
- Change hantro_codec_ops run() prototype to return errors   
- Hantro v4l2 dedicated control is now only an integer
- rebase on top of VPU reset changes posted here:
  https://www.spinics.net/lists/arm-kernel/msg878440.html
- Various fix from previous remarks
- Limit the modifications in API to what the driver needs

version 3:
- Fix typo in Hantro v4l2 dedicated control
- Add documentation for the new structures and fields
- Rebased on top of media_tree for-linus-5.12-rc1 tag

version 2:
- remove all change related to scaling
- squash commits to a coherent split
- be more verbose about the added fields
- fix the comments done by Ezequiel about dma_alloc_coherent usage
- fix Dan's comments about control copy, reverse the test logic
in tile_buffer_reallocate, rework some goto and return cases.
- be more verbose about why I change the bindings
- remove all sign-off expect mime since it is confusing
- remove useless clocks in VPUs nodes

./v4l2-compliance -m 1 
v4l2-compliance 1.21.0-4705, 64 bits, 64-bit time_t
v4l2-compliance SHA: 733f7a54f79d 2021-02-03 08:25:49

Compliance test for hantro-vpu device /dev/media1:

Media Driver Info:
Driver name  : hantro-vpu
Model: hantro-vpu
Serial   : 
Bus info : platform: hantro-vpu
Media version: 5.11.0
Hardware revision: 0x (0)
Driver version   : 5.11.0

Required ioctls:
test MEDIA_IOC_DEVICE_INFO: OK
test invalid ioctls: OK

Allow for multiple opens:
test second /dev/media1 open: OK
test MEDIA_IOC_DEVICE_INFO: OK
test for unlimited opens: OK

Media Controller ioctls:
test MEDIA_IOC_G_TOPOLOGY: OK
Entities: 3 Interfaces: 1 Pads: 4 Links: 4
test MEDIA_IOC_ENUM_ENTITIES/LINKS: OK
test MEDIA_IOC_SETUP_LINK: OK

Total for hantro-vpu device /dev/media1: 8, Succeeded: 8, Failed: 0, Warnings: 0

Compliance test for hantro-vpu device /dev/video1:

Driver Info:
Driver name  : hantro-vpu
Card type: nxp,imx8mq-vpu-g2-dec
Bus info : platform: hantro-vpu
Driver version   : 5.11.0
Capabilities : 0x84204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps  : 0x04204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format
Media Driver Info:
Driver name  : hantro-vpu
Model: hantro-vpu
Serial   : 
Bus info : platform: hantro-vpu
Media version: 5.11.0
Hardware revision: 0x (0)
Driver version   : 5.11.0
Interface Info:
ID   : 0x030c
Type : V4L Video
Entity Info:
ID   : 0x0001 (1)
Name : nxp,imx8mq-vpu-g2-dec-source
Function : V4L2 I/O
Pad 0x0102   : 0: Source
  Link 0x0208: to remote pad 0x104 of entity 
'nxp,imx8mq-vpu-g2-dec-proc': Data, Enabled, Immutable

Required ioctls:
test MC information (see 'Media Driver Info' above): OK
test VIDIOC_QUERYCAP: OK
test invalid ioctls: OK

Allow for multiple opens:
test second /dev/video1 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test fo

[PATCH v5 01/13] dt-bindings: mfd: Add 'nxp, imx8mq-vpu-ctrl' to syscon list

2021-03-17 Thread Benjamin Gaignard
Add 'nxp,imx8mq-vpu-ctrl' in the list of possible syscon.
It will used to access to the VPU control registers.

Signed-off-by: Benjamin Gaignard 
---
 Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml 
b/Documentation/devicetree/bindings/mfd/syscon.yaml
index f14ae6da0068..ae22c4730613 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -44,6 +44,7 @@ properties:
   - hisilicon,peri-subctrl
   - microchip,sparx5-cpu-syscon
   - mstar,msc313-pmsleep
+  - nxp,imx8mq-vpu-ctrl
   - rockchip,px30-qos
   - rockchip,rk3066-qos
   - rockchip,rk3288-qos
-- 
2.25.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 02/13] dt-bindings: media: nxp, imx8mq-vpu: Update the bindings for G2 support

2021-03-17 Thread Benjamin Gaignard
Introducing G2 hevc video decoder lead to modify the bindings to allow
to get one node per VPUs.
VPUs share one hardware control block which is provided as a phandle on
an syscon.
Each node got now one reg and one interrupt.
Add a compatible for G2 hardware block: nxp,imx8mq-vpu-g2.

To be compatible with older DT the driver is still capable to use 'ctrl'
reg-name even if it is deprecated now.

Signed-off-by: Benjamin Gaignard 
---
version 5:
- This version doesn't break the backward compatibilty between kernel
  and DT.
 .../bindings/media/nxp,imx8mq-vpu.yaml| 53 ---
 1 file changed, 34 insertions(+), 19 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml 
b/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml
index 762be3f96ce9..79502fc8bde5 100644
--- a/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml
+++ b/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml
@@ -15,22 +15,18 @@ description:
 
 properties:
   compatible:
-const: nxp,imx8mq-vpu
+oneOf:
+  - const: nxp,imx8mq-vpu
+  - const: nxp,imx8mq-vpu-g2
 
   reg:
-maxItems: 3
-
-  reg-names:
-items:
-  - const: g1
-  - const: g2
-  - const: ctrl
+maxItems: 1
 
   interrupts:
-maxItems: 2
+maxItems: 1
 
   interrupt-names:
-items:
+oneOf:
   - const: g1
   - const: g2
 
@@ -46,14 +42,18 @@ properties:
   power-domains:
 maxItems: 1
 
+  nxp,imx8mq-vpu-ctrl:
+description: Specifies a phandle to syscon VPU hardware control block
+$ref: "/schemas/types.yaml#/definitions/phandle"
+
 required:
   - compatible
   - reg
-  - reg-names
   - interrupts
   - interrupt-names
   - clocks
   - clock-names
+  - nxp,imx8mq-vpu-ctrl
 
 additionalProperties: false
 
@@ -62,18 +62,33 @@ examples:
 #include 
 #include 
 
-vpu: video-codec@3830 {
+vpu_ctrl: syscon@3832 {
+ compatible = "nxp,imx8mq-vpu-ctrl", "syscon";
+ reg = <0x3832 0x1>;
+};
+
+vpu_g1: video-codec@3830 {
 compatible = "nxp,imx8mq-vpu";
-reg = <0x3830 0x1>,
-  <0x3831 0x1>,
-  <0x3832 0x1>;
-reg-names = "g1", "g2", "ctrl";
-interrupts = ,
- ;
-interrupt-names = "g1", "g2";
+reg = <0x3830 0x1>;
+interrupts = ;
+interrupt-names = "g1";
+clocks = <&clk IMX8MQ_CLK_VPU_G1_ROOT>,
+ <&clk IMX8MQ_CLK_VPU_G2_ROOT>,
+ <&clk IMX8MQ_CLK_VPU_DEC_ROOT>;
+clock-names = "g1", "g2", "bus";
+power-domains = <&pgc_vpu>;
+nxp,imx8mq-vpu-ctrl = <&vpu_ctrl>;
+};
+
+vpu_g2: video-codec@3831 {
+compatible = "nxp,imx8mq-vpu-g2";
+reg = <0x3830 0x1>;
+interrupts = ;
+interrupt-names = "g2";
 clocks = <&clk IMX8MQ_CLK_VPU_G1_ROOT>,
  <&clk IMX8MQ_CLK_VPU_G2_ROOT>,
  <&clk IMX8MQ_CLK_VPU_DEC_ROOT>;
 clock-names = "g1", "g2", "bus";
 power-domains = <&pgc_vpu>;
+nxp,imx8mq-vpu-ctrl = <&vpu_ctrl>;
 };
-- 
2.25.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 03/13] media: hantro: Use syscon instead of 'ctrl' register

2021-03-17 Thread Benjamin Gaignard
In order to be able to share the control hardware block between
VPUs use a syscon instead a ioremap it in the driver.
To keep the compatibility with older DT if 'nxp,imx8mq-vpu-ctrl'
phandle is not found look at 'ctrl' reg-name.
With the method it becomes useless to provide a list of register
names so remove it.

Signed-off-by: Benjamin Gaignard 
---
version 5:
 - use syscon instead of VPU reset driver.
 - if DT doesn't provide syscon keep backward compatibilty by using
   'ctrl' reg-name.
 drivers/staging/media/hantro/hantro.h   |  5 +-
 drivers/staging/media/hantro/imx8m_vpu_hw.c | 52 -
 2 files changed, 34 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/media/hantro/hantro.h 
b/drivers/staging/media/hantro/hantro.h
index 65f9f7ea7dcf..a99a96b84b5e 100644
--- a/drivers/staging/media/hantro/hantro.h
+++ b/drivers/staging/media/hantro/hantro.h
@@ -13,6 +13,7 @@
 #define HANTRO_H_
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -167,7 +168,7 @@ hantro_vdev_to_func(struct video_device *vdev)
  * @reg_bases: Mapped addresses of VPU registers.
  * @enc_base:  Mapped address of VPU encoder register for convenience.
  * @dec_base:  Mapped address of VPU decoder register for convenience.
- * @ctrl_base: Mapped address of VPU control block.
+ * @ctrl_base: Regmap of VPU control block.
  * @vpu_mutex: Mutex to synchronize V4L2 calls.
  * @irqlock:   Spinlock to synchronize access to data structures
  * shared with interrupt handlers.
@@ -186,7 +187,7 @@ struct hantro_dev {
void __iomem **reg_bases;
void __iomem *enc_base;
void __iomem *dec_base;
-   void __iomem *ctrl_base;
+   struct regmap *ctrl_base;
 
struct mutex vpu_mutex; /* video_device lock */
spinlock_t irqlock;
diff --git a/drivers/staging/media/hantro/imx8m_vpu_hw.c 
b/drivers/staging/media/hantro/imx8m_vpu_hw.c
index c222de075ef4..bd9d135dd440 100644
--- a/drivers/staging/media/hantro/imx8m_vpu_hw.c
+++ b/drivers/staging/media/hantro/imx8m_vpu_hw.c
@@ -7,6 +7,7 @@
 
 #include 
 #include 
+#include 
 
 #include "hantro.h"
 #include "hantro_jpeg.h"
@@ -24,30 +25,28 @@
 #define CTRL_G1_PP_FUSE0x0c
 #define CTRL_G2_DEC_FUSE   0x10
 
+static const struct regmap_config ctrl_regmap_ctrl = {
+   .reg_bits = 32,
+   .val_bits = 32,
+   .reg_stride = 0x14,
+};
+
 static void imx8m_soft_reset(struct hantro_dev *vpu, u32 reset_bits)
 {
-   u32 val;
-
/* Assert */
-   val = readl(vpu->ctrl_base + CTRL_SOFT_RESET);
-   val &= ~reset_bits;
-   writel(val, vpu->ctrl_base + CTRL_SOFT_RESET);
+   regmap_update_bits(vpu->ctrl_base, CTRL_SOFT_RESET, reset_bits, 0);
 
udelay(2);
 
/* Release */
-   val = readl(vpu->ctrl_base + CTRL_SOFT_RESET);
-   val |= reset_bits;
-   writel(val, vpu->ctrl_base + CTRL_SOFT_RESET);
+   regmap_update_bits(vpu->ctrl_base, CTRL_SOFT_RESET,
+  reset_bits, reset_bits);
 }
 
 static void imx8m_clk_enable(struct hantro_dev *vpu, u32 clock_bits)
 {
-   u32 val;
-
-   val = readl(vpu->ctrl_base + CTRL_CLOCK_ENABLE);
-   val |= clock_bits;
-   writel(val, vpu->ctrl_base + CTRL_CLOCK_ENABLE);
+   regmap_update_bits(vpu->ctrl_base, CTRL_CLOCK_ENABLE,
+  clock_bits, clock_bits);
 }
 
 static int imx8mq_runtime_resume(struct hantro_dev *vpu)
@@ -64,9 +63,9 @@ static int imx8mq_runtime_resume(struct hantro_dev *vpu)
imx8m_clk_enable(vpu, CLOCK_G1 | CLOCK_G2);
 
/* Set values of the fuse registers */
-   writel(0x, vpu->ctrl_base + CTRL_G1_DEC_FUSE);
-   writel(0x, vpu->ctrl_base + CTRL_G1_PP_FUSE);
-   writel(0x, vpu->ctrl_base + CTRL_G2_DEC_FUSE);
+   regmap_write(vpu->ctrl_base, CTRL_G1_DEC_FUSE, 0x);
+   regmap_write(vpu->ctrl_base, CTRL_G1_PP_FUSE, 0x);
+   regmap_write(vpu->ctrl_base, CTRL_G2_DEC_FUSE, 0x);
 
clk_bulk_disable_unprepare(vpu->variant->num_clocks, vpu->clocks);
 
@@ -150,8 +149,22 @@ static irqreturn_t imx8m_vpu_g1_irq(int irq, void *dev_id)
 
 static int imx8mq_vpu_hw_init(struct hantro_dev *vpu)
 {
-   vpu->dec_base = vpu->reg_bases[0];
-   vpu->ctrl_base = vpu->reg_bases[vpu->variant->num_regs - 1];
+   struct device_node *np = vpu->dev->of_node;
+
+   vpu->ctrl_base = syscon_regmap_lookup_by_phandle(np, 
"nxp,imx8mq-vpu-ctrl");
+   if (IS_ERR(vpu->ctrl_base)) {
+   struct resource *res;
+   void __iomem *ctrl;
+
+   res = platform_get_resource_byname(vpu->pdev, IORESOURCE_MEM, 
"ctrl");
+   ctrl = devm_ioremap_resource(vpu->dev, res);
+   if (IS_ERR(ctrl))
+   return PTR_ERR(ctrl);
+
+   vpu->ctrl_base = devm_regmap_init_mmio(vpu->dev, ctrl, 
&ctrl_regmap_ctrl);
+   if (IS_ERR(vpu->ctrl_

[PATCH v5 04/13] media: hevc: Add fields and flags for hevc PPS

2021-03-17 Thread Benjamin Gaignard
Add fields and flags as they are defined in
7.4.3.3.1 "General picture parameter set RBSP semantics of the
H.265 ITU specification.

Signed-off-by: Benjamin Gaignard 
---
 .../userspace-api/media/v4l/ext-ctrls-codec.rst| 14 ++
 include/media/hevc-ctrls.h |  4 
 2 files changed, 18 insertions(+)

diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst 
b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
index 00944e97d638..d62e8e423f3b 100644
--- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
+++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
@@ -3234,6 +3234,12 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
 * - __u8
   - ``num_extra_slice_header_bits``
   -
+* - __u8
+  - ``num_ref_idx_l0_default_active_minus1``
+  - Specifies the inferred value of num_ref_idx_l0_active_minus1
+* - __u8
+  - ``num_ref_idx_l1_default_active_minus1``
+  - Specifies the inferred value of num_ref_idx_l1_active_minus1
 * - __s8
   - ``init_qp_minus26``
   -
@@ -3342,6 +3348,14 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
 * - ``V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT``
   - 0x0004
   -
+* - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
+  - 0x0008
+  - Specifies the presence of deblocking filter control syntax elements in
+the PPS
+* - ``V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING``
+  - 0x0010
+  - Specifies that tile column boundaries and likewise tile row boundaries
+are distributed uniformly across the picture
 
 ``V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS (struct)``
 Specifies various slice-specific parameters, especially from the NAL unit
diff --git a/include/media/hevc-ctrls.h b/include/media/hevc-ctrls.h
index b4cb2ef02f17..003f819ecb26 100644
--- a/include/media/hevc-ctrls.h
+++ b/include/media/hevc-ctrls.h
@@ -100,10 +100,14 @@ struct v4l2_ctrl_hevc_sps {
 #define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER   (1ULL << 16)
 #define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT  (1ULL << 17)
 #define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18)
+#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT   (1ULL << 19)
+#define V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING (1ULL << 20)
 
 struct v4l2_ctrl_hevc_pps {
/* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */
__u8num_extra_slice_header_bits;
+   __u8num_ref_idx_l0_default_active_minus1;
+   __u8num_ref_idx_l1_default_active_minus1;
__s8init_qp_minus26;
__u8diff_cu_qp_delta_depth;
__s8pps_cb_qp_offset;
-- 
2.25.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 05/13] media: hevc: Add decode params control

2021-03-17 Thread Benjamin Gaignard
Add decode params control and it associated structure to regroup
all the information that are needed to decode a reference frame as
it is describe in ITU-T Rec. H.265 section "8.3.2 Decoding process
for reference picture set".

Adapt Cedrus driver to these changes.

Signed-off-by: Benjamin Gaignard 
---
 .../media/v4l/ext-ctrls-codec.rst | 94 +++
 .../media/v4l/vidioc-queryctrl.rst|  6 ++
 drivers/media/v4l2-core/v4l2-ctrls.c  | 26 +++--
 drivers/staging/media/sunxi/cedrus/cedrus.c   |  6 ++
 drivers/staging/media/sunxi/cedrus/cedrus.h   |  1 +
 .../staging/media/sunxi/cedrus/cedrus_dec.c   |  2 +
 .../staging/media/sunxi/cedrus/cedrus_h265.c  |  6 +-
 include/media/hevc-ctrls.h| 29 --
 8 files changed, 134 insertions(+), 36 deletions(-)

diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst 
b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
index d62e8e423f3b..8a6d45cb437e 100644
--- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
+++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
@@ -3436,9 +3436,6 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
 * - __u8
   - ``pic_struct``
   -
-* - __u8
-  - ``num_active_dpb_entries``
-  - The number of entries in ``dpb``.
 * - __u8
   - ``ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
   - The list of L0 reference elements as indices in the DPB.
@@ -3446,22 +3443,8 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
   - ``ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
   - The list of L1 reference elements as indices in the DPB.
 * - __u8
-  - ``num_rps_poc_st_curr_before``
-  - The number of reference pictures in the short-term set that come before
-the current frame.
-* - __u8
-  - ``num_rps_poc_st_curr_after``
-  - The number of reference pictures in the short-term set that come after
-the current frame.
-* - __u8
-  - ``num_rps_poc_lt_curr``
-  - The number of reference pictures in the long-term set.
-* - __u8
-  - ``padding[7]``
+  - ``padding``
   - Applications and drivers must set this to zero.
-* - struct :c:type:`v4l2_hevc_dpb_entry`
-  - ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
-  - The decoded picture buffer, for meta-data about reference frames.
 * - struct :c:type:`v4l2_hevc_pred_weight_table`
   - ``pred_weight_table``
   - The prediction weight coefficients for inter-picture prediction.
@@ -3660,3 +3643,78 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
 so this has to come from client.
 This is applicable to H264 and valid Range is from 0 to 63.
 Source Rec. ITU-T H.264 (06/2019); G.7.4.1.1, G.8.8.1.
+
+``V4L2_CID_MPEG_VIDEO_HEVC_DECODE_PARAMS (struct)``
+Specifies various decode parameters, especially the references picture 
order
+count (POC) for all the lists (short, long, before, current, after) and the
+number of entries for each of them.
+These parameters are defined according to :ref:`hevc`.
+They are described in section 8.3 "Slice decoding process" of the
+specification.
+
+.. c:type:: v4l2_ctrl_hevc_decode_params
+
+.. cssclass:: longtable
+
+.. flat-table:: struct v4l2_ctrl_hevc_decode_params
+:header-rows:  0
+:stub-columns: 0
+:widths:   1 1 2
+
+* - __s32
+  - ``pic_order_cnt_val``
+  - PicOrderCntVal as described in section 8.3.1 "Decoding process
+for picture order count" of the specification.
+* - __u8
+  - ``num_active_dpb_entries``
+  - The number of entries in ``dpb``.
+* - struct :c:type:`v4l2_hevc_dpb_entry`
+  - ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
+  - The decoded picture buffer, for meta-data about reference frames.
+* - __u8
+  - ``num_poc_st_curr_before``
+  - The number of reference pictures in the short-term set that come before
+the current frame.
+* - __u8
+  - ``num_poc_st_curr_after``
+  - The number of reference pictures in the short-term set that come after
+the current frame.
+* - __u8
+  - ``num_poc_lt_curr``
+  - The number of reference pictures in the long-term set.
+* - __u8
+  - ``poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
+  - PocStCurrBefore as described in section 8.3.2 "Decoding process for 
reference
+picture set.
+* - __u8
+  - ``poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
+  - PocStCurrAfter as described in section 8.3.2 "Decoding process for 
reference
+picture set.
+* - __u8
+  - ``poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
+  - PocLtCurr as described in section 8.3.2 "Decoding process for reference
+picture set.
+* - __u64
+  - ``flags``
+  - See :ref:`Decode Parameters Flags `
+
+.. _hevc_decode_params_flags:
+
+``Decode Parameters Flags``
+
+.. cssclass:: longtable
+
+.. flat-table::
+:header-rows:  0
+

[PATCH v5 06/13] media: hantro: change hantro_codec_ops run prototype to return errors

2021-03-17 Thread Benjamin Gaignard
Change hantro_codec_ops run prototype from 'void' to 'int'.
This allow to cancel the job if an error occur while configuring
the hardware.

Signed-off-by: Benjamin Gaignard 
---
version 5:
 - forward hantro_h264_dec_prepare_run() return value in case
   of error
 drivers/staging/media/hantro/hantro_drv.c |  4 +++-
 .../staging/media/hantro/hantro_g1_h264_dec.c | 10 +++---
 .../media/hantro/hantro_g1_mpeg2_dec.c|  4 +++-
 .../staging/media/hantro/hantro_g1_vp8_dec.c  |  6 --
 .../staging/media/hantro/hantro_h1_jpeg_enc.c |  4 +++-
 drivers/staging/media/hantro/hantro_hw.h  | 19 ++-
 .../media/hantro/rk3399_vpu_hw_jpeg_enc.c |  4 +++-
 .../media/hantro/rk3399_vpu_hw_mpeg2_dec.c|  4 +++-
 .../media/hantro/rk3399_vpu_hw_vp8_dec.c  |  6 --
 9 files changed, 40 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/media/hantro/hantro_drv.c 
b/drivers/staging/media/hantro/hantro_drv.c
index e5f200e64993..ac1429f00b33 100644
--- a/drivers/staging/media/hantro/hantro_drv.c
+++ b/drivers/staging/media/hantro/hantro_drv.c
@@ -161,7 +161,9 @@ static void device_run(void *priv)
 
v4l2_m2m_buf_copy_metadata(src, dst, true);
 
-   ctx->codec_ops->run(ctx);
+   if (ctx->codec_ops->run(ctx))
+   goto err_cancel_job;
+
return;
 
 err_cancel_job:
diff --git a/drivers/staging/media/hantro/hantro_g1_h264_dec.c 
b/drivers/staging/media/hantro/hantro_g1_h264_dec.c
index 845bef73d218..5c792b7bcb79 100644
--- a/drivers/staging/media/hantro/hantro_g1_h264_dec.c
+++ b/drivers/staging/media/hantro/hantro_g1_h264_dec.c
@@ -273,13 +273,15 @@ static void set_buffers(struct hantro_ctx *ctx)
vdpu_write_relaxed(vpu, ctx->h264_dec.priv.dma, G1_REG_ADDR_QTABLE);
 }
 
-void hantro_g1_h264_dec_run(struct hantro_ctx *ctx)
+int hantro_g1_h264_dec_run(struct hantro_ctx *ctx)
 {
struct hantro_dev *vpu = ctx->dev;
+   int ret;
 
/* Prepare the H264 decoder context. */
-   if (hantro_h264_dec_prepare_run(ctx))
-   return;
+   ret = hantro_h264_dec_prepare_run(ctx);
+   if (ret)
+   return ret;
 
/* Configure hardware registers. */
set_params(ctx);
@@ -301,4 +303,6 @@ void hantro_g1_h264_dec_run(struct hantro_ctx *ctx)
   G1_REG_CONFIG_DEC_CLK_GATE_E,
   G1_REG_CONFIG);
vdpu_write(vpu, G1_REG_INTERRUPT_DEC_E, G1_REG_INTERRUPT);
+
+   return 0;
 }
diff --git a/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c 
b/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c
index 6386a3989bfe..5e8943d31dc5 100644
--- a/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c
+++ b/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c
@@ -155,7 +155,7 @@ hantro_g1_mpeg2_dec_set_buffers(struct hantro_dev *vpu, 
struct hantro_ctx *ctx,
vdpu_write_relaxed(vpu, backward_addr, G1_REG_REFER3_BASE);
 }
 
-void hantro_g1_mpeg2_dec_run(struct hantro_ctx *ctx)
+int hantro_g1_mpeg2_dec_run(struct hantro_ctx *ctx)
 {
struct hantro_dev *vpu = ctx->dev;
struct vb2_v4l2_buffer *src_buf, *dst_buf;
@@ -248,4 +248,6 @@ void hantro_g1_mpeg2_dec_run(struct hantro_ctx *ctx)
 
reg = G1_REG_DEC_E(1);
vdpu_write(vpu, reg, G1_SWREG(1));
+
+   return 0;
 }
diff --git a/drivers/staging/media/hantro/hantro_g1_vp8_dec.c 
b/drivers/staging/media/hantro/hantro_g1_vp8_dec.c
index a5cdf150cd16..d665df026546 100644
--- a/drivers/staging/media/hantro/hantro_g1_vp8_dec.c
+++ b/drivers/staging/media/hantro/hantro_g1_vp8_dec.c
@@ -426,7 +426,7 @@ static void cfg_buffers(struct hantro_ctx *ctx,
vdpu_write_relaxed(vpu, dst_dma, G1_REG_ADDR_DST);
 }
 
-void hantro_g1_vp8_dec_run(struct hantro_ctx *ctx)
+int hantro_g1_vp8_dec_run(struct hantro_ctx *ctx)
 {
const struct v4l2_ctrl_vp8_frame_header *hdr;
struct hantro_dev *vpu = ctx->dev;
@@ -439,7 +439,7 @@ void hantro_g1_vp8_dec_run(struct hantro_ctx *ctx)
 
hdr = hantro_get_ctrl(ctx, V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER);
if (WARN_ON(!hdr))
-   return;
+   return -EINVAL;
 
/* Reset segment_map buffer in keyframe */
if (VP8_FRAME_IS_KEY_FRAME(hdr) && ctx->vp8_dec.segment_map.cpu)
@@ -499,4 +499,6 @@ void hantro_g1_vp8_dec_run(struct hantro_ctx *ctx)
hantro_end_prepare_run(ctx);
 
vdpu_write(vpu, G1_REG_INTERRUPT_DEC_E, G1_REG_INTERRUPT);
+
+   return 0;
 }
diff --git a/drivers/staging/media/hantro/hantro_h1_jpeg_enc.c 
b/drivers/staging/media/hantro/hantro_h1_jpeg_enc.c
index b88dc4ed06db..56cf261a8e95 100644
--- a/drivers/staging/media/hantro/hantro_h1_jpeg_enc.c
+++ b/drivers/staging/media/hantro/hantro_h1_jpeg_enc.c
@@ -88,7 +88,7 @@ hantro_h1_jpeg_enc_set_qtable(struct hantro_dev *vpu,
}
 }
 
-void hantro_h1_jpeg_enc_run(struct hantro_ctx *ctx)
+int hantro_h1_jpeg_enc_run(struct hantro_ctx *ctx)
 {
struct hantro_dev *vpu = ctx->dev;
struct vb2_v4l2_buffer *src

[PATCH v5 07/13] media: hantro: Define HEVC codec profiles and supported features

2021-03-17 Thread Benjamin Gaignard
Define which HEVC profiles (up to level 5.1) and features
(no scaling, no 10 bits) are supported by the driver.

Signed-off-by: Benjamin Gaignard 
---
 drivers/staging/media/hantro/hantro.h |  3 ++
 drivers/staging/media/hantro/hantro_drv.c | 58 +++
 2 files changed, 61 insertions(+)

diff --git a/drivers/staging/media/hantro/hantro.h 
b/drivers/staging/media/hantro/hantro.h
index a99a96b84b5e..4ae2071b3bfe 100644
--- a/drivers/staging/media/hantro/hantro.h
+++ b/drivers/staging/media/hantro/hantro.h
@@ -35,6 +35,7 @@ struct hantro_codec_ops;
 #define HANTRO_MPEG2_DECODER   BIT(16)
 #define HANTRO_VP8_DECODER BIT(17)
 #define HANTRO_H264_DECODERBIT(18)
+#define HANTRO_HEVC_DECODERBIT(19)
 #define HANTRO_DECODERS0x
 
 /**
@@ -100,6 +101,7 @@ struct hantro_variant {
  * @HANTRO_MODE_H264_DEC: H264 decoder.
  * @HANTRO_MODE_MPEG2_DEC: MPEG-2 decoder.
  * @HANTRO_MODE_VP8_DEC: VP8 decoder.
+ * @HANTRO_MODE_HEVC_DEC: HEVC decoder.
  */
 enum hantro_codec_mode {
HANTRO_MODE_NONE = -1,
@@ -107,6 +109,7 @@ enum hantro_codec_mode {
HANTRO_MODE_H264_DEC,
HANTRO_MODE_MPEG2_DEC,
HANTRO_MODE_VP8_DEC,
+   HANTRO_MODE_HEVC_DEC,
 };
 
 /*
diff --git a/drivers/staging/media/hantro/hantro_drv.c 
b/drivers/staging/media/hantro/hantro_drv.c
index ac1429f00b33..f0b68e16fcc0 100644
--- a/drivers/staging/media/hantro/hantro_drv.c
+++ b/drivers/staging/media/hantro/hantro_drv.c
@@ -245,6 +245,18 @@ static int hantro_try_ctrl(struct v4l2_ctrl *ctrl)
if (sps->bit_depth_luma_minus8 != 0)
/* Only 8-bit is supported */
return -EINVAL;
+   } else if (ctrl->id == V4L2_CID_MPEG_VIDEO_HEVC_SPS) {
+   const struct v4l2_ctrl_hevc_sps *sps = ctrl->p_new.p_hevc_sps;
+
+   if (sps->bit_depth_luma_minus8 != sps->bit_depth_chroma_minus8)
+   /* Luma and chroma bit depth mismatch */
+   return -EINVAL;
+   if (sps->bit_depth_luma_minus8 != 0)
+   /* Only 8-bit is supported */
+   return -EINVAL;
+   if (sps->flags & V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED)
+   /* No scaling support */
+   return -EINVAL;
}
return 0;
 }
@@ -351,6 +363,52 @@ static const struct hantro_ctrl controls[] = {
.def = V4L2_MPEG_VIDEO_H264_PROFILE_MAIN,
}
}, {
+   .codec = HANTRO_HEVC_DECODER,
+   .cfg = {
+   .id = V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE,
+   .min = V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED,
+   .max = V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED,
+   .def = V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED,
+   },
+   }, {
+   .codec = HANTRO_HEVC_DECODER,
+   .cfg = {
+   .id = V4L2_CID_MPEG_VIDEO_HEVC_START_CODE,
+   .min = V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B,
+   .max = V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B,
+   .def = V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B,
+   },
+   }, {
+   .codec = HANTRO_HEVC_DECODER,
+   .cfg = {
+   .id = V4L2_CID_MPEG_VIDEO_HEVC_PROFILE,
+   .min = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN,
+   .max = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10,
+   .def = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN,
+   },
+   }, {
+   .codec = HANTRO_HEVC_DECODER,
+   .cfg = {
+   .id = V4L2_CID_MPEG_VIDEO_HEVC_LEVEL,
+   .min = V4L2_MPEG_VIDEO_HEVC_LEVEL_1,
+   .max = V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1,
+   },
+   }, {
+   .codec = HANTRO_HEVC_DECODER,
+   .cfg = {
+   .id = V4L2_CID_MPEG_VIDEO_HEVC_SPS,
+   .ops = &hantro_ctrl_ops,
+   },
+   }, {
+   .codec = HANTRO_HEVC_DECODER,
+   .cfg = {
+   .id = V4L2_CID_MPEG_VIDEO_HEVC_PPS,
+   },
+   }, {
+   .codec = HANTRO_HEVC_DECODER,
+   .cfg = {
+   .id = V4L2_CID_MPEG_VIDEO_HEVC_DECODE_PARAMS,
+   },
},
 };
 
-- 
2.25.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 08/13] media: hantro: Only use postproc when post processed formats are defined

2021-03-17 Thread Benjamin Gaignard
If the variant doesn't offert postprocessed formats make sure it will
be ok.

Signed-off-by: Benjamin Gaignard 
---
 drivers/staging/media/hantro/hantro.h  |  8 ++--
 drivers/staging/media/hantro/hantro_postproc.c | 14 ++
 drivers/staging/media/hantro/hantro_v4l2.c |  4 +++-
 3 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/media/hantro/hantro.h 
b/drivers/staging/media/hantro/hantro.h
index 4ae2071b3bfe..83299e8d3a6c 100644
--- a/drivers/staging/media/hantro/hantro.h
+++ b/drivers/staging/media/hantro/hantro.h
@@ -413,12 +413,8 @@ hantro_get_dst_buf(struct hantro_ctx *ctx)
return v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
 }
 
-static inline bool
-hantro_needs_postproc(const struct hantro_ctx *ctx,
- const struct hantro_fmt *fmt)
-{
-   return !ctx->is_encoder && fmt->fourcc != V4L2_PIX_FMT_NV12;
-}
+bool hantro_needs_postproc(const struct hantro_ctx *ctx,
+  const struct hantro_fmt *fmt);
 
 static inline dma_addr_t
 hantro_get_dec_buf_addr(struct hantro_ctx *ctx, struct vb2_buffer *vb)
diff --git a/drivers/staging/media/hantro/hantro_postproc.c 
b/drivers/staging/media/hantro/hantro_postproc.c
index 6d2a8f2a8f0b..ed8916c950a4 100644
--- a/drivers/staging/media/hantro/hantro_postproc.c
+++ b/drivers/staging/media/hantro/hantro_postproc.c
@@ -50,6 +50,20 @@ const struct hantro_postproc_regs hantro_g1_postproc_regs = {
.display_width = {G1_REG_PP_DISPLAY_WIDTH, 0, 0xfff},
 };
 
+bool hantro_needs_postproc(const struct hantro_ctx *ctx,
+  const struct hantro_fmt *fmt)
+{
+   struct hantro_dev *vpu = ctx->dev;
+
+   if (ctx->is_encoder)
+   return false;
+
+   if (!vpu->variant->postproc_fmts)
+   return false;
+
+   return fmt->fourcc != V4L2_PIX_FMT_NV12;
+}
+
 void hantro_postproc_enable(struct hantro_ctx *ctx)
 {
struct hantro_dev *vpu = ctx->dev;
diff --git a/drivers/staging/media/hantro/hantro_v4l2.c 
b/drivers/staging/media/hantro/hantro_v4l2.c
index 1bc118e375a1..77d7fe62ce81 100644
--- a/drivers/staging/media/hantro/hantro_v4l2.c
+++ b/drivers/staging/media/hantro/hantro_v4l2.c
@@ -55,7 +55,9 @@ static const struct hantro_fmt *
 hantro_get_postproc_formats(const struct hantro_ctx *ctx,
unsigned int *num_fmts)
 {
-   if (ctx->is_encoder) {
+   struct hantro_dev *vpu = ctx->dev;
+
+   if (ctx->is_encoder || !vpu->variant->postproc_fmts) {
*num_fmts = 0;
return NULL;
}
-- 
2.25.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 09/13] media: uapi: Add a control for HANTRO driver

2021-03-17 Thread Benjamin Gaignard
The HEVC HANTRO driver needs to know the number of bits to skip at
the beginning of the slice header.
That is a hardware specific requirement so create a dedicated control
that this purpose.

Signed-off-by: Benjamin Gaignard 
---
version 5:
 - Be even more verbose in control documentation.
 - Do not create class for the control.
version 4:
- The control is now an integer which is enough to provide the numbers
  of bits to skip.
version 3:
- Fix typo in field name

 .../userspace-api/media/drivers/hantro.rst | 14 ++
 .../userspace-api/media/drivers/index.rst  |  1 +
 include/uapi/linux/v4l2-controls.h | 13 +
 3 files changed, 28 insertions(+)
 create mode 100644 Documentation/userspace-api/media/drivers/hantro.rst

diff --git a/Documentation/userspace-api/media/drivers/hantro.rst 
b/Documentation/userspace-api/media/drivers/hantro.rst
new file mode 100644
index ..78dcd2a44a03
--- /dev/null
+++ b/Documentation/userspace-api/media/drivers/hantro.rst
@@ -0,0 +1,14 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+Hantro video decoder driver
+===
+
+The Hantro video decoder driver implements the following driver-specific 
controls:
+
+``V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP (integer)``
+Specifies to Hantro HEVC video decoder driver the number of data (in bits) 
to
+skip in the slice segment header.
+If non-IDR, the bits to be skipped go from syntax element "pic_output_flag"
+to before syntax element "slice_temporal_mvp_enabled_flag".
+If IDR, the skipped bits are just "pic_output_flag"
+(separate_colour_plane_flag is not supported).
diff --git a/Documentation/userspace-api/media/drivers/index.rst 
b/Documentation/userspace-api/media/drivers/index.rst
index 1a9038f5f9fa..12e3c512d718 100644
--- a/Documentation/userspace-api/media/drivers/index.rst
+++ b/Documentation/userspace-api/media/drivers/index.rst
@@ -33,6 +33,7 @@ For more details see the file COPYING in the source 
distribution of Linux.
 
ccs
cx2341x-uapi
+hantro
imx-uapi
max2175
meye-uapi
diff --git a/include/uapi/linux/v4l2-controls.h 
b/include/uapi/linux/v4l2-controls.h
index 039c0d7add1b..cebfb57080ed 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -865,6 +865,19 @@ enum v4l2_mpeg_mfc51_video_force_frame_type {
 #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC  
(V4L2_CID_CODEC_MFC51_BASE+53)
 #define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P   
(V4L2_CID_CODEC_MFC51_BASE+54)
 
+/*  MPEG-class control IDs specific to the Hantro driver as defined by V4L2 */
+#define V4L2_CID_CODEC_HANTRO_BASE 
(V4L2_CTRL_CLASS_CODEC | 0x1200)
+/*
+ * V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP -
+ * the number of data (in bits) to skip in the
+ * slice segment header.
+ * If non-IDR, the bits to be skipped go from syntax element "pic_output_flag"
+ * to before syntax element "slice_temporal_mvp_enabled_flag".
+ * If IDR, the skipped bits are just "pic_output_flag"
+ * (separate_colour_plane_flag is not supported).
+ */
+#define V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP (V4L2_CID_CODEC_HANTRO_BASE + 0)
+
 /*  Camera class control IDs */
 
 #define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900)
-- 
2.25.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 10/13] media: hantro: handle V4L2_PIX_FMT_HEVC_SLICE control

2021-03-17 Thread Benjamin Gaignard
Make sure that V4L2_PIX_FMT_HEVC_SLICE is correctly handle by v4l2
of the driver.

Signed-off-by: Benjamin Gaignard 
---
 drivers/staging/media/hantro/hantro_v4l2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/media/hantro/hantro_v4l2.c 
b/drivers/staging/media/hantro/hantro_v4l2.c
index 77d7fe62ce81..0655324fd0d4 100644
--- a/drivers/staging/media/hantro/hantro_v4l2.c
+++ b/drivers/staging/media/hantro/hantro_v4l2.c
@@ -392,6 +392,7 @@ hantro_update_requires_request(struct hantro_ctx *ctx, u32 
fourcc)
case V4L2_PIX_FMT_MPEG2_SLICE:
case V4L2_PIX_FMT_VP8_FRAME:
case V4L2_PIX_FMT_H264_SLICE:
+   case V4L2_PIX_FMT_HEVC_SLICE:
ctx->fh.m2m_ctx->out_q_ctx.q.requires_requests = true;
break;
default:
-- 
2.25.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 11/13] media: hantro: Introduce G2/HEVC decoder

2021-03-17 Thread Benjamin Gaignard
Implement all the logic to get G2 hardware decoding HEVC frames.
It support up level 5.1 HEVC stream.
It doesn't support yet 10 bits formats or scaling feature.

Add HANTRO HEVC dedicated control to skip some bits at the beginning
of the slice header. That is very specific to this hardware so can't
go into uapi structures. Compute the needed value is complex and require
information from the stream that only the userland knows so let it
provide the correct value to the driver.

Signed-off-by: Benjamin Gaignard 
Co-developed-by: Adrian Ratiu 
Signed-off-by: Adrian Ratiu 
Co-developed-by: Ezequiel Garcia 
Signed-off-by: Ezequiel Garcia 
---
version 5:
 - Add co-author tags.
 - Fix Ezequiel comments (typo, comments, etc).
 - Remove unused functions.
version 4:
- fix Ezequiel comments
- use dedicated control as an integer
- change hantro_g2_hevc_dec_run prototype to return errors

version 2:
- squash multiple commits in this one.
- fix the comments done by Ezequiel about dma_alloc_coherent usage
- fix Dan's comments about control copy, reverse the test logic
in tile_buffer_reallocate, rework some goto and return cases.

 drivers/staging/media/hantro/Makefile |   2 +
 drivers/staging/media/hantro/hantro.h |   2 +
 drivers/staging/media/hantro/hantro_drv.c |  36 ++
 .../staging/media/hantro/hantro_g2_hevc_dec.c | 587 ++
 drivers/staging/media/hantro/hantro_g2_regs.h | 198 ++
 drivers/staging/media/hantro/hantro_hevc.c| 324 ++
 drivers/staging/media/hantro/hantro_hw.h  |  49 ++
 7 files changed, 1198 insertions(+)
 create mode 100644 drivers/staging/media/hantro/hantro_g2_hevc_dec.c
 create mode 100644 drivers/staging/media/hantro/hantro_g2_regs.h
 create mode 100644 drivers/staging/media/hantro/hantro_hevc.c

diff --git a/drivers/staging/media/hantro/Makefile 
b/drivers/staging/media/hantro/Makefile
index 743ce08eb184..0357f1772267 100644
--- a/drivers/staging/media/hantro/Makefile
+++ b/drivers/staging/media/hantro/Makefile
@@ -9,12 +9,14 @@ hantro-vpu-y += \
hantro_h1_jpeg_enc.o \
hantro_g1_h264_dec.o \
hantro_g1_mpeg2_dec.o \
+   hantro_g2_hevc_dec.o \
hantro_g1_vp8_dec.o \
rk3399_vpu_hw_jpeg_enc.o \
rk3399_vpu_hw_mpeg2_dec.o \
rk3399_vpu_hw_vp8_dec.o \
hantro_jpeg.o \
hantro_h264.o \
+   hantro_hevc.o \
hantro_mpeg2.o \
hantro_vp8.o
 
diff --git a/drivers/staging/media/hantro/hantro.h 
b/drivers/staging/media/hantro/hantro.h
index 83299e8d3a6c..976c1903d9ce 100644
--- a/drivers/staging/media/hantro/hantro.h
+++ b/drivers/staging/media/hantro/hantro.h
@@ -221,6 +221,7 @@ struct hantro_dev {
  * @jpeg_enc:  JPEG-encoding context.
  * @mpeg2_dec: MPEG-2-decoding context.
  * @vp8_dec:   VP8-decoding context.
+ * @hevc_dec:  HEVC-decoding context.
  */
 struct hantro_ctx {
struct hantro_dev *dev;
@@ -247,6 +248,7 @@ struct hantro_ctx {
struct hantro_jpeg_enc_hw_ctx jpeg_enc;
struct hantro_mpeg2_dec_hw_ctx mpeg2_dec;
struct hantro_vp8_dec_hw_ctx vp8_dec;
+   struct hantro_hevc_dec_hw_ctx hevc_dec;
};
 };
 
diff --git a/drivers/staging/media/hantro/hantro_drv.c 
b/drivers/staging/media/hantro/hantro_drv.c
index f0b68e16fcc0..13c197ca9ba3 100644
--- a/drivers/staging/media/hantro/hantro_drv.c
+++ b/drivers/staging/media/hantro/hantro_drv.c
@@ -281,6 +281,26 @@ static int hantro_jpeg_s_ctrl(struct v4l2_ctrl *ctrl)
return 0;
 }
 
+static int hantro_hevc_s_ctrl(struct v4l2_ctrl *ctrl)
+{
+   struct hantro_ctx *ctx;
+
+   ctx = container_of(ctrl->handler,
+  struct hantro_ctx, ctrl_handler);
+
+   vpu_debug(1, "s_ctrl: id = %d, val = %d\n", ctrl->id, ctrl->val);
+
+   switch (ctrl->id) {
+   case V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP:
+   ctx->hevc_dec.ctrls.hevc_hdr_skip_length = ctrl->val;
+   break;
+   default:
+   return -EINVAL;
+   }
+
+   return 0;
+}
+
 static const struct v4l2_ctrl_ops hantro_ctrl_ops = {
.try_ctrl = hantro_try_ctrl,
 };
@@ -289,6 +309,10 @@ static const struct v4l2_ctrl_ops hantro_jpeg_ctrl_ops = {
.s_ctrl = hantro_jpeg_s_ctrl,
 };
 
+static const struct v4l2_ctrl_ops hantro_hevc_ctrl_ops = {
+   .s_ctrl = hantro_hevc_s_ctrl,
+};
+
 static const struct hantro_ctrl controls[] = {
{
.codec = HANTRO_JPEG_ENCODER,
@@ -409,6 +433,18 @@ static const struct hantro_ctrl controls[] = {
.cfg = {
.id = V4L2_CID_MPEG_VIDEO_HEVC_DECODE_PARAMS,
},
+   }, {
+   .codec = HANTRO_HEVC_DECODER,
+   .cfg = {
+   .id = V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP,
+   .name = "Hantro HEVC slice hea

[PATCH v5 12/13] media: hantro: IMX8M: add variant for G2/HEVC codec

2021-03-17 Thread Benjamin Gaignard
Add variant to IMX8M to enable G2/HEVC codec.
Define the capabilities for the hardware up to 3840x2160.
G2 doesn't have postprocessor, use the same clocks and got it
own interruption.

Signed-off-by: Benjamin Gaignard 
---
version 5:
 - remove useless postproc fields for G2

version 2:
- remove useless clocks

 drivers/staging/media/hantro/hantro_drv.c   |  1 +
 drivers/staging/media/hantro/hantro_hw.h|  1 +
 drivers/staging/media/hantro/imx8m_vpu_hw.c | 76 -
 3 files changed, 76 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/hantro/hantro_drv.c 
b/drivers/staging/media/hantro/hantro_drv.c
index 13c197ca9ba3..659124a52e8a 100644
--- a/drivers/staging/media/hantro/hantro_drv.c
+++ b/drivers/staging/media/hantro/hantro_drv.c
@@ -574,6 +574,7 @@ static const struct of_device_id of_hantro_match[] = {
 #endif
 #ifdef CONFIG_VIDEO_HANTRO_IMX8M
{ .compatible = "nxp,imx8mq-vpu", .data = &imx8mq_vpu_variant, },
+   { .compatible = "nxp,imx8mq-vpu-g2", .data = &imx8mq_vpu_g2_variant },
 #endif
{ /* sentinel */ }
 };
diff --git a/drivers/staging/media/hantro/hantro_hw.h 
b/drivers/staging/media/hantro/hantro_hw.h
index dade3b0769c1..f61f58da05fe 100644
--- a/drivers/staging/media/hantro/hantro_hw.h
+++ b/drivers/staging/media/hantro/hantro_hw.h
@@ -193,6 +193,7 @@ extern const struct hantro_variant rk3399_vpu_variant;
 extern const struct hantro_variant rk3328_vpu_variant;
 extern const struct hantro_variant rk3288_vpu_variant;
 extern const struct hantro_variant imx8mq_vpu_variant;
+extern const struct hantro_variant imx8mq_vpu_g2_variant;
 
 extern const struct hantro_postproc_regs hantro_g1_postproc_regs;
 
diff --git a/drivers/staging/media/hantro/imx8m_vpu_hw.c 
b/drivers/staging/media/hantro/imx8m_vpu_hw.c
index bd9d135dd440..b2ddb1fce0e8 100644
--- a/drivers/staging/media/hantro/imx8m_vpu_hw.c
+++ b/drivers/staging/media/hantro/imx8m_vpu_hw.c
@@ -12,6 +12,7 @@
 #include "hantro.h"
 #include "hantro_jpeg.h"
 #include "hantro_g1_regs.h"
+#include "hantro_g2_regs.h"
 
 #define CTRL_SOFT_RESET0x00
 #define RESET_G1   BIT(1)
@@ -129,6 +130,26 @@ static const struct hantro_fmt imx8m_vpu_dec_fmts[] = {
},
 };
 
+static const struct hantro_fmt imx8m_vpu_g2_dec_fmts[] = {
+   {
+   .fourcc = V4L2_PIX_FMT_NV12,
+   .codec_mode = HANTRO_MODE_NONE,
+   },
+   {
+   .fourcc = V4L2_PIX_FMT_HEVC_SLICE,
+   .codec_mode = HANTRO_MODE_HEVC_DEC,
+   .max_depth = 2,
+   .frmsize = {
+   .min_width = 48,
+   .max_width = 3840,
+   .step_width = MB_DIM,
+   .min_height = 48,
+   .max_height = 2160,
+   .step_height = MB_DIM,
+   },
+   },
+};
+
 static irqreturn_t imx8m_vpu_g1_irq(int irq, void *dev_id)
 {
struct hantro_dev *vpu = dev_id;
@@ -147,6 +168,24 @@ static irqreturn_t imx8m_vpu_g1_irq(int irq, void *dev_id)
return IRQ_HANDLED;
 }
 
+static irqreturn_t imx8m_vpu_g2_irq(int irq, void *dev_id)
+{
+   struct hantro_dev *vpu = dev_id;
+   enum vb2_buffer_state state;
+   u32 status;
+
+   status = vdpu_read(vpu, HEVC_REG_INTERRUPT);
+   state = (status & HEVC_REG_INTERRUPT_DEC_RDY_INT) ?
+VB2_BUF_STATE_DONE : VB2_BUF_STATE_ERROR;
+
+   vdpu_write(vpu, 0, HEVC_REG_INTERRUPT);
+   vdpu_write(vpu, HEVC_REG_CONFIG_DEC_CLK_GATE_E, HEVC_REG_CONFIG);
+
+   hantro_irq_done(vpu, state);
+
+   return IRQ_HANDLED;
+}
+
 static int imx8mq_vpu_hw_init(struct hantro_dev *vpu)
 {
struct device_node *np = vpu->dev->of_node;
@@ -176,6 +215,13 @@ static void imx8m_vpu_g1_reset(struct hantro_ctx *ctx)
imx8m_soft_reset(vpu, RESET_G1);
 }
 
+static void imx8m_vpu_g2_reset(struct hantro_ctx *ctx)
+{
+   struct hantro_dev *vpu = ctx->dev;
+
+   imx8m_soft_reset(vpu, RESET_G2);
+}
+
 /*
  * Supported codec ops.
  */
@@ -201,16 +247,28 @@ static const struct hantro_codec_ops 
imx8mq_vpu_codec_ops[] = {
},
 };
 
+static const struct hantro_codec_ops imx8mq_vpu_g2_codec_ops[] = {
+   [HANTRO_MODE_HEVC_DEC] = {
+   .run = hantro_g2_hevc_dec_run,
+   .reset = imx8m_vpu_g2_reset,
+   .init = hantro_hevc_dec_init,
+   .exit = hantro_hevc_dec_exit,
+   },
+};
+
 /*
  * VPU variants.
  */
 
 static const struct hantro_irq imx8mq_irqs[] = {
{ "g1", imx8m_vpu_g1_irq },
-   { "g2", NULL /* TODO: imx8m_vpu_g2_irq */ },
 };
 
-static const char * const imx8mq_clk_names[] = { "g1", "g2", "bus" };
+static const struct hantro_irq imx8mq_g2_irqs[] = {
+   { "g2", imx8m_vpu_g2_irq },
+};
+
+static const char * const imx8mq_clk_names[] = { "g1", "g2", "bus"};
 
 const struct hantro_variant imx8mq_vpu_variant = {
.dec_fmts = imx8m_vpu_dec_fmts,
@@ -228,3 +286,17 @@ const struct han

[PATCH v5 13/13] arm64: dts: imx8mq: Add node to G2 hardware

2021-03-17 Thread Benjamin Gaignard
Split VPU node in two: one for G1 and one for G2 since they are
different hardware blocks.
Add syscon for hardware control block.
Remove reg-names property that is useless.
Each VPU node only need one interrupt.

Signed-off-by: Benjamin Gaignard 
---
version 5:
 - use syscon instead of VPU reset
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 43 ++-
 1 file changed, 34 insertions(+), 9 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi 
b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index 17c449e12c2e..b537d153ebbd 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -1329,15 +1329,16 @@ usb3_phy1: usb-phy@382f0040 {
status = "disabled";
};
 
-   vpu: video-codec@3830 {
+   vpu_ctrl: syscon@3832 {
+   compatible = "nxp,imx8mq-vpu-ctrl", "syscon";
+   reg = <0x3832 0x1>;
+   };
+
+   vpu_g1: video-codec@3830 {
compatible = "nxp,imx8mq-vpu";
-   reg = <0x3830 0x1>,
- <0x3831 0x1>,
- <0x3832 0x1>;
-   reg-names = "g1", "g2", "ctrl";
-   interrupts = ,
-;
-   interrupt-names = "g1", "g2";
+   reg = <0x3830 0x1>;
+   interrupts = ;
+   interrupt-names = "g1";
clocks = <&clk IMX8MQ_CLK_VPU_G1_ROOT>,
 <&clk IMX8MQ_CLK_VPU_G2_ROOT>,
 <&clk IMX8MQ_CLK_VPU_DEC_ROOT>;
@@ -1350,9 +1351,33 @@ vpu: video-codec@3830 {
 <&clk IMX8MQ_VPU_PLL_OUT>,
 <&clk IMX8MQ_SYS1_PLL_800M>,
 <&clk IMX8MQ_VPU_PLL>;
-   assigned-clock-rates = <6>, <6>,
+   assigned-clock-rates = <6>, <3>,
+  <8>, <0>;
+   power-domains = <&pgc_vpu>;
+   nxp,imx8mq-vpu-ctrl = <&vpu_ctrl>;
+   };
+
+   vpu_g2: video-codec@3831 {
+   compatible = "nxp,imx8mq-vpu-g2";
+   reg = <0x3831 0x1>;
+   interrupts = ;
+   interrupt-names = "g2";
+   clocks = <&clk IMX8MQ_CLK_VPU_G1_ROOT>,
+<&clk IMX8MQ_CLK_VPU_G2_ROOT>,
+<&clk IMX8MQ_CLK_VPU_DEC_ROOT>;
+   clock-names = "g1", "g2",  "bus";
+   assigned-clocks = <&clk IMX8MQ_CLK_VPU_G1>,
+ <&clk IMX8MQ_CLK_VPU_G2>,
+ <&clk IMX8MQ_CLK_VPU_BUS>,
+ <&clk IMX8MQ_VPU_PLL_BYPASS>;
+   assigned-clock-parents = <&clk IMX8MQ_VPU_PLL_OUT>,
+<&clk IMX8MQ_VPU_PLL_OUT>,
+<&clk IMX8MQ_SYS1_PLL_800M>,
+<&clk IMX8MQ_VPU_PLL>;
+   assigned-clock-rates = <6>, <3>,
   <8>, <0>;
power-domains = <&pgc_vpu>;
+   nxp,imx8mq-vpu-ctrl = <&vpu_ctrl>;
};
 
pcie0: pcie@3380 {
-- 
2.25.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: wimax: i2400m: Mundane typo fix in the file driver.c

2021-03-17 Thread Randy Dunlap
On 3/17/21 2:26 AM, Bhaskar Chowdhury wrote:
> 
> s/procesing/processing/
> 
> Signed-off-by: Bhaskar Chowdhury 

Acked-by: Randy Dunlap 

> ---
>  drivers/staging/wimax/i2400m/driver.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wimax/i2400m/driver.c 
> b/drivers/staging/wimax/i2400m/driver.c
> index f5186458bb3d..8091106212f9 100644
> --- a/drivers/staging/wimax/i2400m/driver.c
> +++ b/drivers/staging/wimax/i2400m/driver.c
> @@ -96,7 +96,7 @@ MODULE_PARM_DESC(barkers,
>   *
>   * This function just verifies that the header declaration and the
>   * payload are consistent and then deals with it, either forwarding it
> - * to the device or procesing it locally.
> + * to the device or processing it locally.
>   *
>   * In the i2400m, messages are basically commands that will carry an
>   * ack, so we use i2400m_msg_to_dev() and then deliver the ack back to
> --


-- 
~Randy

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 0/3] Binder: Enable App Freezing Capability

2021-03-17 Thread Christian Brauner
On Mon, Mar 15, 2021 at 06:16:27PM -0700, Li Li wrote:
> From: Li Li 
> 
> To improve the user experience when switching between recently used
> applications, the background applications which are not currently needed
> are cached in the memory. Normally, a well designed application will not
> consume valuable CPU resources in the background. However, it's possible
> some applications are not able or willing to behave as expected, wasting
> energy even after being cached.
> 
> It is a good idea to freeze those applications when they're only being
> kept alive for the sake of faster startup and energy saving. These kernel
> patches will provide the necessary infrastructure for user space framework
> to freeze and thaw a cached process, check the current freezing status and
> correctly deal with outstanding binder transactions to frozen processes.
> 
> Changes in v2: avoid panic by using pr_warn for unexpected cases.
> Changes in v3: improved errcode logic in binder_proc_transaction().
> 
> Marco Ballesio (3):
>   binder: BINDER_FREEZE ioctl
>   binder: use EINTR for interrupted wait for work
>   binder: BINDER_GET_FROZEN_INFO ioctl
> 
>  drivers/android/binder.c| 198 ++--
>  drivers/android/binder_internal.h   |  18 +++
>  include/uapi/linux/android/binder.h |  20 +++
>  3 files changed, 224 insertions(+), 12 deletions(-)

[+Cc Jann]

Christian
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 1/3] binder: BINDER_FREEZE ioctl

2021-03-17 Thread Christian Brauner
On Mon, Mar 15, 2021 at 06:16:28PM -0700, Li Li wrote:
> From: Marco Ballesio 
> 
> Frozen tasks can't process binder transactions, so a way is required to
> inform transmitting ends of communication failures due to the frozen
> state of their receiving counterparts. Additionally, races are possible
> between transitions to frozen state and binder transactions enqueued to
> a specific process.
> 
> Implement BINDER_FREEZE ioctl for user space to inform the binder driver
> about the intention to freeze or unfreeze a process. When the ioctl is
> called, block the caller until any pending binder transactions toward
> the target process are flushed. Return an error to transactions to
> processes marked as frozen.
> 
> Signed-off-by: Marco Ballesio 
> Co-developed-by: Todd Kjos 
> Signed-off-by: Todd Kjos 
> Signed-off-by: Li Li 
> ---
>  drivers/android/binder.c| 139 ++--
>  drivers/android/binder_internal.h   |  12 +++
>  include/uapi/linux/android/binder.h |  13 +++
>  3 files changed, 154 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> index c119736ca56a..b93ca53bb90f 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -1506,6 +1506,12 @@ static void binder_free_transaction(struct 
> binder_transaction *t)
>  
>   if (target_proc) {
>   binder_inner_proc_lock(target_proc);
> + target_proc->outstanding_txns--;
> + if (target_proc->outstanding_txns < 0)
> + pr_warn("%s: Unexpected outstanding_txns %d\n",
> + __func__, target_proc->outstanding_txns);
> + if (!target_proc->outstanding_txns && target_proc->is_frozen)
> + wake_up_interruptible_all(&target_proc->freeze_wait);
>   if (t->buffer)
>   t->buffer->transaction = NULL;
>   binder_inner_proc_unlock(target_proc);
> @@ -2331,10 +2337,11 @@ static int binder_fixup_parent(struct 
> binder_transaction *t,
>   * If the @thread parameter is not NULL, the transaction is always queued
>   * to the waitlist of that specific thread.
>   *
> - * Return:   true if the transactions was successfully queued
> - *   false if the target process or thread is dead
> + * Return:   0 if the transaction was successfully queued
> + *   BR_DEAD_REPLY if the target process or thread is dead
> + *   BR_FROZEN_REPLY if the target process or thread is frozen
>   */
> -static bool binder_proc_transaction(struct binder_transaction *t,
> +static int binder_proc_transaction(struct binder_transaction *t,
>   struct binder_proc *proc,
>   struct binder_thread *thread)
>  {
> @@ -2354,10 +2361,11 @@ static bool binder_proc_transaction(struct 
> binder_transaction *t,
>  
>   binder_inner_proc_lock(proc);
>  
> - if (proc->is_dead || (thread && thread->is_dead)) {
> + if ((proc->is_frozen && !oneway) || proc->is_dead ||
> + (thread && thread->is_dead)) {
>   binder_inner_proc_unlock(proc);
>   binder_node_unlock(node);
> - return false;
> + return proc->is_frozen ? BR_FROZEN_REPLY : BR_DEAD_REPLY;
>   }
>  
>   if (!thread && !pending_async)
> @@ -2373,10 +2381,11 @@ static bool binder_proc_transaction(struct 
> binder_transaction *t,
>   if (!pending_async)
>   binder_wakeup_thread_ilocked(proc, thread, !oneway /* sync */);
>  
> + proc->outstanding_txns++;
>   binder_inner_proc_unlock(proc);
>   binder_node_unlock(node);
>  
> - return true;
> + return 0;
>  }
>  
>  /**
> @@ -3013,13 +3022,16 @@ static void binder_transaction(struct binder_proc 
> *proc,
>   if (reply) {
>   binder_enqueue_thread_work(thread, tcomplete);
>   binder_inner_proc_lock(target_proc);
> - if (target_thread->is_dead) {
> + if (target_thread->is_dead || target_proc->is_frozen) {
> + return_error = target_thread->is_dead ?
> + BR_DEAD_REPLY : BR_FROZEN_REPLY;
>   binder_inner_proc_unlock(target_proc);
>   goto err_dead_proc_or_thread;
>   }
>   BUG_ON(t->buffer->async_transaction != 0);
>   binder_pop_transaction_ilocked(target_thread, in_reply_to);
>   binder_enqueue_thread_work_ilocked(target_thread, &t->work);
> + target_proc->outstanding_txns++;
>   binder_inner_proc_unlock(target_proc);
>   wake_up_interruptible_sync(&target_thread->wait);
>   binder_free_transaction(in_reply_to);
> @@ -3038,7 +3050,9 @@ static void binder_transaction(struct binder_proc *proc,
>   t->from_parent = thread->transaction_stack;
>   thread->transaction_stack = t;
>   binder_inner_p

[PATCH] staging: octeon-usb: Match alignment with open parenthesis

2021-03-17 Thread Mahak Gupta
This patches fixes the checks- 'Alignment should match open parenthesis'
of 'checkpatch.pl'.

Signed-off-by: Mahak Gupta 
---
 drivers/staging/octeon-usb/octeon-hcd.c | 32 +
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/octeon-usb/octeon-hcd.c 
b/drivers/staging/octeon-usb/octeon-hcd.c
index e2f8b6b67f75..f27f20a4aa2d 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -1258,7 +1258,7 @@ static void cvmx_usb_poll_tx_fifo(struct octeon_hcd *usb)
union cvmx_usbcx_hptxsts tx_status;
 
tx_status.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HPTXSTS(usb->index));
+   
CVMX_USBCX_HPTXSTS(usb->index));
if (cvmx_usb_fill_tx_hw(usb, &usb->periodic,
tx_status.s.ptxfspcavail))
USB_SET_FIELD32(CVMX_USBCX_GINTMSK(usb->index),
@@ -1272,7 +1272,7 @@ static void cvmx_usb_poll_tx_fifo(struct octeon_hcd *usb)
union cvmx_usbcx_gnptxsts tx_status;
 
tx_status.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_GNPTXSTS(usb->index));
+   
CVMX_USBCX_GNPTXSTS(usb->index));
if (cvmx_usb_fill_tx_hw(usb, &usb->nonperiodic,
tx_status.s.nptxfspcavail))
USB_SET_FIELD32(CVMX_USBCX_GINTMSK(usb->index),
@@ -1298,13 +1298,13 @@ static void cvmx_usb_fill_tx_fifo(struct octeon_hcd 
*usb, int channel)
 
/* We only need to fill data on outbound channels */
hcchar.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HCCHARX(channel, usb->index));
+CVMX_USBCX_HCCHARX(channel, 
usb->index));
if (hcchar.s.epdir != CVMX_USB_DIRECTION_OUT)
return;
 
/* OUT Splits only have data on the start and not the complete */
usbc_hcsplt.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HCSPLTX(channel, usb->index));
+ CVMX_USBCX_HCSPLTX(channel, 
usb->index));
if (usbc_hcsplt.s.spltena && usbc_hcsplt.s.compsplt)
return;
 
@@ -1313,7 +1313,7 @@ static void cvmx_usb_fill_tx_fifo(struct octeon_hcd *usb, 
int channel)
 * words.
 */
usbc_hctsiz.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HCTSIZX(channel, usb->index));
+ CVMX_USBCX_HCTSIZX(channel, 
usb->index));
if (!usbc_hctsiz.s.xfersize)
return;
 
@@ -1360,7 +1360,7 @@ static void cvmx_usb_start_channel_control(struct 
octeon_hcd *usb,
union cvmx_usbcx_hctsizx usbc_hctsiz;
 
usbc_hctsiz.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HCTSIZX(channel, usb->index));
+ CVMX_USBCX_HCTSIZX(channel, 
usb->index));
 
switch (transaction->stage) {
case CVMX_USB_STAGE_NON_CONTROL:
@@ -1517,7 +1517,7 @@ static void cvmx_usb_start_channel(struct octeon_hcd 
*usb, int channel,
 
/* Clear all channel status bits */
usbc_hcint.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HCINTX(channel, usb->index));
+CVMX_USBCX_HCINTX(channel, 
usb->index));
 
cvmx_usb_write_csr32(usb,
 CVMX_USBCX_HCINTX(channel, usb->index),
@@ -1552,7 +1552,7 @@ static void cvmx_usb_start_channel(struct octeon_hcd 
*usb, int channel,
 
/* Enable the channel interrupt to propagate */
usbc_haintmsk.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HAINTMSK(usb->index));
+   
CVMX_USBCX_HAINTMSK(usb->index));
usbc_haintmsk.s.haintmsk |= 1 << channel;
cvmx_usb_write_csr32(usb, CVMX_USBCX_HAINTMSK(usb->index),
 usbc_haintmsk.u32);
@@ -1836,7 +1836,7 @@ static void cvmx_usb_start_channel(struct octeon_hcd 
*usb, int channel,
  * Returns: Pipe or NULL if none are ready
  */
 static struct cvmx_usb_pipe *cvmx_usb_find_ready_pipe(struct octeon_hcd *usb,
-   enum cvmx_usb_transfer xfer_type)
+ enum cvmx_usb_transfer 
xfer_type)
 {
struct list_head *list = usb->active_pipes + xfer_type;
u64 current_frame = usb->frame_number;
@@ -2309,7 +2309,8 @@ static int cvmx_usb_cancel(struct octeon_hcd *usb,
CVMX_SYNCW;
 
usbc_hcchar.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HCCHARX(

[PATCH] staging: octeon-usb: Match alignment with open parenthesis

2021-03-17 Thread Mahak Gupta
This patches fixes the checks- 'Alignment should match open parenthesis'
of 'checkpatch.pl'.

Signed-off-by: Mahak Gupta 
---
 drivers/staging/octeon-usb/octeon-hcd.c | 32 +
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/octeon-usb/octeon-hcd.c 
b/drivers/staging/octeon-usb/octeon-hcd.c
index e2f8b6b67f75..f27f20a4aa2d 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -1258,7 +1258,7 @@ static void cvmx_usb_poll_tx_fifo(struct octeon_hcd *usb)
union cvmx_usbcx_hptxsts tx_status;
 
tx_status.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HPTXSTS(usb->index));
+   
CVMX_USBCX_HPTXSTS(usb->index));
if (cvmx_usb_fill_tx_hw(usb, &usb->periodic,
tx_status.s.ptxfspcavail))
USB_SET_FIELD32(CVMX_USBCX_GINTMSK(usb->index),
@@ -1272,7 +1272,7 @@ static void cvmx_usb_poll_tx_fifo(struct octeon_hcd *usb)
union cvmx_usbcx_gnptxsts tx_status;
 
tx_status.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_GNPTXSTS(usb->index));
+   
CVMX_USBCX_GNPTXSTS(usb->index));
if (cvmx_usb_fill_tx_hw(usb, &usb->nonperiodic,
tx_status.s.nptxfspcavail))
USB_SET_FIELD32(CVMX_USBCX_GINTMSK(usb->index),
@@ -1298,13 +1298,13 @@ static void cvmx_usb_fill_tx_fifo(struct octeon_hcd 
*usb, int channel)
 
/* We only need to fill data on outbound channels */
hcchar.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HCCHARX(channel, usb->index));
+CVMX_USBCX_HCCHARX(channel, 
usb->index));
if (hcchar.s.epdir != CVMX_USB_DIRECTION_OUT)
return;
 
/* OUT Splits only have data on the start and not the complete */
usbc_hcsplt.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HCSPLTX(channel, usb->index));
+ CVMX_USBCX_HCSPLTX(channel, 
usb->index));
if (usbc_hcsplt.s.spltena && usbc_hcsplt.s.compsplt)
return;
 
@@ -1313,7 +1313,7 @@ static void cvmx_usb_fill_tx_fifo(struct octeon_hcd *usb, 
int channel)
 * words.
 */
usbc_hctsiz.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HCTSIZX(channel, usb->index));
+ CVMX_USBCX_HCTSIZX(channel, 
usb->index));
if (!usbc_hctsiz.s.xfersize)
return;
 
@@ -1360,7 +1360,7 @@ static void cvmx_usb_start_channel_control(struct 
octeon_hcd *usb,
union cvmx_usbcx_hctsizx usbc_hctsiz;
 
usbc_hctsiz.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HCTSIZX(channel, usb->index));
+ CVMX_USBCX_HCTSIZX(channel, 
usb->index));
 
switch (transaction->stage) {
case CVMX_USB_STAGE_NON_CONTROL:
@@ -1517,7 +1517,7 @@ static void cvmx_usb_start_channel(struct octeon_hcd 
*usb, int channel,
 
/* Clear all channel status bits */
usbc_hcint.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HCINTX(channel, usb->index));
+CVMX_USBCX_HCINTX(channel, 
usb->index));
 
cvmx_usb_write_csr32(usb,
 CVMX_USBCX_HCINTX(channel, usb->index),
@@ -1552,7 +1552,7 @@ static void cvmx_usb_start_channel(struct octeon_hcd 
*usb, int channel,
 
/* Enable the channel interrupt to propagate */
usbc_haintmsk.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HAINTMSK(usb->index));
+   
CVMX_USBCX_HAINTMSK(usb->index));
usbc_haintmsk.s.haintmsk |= 1 << channel;
cvmx_usb_write_csr32(usb, CVMX_USBCX_HAINTMSK(usb->index),
 usbc_haintmsk.u32);
@@ -1836,7 +1836,7 @@ static void cvmx_usb_start_channel(struct octeon_hcd 
*usb, int channel,
  * Returns: Pipe or NULL if none are ready
  */
 static struct cvmx_usb_pipe *cvmx_usb_find_ready_pipe(struct octeon_hcd *usb,
-   enum cvmx_usb_transfer xfer_type)
+ enum cvmx_usb_transfer 
xfer_type)
 {
struct list_head *list = usb->active_pipes + xfer_type;
u64 current_frame = usb->frame_number;
@@ -2309,7 +2309,8 @@ static int cvmx_usb_cancel(struct octeon_hcd *usb,
CVMX_SYNCW;
 
usbc_hcchar.u32 = cvmx_usb_read_csr32(usb,
-   CVMX_USBCX_HCCHARX(

[PATCH 00/43] Staging: rtl8723bs: convert ALL_CAPS names

2021-03-17 Thread Marco Cesati
This set of patches converts struct and enum names in the
staging/rtl8723bs source code from all caps to lowercase.
The checkpatch.pl script emits many errors and warnings for these
patches, however all of them are caused by the original code.

[PATCH 01/43] Staging: rtl8723bs: fix names in rtw_mlme.h
[PATCH 02/43] Staging: rtl8723bs: fix names in wlan_bssdef.h
[PATCH 03/43] Staging: rtl8723bs: fix names in rtw_pwrctrl.h
[PATCH 04/43] Staging: rtl8723bs: fix names in hal_com.h
[PATCH 05/43] Staging: rtl8723bs: fix names in rtw_eeprom.h
[PATCH 06/43] Staging: rtl8723bs: fix names in rtw_recv.h
[PATCH 07/43] Staging: rtl8723bs: fix names in drv_types.h
[PATCH 08/43] Staging: rtl8723bs: fix names in rtw_ht.h
[PATCH 09/43] Staging: rtl8723bs: fix names in rtw_mp.h
[PATCH 10/43] Staging: rtl8723bs: fix names in rtw_cmd.h
[PATCH 11/43] Staging: rtl8723bs: fix names in hal_intf.h
[PATCH 12/43] Staging: rtl8723bs: fix names in osdep_service.h
[PATCH 13/43] Staging: rtl8723bs: fix names in rtw_security.h
[PATCH 14/43] Staging: rtl8723bs: fix names in hal_com_h2c.h
[PATCH 15/43] Staging: rtl8723bs: fix names in rtl8723b_xmit.h
[PATCH 16/43] Staging: rtl8723bs: fix names in HalVerDef.h
[PATCH 17/43] Staging: rtl8723bs: fix names in wifi.h
[PATCH 18/43] Staging: rtl8723bs: fix names in rtl8723b_hal.h
[PATCH 19/43] Staging: rtl8723bs: fix names in hal_phy.h
[PATCH 20/43] Staging: rtl8723bs: fix names in rtw_mlme_ext.h
[PATCH 21/43] Staging: rtl8723bs: fix names in rtw_xmit.h
[PATCH 22/43] Staging: rtl8723bs: fix names in rtw_rf.h
[PATCH 23/43] Staging: rtl8723bs: fix names in HalPwrSeqCmd.h
[PATCH 24/43] Staging: rtl8723bs: fix names in hal_com_phycfg.h
[PATCH 25/43] Staging: rtl8723bs: fix names in sta_info.h
[PATCH 26/43] Staging: rtl8723bs: fix names in hal_data.h
[PATCH 27/43] Staging: rtl8723bs: fix names in ieee80211.h
[PATCH 28/43] Staging: rtl8723bs: fix names in rtw_efuse.h
[PATCH 29/43] Staging: rtl8723bs: fix names in hal_btcoex.h
[PATCH 30/43] Staging: rtl8723bs: fix names in odm_interface.h
[PATCH 31/43] Staging: rtl8723bs: fix names in HalBtcOutSrc.h
[PATCH 32/43] Staging: rtl8723bs: fix names in odm_EdcaTurboCheck.h
[PATCH 33/43] Staging: rtl8723bs: fix names in odm_HWConfig.h
[PATCH 34/43] Staging: rtl8723bs: fix names in HalBtc8723b1Ant.h
[PATCH 35/43] Staging: rtl8723bs: fix names in odm_types.h
[PATCH 36/43] Staging: rtl8723bs: fix names in odm_DIG.h
[PATCH 37/43] Staging: rtl8723bs: fix names in hal_btcoex.c
[PATCH 38/43] Staging: rtl8723bs: fix names in odm_CfoTracking.h
[PATCH 39/43] Staging: rtl8723bs: fix names in HalPhyRf.h
[PATCH 40/43] Staging: rtl8723bs: fix names in odm.h
[PATCH 41/43] Staging: rtl8723bs: fix in odm_DynamicBBPowerSaving.h
[PATCH 42/43] Staging: rtl8723bs: fix names in odm_NoiseMonitor.h
[PATCH 43/43] Staging: rtl8723bs: fix names in HalBtc8723b2Ant.h

 drivers/staging/rtl8723bs/core/rtw_cmd.c  |   4 +-
 .../staging/rtl8723bs/core/rtw_ioctl_set.c|   6 +-
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c |  26 +--
 drivers/staging/rtl8723bs/core/rtw_odm.c  |   6 +-
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |   4 +-
 .../staging/rtl8723bs/hal/HalBtc8723b1Ant.c   | 156 +-
 .../staging/rtl8723bs/hal/HalBtc8723b1Ant.h   |  40 ++---
 .../staging/rtl8723bs/hal/HalBtc8723b2Ant.c   | 146 
 .../staging/rtl8723bs/hal/HalBtc8723b2Ant.h   |  38 ++---
 drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h  | 100 +--
 .../staging/rtl8723bs/hal/HalHWImg8723B_BB.c  |  10 +-
 .../staging/rtl8723bs/hal/HalHWImg8723B_BB.h  |   6 +-
 .../staging/rtl8723bs/hal/HalHWImg8723B_MAC.c |   6 +-
 .../staging/rtl8723bs/hal/HalHWImg8723B_MAC.h |   2 +-
 .../staging/rtl8723bs/hal/HalHWImg8723B_RF.c  |  12 +-
 .../staging/rtl8723bs/hal/HalHWImg8723B_RF.h  |   6 +-
 drivers/staging/rtl8723bs/hal/HalPhyRf.c  |   8 +-
 drivers/staging/rtl8723bs/hal/HalPhyRf.h  |  18 +-
 .../staging/rtl8723bs/hal/HalPhyRf_8723B.c|  56 +++
 .../staging/rtl8723bs/hal/HalPhyRf_8723B.h|  12 +-
 drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c  |   4 +-
 drivers/staging/rtl8723bs/hal/hal_btcoex.c| 138 
 drivers/staging/rtl8723bs/hal/hal_com.c   |  22 +--
 .../staging/rtl8723bs/hal/hal_com_phycfg.c|  18 +-
 drivers/staging/rtl8723bs/hal/hal_intf.c  |  12 +-
 drivers/staging/rtl8723bs/hal/hal_pwr_seq.c   |  22 +--
 drivers/staging/rtl8723bs/hal/odm.c   | 102 ++--
 drivers/staging/rtl8723bs/hal/odm.h   | 150 -
 .../staging/rtl8723bs/hal/odm_CfoTracking.c   |  28 ++--
 .../staging/rtl8723bs/hal/odm_CfoTracking.h   |   2 +-
 drivers/staging/rtl8723bs/hal/odm_DIG.c   |  52 +++---
 drivers/staging/rtl8723bs/hal/odm_DIG.h   |   4 +-
 .../rtl8723bs/hal/odm_DynamicBBPowerSaving.c  |   8 +-
 .../rtl8723bs/hal/odm_DynamicBBPowerSaving.h  |   2 +-
 .../rtl8723bs/hal/odm_DynamicTxPower.c|   2 +-
 .../rtl8723bs/hal/odm_EdcaTurboCheck.c|   6 +-
 .../rtl8723bs/hal/odm_EdcaTurboCheck.h|  

[PATCH 01/43] Staging: rtl8723bs: fix names in rtw_mlme.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/rtw_mlme.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c|  2 +-
 drivers/staging/rtl8723bs/hal/hal_btcoex.c   |  2 +-
 drivers/staging/rtl8723bs/include/rtw_mlme.h | 12 ++--
 drivers/staging/rtl8723bs/include/rtw_mlme_ext.h |  2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index e60a2ed32de5..416268f26dc3 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -4133,7 +4133,7 @@ Following are some utility functions for WiFi MLME
 void site_survey(struct adapter *padapter)
 {
unsigned char   survey_channel = 0, val8;
-   enum RT_SCAN_TYPE   ScanType = SCAN_PASSIVE;
+   enum rt_scan_type   ScanType = SCAN_PASSIVE;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
u32 initialgain = 0;
diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c 
b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
index fb279b662122..0b339c155860 100644
--- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c
+++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
@@ -445,7 +445,7 @@ static u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, 
void *pOutBuf)
 
case BTC_GET_U4_WIFI_TRAFFIC_DIRECTION:
{
-   struct RT_LINK_DETECT_T *plinkinfo;
+   struct rt_link_detect_t *plinkinfo;
plinkinfo = &padapter->mlmepriv.LinkDetectInfo;
 
if (plinkinfo->NumTxOkInPeriod > 
plinkinfo->NumRxOkInPeriod)
diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme.h 
b/drivers/staging/rtl8723bs/include/rtw_mlme.h
index 1ebc1e183381..ffcceb1fdde6 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme.h
@@ -81,13 +81,13 @@ enum dot11AuthAlgrthmNum {
 };
 
 /*  Scan type including active and passive scan. */
-enum RT_SCAN_TYPE {
+enum rt_scan_type {
SCAN_PASSIVE,
SCAN_ACTIVE,
SCAN_MIX,
 };
 
-enum  _BAND {
+enum  _band {
GHZ24_50 = 0,
GHZ_50,
GHZ_24,
@@ -101,7 +101,7 @@ enum DriverInterface {
DRIVER_CFG80211 = 2
 };
 
-enum SCAN_RESULT_TYPE {
+enum scan_result_type {
SCAN_RESULT_P2P_ONLY = 0,   /*  Will return all the P2P 
devices. */
SCAN_RESULT_ALL = 1,/*  Will return all the 
scanned device, include AP. */
SCAN_RESULT_WFD_TYPE = 2/*  Will just return the 
correct WFD device. */
@@ -134,7 +134,7 @@ struct sitesurvey_ctrl {
struct timer_list   sitesurvey_ctrl_timer;
 };
 
-struct RT_LINK_DETECT_T {
+struct rt_link_detect_t {
u32 NumTxOkInPeriod;
u32 NumRxOkInPeriod;
u32 NumRxUnicastOkInPeriod;
@@ -385,12 +385,12 @@ struct mlme_priv {
 
struct ht_priv htpriv;
 
-   struct RT_LINK_DETECT_T LinkDetectInfo;
+   struct rt_link_detect_t LinkDetectInfo;
struct timer_list   dynamic_chk_timer; /* dynamic/periodic check 
timer */
 
u8 acm_mask; /*  for wmm acm mask */
u8 ChannelPlan;
-   enum RT_SCAN_TYPE   scan_mode; /*  active: 1, passive: 0 */
+   enum rt_scan_type   scan_mode; /*  active: 1, passive: 0 */
 
u8 *wps_probe_req_ie;
u32 wps_probe_req_ie_len;
diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h 
b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
index e593293bb9c4..0f4dd33b6e55 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
@@ -419,7 +419,7 @@ struct mlme_ext_info {
 /*  The channel information about this channel including joining, scanning, 
and power constraints. */
 struct RT_CHANNEL_INFO {
u8  ChannelNum; /*  The channel number. */
-   enum RT_SCAN_TYPE   ScanType;   /*  Scan type such as 
passive or active scan. */
+   enum rt_scan_type   ScanType;   /*  Scan type such as 
passive or active scan. */
 };
 
 int rtw_ch_set_search_ch(struct RT_CHANNEL_INFO *ch_set, const u32 ch);
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/43] Staging: rtl8723bs: fix names in hal_com.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/hal_com.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 2 +-
 drivers/staging/rtl8723bs/hal/hal_btcoex.c   | 2 +-
 drivers/staging/rtl8723bs/include/hal_com.h  | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h 
b/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
index c38baf2bc412..87134cad 100644
--- a/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
+++ b/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
@@ -540,7 +540,7 @@ void EXhalbtcoutsrc_LpsNotify(struct BTC_COEXIST 
*pBtCoexist, u8 type);
 void EXhalbtcoutsrc_ScanNotify(struct BTC_COEXIST *pBtCoexist, u8 type);
 void EXhalbtcoutsrc_ConnectNotify(struct BTC_COEXIST *pBtCoexist, u8 action);
 void EXhalbtcoutsrc_MediaStatusNotify(
-   struct BTC_COEXIST *pBtCoexist, enum RT_MEDIA_STATUS mediaStatus
+   struct BTC_COEXIST *pBtCoexist, enum rt_media_status mediaStatus
 );
 void EXhalbtcoutsrc_SpecialPacketNotify(struct BTC_COEXIST *pBtCoexist, u8 
pktType);
 void EXhalbtcoutsrc_BtInfoNotify(
diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c 
b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
index 0b339c155860..e524c775307f 100644
--- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c
+++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
@@ -1106,7 +1106,7 @@ void EXhalbtcoutsrc_ConnectNotify(struct BTC_COEXIST 
*pBtCoexist, u8 action)
 }
 
 void EXhalbtcoutsrc_MediaStatusNotify(struct BTC_COEXIST *pBtCoexist, enum
-   RT_MEDIA_STATUS mediaStatus)
+   rt_media_status mediaStatus)
 {
u8 mStatus;
 
diff --git a/drivers/staging/rtl8723bs/include/hal_com.h 
b/drivers/staging/rtl8723bs/include/hal_com.h
index d71c26cfd54c..81c85ca3b402 100644
--- a/drivers/staging/rtl8723bs/include/hal_com.h
+++ b/drivers/staging/rtl8723bs/include/hal_com.h
@@ -165,13 +165,13 @@ enum{
UP_LINK,
DOWN_LINK,
 };
-enum RT_MEDIA_STATUS {
+enum rt_media_status {
RT_MEDIA_DISCONNECT = 0,
RT_MEDIA_CONNECT   = 1
 };
 
 #define MAX_DLFW_PAGE_SIZE 4096/*  @ page : 4k bytes */
-enum FIRMWARE_SOURCE {
+enum firmware_source {
FW_SOURCE_IMG_FILE = 0,
FW_SOURCE_HEADER_FILE = 1,  /* from header file */
 };
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/43] Staging: rtl8723bs: fix names in rtw_eeprom.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/rtw_eeprom.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/include/rtw_eeprom.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_eeprom.h 
b/drivers/staging/rtl8723bs/include/rtw_eeprom.h
index fb619e83217a..da7f14aadaa0 100644
--- a/drivers/staging/rtl8723bs/include/rtw_eeprom.h
+++ b/drivers/staging/rtl8723bs/include/rtw_eeprom.h
@@ -42,7 +42,7 @@
 /*  Besides, CustomerID of registry has precedence of that of EEPROM. */
 /*  defined below. 060703, by rcnjko. */
 /*  */
-enum RT_CUSTOMER_ID {
+enum rt_customer_id {
RT_CID_DEFAULT = 0,
RT_CID_8187_ALPHA0 = 1,
RT_CID_8187_SERCOMM_PS = 2,
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/43] Staging: rtl8723bs: fix names in wlan_bssdef.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/wlan_bssdef.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/core/rtw_cmd.c  |  4 +--
 .../staging/rtl8723bs/core/rtw_ioctl_set.c|  6 ++--
 drivers/staging/rtl8723bs/hal/hal_intf.c  |  2 +-
 drivers/staging/rtl8723bs/include/rtw_cmd.h   |  2 +-
 .../staging/rtl8723bs/include/rtw_ioctl_set.h |  4 +--
 .../staging/rtl8723bs/include/rtw_security.h  |  2 +-
 .../staging/rtl8723bs/include/wlan_bssdef.h   | 28 +--
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c |  4 +--
 .../staging/rtl8723bs/os_dep/ioctl_linux.c|  8 +++---
 9 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c 
b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index e671ccfea964..2aaf25b48f96 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -760,7 +760,7 @@ u8 rtw_joinbss_cmd(struct adapter  *padapter, struct 
wlan_network *pnetwork)
struct security_priv *psecuritypriv = &padapter->securitypriv;
struct registry_priv *pregistrypriv = &padapter->registrypriv;
struct ht_priv  *phtpriv = &pmlmepriv->htpriv;
-   enum NDIS_802_11_NETWORK_INFRASTRUCTURE ndis_network_mode = 
pnetwork->network.InfrastructureMode;
+   enum ndis_802_11_network_infrastructure ndis_network_mode = 
pnetwork->network.InfrastructureMode;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
u32 tmp_len;
@@ -914,7 +914,7 @@ u8 rtw_disassoc_cmd(struct adapter *padapter, u32 
deauth_timeout_ms, bool enqueu
return res;
 }
 
-u8 rtw_setopmode_cmd(struct adapter  *padapter, enum 
NDIS_802_11_NETWORK_INFRASTRUCTURE networktype, bool enqueue)
+u8 rtw_setopmode_cmd(struct adapter  *padapter, enum 
ndis_802_11_network_infrastructure networktype, bool enqueue)
 {
struct  cmd_obj *ph2c;
struct  setopmode_parm *psetop;
diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c 
b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
index c9418bfb2a00..211071e0254b 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
@@ -401,11 +401,11 @@ u8 rtw_set_802_11_connect(struct adapter *padapter, u8 
*bssid, struct ndis_802_1
 }
 
 u8 rtw_set_802_11_infrastructure_mode(struct adapter *padapter,
-   enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype)
+   enum ndis_802_11_network_infrastructure networktype)
 {
struct  mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct  wlan_network*cur_network = &pmlmepriv->cur_network;
-   enum NDIS_802_11_NETWORK_INFRASTRUCTURE *pold_state = 
&(cur_network->network.InfrastructureMode);
+   enum ndis_802_11_network_infrastructure *pold_state = 
&(cur_network->network.InfrastructureMode);
 
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_notice_,
 ("+rtw_set_802_11_infrastructure_mode: old =%d new =%d 
fw_state = 0x%08x\n",
@@ -539,7 +539,7 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter *padapter, 
struct ndis_802_11_s
return res;
 }
 
-u8 rtw_set_802_11_authentication_mode(struct adapter *padapter, enum 
NDIS_802_11_AUTHENTICATION_MODE authmode)
+u8 rtw_set_802_11_authentication_mode(struct adapter *padapter, enum 
ndis_802_11_authentication_mode authmode)
 {
struct security_priv *psecuritypriv = &padapter->securitypriv;
int res;
diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c 
b/drivers/staging/rtl8723bs/hal/hal_intf.c
index a3d431af8d26..4df980f94327 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -63,7 +63,7 @@ void rtw_hal_dm_deinit(struct adapter *padapter)
 
 static void rtw_hal_init_opmode(struct adapter *padapter)
 {
-   enum NDIS_802_11_NETWORK_INFRASTRUCTURE networkType = 
Ndis802_11InfrastructureMax;
+   enum ndis_802_11_network_infrastructure networkType = 
Ndis802_11InfrastructureMax;
struct  mlme_priv *pmlmepriv = &(padapter->mlmepriv);
signed int fw_state;
 
diff --git a/drivers/staging/rtl8723bs/include/rtw_cmd.h 
b/drivers/staging/rtl8723bs/include/rtw_cmd.h
index b15a5abca17c..dd01c3c76584 100644
--- a/drivers/staging/rtl8723bs/include/rtw_cmd.h
+++ b/drivers/staging/rtl8723bs/include/rtw_cmd.h
@@ -826,7 +826,7 @@ extern u8 rtw_clearstakey_cmd(struct adapter *padapter, 
struct sta_info *sta, u8
 
 extern u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network 
*pnetwork);
 u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, bool 
enqueue);
-extern u8 rtw_setopmode_cmd(struct adapter  *padapter, enum 
NDIS_802_11_NETWORK_INFRASTRUCTURE networktype, bool enqueue);
+extern u8 rtw_setopmode_cmd(struct adapter  *padapter, enum 
ndis_802_11_network_infrastructure networktype, bool enqueue);
 extern u8 rtw_setdatarate_cmd(stru

[PATCH 06/43] Staging: rtl8723bs: fix names in rtw_recv.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/rtw_recv.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/include/rtw_recv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_recv.h 
b/drivers/staging/rtl8723bs/include/rtw_recv.h
index 0a56c3a66ee8..1439158829ac 100644
--- a/drivers/staging/rtl8723bs/include/rtw_recv.h
+++ b/drivers/staging/rtl8723bs/include/rtw_recv.h
@@ -369,7 +369,7 @@ union recv_frame {
 
 };
 
-enum RX_PACKET_TYPE {
+enum rx_packet_type {
NORMAL_RX,/* Normal rx packet */
TX_REPORT1,/* CCX */
TX_REPORT2,/* TX RPT */
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/43] Staging: rtl8723bs: fix names in drv_types.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/drv_types.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/include/drv_types.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/drv_types.h 
b/drivers/staging/rtl8723bs/include/drv_types.h
index 9d482a6115ab..49f10ff6d54c 100644
--- a/drivers/staging/rtl8723bs/include/drv_types.h
+++ b/drivers/staging/rtl8723bs/include/drv_types.h
@@ -24,7 +24,7 @@
 #include 
 #include 
 
-enum _NIC_VERSION {
+enum _nic_version {
 
RTL8711_NIC,
RTL8712_NIC,
@@ -359,19 +359,19 @@ static inline struct device *dvobj_to_dev(struct 
dvobj_priv *dvobj)
 
 struct adapter *dvobj_get_port0_adapter(struct dvobj_priv *dvobj);
 
-enum _IFACE_TYPE {
+enum _iface_type {
IFACE_PORT0, /* mapping to port0 for C/D series chips */
IFACE_PORT1, /* mapping to port1 for C/D series chip */
MAX_IFACE_PORT,
 };
 
-enum ADAPTER_TYPE {
+enum adapter_type {
PRIMARY_ADAPTER,
SECONDARY_ADAPTER,
MAX_ADAPTER = 0xFF,
 };
 
-enum DRIVER_STATE {
+enum driver_state {
DRIVER_NORMAL = 0,
DRIVER_DISAPPEAR = 1,
DRIVER_REPLACE_DONGLE = 2,
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/43] Staging: rtl8723bs: fix names in rtw_pwrctrl.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/rtw_pwrctrl.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c| 4 ++--
 drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 8 
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c 
b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 2e6c522b74e3..c2a2cec35d55 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -1304,7 +1304,7 @@ int rtw_pm_set_ips(struct adapter *padapter, u8 mode)
  * ATTENTION:
  *This function will request pwrctrl LOCK!
  */
-void rtw_ps_deny(struct adapter *padapter, enum PS_DENY_REASON reason)
+void rtw_ps_deny(struct adapter *padapter, enum ps_deny_reason reason)
 {
struct pwrctrl_priv *pwrpriv;
 
@@ -1329,7 +1329,7 @@ void rtw_ps_deny(struct adapter *padapter, enum 
PS_DENY_REASON reason)
  * ATTENTION:
  *This function will request pwrctrl LOCK!
  */
-void rtw_ps_deny_cancel(struct adapter *padapter, enum PS_DENY_REASON reason)
+void rtw_ps_deny_cancel(struct adapter *padapter, enum ps_deny_reason reason)
 {
struct pwrctrl_priv *pwrpriv;
 
diff --git a/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h 
b/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h
index 33e33591006d..cec9fc0cf794 100644
--- a/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h
+++ b/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h
@@ -141,7 +141,7 @@ enum { /*  for ips_mode */
 };
 
 /*  Design for pwrctrl_priv.ips_deny, 32 bits for 32 reasons at most */
-enum PS_DENY_REASON {
+enum ps_deny_reason {
PS_DENY_DRV_INITIAL = 0,
PS_DENY_SCAN,
PS_DENY_JOIN,
@@ -192,7 +192,7 @@ struct pwrctrl_priv {
u8 pre_ips_type;/*  0: default flow, 1: carddisbale flow */
 
/*  ps_deny: if 0, power save is free to go; otherwise deny all kinds 
of power save. */
-   /*  Use PS_DENY_REASON to decide reason. */
+   /*  Use enum ps_deny_reason to decide reason. */
/*  Don't access this variable directly without control function, */
/*  and this variable should be protected by lock. */
u32 ps_deny;
@@ -290,8 +290,8 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 
ips_deffer_ms, const char *cal
 int rtw_pm_set_ips(struct adapter *padapter, u8 mode);
 int rtw_pm_set_lps(struct adapter *padapter, u8 mode);
 
-void rtw_ps_deny(struct adapter *padapter, enum PS_DENY_REASON reason);
-void rtw_ps_deny_cancel(struct adapter *padapter, enum PS_DENY_REASON reason);
+void rtw_ps_deny(struct adapter *padapter, enum ps_deny_reason reason);
+void rtw_ps_deny_cancel(struct adapter *padapter, enum ps_deny_reason reason);
 u32 rtw_ps_deny_get(struct adapter *padapter);
 
 #endif  /* __RTL871X_PWRCTRL_H_ */
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/43] Staging: rtl8723bs: fix names in rtw_ht.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/rtw_ht.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/include/rtw_ht.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_ht.h 
b/drivers/staging/rtl8723bs/include/rtw_ht.h
index bce5bff3b844..fb321d20d276 100644
--- a/drivers/staging/rtl8723bs/include/rtw_ht.h
+++ b/drivers/staging/rtl8723bs/include/rtw_ht.h
@@ -37,7 +37,7 @@ struct ht_priv {
 
 };
 
-enum AGGRE_SIZE_E {
+enum aggre_size_e {
HT_AGG_SIZE_8K = 0,
HT_AGG_SIZE_16K = 1,
HT_AGG_SIZE_32K = 2,
@@ -48,7 +48,7 @@ enum AGGRE_SIZE_E {
VHT_AGG_SIZE_1024K = 7,
 };
 
-enum RT_HT_INF0_CAPBILITY {
+enum rt_ht_inf0_capbility {
RT_HT_CAP_USE_TURBO_AGGR = 0x01,
RT_HT_CAP_USE_LONG_PREAMBLE = 0x02,
RT_HT_CAP_USE_AMPDU = 0x04,
@@ -59,7 +59,7 @@ enum RT_HT_INF0_CAPBILITY {
RT_HT_CAP_USE_AP_CLIENT_MODE = 0x80,/*  AP team request to reserve 
this bit, by Emily */
 };
 
-enum RT_HT_INF1_CAPBILITY {
+enum rt_ht_inf1_capbility {
RT_HT_CAP_USE_VIDEO_CLIENT = 0x01,
RT_HT_CAP_USE_JAGUAR_BCUT = 0x02,
RT_HT_CAP_USE_JAGUAR_CCUT = 0x04,
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/43] Staging: rtl8723bs: fix names in rtw_mp.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/rtw_mp.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/include/rtw_mp.h | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_mp.h 
b/drivers/staging/rtl8723bs/include/rtw_mp.h
index 8b6e4e9578f9..48e5915e0a7a 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mp.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mp.h
@@ -49,7 +49,7 @@ struct mp_tx {
 #define MP_MAX_LINES_BYTES 256
 
 typedef void (*MPT_WORK_ITEM_HANDLER)(void *Adapter);
-struct MPT_CONTEXT {
+struct mpt_context {
/*  Indicate if we have started Mass Production Test. */
boolbMassProdTest;
 
@@ -257,12 +257,12 @@ struct mp_priv {
bool bSetRxBssid;
bool bTxBufCkFail;
 
-   struct MPT_CONTEXT MptCtx;
+   struct mpt_context MptCtx;
 
u8 *TXradomBuffer;
 };
 
-struct IOCMD_STRUCT {
+struct iocmd_struct {
u8 cmdclass;
u16 value;
u8 index;
@@ -286,7 +286,7 @@ struct bb_reg_param {
 #define BB_REG_BASE_ADDR   0x800
 
 /* MP variables */
-enum MP_MODE {
+enum mp_mode {
MP_OFF,
MP_ON,
MP_ERR,
@@ -303,7 +303,7 @@ enum MP_MODE {
 extern u8 mpdatarate[NumRates];
 
 /* MP set force data rate base on the definition. */
-enum MPT_RATE_INDEX {
+enum mpt_rate_index {
/* CCK rate. */
MPT_RATE_1M = 0,/* 0 */
MPT_RATE_2M,
@@ -363,13 +363,13 @@ enum MPT_RATE_INDEX {
 
 #define MAX_TX_PWR_INDEX_N_MODE 64 /*  0x3F */
 
-enum POWER_MODE {
+enum power_mode {
POWER_LOW = 0,
POWER_NORMAL
 };
 
 /*  The following enumeration is used to define the value of Reg0xD00[30:28] 
or JaguarReg0x914[18:16]. */
-enum OFDM_TX_MODE {
+enum ofdm_tx_mode {
OFDM_ALL_OFF= 0,
OFDM_ContinuousTx   = 1,
OFDM_SingleCarrier  = 2,
@@ -391,14 +391,14 @@ enum OFDM_TX_MODE {
 #define Mac_HT_FasleAlarm  0x9000
 #define Mac_DropPacket 0xA000
 
-enum ENCRY_CTRL_STATE {
+enum encry_ctrl_state {
HW_CONTROL, /* hw encryption& decryption */
SW_CONTROL, /* sw encryption& decryption */
HW_ENCRY_SW_DECRY,  /* hw encryption & sw decryption */
SW_ENCRY_HW_DECRY   /* sw encryption & hw decryption */
 };
 
-enum MPT_TXPWR_DEF {
+enum mpt_txpwr_def {
MPT_CCK,
MPT_OFDM, /*  L and HT OFDM */
MPT_VHT_OFDM
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/43] Staging: rtl8723bs: fix names in rtw_cmd.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/rtw_cmd.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/include/rtw_cmd.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_cmd.h 
b/drivers/staging/rtl8723bs/include/rtw_cmd.h
index dd01c3c76584..6f3b018463e4 100644
--- a/drivers/staging/rtl8723bs/include/rtw_cmd.h
+++ b/drivers/staging/rtl8723bs/include/rtw_cmd.h
@@ -158,7 +158,7 @@ enum rtw_drvextra_cmd_id {
MAX_WK_CID
 };
 
-enum LPS_CTRL_TYPE {
+enum lps_ctrl_type {
LPS_CTRL_SCAN = 0,
LPS_CTRL_JOINBSS = 1,
LPS_CTRL_CONNECT = 2,
@@ -168,7 +168,7 @@ enum LPS_CTRL_TYPE {
LPS_CTRL_TRAFFIC_BUSY = 6,
 };
 
-enum RFINTFS {
+enum rfintfs {
SWSI,
HWSI,
HWPI,
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/43] Staging: rtl8723bs: fix names in rtw_security.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/rtw_security.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/include/rtw_security.h  | 4 ++--
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c| 2 +-
 drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 8 
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_security.h 
b/drivers/staging/rtl8723bs/include/rtw_security.h
index 8611dff1aa4a..0d3f7d46c33f 100644
--- a/drivers/staging/rtl8723bs/include/rtw_security.h
+++ b/drivers/staging/rtl8723bs/include/rtw_security.h
@@ -84,7 +84,7 @@ union Keytype {
 };
 
 
-struct RT_PMKID_LIST {
+struct rt_pmkid_list {
u8  bUsed;
u8  Bssid[6];
u8  PMKID[16];
@@ -163,7 +163,7 @@ struct security_priv {
u32 btkip_countermeasure_time;
 
/*  For WPA2 Pre-Authentication. */
-   struct RT_PMKID_LISTPMKIDList[NUM_PMKID_CACHE]; /*  
Renamed from PreAuthKey[NUM_PRE_AUTH_KEY]. Annie, 2006-10-13. */
+   struct rt_pmkid_listPMKIDList[NUM_PMKID_CACHE]; /*  
Renamed from PreAuthKey[NUM_PRE_AUTH_KEY]. Annie, 2006-10-13. */
u8  PMKIDIndex;
 
u8 bWepDefaultKeyIdxSet;
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c 
b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 685ecb45e742..e70bb7f1ca3a 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -2346,7 +2346,7 @@ static int cfg80211_rtw_flush_pmksa(struct wiphy *wiphy,
 
DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
 
-   memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(struct RT_PMKID_LIST) 
* NUM_PMKID_CACHE);
+   memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(struct rt_pmkid_list) 
* NUM_PMKID_CACHE);
psecuritypriv->PMKIDIndex = 0;
 
return 0;
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c 
b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 2d8da969fbda..bd1b9571cd4b 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -969,7 +969,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
}
} else if (pPMK->cmd == IW_PMKSA_FLUSH) {
DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n");
-   memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(struct 
RT_PMKID_LIST) * NUM_PMKID_CACHE);
+   memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(struct 
rt_pmkid_list) * NUM_PMKID_CACHE);
psecuritypriv->PMKIDIndex = 0;
intReturn = true;
}
diff --git a/drivers/staging/rtl8723bs/os_dep/mlme_linux.c 
b/drivers/staging/rtl8723bs/os_dep/mlme_linux.c
index ac3ae26fc385..ba4d3789a41e 100644
--- a/drivers/staging/rtl8723bs/os_dep/mlme_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/mlme_linux.c
@@ -65,7 +65,7 @@ void rtw_os_indicate_scan_done(struct adapter *padapter, bool 
aborted)
indicate_wx_scan_complete_event(padapter);
 }
 
-static struct RT_PMKID_LIST   backupPMKIDList[NUM_PMKID_CACHE];
+static struct rt_pmkid_list   backupPMKIDList[NUM_PMKID_CACHE];
 void rtw_reset_securitypriv(struct adapter *adapter)
 {
u8 backupPMKIDIndex = 0;
@@ -84,7 +84,7 @@ void rtw_reset_securitypriv(struct adapter *adapter)
/*  Backup the btkip_countermeasure information. */
/*  When the countermeasure is trigger, the driver have to 
disconnect with AP for 60 seconds. */
 
-   memcpy(&backupPMKIDList[0], 
&adapter->securitypriv.PMKIDList[0], sizeof(struct RT_PMKID_LIST) * 
NUM_PMKID_CACHE);
+   memcpy(&backupPMKIDList[0], 
&adapter->securitypriv.PMKIDList[0], sizeof(struct rt_pmkid_list) * 
NUM_PMKID_CACHE);
backupPMKIDIndex = adapter->securitypriv.PMKIDIndex;
backupTKIPCountermeasure = 
adapter->securitypriv.btkip_countermeasure;
backupTKIPcountermeasure_time = 
adapter->securitypriv.btkip_countermeasure_time;
@@ -96,7 +96,7 @@ void rtw_reset_securitypriv(struct adapter *adapter)
 
/*  Added by Albert 2009/02/18 */
/*  Restore the PMK information to securitypriv structure for 
the following connection. */
-   memcpy(&adapter->securitypriv.PMKIDList[0], 
&backupPMKIDList[0], sizeof(struct RT_PMKID_LIST) * NUM_PMKID_CACHE);
+   memcpy(&adapter->securitypriv.PMKIDList[0], 
&backupPMKIDList[0], sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE);
adapter->securitypriv.PMKIDIndex = backupPMKIDIndex;
adapter->securitypriv.btkip_countermeasure = 
backupTKIPCountermeasure;
adapter->securitypriv.btkip_countermeasure_time = 
backupTKIPcountermeasure_time;
@@

[PATCH 11/43] Staging: rtl8723bs: fix names in hal_intf.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/hal_intf.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/hal_com.c   |  8 ++---
 drivers/staging/rtl8723bs/hal/hal_intf.c  |  8 ++---
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  8 ++---
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  |  4 +--
 drivers/staging/rtl8723bs/include/hal_com.h   |  8 ++---
 drivers/staging/rtl8723bs/include/hal_intf.h  | 30 +--
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |  4 +--
 7 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c 
b/drivers/staging/rtl8723bs/hal/hal_com.c
index 21e37976cb3a..32e6b8233341 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -1113,7 +1113,7 @@ void GetHwReg(struct adapter *adapter, u8 variable, u8 
*val)
 
 
 u8 SetHalDefVar(
-   struct adapter *adapter, enum HAL_DEF_VARIABLE variable, void *value
+   struct adapter *adapter, enum hal_def_variable variable, void *value
 )
 {
struct hal_com_data *hal_data = GET_HAL_DATA(adapter);
@@ -1198,7 +1198,7 @@ u8 SetHalDefVar(
 }
 
 u8 GetHalDefVar(
-   struct adapter *adapter, enum HAL_DEF_VARIABLE variable, void *value
+   struct adapter *adapter, enum hal_def_variable variable, void *value
 )
 {
struct hal_com_data *hal_data = GET_HAL_DATA(adapter);
@@ -1254,7 +1254,7 @@ u8 GetHalDefVar(
 
 void GetHalODMVar(
struct adapter *Adapter,
-   enum HAL_ODM_VARIABLE eVariable,
+   enum hal_odm_variable eVariable,
void *pValue1,
void *pValue2
 )
@@ -1267,7 +1267,7 @@ void GetHalODMVar(
 
 void SetHalODMVar(
struct adapter *Adapter,
-   enum HAL_ODM_VARIABLE eVariable,
+   enum hal_odm_variable eVariable,
void *pValue1,
bool bSet
 )
diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c 
b/drivers/staging/rtl8723bs/hal/hal_intf.c
index 4df980f94327..8554baef95b8 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -147,27 +147,27 @@ void rtw_hal_set_hwreg_with_buf(struct adapter *padapter, 
u8 variable, u8 *pbuf,
padapter->HalFunc.SetHwRegHandlerWithBuf(padapter, variable, 
pbuf, len);
 }
 
-u8 rtw_hal_set_def_var(struct adapter *padapter, enum HAL_DEF_VARIABLE 
eVariable, void *pValue)
+u8 rtw_hal_set_def_var(struct adapter *padapter, enum hal_def_variable 
eVariable, void *pValue)
 {
if (padapter->HalFunc.SetHalDefVarHandler)
return padapter->HalFunc.SetHalDefVarHandler(padapter, 
eVariable, pValue);
return _FAIL;
 }
 
-u8 rtw_hal_get_def_var(struct adapter *padapter, enum HAL_DEF_VARIABLE 
eVariable, void *pValue)
+u8 rtw_hal_get_def_var(struct adapter *padapter, enum hal_def_variable 
eVariable, void *pValue)
 {
if (padapter->HalFunc.GetHalDefVarHandler)
return padapter->HalFunc.GetHalDefVarHandler(padapter, 
eVariable, pValue);
return _FAIL;
 }
 
-void rtw_hal_set_odm_var(struct adapter *padapter, enum HAL_ODM_VARIABLE 
eVariable, void *pValue1, bool bSet)
+void rtw_hal_set_odm_var(struct adapter *padapter, enum hal_odm_variable 
eVariable, void *pValue1, bool bSet)
 {
if (padapter->HalFunc.SetHalODMVarHandler)
padapter->HalFunc.SetHalODMVarHandler(padapter, eVariable, 
pValue1, bSet);
 }
 
-void rtw_hal_get_odm_var(struct adapter *padapter, enum HAL_ODM_VARIABLE 
eVariable, void *pValue1, void *pValue2)
+void rtw_hal_get_odm_var(struct adapter *padapter, enum hal_odm_variable 
eVariable, void *pValue1, void *pValue2)
 {
if (padapter->HalFunc.GetHalODMVarHandler)
padapter->HalFunc.GetHalODMVarHandler(padapter, eVariable, 
pValue1, pValue2);
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 9bcceb13ca2d..d30659a11236 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -2086,7 +2086,7 @@ static void rtl8723b_SetBeaconRelatedRegisters(struct 
adapter *padapter)
 
 static void rtl8723b_GetHalODMVar(
struct adapter *Adapter,
-   enum HAL_ODM_VARIABLE eVariable,
+   enum hal_odm_variable eVariable,
void *pValue1,
void *pValue2
 )
@@ -2096,7 +2096,7 @@ static void rtl8723b_GetHalODMVar(
 
 static void rtl8723b_SetHalODMVar(
struct adapter *Adapter,
-   enum HAL_ODM_VARIABLE eVariable,
+   enum hal_odm_variable eVariable,
void *pValue1,
bool bSet
 )
@@ -4304,7 +4304,7 @@ void GetHwReg8723B(struct adapter *padapter, u8 variable, 
u8 *val)
 /* Description:
  * Change default setting of specified variable.
  */
-u8 SetHalDefVar8723B(struct adapter *padapter, enum HAL_DEF_VARIABLE variable, 
void *pval)
+u8 SetHalDefVar8723B(struct adapter *padapter, enum hal_def_variable variable, 
void *pval)
 {
   

[PATCH 12/43] Staging: rtl8723bs: fix names in osdep_service.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/osdep_service.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/include/osdep_service.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/include/osdep_service.h 
b/drivers/staging/rtl8723bs/include/osdep_service.h
index 07f846efa0d1..10e1826eff77 100644
--- a/drivers/staging/rtl8723bs/include/osdep_service.h
+++ b/drivers/staging/rtl8723bs/include/osdep_service.h
@@ -80,7 +80,7 @@ enum mstat_f {
 #define mstat_tf_idx(flags) ((flags)&0xff)
 #define mstat_ff_idx(flags) (((flags)&0xff00) >> 8)
 
-enum MSTAT_STATUS {
+enum mstat_status {
MSTAT_ALLOC_SUCCESS = 0,
MSTAT_ALLOC_FAIL,
MSTAT_FREE
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 15/43] Staging: rtl8723bs: fix names in rtl8723b_xmit.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/rtl8723b_xmit.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 8 
 drivers/staging/rtl8723bs/include/rtl8723b_xmit.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index d30659a11236..9c30024fa984 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -2991,7 +2991,7 @@ static u8 fill_txdesc_sectype(struct pkt_attrib *pattrib)
return sectype;
 }
 
-static void fill_txdesc_vcs_8723b(struct adapter *padapter, struct pkt_attrib 
*pattrib, struct TXDESC_8723B *ptxdesc)
+static void fill_txdesc_vcs_8723b(struct adapter *padapter, struct pkt_attrib 
*pattrib, struct txdesc_8723b *ptxdesc)
 {
/* DBG_8192C("cvs_mode =%d\n", pattrib->vcs_mode); */
 
@@ -3024,7 +3024,7 @@ static void fill_txdesc_vcs_8723b(struct adapter 
*padapter, struct pkt_attrib *p
}
 }
 
-static void fill_txdesc_phy_8723b(struct adapter *padapter, struct pkt_attrib 
*pattrib, struct TXDESC_8723B *ptxdesc)
+static void fill_txdesc_phy_8723b(struct adapter *padapter, struct pkt_attrib 
*pattrib, struct txdesc_8723b *ptxdesc)
 {
/* DBG_8192C("bwmode =%d, ch_off =%d\n", pattrib->bwmode, 
pattrib->ch_offset); */
 
@@ -3044,7 +3044,7 @@ static void rtl8723b_fill_default_txdesc(
struct mlme_ext_priv *pmlmeext;
struct mlme_ext_info *pmlmeinfo;
struct pkt_attrib *pattrib;
-   struct TXDESC_8723B *ptxdesc;
+   struct txdesc_8723b *ptxdesc;
s32 bmcst;
 
memset(pbuf, 0, TXDESC_SIZE);
@@ -3057,7 +3057,7 @@ static void rtl8723b_fill_default_txdesc(
pattrib = &pxmitframe->attrib;
bmcst = IS_MCAST(pattrib->ra);
 
-   ptxdesc = (struct TXDESC_8723B *)pbuf;
+   ptxdesc = (struct txdesc_8723b *)pbuf;
 
if (pxmitframe->frame_tag == DATA_FRAMETAG) {
u8 drv_userate = 0;
diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_xmit.h 
b/drivers/staging/rtl8723bs/include/rtl8723b_xmit.h
index ccadc3d11644..56bdc14af47d 100644
--- a/drivers/staging/rtl8723bs/include/rtl8723b_xmit.h
+++ b/drivers/staging/rtl8723bs/include/rtl8723b_xmit.h
@@ -59,7 +59,7 @@
 /*  */
 /* defined for TX DESC Operation */
 /*  */
-struct TXDESC_8723B {
+struct txdesc_8723b {
/*  Offset 0 */
u32 pktlen:16;
u32 offset:8;
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 14/43] Staging: rtl8723bs: fix names in hal_com_h2c.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/hal_com_h2c.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c| 12 ++--
 drivers/staging/rtl8723bs/include/hal_com_h2c.h |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
index 61fd643c244f..6897fc49e649 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
@@ -434,7 +434,7 @@ void CheckFwRsvdPageContent(struct adapter *Adapter)
 {
 }
 
-static void rtl8723b_set_FwRsvdPage_cmd(struct adapter *padapter, struct 
RSVDPAGE_LOC *rsvdpageloc)
+static void rtl8723b_set_FwRsvdPage_cmd(struct adapter *padapter, struct 
rsvdpage_loc *rsvdpageloc)
 {
u8 u1H2CRsvdPageParm[H2C_RSVDPAGE_LOC_LEN] = {0};
 
@@ -453,7 +453,7 @@ static void rtl8723b_set_FwRsvdPage_cmd(struct adapter 
*padapter, struct RSVDPAG
FillH2CCmd8723B(padapter, H2C_8723B_RSVD_PAGE, H2C_RSVDPAGE_LOC_LEN, 
u1H2CRsvdPageParm);
 }
 
-static void rtl8723b_set_FwAoacRsvdPage_cmd(struct adapter *padapter, struct 
RSVDPAGE_LOC *rsvdpageloc)
+static void rtl8723b_set_FwAoacRsvdPage_cmd(struct adapter *padapter, struct 
rsvdpage_loc *rsvdpageloc)
 {
 }
 
@@ -789,7 +789,7 @@ static void rtl8723b_set_FwRsvdPagePkt(
u16 BufIndex, PageSize = 128;
u32 TotalPacketLen, MaxRsvdPageBufSize = 0;
 
-   struct RSVDPAGE_LOC RsvdPageLoc;
+   struct rsvdpage_loc RsvdPageLoc;
 
/* DBG_871X("%s>\n", __func__); */
 
@@ -808,7 +808,7 @@ static void rtl8723b_set_FwRsvdPagePkt(
}
 
ReservedPagePacket = pcmdframe->buf_addr;
-   memset(&RsvdPageLoc, 0, sizeof(struct RSVDPAGE_LOC));
+   memset(&RsvdPageLoc, 0, sizeof(struct rsvdpage_loc));
 
/* 3 (1) beacon */
BufIndex = TxDescOffset;
@@ -1267,7 +1267,7 @@ static void SetFwRsvdPagePkt_BTCoex(struct adapter 
*padapter)
u8 TotalPageNum = 0, CurtPktPageNum = 0, RsvdPageNum = 0;
u16 BufIndex, PageSize;
u32 TotalPacketLen, MaxRsvdPageBufSize = 0;
-   struct RSVDPAGE_LOC RsvdPageLoc;
+   struct rsvdpage_loc RsvdPageLoc;
 
 
 /* DBG_8192C("+" FUNC_ADPT_FMT "\n", FUNC_ADPT_ARG(padapter)); */
@@ -1287,7 +1287,7 @@ static void SetFwRsvdPagePkt_BTCoex(struct adapter 
*padapter)
}
 
ReservedPagePacket = pcmdframe->buf_addr;
-   memset(&RsvdPageLoc, 0, sizeof(struct RSVDPAGE_LOC));
+   memset(&RsvdPageLoc, 0, sizeof(struct rsvdpage_loc));
 
/* 3 (1) beacon */
BufIndex = TxDescOffset;
diff --git a/drivers/staging/rtl8723bs/include/hal_com_h2c.h 
b/drivers/staging/rtl8723bs/include/hal_com_h2c.h
index 1e1982621e2c..f8b5a53e90bc 100644
--- a/drivers/staging/rtl8723bs/include/hal_com_h2c.h
+++ b/drivers/staging/rtl8723bs/include/hal_com_h2c.h
@@ -180,7 +180,7 @@ enum h2c_cmd {
 /*  */
 /* Structure-- */
 /*  */
-struct RSVDPAGE_LOC {
+struct rsvdpage_loc {
u8 LocProbeRsp;
u8 LocPsPoll;
u8 LocNullData;
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 16/43] Staging: rtl8723bs: fix names in HalVerDef.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/HalVerDef.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/hal_com.c   |  2 +-
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  4 +-
 drivers/staging/rtl8723bs/include/HalVerDef.h | 50 +--
 drivers/staging/rtl8723bs/include/hal_com.h   |  2 +-
 drivers/staging/rtl8723bs/include/hal_data.h  |  2 +-
 5 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c 
b/drivers/staging/rtl8723bs/hal/hal_com.c
index 32e6b8233341..1e66f749fd40 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -38,7 +38,7 @@ void rtw_hal_data_deinit(struct adapter *padapter)
 }
 
 
-void dump_chip_info(struct HAL_VERSION ChipVersion)
+void dump_chip_info(struct hal_version ChipVersion)
 {
char buf[128];
size_t cnt = 0;
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 9c30024fa984..44bbffab0c02 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -1872,10 +1872,10 @@ static bool Hal_EfusePgPacketWrite_BT(
return true;
 }
 
-static struct HAL_VERSION ReadChipVersion8723B(struct adapter *padapter)
+static struct hal_version ReadChipVersion8723B(struct adapter *padapter)
 {
u32 value32;
-   struct HAL_VERSION ChipVersion;
+   struct hal_version ChipVersion;
struct hal_com_data *pHalData;
 
 /* YJ, TODO, move read chip type here */
diff --git a/drivers/staging/rtl8723bs/include/HalVerDef.h 
b/drivers/staging/rtl8723bs/include/HalVerDef.h
index 11055147a2a2..bab226f77b24 100644
--- a/drivers/staging/rtl8723bs/include/HalVerDef.h
+++ b/drivers/staging/rtl8723bs/include/HalVerDef.h
@@ -7,8 +7,8 @@
 #ifndef __HAL_VERSION_DEF_H__
 #define __HAL_VERSION_DEF_H__
 
-/*  HAL_IC_TYPE_E */
-enum HAL_IC_TYPE_E { /* tag_HAL_IC_Type_Definition */
+/*  hal_ic_type_e */
+enum hal_ic_type_e { /* tag_HAL_IC_Type_Definition */
CHIP_8192S  =   0,
CHIP_8188C  =   1,
CHIP_8192C  =   2,
@@ -21,15 +21,15 @@ enum HAL_IC_TYPE_E { /* tag_HAL_IC_Type_Definition */
CHIP_8192E  =   9,
 };
 
-/* HAL_CHIP_TYPE_E */
-enum HAL_CHIP_TYPE_E { /* tag_HAL_CHIP_Type_Definition */
+/* hal_chip_type_e */
+enum hal_chip_type_e { /* tag_HAL_CHIP_Type_Definition */
TEST_CHIP   =   0,
NORMAL_CHIP =   1,
FPGA=   2,
 };
 
-/* HAL_CUT_VERSION_E */
-enum HAL_CUT_VERSION_E { /* tag_HAL_Cut_Version_Definition */
+/* hal_cut_version_e */
+enum hal_cut_version_e { /* tag_HAL_Cut_Version_Definition */
A_CUT_VERSION   =   0,
B_CUT_VERSION   =   1,
C_CUT_VERSION   =   2,
@@ -44,13 +44,13 @@ enum HAL_CUT_VERSION_E { /* tag_HAL_Cut_Version_Definition 
*/
 };
 
 /*  HAL_Manufacturer */
-enum HAL_VENDOR_E { /* tag_HAL_Manufacturer_Version_Definition */
+enum hal_vendor_e { /* tag_HAL_Manufacturer_Version_Definition */
CHIP_VENDOR_TSMC=   0,
CHIP_VENDOR_UMC =   1,
CHIP_VENDOR_SMIC=   2,
 };
 
-enum HAL_RF_TYPE_E { /* tag_HAL_RF_Type_Definition */
+enum hal_rf_type_e { /* tag_HAL_RF_Type_Definition */
RF_TYPE_1T1R=   0,
RF_TYPE_1T2R=   1,
RF_TYPE_2T2R=   2,
@@ -61,36 +61,36 @@ enum HAL_RF_TYPE_E { /* tag_HAL_RF_Type_Definition */
RF_TYPE_4T4R=   7,
 };
 
-struct HAL_VERSION { /* tag_HAL_VERSION */
-   enum HAL_IC_TYPE_E  ICType;
-   enum HAL_CHIP_TYPE_EChipType;
-   enum HAL_CUT_VERSION_E  CUTVersion;
-   enum HAL_VENDOR_E   VendorType;
-   enum HAL_RF_TYPE_E  RFType;
+struct hal_version { /* tag_HAL_VERSION */
+   enum hal_ic_type_e  ICType;
+   enum hal_chip_type_eChipType;
+   enum hal_cut_version_e  CUTVersion;
+   enum hal_vendor_e   VendorType;
+   enum hal_rf_type_e  RFType;
u8  ROMVer;
 };
 
 /* VERSION_8192C   VersionID; */
-/* HAL_VERSION VersionID; */
+/* hal_version VersionID; */
 
 /*  Get element */
-#define GET_CVID_IC_TYPE(version)  ((enum 
HAL_IC_TYPE_E)((version).ICType))
-#define GET_CVID_CHIP_TYPE(version)((enum 
HAL_CHIP_TYPE_E)((version).ChipType))
-#define GET_CVID_RF_TYPE(version)  ((enum 
HAL_RF_TYPE_E)((version).RFType))
-#define GET_CVID_MANUFACTUER(version)  ((enum 
HAL_VENDOR_E)((version).VendorType))
-#define GET_CVID_CUT_VERSION(version)  ((enum 
HAL_CUT_VERSION_E)((version).CUTVersion))
+#define GET_CVID_IC_TYPE(version)  ((enum 
hal_ic_type

[PATCH 18/43] Staging: rtl8723bs: fix names in rtl8723b_hal.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/rtl8723b_hal.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 ++--
 drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c| 2 +-
 drivers/staging/rtl8723bs/include/rtl8723b_hal.h  | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 44bbffab0c02..f33b084011b5 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -3695,7 +3695,7 @@ s32 c2h_handler_8723b(struct adapter *padapter, u8 *buf)
return ret;
 }
 
-static void process_c2h_event(struct adapter *padapter, struct C2H_EVT_HDR 
*pC2hEvent, u8 *c2hBuf)
+static void process_c2h_event(struct adapter *padapter, struct c2h_evt_hdr_t 
*pC2hEvent, u8 *c2hBuf)
 {
u8 index = 0;
 
@@ -3739,7 +3739,7 @@ static void process_c2h_event(struct adapter *padapter, 
struct C2H_EVT_HDR *pC2h
 
 void C2HPacketHandler_8723B(struct adapter *padapter, u8 *pbuffer, u16 length)
 {
-   struct C2H_EVT_HDR  C2hEvent;
+   struct c2h_evt_hdr_tC2hEvent;
u8 *tmpBuf = NULL;
C2hEvent.CmdID = pbuffer[0];
C2hEvent.CmdSeq = pbuffer[1];
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c 
b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
index 9e1b33c71710..17a3e7bf66ef 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
@@ -349,7 +349,7 @@ static void rtl8723bs_recv_tasklet(struct tasklet_struct *t)

RT_TRACE(_module_rtl871x_recv_c_, _drv_dump_, ("%s: rtw_recv_entry(precvframe) 
!= _SUCCESS\n", __func__));
}
} else if (pattrib->pkt_rpt_type == C2H_PACKET) 
{
-   struct C2H_EVT_HDR  C2hEvent;
+   struct c2h_evt_hdr_tC2hEvent;
 
u16 len_c2h = pattrib->pkt_len;
u8 *pbuf_c2h = 
precvframe->u.hdr.rx_data;
diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h 
b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
index fdade62bda28..95dfcb338fa8 100644
--- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
+++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
@@ -156,7 +156,7 @@ struct rt_firmware_hdr {
 /* Description: Determine the types of C2H events that are the same in driver
  * and FW; First constructed by tynli. 2009.10.09.
  */
-enum C2H_EVT {
+enum c2h_evt {
C2H_DBG = 0,
C2H_TSF = 1,
C2H_AP_RPT_RSP = 2,
@@ -172,13 +172,13 @@ enum C2H_EVT {
MAX_C2HEVENT
 };
 
-struct C2H_EVT_HDR {
+struct c2h_evt_hdr_t {
u8 CmdID;
u8 CmdLen;
u8 CmdSeq;
 } __attribute__((__packed__));
 
-enum PACKAGE_TYPE_E { /* tag_Package_Definition */
+enum package_type_e { /* tag_Package_Definition */
PACKAGE_DEFAULT,
PACKAGE_QFN68,
PACKAGE_TFBGA90,
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 19/43] Staging: rtl8723bs: fix names in hal_phy.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/hal_phy.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/hal_com_phycfg.c   |  2 +-
 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c  |  4 ++--
 drivers/staging/rtl8723bs/hal/sdio_halinit.c |  4 ++--
 .../staging/rtl8723bs/include/hal_com_phycfg.h   |  2 +-
 drivers/staging/rtl8723bs/include/hal_data.h |  6 +++---
 drivers/staging/rtl8723bs/include/hal_phy.h  | 16 
 drivers/staging/rtl8723bs/include/rtw_mp.h   |  2 +-
 7 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c 
b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
index 7405f9229117..b46db8909cb4 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
@@ -1673,7 +1673,7 @@ static s16 get_rate_sctn_idx(const u8 rate)
 }
 
 s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel,
- enum BAND_TYPE band_type, enum CHANNEL_WIDTH bandwidth,
+ enum band_type band_type, enum CHANNEL_WIDTH bandwidth,
  u8 rf_path, u8 data_rate, u8 channel)
 {
s16 idx_band   = -1;
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
index 9868d9f2b4df..9a41c185cf84 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
@@ -108,7 +108,7 @@ void PHY_SetBBReg_8723B(
 /*  */
 
 static u32 phy_RFSerialRead_8723B(
-   struct adapter *Adapter, enum RF_PATH eRFPath, u32 Offset
+   struct adapter *Adapter, enum rf_path eRFPath, u32 Offset
 )
 {
u32 retValue = 0;
@@ -202,7 +202,7 @@ static u32 phy_RFSerialRead_8723B(
  */
 static void phy_RFSerialWrite_8723B(
struct adapter *Adapter,
-   enum RF_PATH eRFPath,
+   enum rf_path eRFPath,
u32 Offset,
u32 Data
 )
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c 
b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 9fc565881e32..6731ce2dadda 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -751,9 +751,9 @@ static u32 rtl8723bs_hal_init(struct adapter *padapter)
/*  Joseph Note: Keep RfRegChnlVal for later use. */
/*  */
pHalData->RfRegChnlVal[0] =
-   PHY_QueryRFReg(padapter, (enum RF_PATH)0, RF_CHNLBW, 
bRFRegOffsetMask);
+   PHY_QueryRFReg(padapter, (enum rf_path)0, RF_CHNLBW, 
bRFRegOffsetMask);
pHalData->RfRegChnlVal[1] =
-   PHY_QueryRFReg(padapter, (enum RF_PATH)1, RF_CHNLBW, 
bRFRegOffsetMask);
+   PHY_QueryRFReg(padapter, (enum rf_path)1, RF_CHNLBW, 
bRFRegOffsetMask);
 
 
/* if (!pHalData->bMACFuncEnable) { */
diff --git a/drivers/staging/rtl8723bs/include/hal_com_phycfg.h 
b/drivers/staging/rtl8723bs/include/hal_com_phycfg.h
index 580b85324ae7..32fd050428db 100644
--- a/drivers/staging/rtl8723bs/include/hal_com_phycfg.h
+++ b/drivers/staging/rtl8723bs/include/hal_com_phycfg.h
@@ -178,7 +178,7 @@ u8  Channel,
);
 
 s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 RegPwrTblSel,
-   enum BAND_TYPE Band, enum CHANNEL_WIDTH Bandwidth,
+   enum band_type Band, enum CHANNEL_WIDTH Bandwidth,
 u8 RfPath,
 u8 DataRate,
 u8 Channel
diff --git a/drivers/staging/rtl8723bs/include/hal_data.h 
b/drivers/staging/rtl8723bs/include/hal_data.h
index 5f7cad83ce1c..d731cec8ab81 100644
--- a/drivers/staging/rtl8723bs/include/hal_data.h
+++ b/drivers/staging/rtl8723bs/include/hal_data.h
@@ -187,10 +187,10 @@ struct hal_com_data {
u16 FirmwareSignature;
 
/* current WIFI_PHY values */
-   enum WIRELESS_MODE CurrentWirelessMode;
+   enum wireless_mode CurrentWirelessMode;
enum CHANNEL_WIDTH CurrentChannelBW;
-   enum BAND_TYPE CurrentBandType; /* 0:2.4G, 1:5G */
-   enum BAND_TYPE BandSet;
+   enum band_type CurrentBandType; /* 0:2.4G, 1:5G */
+   enum band_type BandSet;
u8 CurrentChannel;
u8 CurrentCenterFrequencyIndex1;
u8 nCur40MhzPrimeSC;/*  Control channel sub-carrier */
diff --git a/drivers/staging/rtl8723bs/include/hal_phy.h 
b/drivers/staging/rtl8723bs/include/hal_phy.h
index ed0caa0574e3..d2f5e7afcd64 100644
--- a/drivers/staging/rtl8723bs/include/hal_phy.h
+++ b/drivers/staging/rtl8723bs/include/hal_phy.h
@@ -42,14 +42,14 @@
 
 
 /*--Define Parameters---*/
-enum BAND_TYPE {
+enum band_type {
BAND_ON_2_4G = 0,
BAND_ON_5G,
BAND_ON_BOTH,
BANDMAX
 };
 
-enum RF_TYPE {
+enum rf_type {
RF_TYPE_MIN = 0,/*  0 */
RF_8225 = 1,/*  1 11b/g RF for verification only */
RF_8256 = 2,/*  2 11b/g/n */
@@ -59,7 

[PATCH 17/43] Staging: rtl8723bs: fix names in wifi.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/wifi.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/include/rtw_mlme.h |  8 
 drivers/staging/rtl8723bs/include/wifi.h | 14 +++---
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme.h 
b/drivers/staging/rtl8723bs/include/rtw_mlme.h
index ffcceb1fdde6..02d973a5aed2 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme.h
@@ -230,9 +230,9 @@ struct wifidirect_info {
struct group_id_infogroupid_info;   /*  Store the group id 
information when doing the group negotiation handshake. */
struct scan_limit_info  rx_invitereq_info;  /*  Used for get 
the limit scan channel from the Invitation procedure */
struct scan_limit_info  p2p_info;   /*  Used for get 
the limit scan channel from the P2P negotiation handshake */
-   enum P2P_ROLE   role;
-   enum P2P_STATE  pre_p2p_state;
-   enum P2P_STATE  p2p_state;
+   enum p2p_role   role;
+   enum p2p_state  pre_p2p_state;
+   enum p2p_state  p2p_state;
u8  device_addr[ETH_ALEN];  /*  The 
device address should be the mac address of this device. */
u8  interface_addr[ETH_ALEN];
u8  social_chan[4];
@@ -275,7 +275,7 @@ struct wifidirect_info {

/*  In this case, the driver can issue the 
tdls setup request frame */

/*  even the current security is weak 
security. */
 
-   enumP2P_WPSINFO ui_got_wps_info;
/*  This field will store the WPS value (PIN value or PBC) that UI had got 
from the user. */
+   enump2p_wpsinfo ui_got_wps_info;
/*  This field will store the WPS value (PIN value or PBC) that UI had got 
from the user. */
u16 supported_wps_cm;   
/*  This field describes the WPS config method which this driver 
supported. */

/*  The value should be the combination of 
config method defined in page104 of WPS v2.0 spec. */
u8  external_uuid;  
/*  UUID flag */
diff --git a/drivers/staging/rtl8723bs/include/wifi.h 
b/drivers/staging/rtl8723bs/include/wifi.h
index 4080803d9b1b..f9815411321c 100644
--- a/drivers/staging/rtl8723bs/include/wifi.h
+++ b/drivers/staging/rtl8723bs/include/wifi.h
@@ -43,14 +43,14 @@
 /*  This test verifies the WLAN NIC can update the NAV through sending the CTS 
with large duration. */
 #defineWiFiNavUpperUs  3   /*  30 ms */
 
-enum WIFI_FRAME_TYPE {
+enum wifi_frame_type {
WIFI_MGT_TYPE  =(0),
WIFI_CTRL_TYPE =(BIT(2)),
WIFI_DATA_TYPE =(BIT(3)),
WIFI_QOS_DATA_TYPE  = (BIT(7)|BIT(3)),  /*  QoS Data */
 };
 
-enum WIFI_FRAME_SUBTYPE {
+enum wifi_frame_subtype {
 
 /*  below is for mgt frame */
 WIFI_ASSOCREQ   = (0 | WIFI_MGT_TYPE),
@@ -88,7 +88,7 @@ enum WIFI_FRAME_SUBTYPE {
 WIFI_QOS_DATA_NULL = (BIT(6) | WIFI_QOS_DATA_TYPE),
 };
 
-enum WIFI_REG_DOMAIN {
+enum wifi_reg_domain {
DOMAIN_FCC  = 1,
DOMAIN_IC   = 2,
DOMAIN_ETSI = 3,
@@ -751,14 +751,14 @@ struct ADDBA_request {
 #defineWPS_CM_SW_DISPLAY_PIN   0x2008
 #defineWPS_CM_LCD_DISPLAY_PIN  0x4008
 
-enum P2P_ROLE {
+enum p2p_role {
P2P_ROLE_DISABLE = 0,
P2P_ROLE_DEVICE = 1,
P2P_ROLE_CLIENT = 2,
P2P_ROLE_GO = 3
 };
 
-enum P2P_STATE {
+enum p2p_state {
P2P_STATE_NONE = 0, 
/*  P2P disable */
P2P_STATE_IDLE = 1, 
/*  P2P had enabled and do nothing */
P2P_STATE_LISTEN = 2,   
/*  In pure listen state */
@@ -784,7 +784,7 @@ enum P2P_STATE {
P2P_STATE_TX_INFOR_NOREADY = 22,/*  sending p2p 
negotiation response with information is not available */
 };
 
-enum P2P_WPSINFO {
+enum p2p_wpsinfo {
P2P_NO_WPSINFO  = 0,
P2P_GOT_WPSINFO_PEER_DISPLAY_PIN= 1,
P2P_GOT_WP

[PATCH 20/43] Staging: rtl8723bs: fix names in rtw_mlme_ext.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/rtw_mlme_ext.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 24 -
 .../staging/rtl8723bs/include/rtw_mlme_ext.h  | 26 +--
 drivers/staging/rtl8723bs/os_dep/wifi_regd.c  |  2 +-
 3 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 416268f26dc3..7bd75744bcb2 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -71,7 +71,7 @@ static unsigned char REALTEK_96B_IE[] = {0x00, 0xe0, 0x4c, 
0x02, 0x01, 0x20};
 /
 ChannelPlan definitions
 */
-static struct RT_CHANNEL_PLAN_2G   
RTW_ChannelPlan2G[RT_CHANNEL_DOMAIN_2G_MAX] = {
+static struct rt_channel_plan_2g   
RTW_ChannelPlan2G[RT_CHANNEL_DOMAIN_2G_MAX] = {
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13},  /*  
0x00, RT_CHANNEL_DOMAIN_2G_WORLD , Passive scan CH 12, 13 */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13},  /*  
0x01, RT_CHANNEL_DOMAIN_2G_ETSI1 */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 11},  /*  
0x02, RT_CHANNEL_DOMAIN_2G_FCC1 */
@@ -81,7 +81,7 @@ static struct RT_CHANNEL_PLAN_2G  
RTW_ChannelPlan2G[RT_CHANNEL_DOMAIN_2G_MAX] = {
{{}, 0},
/*  0x06, RT_CHANNEL_DOMAIN_2G_NULL */
 };
 
-static struct RT_CHANNEL_PLAN_5G   
RTW_ChannelPlan5G[RT_CHANNEL_DOMAIN_5G_MAX] = {
+static struct rt_channel_plan_5g   
RTW_ChannelPlan5G[RT_CHANNEL_DOMAIN_5G_MAX] = {
{{}, 0},

/*  0x00, RT_CHANNEL_DOMAIN_5G_NULL */
{{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 
128, 132, 136, 140}, 19},  /*  0x01, 
RT_CHANNEL_DOMAIN_5G_ETSI1 */
{{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 
128, 132, 136, 140, 149, 153, 157, 161, 165}, 24}, /*  0x02, 
RT_CHANNEL_DOMAIN_5G_ETSI2 */
@@ -121,7 +121,7 @@ static struct RT_CHANNEL_PLAN_5G
RTW_ChannelPlan5G[RT_CHANNEL_DOMAIN_5G_MAX] = {
{{36, 40, 44, 48, 149, 153, 157, 161}, 8},  

/*  0x22, RT_CHANNEL_DOMAIN_5G_FCC4_NO_DFS */
 };
 
-static struct RT_CHANNEL_PLAN_MAP  
RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
+static struct rt_channel_plan_map  
RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
/*  0x00 ~ 0x1F , Old Define = */
{0x02, 0x20},   /* 0x00, RT_CHANNEL_DOMAIN_FCC */
{0x02, 0x0A},   /* 0x01, RT_CHANNEL_DOMAIN_IC */
@@ -209,7 +209,7 @@ static struct RT_CHANNEL_PLAN_MAP   
RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
 };
 
  /* use the combination for max channel numbers */
-static struct RT_CHANNEL_PLAN_MAP RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE = {0x03, 
0x02};
+static struct rt_channel_plan_map RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE = {0x03, 
0x02};
 
 /* Search the @param ch in given @param ch_set
  * @ch_set: the given channel set
@@ -217,7 +217,7 @@ static struct RT_CHANNEL_PLAN_MAP 
RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE = {0x03, 0
  *
  * return the index of channel_num in channel_set, -1 if not found
  */
-int rtw_ch_set_search_ch(struct RT_CHANNEL_INFO *ch_set, const u32 ch)
+int rtw_ch_set_search_ch(struct rt_channel_info *ch_set, const u32 ch)
 {
int i;
 
@@ -325,7 +325,7 @@ static void init_mlme_ext_priv_value(struct adapter 
*padapter)
pmlmeext->action_public_dialog_token = 0xff;
 }
 
-static int has_channel(struct RT_CHANNEL_INFO *channel_set,
+static int has_channel(struct rt_channel_info *channel_set,
   u8 chanset_size,
   u8 chan)
 {
@@ -340,7 +340,7 @@ static int has_channel(struct RT_CHANNEL_INFO *channel_set,
return 0;
 }
 
-static void init_channel_list(struct adapter *padapter, struct RT_CHANNEL_INFO 
*channel_set,
+static void init_channel_list(struct adapter *padapter, struct rt_channel_info 
*channel_set,
  u8 chanset_size,
  struct p2p_channels 
*channel_list)
 {
@@ -392,13 +392,13 @@ static void init_channel_list(struct adapter *padapter, 
struct RT_CHANNEL_INFO *
 
 }
 
-static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, struct 
RT_CHANNEL_INFO *channel_set)
+static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, struct 
rt_channel_info *

[PATCH 21/43] Staging: rtl8723bs: fix names in rtw_xmit.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/rtw_xmit.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/include/rtw_xmit.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_xmit.h 
b/drivers/staging/rtl8723bs/include/rtw_xmit.h
index b482821c9af8..f7d6ac0ff865 100644
--- a/drivers/staging/rtl8723bs/include/rtw_xmit.h
+++ b/drivers/staging/rtl8723bs/include/rtw_xmit.h
@@ -83,7 +83,7 @@ do {\
 
 #define TXDESC_OFFSET TXDESC_SIZE
 
-enum TXDESC_SC {
+enum txdesc_sc {
SC_DONT_CARE = 0x00,
SC_UPPER = 0x01,
SC_LOWER = 0x02,
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 22/43] Staging: rtl8723bs: fix names in rtw_rf.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/rtw_rf.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/hal_com_phycfg.c |  8 
 drivers/staging/rtl8723bs/hal/hal_intf.c   |  2 +-
 .../staging/rtl8723bs/hal/rtl8723b_phycfg.c| 16 
 .../staging/rtl8723bs/hal/rtl8723b_rf6052.c|  2 +-
 .../staging/rtl8723bs/include/hal_com_phycfg.h |  6 +++---
 drivers/staging/rtl8723bs/include/hal_data.h   |  2 +-
 drivers/staging/rtl8723bs/include/hal_intf.h   |  6 +++---
 .../staging/rtl8723bs/include/hal_phy_cfg.h|  6 +++---
 .../staging/rtl8723bs/include/rtl8723b_rf.h|  2 +-
 drivers/staging/rtl8723bs/include/rtw_rf.h | 18 +-
 10 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c 
b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
index b46db8909cb4..586e3ded447f 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
@@ -1039,7 +1039,7 @@ u8 PHY_GetTxPowerIndexBase(
struct adapter *padapter,
u8 RFPath,
u8 Rate,
-   enum CHANNEL_WIDTH  BandWidth,
+   enum channel_width  BandWidth,
u8 Channel,
bool *bIn24G
 )
@@ -1556,7 +1556,7 @@ void PHY_SetTxPowerLevelByPath(struct adapter *Adapter, 
u8 channel, u8 path)
 void PHY_SetTxPowerIndexByRateArray(
struct adapter *padapter,
u8 RFPath,
-   enum CHANNEL_WIDTH BandWidth,
+   enum channel_width BandWidth,
u8 Channel,
u8 *Rates,
u8 RateArraySize
@@ -1610,7 +1610,7 @@ static s8 phy_GetChannelIndexOfTxPowerLimit(u8 Band, u8 
Channel)
return channelIndex;
 }
 
-static s16 get_bandwidth_idx(const enum CHANNEL_WIDTH bandwidth)
+static s16 get_bandwidth_idx(const enum channel_width bandwidth)
 {
switch (bandwidth) {
case CHANNEL_WIDTH_20:
@@ -1673,7 +1673,7 @@ static s16 get_rate_sctn_idx(const u8 rate)
 }
 
 s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel,
- enum band_type band_type, enum CHANNEL_WIDTH bandwidth,
+ enum band_type band_type, enum channel_width bandwidth,
  u8 rf_path, u8 data_rate, u8 channel)
 {
s16 idx_band   = -1;
diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c 
b/drivers/staging/rtl8723bs/hal/hal_intf.c
index 8554baef95b8..aa4356327636 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -342,7 +342,7 @@ void rtw_hal_set_chan(struct adapter *padapter, u8 channel)
 }
 
 void rtw_hal_set_chnl_bw(struct adapter *padapter, u8 channel,
-enum CHANNEL_WIDTH Bandwidth, u8 Offset40, u8 Offset80)
+enum channel_width Bandwidth, u8 Offset40, u8 Offset80)
 {
if (padapter->HalFunc.set_chnl_bw_handler)
padapter->HalFunc.set_chnl_bw_handler(padapter, channel,
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
index 9a41c185cf84..52cb58dc4e8d 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
@@ -559,7 +559,7 @@ u8 PHY_GetTxPowerIndex(
struct adapter *padapter,
u8 RFPath,
u8 Rate,
-   enum CHANNEL_WIDTH BandWidth,
+   enum channel_width BandWidth,
u8 Channel
 )
 {
@@ -616,7 +616,7 @@ void PHY_GetTxPowerLevel8723B(struct adapter *Adapter, s32 
*powerlevel)
 }
 
 static void phy_SetRegBW_8723B(
-   struct adapter *Adapter, enum CHANNEL_WIDTH CurrentBW
+   struct adapter *Adapter, enum channel_width CurrentBW
 )
 {
u16 RegRfMod_BW, u2tmp = 0;
@@ -806,16 +806,16 @@ static void PHY_HandleSwChnlAndSetBW8723B(
bool bSwitchChannel,
bool bSetBandWidth,
u8 ChannelNum,
-   enum CHANNEL_WIDTH ChnlWidth,
-   enum EXTCHNL_OFFSET ExtChnlOffsetOf40MHz,
-   enum EXTCHNL_OFFSET ExtChnlOffsetOf80MHz,
+   enum channel_width ChnlWidth,
+   enum extchnl_offset ExtChnlOffsetOf40MHz,
+   enum extchnl_offset ExtChnlOffsetOf80MHz,
u8 CenterFrequencyIndex1
 )
 {
/* static bool  bInitialzed = false; */
struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
u8 tmpChannel = pHalData->CurrentChannel;
-   enum CHANNEL_WIDTH tmpBW = pHalData->CurrentChannelBW;
+   enum channel_width tmpBW = pHalData->CurrentChannelBW;
u8 tmpnCur40MhzPrimeSC = pHalData->nCur40MhzPrimeSC;
u8 tmpnCur80MhzPrimeSC = pHalData->nCur80MhzPrimeSC;
u8 tmpCenterFrequencyIndex1 = pHalData->CurrentCenterFrequencyIndex1;
@@ -874,7 +874,7 @@ static void PHY_HandleSwChnlAndSetBW8723B(
 
 void PHY_SetBWMode8723B(
struct adapter *Adapter,
-   enum CHANNEL_WIDTH Bandwidth, /*  20M or 40M */
+   enum channel_width Bandwidth, /*  20M or 40M */
unsigned char Of

[PATCH 23/43] Staging: rtl8723bs: fix names in HalPwrSeqCmd.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/HalPwrSeqCmd.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c  |  4 ++--
 drivers/staging/rtl8723bs/hal/hal_pwr_seq.c   | 22 +--
 .../staging/rtl8723bs/include/HalPwrSeqCmd.h  |  6 ++---
 .../staging/rtl8723bs/include/hal_pwr_seq.h   | 22 +--
 4 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c 
b/drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c
index c1c9914d9b49..932b31fda6ad 100644
--- a/drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c
+++ b/drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c
@@ -39,10 +39,10 @@ u8 HalPwrSeqCmdParsing(
u8 CutVersion,
u8 FabVersion,
u8 InterfaceType,
-   struct WLAN_PWR_CFG PwrSeqCmd[]
+   struct wlan_pwr_cfg PwrSeqCmd[]
 )
 {
-   struct WLAN_PWR_CFG PwrCfgCmd;
+   struct wlan_pwr_cfg PwrCfgCmd;
u8 bPollingBit = false;
u32 AryIdx = 0;
u8 value = 0;
diff --git a/drivers/staging/rtl8723bs/hal/hal_pwr_seq.c 
b/drivers/staging/rtl8723bs/hal/hal_pwr_seq.c
index 2a80da26f572..fba67a7c069c 100644
--- a/drivers/staging/rtl8723bs/hal/hal_pwr_seq.c
+++ b/drivers/staging/rtl8723bs/hal/hal_pwr_seq.c
@@ -21,7 +21,7 @@ Major Change History:
 
 /* drivers should parse below arrays and do the corresponding actions */
 /* 3 Power on  Array */
-struct WLAN_PWR_CFG rtl8723B_power_on_flow[
+struct wlan_pwr_cfg rtl8723B_power_on_flow[
RTL8723B_TRANS_CARDEMU_TO_ACT_STEPS+
RTL8723B_TRANS_END_STEPS
 ] = {
@@ -30,7 +30,7 @@ struct WLAN_PWR_CFG rtl8723B_power_on_flow[
 };
 
 /* 3Radio off GPIO Array */
-struct WLAN_PWR_CFG rtl8723B_radio_off_flow[
+struct wlan_pwr_cfg rtl8723B_radio_off_flow[
RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS+
RTL8723B_TRANS_END_STEPS
 ] = {
@@ -39,7 +39,7 @@ struct WLAN_PWR_CFG rtl8723B_radio_off_flow[
 };
 
 /* 3Card Disable Array */
-struct WLAN_PWR_CFG rtl8723B_card_disable_flow[
+struct wlan_pwr_cfg rtl8723B_card_disable_flow[
RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS+
RTL8723B_TRANS_CARDEMU_TO_PDN_STEPS+
RTL8723B_TRANS_END_STEPS
@@ -50,7 +50,7 @@ struct WLAN_PWR_CFG rtl8723B_card_disable_flow[
 };
 
 /* 3 Card Enable Array */
-struct WLAN_PWR_CFG rtl8723B_card_enable_flow[
+struct wlan_pwr_cfg rtl8723B_card_enable_flow[
RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS+
RTL8723B_TRANS_CARDEMU_TO_PDN_STEPS+
RTL8723B_TRANS_END_STEPS
@@ -61,7 +61,7 @@ struct WLAN_PWR_CFG rtl8723B_card_enable_flow[
 };
 
 /* 3Suspend Array */
-struct WLAN_PWR_CFG rtl8723B_suspend_flow[
+struct wlan_pwr_cfg rtl8723B_suspend_flow[
RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS+
RTL8723B_TRANS_CARDEMU_TO_SUS_STEPS+
RTL8723B_TRANS_END_STEPS
@@ -72,7 +72,7 @@ struct WLAN_PWR_CFG rtl8723B_suspend_flow[
 };
 
 /* 3 Resume Array */
-struct WLAN_PWR_CFG rtl8723B_resume_flow[
+struct wlan_pwr_cfg rtl8723B_resume_flow[
RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS+
RTL8723B_TRANS_CARDEMU_TO_SUS_STEPS+
RTL8723B_TRANS_END_STEPS
@@ -83,7 +83,7 @@ struct WLAN_PWR_CFG rtl8723B_resume_flow[
 };
 
 /* 3HWPDN Array */
-struct WLAN_PWR_CFG rtl8723B_hwpdn_flow[
+struct wlan_pwr_cfg rtl8723B_hwpdn_flow[
RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS+
RTL8723B_TRANS_CARDEMU_TO_PDN_STEPS+
RTL8723B_TRANS_END_STEPS
@@ -94,7 +94,7 @@ struct WLAN_PWR_CFG rtl8723B_hwpdn_flow[
 };
 
 /* 3 Enter LPS */
-struct WLAN_PWR_CFG rtl8723B_enter_lps_flow[
+struct wlan_pwr_cfg rtl8723B_enter_lps_flow[
RTL8723B_TRANS_ACT_TO_LPS_STEPS+RTL8723B_TRANS_END_STEPS
 ] = {
/* FW behavior */
@@ -103,7 +103,7 @@ struct WLAN_PWR_CFG rtl8723B_enter_lps_flow[
 };
 
 /* 3 Leave LPS */
-struct WLAN_PWR_CFG rtl8723B_leave_lps_flow[
+struct wlan_pwr_cfg rtl8723B_leave_lps_flow[
RTL8723B_TRANS_LPS_TO_ACT_STEPS+RTL8723B_TRANS_END_STEPS
 ] = {
/* FW behavior */
@@ -112,7 +112,7 @@ struct WLAN_PWR_CFG rtl8723B_leave_lps_flow[
 };
 
 /* 3 Enter SW LPS */
-struct WLAN_PWR_CFG rtl8723B_enter_swlps_flow[
+struct wlan_pwr_cfg rtl8723B_enter_swlps_flow[
RTL8723B_TRANS_ACT_TO_SWLPS_STEPS+RTL8723B_TRANS_END_STEPS
 ] = {
/* SW behavior */
@@ -121,7 +121,7 @@ struct WLAN_PWR_CFG rtl8723B_enter_swlps_flow[
 };
 
 /* 3 Leave SW LPS */
-struct WLAN_PWR_CFG rtl8723B_leave_swlps_flow[
+struct wlan_pwr_cfg rtl8723B_leave_swlps_flow[
RTL8723B_TRANS_SWLPS_TO_ACT_STEPS+RTL8723B_TRANS_END_STEPS
 ] = {
/* SW behavior */
diff --git a/drivers/staging/rtl8723bs/include/HalPwrSeqCmd.h 
b/drivers/staging/rtl8723bs/include/HalPwrSeqCmd.h
index 7e8c2e511d0b..ba9b033685ec 100644
--- a/drivers/staging/rtl8723bs/include/HalPwrSeqCmd.h
+++ b/drivers/staging/rtl8723bs/include/HalPwrSeqCmd.h
@@ -82,12 +82,12 @@
 #definePWR_CUT_ALL_MSK 0xFF
 
 
-enum PWRSEQ_CMD_DELAY_UNIT {
+enum pwrseq_cmd_delay_unit {
PWRSEQ_DELAY_US,
PWRSEQ_DE

[PATCH 24/43] Staging: rtl8723bs: fix names in hal_com_phycfg.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/hal_com_phycfg.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 4 ++--
 drivers/staging/rtl8723bs/include/hal_com_phycfg.h | 8 
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c 
b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
index 586e3ded447f..67db3c60b518 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
@@ -12,7 +12,7 @@
 #include 
 
 u8 PHY_GetTxPowerByRateBase(struct adapter *Adapter, u8 Band, u8 RfPath,
-   u8 TxNum, enum RATE_SECTION RateSection)
+   u8 TxNum, enum rate_section RateSection)
 {
struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
u8  value = 0;
@@ -104,7 +104,7 @@ phy_SetTxPowerByRateBase(
struct adapter *Adapter,
u8 Band,
u8 RfPath,
-   enum RATE_SECTION   RateSection,
+   enum rate_section   RateSection,
u8 TxNum,
u8 Value
 )
diff --git a/drivers/staging/rtl8723bs/include/hal_com_phycfg.h 
b/drivers/staging/rtl8723bs/include/hal_com_phycfg.h
index 979b621f4baa..51eef4d5c861 100644
--- a/drivers/staging/rtl8723bs/include/hal_com_phycfg.h
+++ b/drivers/staging/rtl8723bs/include/hal_com_phycfg.h
@@ -12,7 +12,7 @@
 #definePathC   0x2
 #definePathD   0x3
 
-enum RATE_SECTION {
+enum rate_section {
CCK = 0,
OFDM,
HT_MCS0_MCS7,
@@ -25,7 +25,7 @@ enum RATE_SECTION {
VHT_4SSMCS0_4SSMCS9,
 };
 
-enum RF_TX_NUM {
+enum rf_tx_num {
RF_1TX = 0,
RF_2TX,
RF_3TX,
@@ -36,7 +36,7 @@ enum RF_TX_NUM {
 
 #define MAX_POWER_INDEX0x3F
 
-enum _REGULATION_TXPWR_LMT {
+enum _regulation_txpwr_lmt {
TXPWR_LMT_FCC = 0,
TXPWR_LMT_MKK,
TXPWR_LMT_ETSI,
@@ -76,7 +76,7 @@ struct adapter *Adapter,
 u8 Band,
 u8 RfPath,
 u8 TxNum,
-enum RATE_SECTION  RateSection
+enum rate_section  RateSection
);
 
 u8
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 26/43] Staging: rtl8723bs: fix names in hal_data.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/hal_data.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/include/hal_data.h | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/hal_data.h 
b/drivers/staging/rtl8723bs/include/hal_data.h
index 83a538e5120b..89943217fb42 100644
--- a/drivers/staging/rtl8723bs/include/hal_data.h
+++ b/drivers/staging/rtl8723bs/include/hal_data.h
@@ -15,7 +15,7 @@
 /*  */
 /*   For RTL8723 WiFi/BT/GPS multi-function configuration. 
2010.10.06. */
 /*  */
-enum RT_MULTI_FUNC {
+enum rt_multi_func {
RT_MULTI_FUNC_NONE  = 0x00,
RT_MULTI_FUNC_WIFI  = 0x01,
RT_MULTI_FUNC_BT= 0x02,
@@ -24,18 +24,18 @@ enum RT_MULTI_FUNC {
 /*  */
 /*   For RTL8723 WiFi PDn/GPIO polarity control configuration. 
2010.10.08. */
 /*  */
-enum RT_POLARITY_CTL {
+enum rt_polarity_ctl {
RT_POLARITY_LOW_ACT = 0,
RT_POLARITY_HIGH_ACT= 1,
 };
 
 /*  For RTL8723 regulator mode. by tynli. 2011.01.14. */
-enum RT_REGULATOR_MODE {
+enum rt_regulator_mode {
RT_SWITCHING_REGULATOR  = 0,
RT_LDO_REGULATOR= 1,
 };
 
-enum RT_AMPDU_BURST {
+enum rt_ampdu_burst {
RT_AMPDU_BURST_NONE = 0,
RT_AMPDU_BURST_92D  = 1,
RT_AMPDU_BURST_88E  = 2,
@@ -177,9 +177,9 @@ struct dm_priv {
 
 struct hal_com_data {
struct hal_version VersionID;
-   enum RT_MULTI_FUNC MultiFunc; /*  For multi-function consideration. */
-   enum RT_POLARITY_CTL PolarityCtl; /*  For Wifi PDn Polarity control. */
-   enum RT_REGULATOR_MODE  RegulatorMode; /*  switching regulator or LDO */
+   enum rt_multi_func MultiFunc; /*  For multi-function consideration. */
+   enum rt_polarity_ctl PolarityCtl; /*  For Wifi PDn Polarity control. */
+   enum rt_regulator_mode  RegulatorMode; /*  switching regulator or LDO */
 
u16 FirmwareVersion;
u16 FirmwareVersionRev;
@@ -411,7 +411,7 @@ struct hal_com_data {
u8 RegIQKFWOffload;
struct submit_ctx   iqk_sctx;
 
-   enum RT_AMPDU_BURST AMPDUBurstMode; /* 92C maybe not use, but for 
compile successfully */
+   enum rt_ampdu_burst AMPDUBurstMode; /* 92C maybe not use, but for 
compile successfully */
 
u32 sdio_himr;
u32 sdio_hisr;
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 25/43] Staging: rtl8723bs: fix names in sta_info.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/sta_info.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/include/sta_info.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/sta_info.h 
b/drivers/staging/rtl8723bs/include/sta_info.h
index 33e6e00c126d..abde3e3df988 100644
--- a/drivers/staging/rtl8723bs/include/sta_info.h
+++ b/drivers/staging/rtl8723bs/include/sta_info.h
@@ -31,7 +31,7 @@ struct wlan_acl_pool {
struct __queue  acl_node_q;
 };
 
-struct RSSI_STA {
+struct rssi_sta {
s32 UndecoratedSmoothedPWDB;
s32 UndecoratedSmoothedCCK;
s32 UndecoratedSmoothedOFDM;
@@ -186,7 +186,7 @@ struct sta_info {
u32 assoc_req_len;
 
/* for DM */
-   struct RSSI_STA  rssi_stat;
+   struct rssi_sta  rssi_stat;
 
/* ODM_STA_INFO_T */
/*  ODM Relative Info === */
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 27/43] Staging: rtl8723bs: fix names in ieee80211.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/ieee80211.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/include/ieee80211.h | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/ieee80211.h 
b/drivers/staging/rtl8723bs/include/ieee80211.h
index 1c671b778c57..a7cbd04059f8 100644
--- a/drivers/staging/rtl8723bs/include/ieee80211.h
+++ b/drivers/staging/rtl8723bs/include/ieee80211.h
@@ -125,7 +125,7 @@ extern u8 RSN_CIPHER_SUITE_CCMP[];
 extern u8 RSN_CIPHER_SUITE_WEP104[];
 
 
-enum RATEID_IDX {
+enum rateid_idx {
RATEID_IDX_BGN_40M_2SS = 0,
RATEID_IDX_BGN_40M_1SS = 1,
RATEID_IDX_BGN_20M_2SS_BN = 2,
@@ -139,7 +139,7 @@ enum RATEID_IDX {
RATEID_IDX_VHT_1SS = 10,
 };
 
-enum RATR_TABLE_MODE {
+enum ratr_table_mode {
RATR_INX_WIRELESS_NGB = 0,  /*  BGN 40 Mhz 2SS 1SS */
RATR_INX_WIRELESS_NG = 1,   /*  GN or N */
RATR_INX_WIRELESS_NB = 2,   /*  BGN 20 Mhz 2SS 1SS  or BN */
@@ -152,7 +152,7 @@ enum RATR_TABLE_MODE {
 };
 
 
-enum NETWORK_TYPE {
+enum network_type {
WIRELESS_INVALID = 0,
/* Sub-Element */
WIRELESS_11B = BIT(0), /*  tx: cck only , rx: cck only, hw: cck */
@@ -423,7 +423,7 @@ struct ieee80211_snap_hdr {
 #define IEEE80211_OFDM_SHIFT_MASK_A 4
 
 
-enum MGN_RATE {
+enum mgn_rate {
MGN_1M  = 0x02,
MGN_2M  = 0x04,
MGN_5_5M= 0x0B,
@@ -799,7 +799,7 @@ enum rtw_ieee80211_category {
RTW_WLAN_CATEGORY_P2P = 0x7f,/* P2P action frames */
 };
 
-enum _PUBLIC_ACTION {
+enum _public_action {
ACT_PUBLIC_BSSCOEXIST = 0, /*  20/40 BSS Coexistence */
ACT_PUBLIC_DSE_ENABLE = 1,
ACT_PUBLIC_DSE_DEENABLE = 2,
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 28/43] Staging: rtl8723bs: fix names in rtw_efuse.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/rtw_efuse.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 28 +--
 drivers/staging/rtl8723bs/include/hal_data.h  |  2 +-
 drivers/staging/rtl8723bs/include/rtw_efuse.h |  6 ++--
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index f33b084011b5..e0b5a608ec97 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -575,7 +575,7 @@ static u8 hal_EfuseSwitchToBank(
u32 value32 = 0;
 #ifdef HAL_EFUSE_MEMORY
struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
-   struct EFUSE_HAL *pEfuseHal = &pHalData->EfuseHal;
+   struct efuse_hal *pEfuseHal = &pHalData->EfuseHal;
 #endif
 
 
@@ -856,7 +856,7 @@ static void hal_ReadEFuse_WiFi(
 {
 #ifdef HAL_EFUSE_MEMORY
struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
-   struct EFUSE_HAL *pEfuseHal = &pHalData->EfuseHal;
+   struct efuse_hal *pEfuseHal = &pHalData->EfuseHal;
 #endif
u8 *efuseTbl = NULL;
u16 eFuse_Addr = 0;
@@ -995,7 +995,7 @@ static void hal_ReadEFuse_BT(
 {
 #ifdef HAL_EFUSE_MEMORY
struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
-   struct EFUSE_HAL *pEfuseHal = &pHalData->EfuseHal;
+   struct efuse_hal *pEfuseHal = &pHalData->EfuseHal;
 #endif
u8 *efuseTbl;
u8 bank;
@@ -1138,7 +1138,7 @@ static u16 hal_EfuseGetCurrentSize_WiFi(
 {
 #ifdef HAL_EFUSE_MEMORY
struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
-   struct EFUSE_HAL *pEfuseHal = &pHalData->EfuseHal;
+   struct efuse_hal *pEfuseHal = &pHalData->EfuseHal;
 #endif
u16 efuse_addr = 0;
u16 start_addr = 0; /*  for debug */
@@ -1236,7 +1236,7 @@ static u16 hal_EfuseGetCurrentSize_BT(struct adapter 
*padapter, u8 bPseudoTest)
 {
 #ifdef HAL_EFUSE_MEMORY
struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
-   struct EFUSE_HAL *pEfuseHal = &pHalData->EfuseHal;
+   struct efuse_hal *pEfuseHal = &pHalData->EfuseHal;
 #endif
u16 btusedbytes;
u16 efuse_addr;
@@ -1541,7 +1541,7 @@ static void hal_EfuseConstructPGPkt(
u8 offset,
u8 word_en,
u8 *pData,
-   struct PGPKT_STRUCT *pTargetPkt
+   struct pgpkt_struct *pTargetPkt
 )
 {
memset(pTargetPkt->data, 0xFF, PGPKT_DATA_SIZE);
@@ -1555,12 +1555,12 @@ static u8 hal_EfusePartialWriteCheck(
struct adapter *padapter,
u8 efuseType,
u16 *pAddr,
-   struct PGPKT_STRUCT *pTargetPkt,
+   struct pgpkt_struct *pTargetPkt,
u8 bPseudoTest
 )
 {
struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
-   struct EFUSE_HAL *pEfuseHal = &pHalData->EfuseHal;
+   struct efuse_hal *pEfuseHal = &pHalData->EfuseHal;
u8 bRet = false;
u16 startAddr = 0, efuse_max_available_len = 0, efuse_max = 0;
u8 efuse_data = 0;
@@ -1673,7 +1673,7 @@ static u8 hal_EfusePgPacketWrite1ByteHeader(
struct adapter *padapter,
u8 efuseType,
u16 *pAddr,
-   struct PGPKT_STRUCT *pTargetPkt,
+   struct pgpkt_struct *pTargetPkt,
u8 bPseudoTest
 )
 {
@@ -1710,7 +1710,7 @@ static u8 hal_EfusePgPacketWrite2ByteHeader(
struct adapter *padapter,
u8 efuseType,
u16 *pAddr,
-   struct PGPKT_STRUCT *pTargetPkt,
+   struct pgpkt_struct *pTargetPkt,
u8 bPseudoTest
 )
 {
@@ -1777,7 +1777,7 @@ static u8 hal_EfusePgPacketWriteHeader(
struct adapter *padapter,
u8 efuseType,
u16 *pAddr,
-   struct PGPKT_STRUCT *pTargetPkt,
+   struct pgpkt_struct *pTargetPkt,
u8 bPseudoTest
 )
 {
@@ -1795,7 +1795,7 @@ static u8 hal_EfusePgPacketWriteData(
struct adapter *padapter,
u8 efuseType,
u16 *pAddr,
-   struct PGPKT_STRUCT *pTargetPkt,
+   struct pgpkt_struct *pTargetPkt,
u8 bPseudoTest
 )
 {
@@ -1822,7 +1822,7 @@ static s32 Hal_EfusePgPacketWrite(
bool bPseudoTest
 )
 {
-   struct PGPKT_STRUCT targetPkt;
+   struct pgpkt_struct targetPkt;
u16 startAddr = 0;
u8 efuseType = EFUSE_WIFI;
 
@@ -1851,7 +1851,7 @@ static bool Hal_EfusePgPacketWrite_BT(
bool bPseudoTest
 )
 {
-   struct PGPKT_STRUCT targetPkt;
+   struct pgpkt_struct targetPkt;
u16 startAddr = 0;
u8 efuseType = EFUSE_BT;
 
diff --git a/drivers/staging/rtl8723bs/include/hal_data.h 
b/drivers/staging/rtl8723bs/include/hal_data.h
index 89943217fb42..6a0c5626e19f 100644
--- a/drivers/staging/rtl8723bs/include/hal_data.h
+++ b/drivers/staging/rtl8723bs/include/hal_data.h
@@ -233,7 +233,7 @@ struct hal_com_data {
boolEepromOrEfuse;
u8  EfuseUsedPercentage;
u16 EfuseUsedBytes;

[PATCH 29/43] Staging: rtl8723bs: fix names in hal_btcoex.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in include/hal_btcoex.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/include/hal_btcoex.h | 2 +-
 drivers/staging/rtl8723bs/include/hal_data.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/hal_btcoex.h 
b/drivers/staging/rtl8723bs/include/hal_btcoex.h
index fb8bc2cf083b..3c03be210d87 100644
--- a/drivers/staging/rtl8723bs/include/hal_btcoex.h
+++ b/drivers/staging/rtl8723bs/include/hal_btcoex.h
@@ -11,7 +11,7 @@
 
 /*  Some variables can't get from outsrc BT-Coex, */
 /*  so we need to save here */
-struct BT_COEXIST {
+struct bt_coexist {
u8 bBtExist;
u8 btTotalAntNum;
u8 btChipType;
diff --git a/drivers/staging/rtl8723bs/include/hal_data.h 
b/drivers/staging/rtl8723bs/include/hal_data.h
index 6a0c5626e19f..9512da2a7e95 100644
--- a/drivers/staging/rtl8723bs/include/hal_data.h
+++ b/drivers/staging/rtl8723bs/include/hal_data.h
@@ -434,7 +434,7 @@ struct hal_com_data {
struct DM_ODM_T odmpriv;
 
/*  For bluetooth co-existance */
-   struct BT_COEXIST   bt_coexist;
+   struct bt_coexist   bt_coexist;
 
/*  Interrupt related register information. */
u32 SysIntrStatus;
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 30/43] Staging: rtl8723bs: fix names in odm_interface.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in hal/odm_interface.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/odm_interface.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_interface.h 
b/drivers/staging/rtl8723bs/hal/odm_interface.h
index b129eb81bca0..8159bbd06c22 100644
--- a/drivers/staging/rtl8723bs/hal/odm_interface.h
+++ b/drivers/staging/rtl8723bs/hal/odm_interface.h
@@ -39,7 +39,7 @@ ODM_REG(DIG, _pDM_Odm)
 #define ODM_REG(_name, _pDM_Odm)   _cat(_name, _pDM_Odm->SupportICType, 
_reg)
 #define ODM_BIT(_name, _pDM_Odm)   _cat(_name, _pDM_Odm->SupportICType, 
_bit)
 
-enum ODM_H2C_CMD {
+enum odm_h2c_cmd {
ODM_H2C_RSSI_REPORT = 0,
ODM_H2C_PSD_RESULT = 1,
ODM_H2C_PathDiv = 2,
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 32/43] Staging: rtl8723bs: fix names in odm_EdcaTurboCheck.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in hal/odm_EdcaTurboCheck.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/odm.h| 2 +-
 drivers/staging/rtl8723bs/hal/odm_EdcaTurboCheck.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm.h 
b/drivers/staging/rtl8723bs/hal/odm.h
index 8f457b0ea70d..80683d3fb80f 100644
--- a/drivers/staging/rtl8723bs/hal/odm.h
+++ b/drivers/staging/rtl8723bs/hal/odm.h
@@ -1121,7 +1121,7 @@ struct DM_ODM_T { /* 
DM_Out_Source_Dynamic_Mechanism_Structure */
bool RSSI_test;
struct CFO_TRACKING DM_CfoTrack;
 
-   struct EDCA_T DM_EDCA_Table;
+   struct edca_t DM_EDCA_Table;
u32 WMMEDCA_BE;
struct PATHDIV_T DM_PathDiv;
/*  Copy from SD4 structure */
diff --git a/drivers/staging/rtl8723bs/hal/odm_EdcaTurboCheck.h 
b/drivers/staging/rtl8723bs/hal/odm_EdcaTurboCheck.h
index 09764431c4d6..e9f9f07221f2 100644
--- a/drivers/staging/rtl8723bs/hal/odm_EdcaTurboCheck.h
+++ b/drivers/staging/rtl8723bs/hal/odm_EdcaTurboCheck.h
@@ -8,7 +8,7 @@
 #ifndef __ODMEDCATURBOCHECK_H__
 #define __ODMEDCATURBOCHECK_H__
 
-struct EDCA_T { /* _EDCA_TURBO_ */
+struct edca_t { /* _EDCA_TURBO_ */
bool bCurrentTurboEDCA;
bool bIsCurRDLState;
 
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 33/43] Staging: rtl8723bs: fix names in odm_HWConfig.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in hal/odm_HWConfig.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 2 +-
 drivers/staging/rtl8723bs/hal/odm_HWConfig.h | 8 
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c 
b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
index 56fd583eb283..47237cd636cf 100644
--- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
@@ -90,7 +90,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(
bool isCCKrate = false;
u8 rf_rx_num = 0;
u8 LNA_idx, VGA_idx;
-   struct PHY_STATUS_RPT_8192CD_T *pPhyStaRpt = (struct 
PHY_STATUS_RPT_8192CD_T *)pPhyStatus;
+   struct phy_status_rpt_8192cd_t *pPhyStaRpt = (struct 
phy_status_rpt_8192cd_t *)pPhyStatus;
 
isCCKrate = pPktinfo->data_rate <= DESC_RATE11M;
pPhyInfo->rx_mimo_signal_quality[ODM_RF_PATH_A] = -1;
diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.h 
b/drivers/staging/rtl8723bs/hal/odm_HWConfig.h
index deec2e71bd49..10cd4e8b1c9d 100644
--- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.h
+++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.h
@@ -30,7 +30,7 @@
 /*  structure and define */
 /*  */
 
-struct PHY_RX_AGC_INFO_T {
+struct phy_rx_agc_info_t {
#if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE)
u8 gain:7, trsw:1;
#else
@@ -38,8 +38,8 @@ struct PHY_RX_AGC_INFO_T {
#endif
 };
 
-struct PHY_STATUS_RPT_8192CD_T {
-   struct PHY_RX_AGC_INFO_T path_agc[2];
+struct phy_status_rpt_8192cd_t {
+   struct phy_rx_agc_info_t path_agc[2];
u8 ch_corr[2];
u8 cck_sig_qual_ofdm_pwdb_all;
u8 cck_agc_rpt_ofdm_cfosho_a;
@@ -77,7 +77,7 @@ struct PHY_STATUS_RPT_8192CD_T {
 };
 
 
-struct PHY_STATUS_RPT_8812_T {
+struct phy_status_rpt_8812_t {
/* 2012.05.24 LukeLee: This structure should take big/little endian in 
consideration later. */
 
/* DWORD 0 */
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 34/43] Staging: rtl8723bs: fix names in HalBtc8723b1Ant.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in hal/HalBtc8723b1Ant.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c |  8 
 drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.h | 12 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c 
b/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
index 55d6a97d61dc..621f8181f46d 100644
--- a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
+++ b/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
@@ -8,10 +8,10 @@
 #include "Mp_Precomp.h"
 
 /*  Global variables, these are static variables */
-static struct COEX_DM_8723B_1ANT GLCoexDm8723b1Ant;
-static struct COEX_DM_8723B_1ANT *pCoexDm = &GLCoexDm8723b1Ant;
-static struct COEX_STA_8723B_1ANT GLCoexSta8723b1Ant;
-static struct COEX_STA_8723B_1ANT *pCoexSta = &GLCoexSta8723b1Ant;
+static struct coex_dm_8723b_1ant GLCoexDm8723b1Ant;
+static struct coex_dm_8723b_1ant *pCoexDm = &GLCoexDm8723b1Ant;
+static struct coex_sta_8723b_1ant GLCoexSta8723b1Ant;
+static struct coex_sta_8723b_1ant *pCoexSta = &GLCoexSta8723b1Ant;
 
 static const char *const GLBtInfoSrc8723b1Ant[] = {
"BT Info[wifi fw]",
diff --git a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.h 
b/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.h
index 46d964d3cb06..ed569e77e518 100644
--- a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.h
+++ b/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.h
@@ -21,14 +21,14 @@
 
 #define  BT_8723B_1ANT_WIFI_NOISY_THRESH 30   /* max: 255 */
 
-enum BT_INFO_SRC_8723B_1ANT {
+enum bt_info_src_8723b_1ant {
BT_INFO_SRC_8723B_1ANT_WIFI_FW  = 0x0,
BT_INFO_SRC_8723B_1ANT_BT_RSP   = 0x1,
BT_INFO_SRC_8723B_1ANT_BT_ACTIVE_SEND   = 0x2,
BT_INFO_SRC_8723B_1ANT_MAX
 };
 
-enum BT_8723B_1ANT_BT_STATUS {
+enum bt_8723b_1ant_bt_status {
BT_8723B_1ANT_BT_STATUS_NON_CONNECTED_IDLE  = 0x0,
BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE  = 0x1,
BT_8723B_1ANT_BT_STATUS_INQ_PAGE= 0x2,
@@ -38,7 +38,7 @@ enum BT_8723B_1ANT_BT_STATUS {
BT_8723B_1ANT_BT_STATUS_MAX
 };
 
-enum BT_8723B_1ANT_WIFI_STATUS {
+enum bt_8723b_1ant_wifi_status {
BT_8723B_1ANT_WIFI_STATUS_NON_CONNECTED_IDLE   = 0x0,
BT_8723B_1ANT_WIFI_STATUS_NON_CONNECTED_ASSO_AUTH_SCAN = 0x1,
BT_8723B_1ANT_WIFI_STATUS_CONNECTED_SCAN   = 0x2,
@@ -48,7 +48,7 @@ enum BT_8723B_1ANT_WIFI_STATUS {
BT_8723B_1ANT_WIFI_STATUS_MAX
 };
 
-enum BT_8723B_1ANT_COEX_ALGO {
+enum bt_8723b_1ant_coex_algo {
BT_8723B_1ANT_COEX_ALGO_UNDEFINED   = 0x0,
BT_8723B_1ANT_COEX_ALGO_SCO = 0x1,
BT_8723B_1ANT_COEX_ALGO_HID = 0x2,
@@ -63,7 +63,7 @@ enum BT_8723B_1ANT_COEX_ALGO {
BT_8723B_1ANT_COEX_ALGO_MAX = 0xb,
 };
 
-struct COEX_DM_8723B_1ANT {
+struct coex_dm_8723b_1ant {
/*  fw mechanism */
bool bCurIgnoreWlanAct;
bool bPreIgnoreWlanAct;
@@ -118,7 +118,7 @@ struct COEX_DM_8723B_1ANT {
u8 errorCondition;
 };
 
-struct COEX_STA_8723B_1ANT {
+struct coex_sta_8723b_1ant {
bool bBtLinkExist;
bool bScoExist;
bool bA2dpExist;
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 35/43] Staging: rtl8723bs: fix names in odm_types.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in hal/odm_types.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 6 +++---
 drivers/staging/rtl8723bs/hal/odm_HWConfig.h | 8 
 drivers/staging/rtl8723bs/hal/odm_types.h| 4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c 
b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
index 47237cd636cf..b1b69459282f 100644
--- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
@@ -421,7 +421,7 @@ void ODM_PhyStatusQuery(
 /*  */
 /*  */
 
-enum HAL_STATUS ODM_ConfigRFWithHeaderFile(
+enum hal_status ODM_ConfigRFWithHeaderFile(
struct DM_ODM_T *pDM_Odm,
enum ODM_RF_Config_Type ConfigType,
enum ODM_RF_RADIO_PATH_E eRFPath
@@ -441,7 +441,7 @@ enum HAL_STATUS ODM_ConfigRFWithHeaderFile(
return HAL_STATUS_SUCCESS;
 }
 
-enum HAL_STATUS ODM_ConfigRFWithTxPwrTrackHeaderFile(struct DM_ODM_T *pDM_Odm)
+enum hal_status ODM_ConfigRFWithTxPwrTrackHeaderFile(struct DM_ODM_T *pDM_Odm)
 {
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
 ("===>ODM_ConfigRFWithTxPwrTrackHeaderFile 
(%s)\n", (pDM_Odm->bIsMPChip) ? "MPChip" : "TestChip"));
@@ -455,7 +455,7 @@ enum HAL_STATUS ODM_ConfigRFWithTxPwrTrackHeaderFile(struct 
DM_ODM_T *pDM_Odm)
return HAL_STATUS_SUCCESS;
 }
 
-enum HAL_STATUS ODM_ConfigBBWithHeaderFile(
+enum hal_status ODM_ConfigBBWithHeaderFile(
struct DM_ODM_T *pDM_Odm, enum ODM_BB_Config_Type ConfigType
 )
 {
diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.h 
b/drivers/staging/rtl8723bs/hal/odm_HWConfig.h
index 10cd4e8b1c9d..184609623f5c 100644
--- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.h
+++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.h
@@ -128,19 +128,19 @@ void ODM_PhyStatusQuery(
struct odm_packet_info *pPktinfo
 );
 
-enum HAL_STATUS ODM_ConfigRFWithTxPwrTrackHeaderFile(struct DM_ODM_T *pDM_Odm);
+enum hal_status ODM_ConfigRFWithTxPwrTrackHeaderFile(struct DM_ODM_T *pDM_Odm);
 
-enum HAL_STATUS ODM_ConfigRFWithHeaderFile(
+enum hal_status ODM_ConfigRFWithHeaderFile(
struct DM_ODM_T *pDM_Odm,
enum ODM_RF_Config_Type ConfigType,
enum ODM_RF_RADIO_PATH_E eRFPath
 );
 
-enum HAL_STATUS ODM_ConfigBBWithHeaderFile(
+enum hal_status ODM_ConfigBBWithHeaderFile(
struct DM_ODM_T *pDM_Odm, enum ODM_BB_Config_Type ConfigType
 );
 
-enum HAL_STATUS ODM_ConfigFWWithHeaderFile(
+enum hal_status ODM_ConfigFWWithHeaderFile(
struct DM_ODM_T *pDM_Odm,
enum ODM_FW_Config_Type ConfigType,
u8 *pFirmware,
diff --git a/drivers/staging/rtl8723bs/hal/odm_types.h 
b/drivers/staging/rtl8723bs/hal/odm_types.h
index 72c7e971ac96..0b1b3e14d451 100644
--- a/drivers/staging/rtl8723bs/hal/odm_types.h
+++ b/drivers/staging/rtl8723bs/hal/odm_types.h
@@ -15,7 +15,7 @@
 
 #define GET_ODM(__padapter)
((PDM_ODM_T)(&((GET_HAL_DATA(__padapter))->odmpriv)))
 
-enum HAL_STATUS {
+enum hal_status {
HAL_STATUS_SUCCESS,
HAL_STATUS_FAILURE,
/*RT_STATUS_PENDING,
@@ -30,7 +30,7 @@ enum HAL_STATUS {
 /*  */
 /*  Declare for ODM spin lock definition temporarily from compile pass. */
 /*  */
-enum RT_SPINLOCK_TYPE {
+enum rt_spinlock_type {
RT_TX_SPINLOCK = 1,
RT_RX_SPINLOCK = 2,
RT_RM_SPINLOCK = 3,
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 37/43] Staging: rtl8723bs: fix names in hal_btcoex.c

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in hal/hal_btcoex.c from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/hal_btcoex.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c 
b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
index e718120457e7..d42cc24c7535 100644
--- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c
+++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
@@ -20,22 +20,22 @@ static u8 GLBtcWiFiInIQKState;
 u32 GLBtcDbgType[BTC_MSG_MAX];
 static u8 GLBtcDbgBuf[BT_TMP_BUF_SIZE];
 
-struct BTCDBGINFO { /* _btcoexdbginfo */
+struct btcdbginfo { /* _btcoexdbginfo */
u8 *info;
u32 size; /*  buffer total size */
u32 len; /*  now used length */
 };
 
-static struct BTCDBGINFO GLBtcDbgInfo;
+static struct btcdbginfo GLBtcDbgInfo;
 
 #defineBT_Operation(Adapter)   
false
 
-static void DBG_BT_INFO_INIT(struct BTCDBGINFO *pinfo, u8 *pbuf, u32 size)
+static void DBG_BT_INFO_INIT(struct btcdbginfo *pinfo, u8 *pbuf, u32 size)
 {
if (!pinfo)
return;
 
-   memset(pinfo, 0, sizeof(struct BTCDBGINFO));
+   memset(pinfo, 0, sizeof(struct btcdbginfo));
 
if (pbuf && size) {
pinfo->info = pbuf;
@@ -45,7 +45,7 @@ static void DBG_BT_INFO_INIT(struct BTCDBGINFO *pinfo, u8 
*pbuf, u32 size)
 
 void DBG_BT_INFO(u8 *dbgmsg)
 {
-   struct BTCDBGINFO *pinfo;
+   struct btcdbginfo *pinfo;
u32 msglen;
u8 *pbuf;
 
@@ -1490,7 +1490,7 @@ void hal_btcoex_RecordPwrMode(struct adapter *padapter, 
u8 *pCmdBuf, u8 cmdLen)
 
 void hal_btcoex_DisplayBtCoexInfo(struct adapter *padapter, u8 *pbuf, u32 
bufsize)
 {
-   struct BTCDBGINFO *pinfo;
+   struct btcdbginfo *pinfo;
 
 
pinfo = &GLBtcDbgInfo;
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 31/43] Staging: rtl8723bs: fix names in HalBtcOutSrc.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in hal/HalBtcOutSrc.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 .../staging/rtl8723bs/hal/HalBtc8723b1Ant.c   | 148 +-
 .../staging/rtl8723bs/hal/HalBtc8723b1Ant.h   |  28 ++--
 .../staging/rtl8723bs/hal/HalBtc8723b2Ant.c   | 138 
 .../staging/rtl8723bs/hal/HalBtc8723b2Ant.h   |  28 ++--
 drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h  | 100 ++--
 drivers/staging/rtl8723bs/hal/hal_btcoex.c| 122 +++
 6 files changed, 282 insertions(+), 282 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c 
b/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
index 9e81dec49712..55d6a97d61dc 100644
--- a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
+++ b/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
@@ -151,7 +151,7 @@ static u8 halbtc8723b1ant_BtRssiState(
 }
 
 static void halbtc8723b1ant_UpdateRaMask(
-   struct BTC_COEXIST *pBtCoexist, bool bForceExec, u32 disRateMask
+   struct btc_coexist *pBtCoexist, bool bForceExec, u32 disRateMask
 )
 {
pCoexDm->curRaMask = disRateMask;
@@ -166,7 +166,7 @@ static void halbtc8723b1ant_UpdateRaMask(
 }
 
 static void halbtc8723b1ant_AutoRateFallbackRetry(
-   struct BTC_COEXIST *pBtCoexist, bool bForceExec, u8 type
+   struct btc_coexist *pBtCoexist, bool bForceExec, u8 type
 )
 {
bool bWifiUnderBMode = false;
@@ -204,7 +204,7 @@ static void halbtc8723b1ant_AutoRateFallbackRetry(
 }
 
 static void halbtc8723b1ant_RetryLimit(
-   struct BTC_COEXIST *pBtCoexist, bool bForceExec, u8 type
+   struct btc_coexist *pBtCoexist, bool bForceExec, u8 type
 )
 {
pCoexDm->curRetryLimitType = type;
@@ -231,7 +231,7 @@ static void halbtc8723b1ant_RetryLimit(
 }
 
 static void halbtc8723b1ant_AmpduMaxTime(
-   struct BTC_COEXIST *pBtCoexist, bool bForceExec, u8 type
+   struct btc_coexist *pBtCoexist, bool bForceExec, u8 type
 )
 {
pCoexDm->curAmpduTimeType = type;
@@ -257,7 +257,7 @@ static void halbtc8723b1ant_AmpduMaxTime(
 }
 
 static void halbtc8723b1ant_LimitedTx(
-   struct BTC_COEXIST *pBtCoexist,
+   struct btc_coexist *pBtCoexist,
bool bForceExec,
u8 raMaskType,
u8 arfrType,
@@ -285,7 +285,7 @@ static void halbtc8723b1ant_LimitedTx(
 }
 
 static void halbtc8723b1ant_LimitedRx(
-   struct BTC_COEXIST *pBtCoexist,
+   struct btc_coexist *pBtCoexist,
bool bForceExec,
bool bRejApAggPkt,
bool bBtCtrlAggBufSize,
@@ -314,7 +314,7 @@ static void halbtc8723b1ant_LimitedRx(
 
 }
 
-static void halbtc8723b1ant_QueryBtInfo(struct BTC_COEXIST *pBtCoexist)
+static void halbtc8723b1ant_QueryBtInfo(struct btc_coexist *pBtCoexist)
 {
u8  H2C_Parameter[1] = {0};
 
@@ -331,7 +331,7 @@ static void halbtc8723b1ant_QueryBtInfo(struct BTC_COEXIST 
*pBtCoexist)
pBtCoexist->fBtcFillH2c(pBtCoexist, 0x61, 1, H2C_Parameter);
 }
 
-static void halbtc8723b1ant_MonitorBtCtr(struct BTC_COEXIST *pBtCoexist)
+static void halbtc8723b1ant_MonitorBtCtr(struct btc_coexist *pBtCoexist)
 {
u32 regHPTxRx, regLPTxRx, u4Tmp;
u32 regHPTx = 0, regHPRx = 0, regLPTx = 0, regLPRx = 0;
@@ -392,7 +392,7 @@ static void halbtc8723b1ant_MonitorBtCtr(struct BTC_COEXIST 
*pBtCoexist)
 }
 
 
-static void halbtc8723b1ant_MonitorWiFiCtr(struct BTC_COEXIST *pBtCoexist)
+static void halbtc8723b1ant_MonitorWiFiCtr(struct btc_coexist *pBtCoexist)
 {
s32 wifiRssi = 0;
bool bWifiBusy = false, bWifiUnderBMode = false;
@@ -478,7 +478,7 @@ static void halbtc8723b1ant_MonitorWiFiCtr(struct 
BTC_COEXIST *pBtCoexist)
 
 }
 
-static bool halbtc8723b1ant_IsWifiStatusChanged(struct BTC_COEXIST *pBtCoexist)
+static bool halbtc8723b1ant_IsWifiStatusChanged(struct btc_coexist *pBtCoexist)
 {
static bool bPreWifiBusy, bPreUnder4way, bPreBtHsOn;
bool bWifiBusy = false, bUnder4way = false, bBtHsOn = false;
@@ -513,9 +513,9 @@ static bool halbtc8723b1ant_IsWifiStatusChanged(struct 
BTC_COEXIST *pBtCoexist)
return false;
 }
 
-static void halbtc8723b1ant_UpdateBtLinkInfo(struct BTC_COEXIST *pBtCoexist)
+static void halbtc8723b1ant_UpdateBtLinkInfo(struct btc_coexist *pBtCoexist)
 {
-   struct BTC_BT_LINK_INFO *pBtLinkInfo = &pBtCoexist->btLinkInfo;
+   struct btc_bt_link_info *pBtLinkInfo = &pBtCoexist->btLinkInfo;
bool bBtHsOn = false;
 
pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn);
@@ -577,9 +577,9 @@ static void halbtc8723b1ant_UpdateBtLinkInfo(struct 
BTC_COEXIST *pBtCoexist)
pBtLinkInfo->bHidOnly = false;
 }
 
-static u8 halbtc8723b1ant_ActionAlgorithm(struct BTC_COEXIST *pBtCoexist)
+static u8 halbtc8723b1ant_ActionAlgorithm(struct btc_coexist *pBtCoexist)
 {
-   struct BTC_BT_LINK_INFO *pBtLinkInfo = &pBtCoexist->btLinkInfo;
+   struct btc_bt_link_info *pBtLinkInfo = &pBtCoexist->btLinkInfo;
bool bBtHsOn = false;
u8 alg

[PATCH 36/43] Staging: rtl8723bs: fix names in odm_DIG.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in hal/odm_DIG.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/hal_com.c   |  2 +-
 drivers/staging/rtl8723bs/hal/odm.c   |  2 +-
 drivers/staging/rtl8723bs/hal/odm.h   |  2 +-
 drivers/staging/rtl8723bs/hal/odm_DIG.c   | 12 ++--
 drivers/staging/rtl8723bs/hal/odm_DIG.h   |  4 ++--
 drivers/staging/rtl8723bs/hal/rtl8723b_dm.c   |  2 +-
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c |  2 +-
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c 
b/drivers/staging/rtl8723bs/hal/hal_com.c
index 1e66f749fd40..3d2120f0d843 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -1170,7 +1170,7 @@ u8 SetHalDefVar(
odm->SupportAbility  &= (~DYNAMIC_BB_ANT_DIV);
} else if (dm_func == 6) {/* turn on all dynamic func */
if (!(odm->SupportAbility  & DYNAMIC_BB_DIG)) {
-   struct DIG_T*pDigTable = &odm->DM_DigTable;
+   struct dig_t*pDigTable = &odm->DM_DigTable;
pDigTable->CurIGValue = rtw_read8(adapter, 
0xc50);
}
dm->DMFlag |= DYNAMIC_FUNC_BT;
diff --git a/drivers/staging/rtl8723bs/hal/odm.c 
b/drivers/staging/rtl8723bs/hal/odm.c
index c7607e7d26c5..3e5f6623971b 100644
--- a/drivers/staging/rtl8723bs/hal/odm.c
+++ b/drivers/staging/rtl8723bs/hal/odm.c
@@ -417,7 +417,7 @@ void ODM_DMWatchdog(struct DM_ODM_T *pDM_Odm)
odm_DIG(pDM_Odm);
 
{
-   struct DIG_T *pDM_DigTable = &pDM_Odm->DM_DigTable;
+   struct dig_t *pDM_DigTable = &pDM_Odm->DM_DigTable;
 
odm_Adaptivity(pDM_Odm, pDM_DigTable->CurIGValue);
}
diff --git a/drivers/staging/rtl8723bs/hal/odm.h 
b/drivers/staging/rtl8723bs/hal/odm.h
index 80683d3fb80f..1dda34ffdad3 100644
--- a/drivers/staging/rtl8723bs/hal/odm.h
+++ b/drivers/staging/rtl8723bs/hal/odm.h
@@ -1110,7 +1110,7 @@ struct DM_ODM_T { /* 
DM_Out_Source_Dynamic_Mechanism_Structure */
/* ODM Structure */
/*  */
struct FAT_T DM_FatTable;
-   struct DIG_T DM_DigTable;
+   struct dig_t DM_DigTable;
struct PS_T DM_PSTable;
struct dynamic_primary_CCA DM_PriCCA;
struct RXHP_T DM_RXHP_Table;
diff --git a/drivers/staging/rtl8723bs/hal/odm_DIG.c 
b/drivers/staging/rtl8723bs/hal/odm_DIG.c
index eca34f45aaa3..aa185d5a3251 100644
--- a/drivers/staging/rtl8723bs/hal/odm_DIG.c
+++ b/drivers/staging/rtl8723bs/hal/odm_DIG.c
@@ -323,7 +323,7 @@ void odm_Adaptivity(void *pDM_VOID, u8 IGI)
 void ODM_Write_DIG(void *pDM_VOID, u8 CurrentIGI)
 {
struct DM_ODM_T *pDM_Odm = (struct DM_ODM_T *)pDM_VOID;
-   struct DIG_T *pDM_DigTable = &pDM_Odm->DM_DigTable;
+   struct dig_t *pDM_DigTable = &pDM_Odm->DM_DigTable;
 
if (pDM_DigTable->bStopDIG) {
ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("Stop 
Writing IGI\n"));
@@ -363,7 +363,7 @@ void odm_PauseDIG(
 )
 {
struct DM_ODM_T *pDM_Odm = (struct DM_ODM_T *)pDM_VOID;
-   struct DIG_T *pDM_DigTable = &pDM_Odm->DM_DigTable;
+   struct dig_t *pDM_DigTable = &pDM_Odm->DM_DigTable;
static bool bPaused;
 
ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_PauseDIG() 
=>\n"));
@@ -467,7 +467,7 @@ bool odm_DigAbort(void *pDM_VOID)
 void odm_DIGInit(void *pDM_VOID)
 {
struct DM_ODM_T *pDM_Odm = (struct DM_ODM_T *)pDM_VOID;
-   struct DIG_T *pDM_DigTable = &pDM_Odm->DM_DigTable;
+   struct dig_t *pDM_DigTable = &pDM_Odm->DM_DigTable;
 
pDM_DigTable->bStopDIG = false;
pDM_DigTable->bPSDInProgress = false;
@@ -507,7 +507,7 @@ void odm_DIG(void *pDM_VOID)
struct DM_ODM_T *pDM_Odm = (struct DM_ODM_T *)pDM_VOID;
 
/*  Common parameters */
-   struct DIG_T *pDM_DigTable = &pDM_Odm->DM_DigTable;
+   struct dig_t *pDM_DigTable = &pDM_Odm->DM_DigTable;
struct false_ALARM_STATISTICS *pFalseAlmCnt = &pDM_Odm->FalseAlmCnt;
bool FirstConnect, FirstDisConnect;
u8 DIG_MaxOfMin, DIG_Dynamic_MIN;
@@ -1079,7 +1079,7 @@ void odm_FAThresholdCheck(
 u8 odm_ForbiddenIGICheck(void *pDM_VOID, u8 DIG_Dynamic_MIN, u8 CurrentIGI)
 {
struct DM_ODM_T *pDM_Odm = (struct DM_ODM_T *)pDM_VOID;
-   struct DIG_T *pDM_DigTable = &pDM_Odm->DM_DigTable;
+   struct dig_t *pDM_DigTable = &pDM_Odm->DM_DigTable;
struct false_ALARM_STATISTICS *pFalseAlmCnt = &pDM_Odm->FalseAlmCnt;
u8 rx_gain_range_min = pDM_DigTable->rx_gain_range_min;
 
@@ -1196,7 +1196,7 @@ void odm_CCKPacketDetectionThresh(void *pDM_VOID)
 void ODM_Write_CCK_CCA_Thres(void *pDM_VOID, u8 CurCCK_CCAThres)
 {
struct DM_ODM_T *pDM_Odm = (struct DM_ODM_T *)pDM_VOID;
-   stru

[PATCH 39/43] Staging: rtl8723bs: fix names in HalPhyRf.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in hal/HalPhyRf.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/HalPhyRf.c   |  4 ++--
 drivers/staging/rtl8723bs/hal/HalPhyRf.h   | 10 +-
 drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c |  4 ++--
 drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.h |  4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf.c 
b/drivers/staging/rtl8723bs/hal/HalPhyRf.c
index 08064fd1d941..9599c45997bb 100644
--- a/drivers/staging/rtl8723bs/hal/HalPhyRf.c
+++ b/drivers/staging/rtl8723bs/hal/HalPhyRf.c
@@ -23,7 +23,7 @@
} while (0)
 
 
-void ConfigureTxpowerTrack(struct DM_ODM_T *pDM_Odm, struct TXPWRTRACK_CFG 
*pConfig)
+void ConfigureTxpowerTrack(struct DM_ODM_T *pDM_Odm, struct txpwrtrack_cfg 
*pConfig)
 {
ConfigureTxpowerTrack_8723B(pConfig);
 }
@@ -83,7 +83,7 @@ void ODM_TXPowerTrackingCallback_ThermalMeter(struct adapter 
*Adapter)
u8 OFDM_min_index = 0;  /*  OFDM BB Swing should be less than +3.0dB, 
which is required by Arthur */
u8 Indexforchannel = 0; /*  
GetRightChnlPlaceforIQK(pHalData->CurrentChannel) */
 
-   struct TXPWRTRACK_CFG c;
+   struct txpwrtrack_cfg c;
 
 
/* 4 1. The following TWO tables decide the final index of OFDM/CCK 
swing table. */
diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf.h 
b/drivers/staging/rtl8723bs/hal/HalPhyRf.h
index eaa5bd2811a1..5a07f3c14d80 100644
--- a/drivers/staging/rtl8723bs/hal/HalPhyRf.h
+++ b/drivers/staging/rtl8723bs/hal/HalPhyRf.h
@@ -8,23 +8,23 @@
  #ifndef __HAL_PHY_RF_H__
  #define __HAL_PHY_RF_H__
 
-enum SPUR_CAL_METHOD {
+enum spur_cal_method {
PLL_RESET,
AFE_PHASE_SEL
 };
 
-enum PWRTRACK_METHOD {
+enum pwrtrack_method {
BBSWING,
TXAGC,
MIX_MODE
 };
 
-typedef void (*FuncSetPwr)(struct DM_ODM_T *, enum PWRTRACK_METHOD, u8, u8);
+typedef void (*FuncSetPwr)(struct DM_ODM_T *, enum pwrtrack_method, u8, u8);
 typedef void (*FuncIQK)(struct DM_ODM_T *, u8, u8, u8);
 typedef void (*FuncLCK)(struct DM_ODM_T *);
 typedef void (*FuncSwing)(struct DM_ODM_T *, u8 **, u8 **, u8 **, u8 **);
 
-struct TXPWRTRACK_CFG {
+struct txpwrtrack_cfg {
u8 SwingTableSize_CCK;
u8 SwingTableSize_OFDM;
u8 Threshold_IQK;
@@ -37,7 +37,7 @@ struct TXPWRTRACK_CFG {
FuncSwing GetDeltaSwingTable;
 };
 
-void ConfigureTxpowerTrack(struct DM_ODM_T *pDM_Odm, struct TXPWRTRACK_CFG 
*pConfig);
+void ConfigureTxpowerTrack(struct DM_ODM_T *pDM_Odm, struct txpwrtrack_cfg 
*pConfig);
 
 
 void ODM_ClearTxPowerTrackingState(struct DM_ODM_T *pDM_Odm);
diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c 
b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
index 50aabed8ace6..30cbe125eb4c 100644
--- a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
+++ b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
@@ -186,7 +186,7 @@ void DoIQK_8723B(
  *---*/
 void ODM_TxPwrTrackSetPwr_8723B(
struct DM_ODM_T *pDM_Odm,
-   enum PWRTRACK_METHOD Method,
+   enum pwrtrack_method Method,
u8 RFPath,
u8 ChannelMappedIndex
 )
@@ -409,7 +409,7 @@ static void GetDeltaSwingTable_8723B(
 }
 
 
-void ConfigureTxpowerTrack_8723B(struct TXPWRTRACK_CFG *pConfig)
+void ConfigureTxpowerTrack_8723B(struct txpwrtrack_cfg *pConfig)
 {
pConfig->SwingTableSize_CCK = CCK_TABLE_SIZE;
pConfig->SwingTableSize_OFDM = OFDM_TABLE_SIZE;
diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.h 
b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.h
index 5cd65a7cfebc..7b009b11540c 100644
--- a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.h
+++ b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.h
@@ -16,7 +16,7 @@
 #defineRF_T_METER_8723B0x42
/*  */
 
 
-void ConfigureTxpowerTrack_8723B(struct TXPWRTRACK_CFG *pConfig);
+void ConfigureTxpowerTrack_8723B(struct txpwrtrack_cfg *pConfig);
 
 void DoIQK_8723B(
struct DM_ODM_T *pDM_Odm,
@@ -27,7 +27,7 @@ void DoIQK_8723B(
 
 void ODM_TxPwrTrackSetPwr_8723B(
struct DM_ODM_T *pDM_Odm,
-   enum PWRTRACK_METHOD Method,
+   enum pwrtrack_method Method,
u8 RFPath,
u8 ChannelMappedIndex
 );
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 38/43] Staging: rtl8723bs: fix names in odm_CfoTracking.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in hal/odm_CfoTracking.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/odm.h |  2 +-
 drivers/staging/rtl8723bs/hal/odm_CfoTracking.c | 12 ++--
 drivers/staging/rtl8723bs/hal/odm_CfoTracking.h |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm.h 
b/drivers/staging/rtl8723bs/hal/odm.h
index 1dda34ffdad3..932a5b357877 100644
--- a/drivers/staging/rtl8723bs/hal/odm.h
+++ b/drivers/staging/rtl8723bs/hal/odm.h
@@ -1119,7 +1119,7 @@ struct DM_ODM_T { /* 
DM_Out_Source_Dynamic_Mechanism_Structure */
struct false_ALARM_STATISTICS FlaseAlmCntBuddyAdapter;
struct SWAT_T DM_SWAT_Table;
bool RSSI_test;
-   struct CFO_TRACKING DM_CfoTrack;
+   struct cfo_tracking DM_CfoTrack;
 
struct edca_t DM_EDCA_Table;
u32 WMMEDCA_BE;
diff --git a/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c 
b/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c
index fc059822edd9..edfdd9101008 100644
--- a/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c
+++ b/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c
@@ -10,7 +10,7 @@
 static void odm_SetCrystalCap(void *pDM_VOID, u8 CrystalCap)
 {
struct DM_ODM_T *pDM_Odm = (struct DM_ODM_T *)pDM_VOID;
-   struct CFO_TRACKING *pCfoTrack = &pDM_Odm->DM_CfoTrack;
+   struct cfo_tracking *pCfoTrack = &pDM_Odm->DM_CfoTrack;
 
if (pCfoTrack->CrystalCap == CrystalCap)
return;
@@ -50,7 +50,7 @@ static u8 odm_GetDefaultCrytaltalCap(void *pDM_VOID)
 static void odm_SetATCStatus(void *pDM_VOID, bool ATCStatus)
 {
struct DM_ODM_T *pDM_Odm = (struct DM_ODM_T *)pDM_VOID;
-   struct CFO_TRACKING *pCfoTrack = &pDM_Odm->DM_CfoTrack;
+   struct cfo_tracking *pCfoTrack = &pDM_Odm->DM_CfoTrack;
 
if (pCfoTrack->bATCStatus == ATCStatus)
return;
@@ -80,7 +80,7 @@ static bool odm_GetATCStatus(void *pDM_VOID)
 void ODM_CfoTrackingReset(void *pDM_VOID)
 {
struct DM_ODM_T *pDM_Odm = (struct DM_ODM_T *)pDM_VOID;
-   struct CFO_TRACKING *pCfoTrack = &pDM_Odm->DM_CfoTrack;
+   struct cfo_tracking *pCfoTrack = &pDM_Odm->DM_CfoTrack;
 
pCfoTrack->DefXCap = odm_GetDefaultCrytaltalCap(pDM_Odm);
pCfoTrack->bAdjust = true;
@@ -92,7 +92,7 @@ void ODM_CfoTrackingReset(void *pDM_VOID)
 void ODM_CfoTrackingInit(void *pDM_VOID)
 {
struct DM_ODM_T *pDM_Odm = (struct DM_ODM_T *)pDM_VOID;
-   struct CFO_TRACKING *pCfoTrack = &pDM_Odm->DM_CfoTrack;
+   struct cfo_tracking *pCfoTrack = &pDM_Odm->DM_CfoTrack;
 
pCfoTrack->DefXCap =
pCfoTrack->CrystalCap = odm_GetDefaultCrytaltalCap(pDM_Odm);
@@ -119,7 +119,7 @@ void ODM_CfoTrackingInit(void *pDM_VOID)
 void ODM_CfoTracking(void *pDM_VOID)
 {
struct DM_ODM_T *pDM_Odm = (struct DM_ODM_T *)pDM_VOID;
-   struct CFO_TRACKING *pCfoTrack = &pDM_Odm->DM_CfoTrack;
+   struct cfo_tracking *pCfoTrack = &pDM_Odm->DM_CfoTrack;
int CFO_kHz_A, CFO_kHz_B, CFO_ave = 0;
int CFO_ave_diff;
int CrystalCap = (int)pCfoTrack->CrystalCap;
@@ -299,7 +299,7 @@ void ODM_ParsingCFO(void *pDM_VOID, void *pPktinfo_VOID, s8 
*pcfotail)
 {
struct DM_ODM_T *pDM_Odm = (struct DM_ODM_T *)pDM_VOID;
struct odm_packet_info *pPktinfo = pPktinfo_VOID;
-   struct CFO_TRACKING *pCfoTrack = &pDM_Odm->DM_CfoTrack;
+   struct cfo_tracking *pCfoTrack = &pDM_Odm->DM_CfoTrack;
u8 i;
 
if (!(pDM_Odm->SupportAbility & ODM_BB_CFO_TRACKING))
diff --git a/drivers/staging/rtl8723bs/hal/odm_CfoTracking.h 
b/drivers/staging/rtl8723bs/hal/odm_CfoTracking.h
index 3c4e286436b8..bb00d8c893bd 100644
--- a/drivers/staging/rtl8723bs/hal/odm_CfoTracking.h
+++ b/drivers/staging/rtl8723bs/hal/odm_CfoTracking.h
@@ -12,7 +12,7 @@
 #defineCFO_TH_XTAL_LOW 10  /*  kHz 
*/
 #defineCFO_TH_ATC  80  /*  kHz 
*/
 
-struct CFO_TRACKING {
+struct cfo_tracking {
bool bATCStatus;
bool largeCFOHit;
bool bAdjust;
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 41/43] Staging: rtl8723bs: fix in odm_DynamicBBPowerSaving.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in hal/odm_DynamicBBPowerSaving.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/odm.h  | 2 +-
 drivers/staging/rtl8723bs/hal/odm_DynamicBBPowerSaving.c | 4 ++--
 drivers/staging/rtl8723bs/hal/odm_DynamicBBPowerSaving.h | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm.h 
b/drivers/staging/rtl8723bs/hal/odm.h
index e2dd8c34c569..ec6e32ec20de 100644
--- a/drivers/staging/rtl8723bs/hal/odm.h
+++ b/drivers/staging/rtl8723bs/hal/odm.h
@@ -,7 +,7 @@ struct dm_odm_t { /* 
DM_Out_Source_Dynamic_Mechanism_Structure */
/*  */
struct fat_t DM_FatTable;
struct dig_t DM_DigTable;
-   struct PS_T DM_PSTable;
+   struct ps_t DM_PSTable;
struct dynamic_primary_CCA DM_PriCCA;
struct rxhp_t dM_RXHP_Table;
struct ra_t DM_RA_Table;
diff --git a/drivers/staging/rtl8723bs/hal/odm_DynamicBBPowerSaving.c 
b/drivers/staging/rtl8723bs/hal/odm_DynamicBBPowerSaving.c
index d12f4841114c..57c5736527d2 100644
--- a/drivers/staging/rtl8723bs/hal/odm_DynamicBBPowerSaving.c
+++ b/drivers/staging/rtl8723bs/hal/odm_DynamicBBPowerSaving.c
@@ -10,7 +10,7 @@
 void odm_DynamicBBPowerSavingInit(void *pDM_VOID)
 {
struct dm_odm_t *pDM_Odm = (struct dm_odm_t *)pDM_VOID;
-   struct PS_T *pDM_PSTable = &pDM_Odm->DM_PSTable;
+   struct ps_t *pDM_PSTable = &pDM_Odm->DM_PSTable;
 
pDM_PSTable->PreCCAState = CCA_MAX;
pDM_PSTable->CurCCAState = CCA_MAX;
@@ -23,7 +23,7 @@ void odm_DynamicBBPowerSavingInit(void *pDM_VOID)
 void ODM_RF_Saving(void *pDM_VOID, u8 bForceInNormal)
 {
struct dm_odm_t *pDM_Odm = (struct dm_odm_t *)pDM_VOID;
-   struct PS_T *pDM_PSTable = &pDM_Odm->DM_PSTable;
+   struct ps_t *pDM_PSTable = &pDM_Odm->DM_PSTable;
u8 Rssi_Up_bound = 30;
u8 Rssi_Low_bound = 25;
 
diff --git a/drivers/staging/rtl8723bs/hal/odm_DynamicBBPowerSaving.h 
b/drivers/staging/rtl8723bs/hal/odm_DynamicBBPowerSaving.h
index 90b9c7659084..3ebbbfd1dd1f 100644
--- a/drivers/staging/rtl8723bs/hal/odm_DynamicBBPowerSaving.h
+++ b/drivers/staging/rtl8723bs/hal/odm_DynamicBBPowerSaving.h
@@ -8,7 +8,7 @@
 #ifndef__ODMDYNAMICBBPOWERSAVING_H__
 #define__ODMDYNAMICBBPOWERSAVING_H__
 
-struct PS_T { /* _Dynamic_Power_Saving_ */
+struct ps_t { /* _Dynamic_Power_Saving_ */
u8 PreCCAState;
u8 CurCCAState;
 
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 42/43] Staging: rtl8723bs: fix names in odm_NoiseMonitor.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in hal/odm_NoiseMonitor.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/odm.h  | 2 +-
 drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm.h 
b/drivers/staging/rtl8723bs/hal/odm.h
index ec6e32ec20de..3c8d76e42c99 100644
--- a/drivers/staging/rtl8723bs/hal/odm.h
+++ b/drivers/staging/rtl8723bs/hal/odm.h
@@ -1076,7 +1076,7 @@ struct dm_odm_t { /* 
DM_Out_Source_Dynamic_Mechanism_Structure */
u8 Adaptivity_IGI_upper;
u8 NHM_cnt_0;
 
-   struct ODM_NOISE_MONITOR noise_level;/* ODM_MAX_CHANNEL_NUM]; */
+   struct odm_noise_monitor noise_level;/* ODM_MAX_CHANNEL_NUM]; */
/*  */
/* 2 Define STA info. */
/*  _ODM_STA_INFO */
diff --git a/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.h 
b/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.h
index 0eb55d785c7f..ab114543f39c 100644
--- a/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.h
+++ b/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.h
@@ -24,7 +24,7 @@ struct noise_level {
 };
 
 
-struct ODM_NOISE_MONITOR {
+struct odm_noise_monitor {
s8 noise[MAX_RF_PATH];
s16 noise_all;
 };
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 43/43] Staging: rtl8723bs: fix names in HalBtc8723b2Ant.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in hal/HalBtc8723b2Ant.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c |  8 
 drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.h | 10 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c 
b/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c
index 0e1aa204c099..6edaefa47af1 100644
--- a/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c
+++ b/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c
@@ -15,10 +15,10 @@ do {
  \
 } while (0)
 
 /*  Global variables, these are static variables */
-static struct COEX_DM_8723B_2ANT GLCoexDm8723b2Ant;
-static struct COEX_DM_8723B_2ANT *pCoexDm = &GLCoexDm8723b2Ant;
-static struct COEX_STA_8723B_2ANT GLCoexSta8723b2Ant;
-static struct COEX_STA_8723B_2ANT *pCoexSta = &GLCoexSta8723b2Ant;
+static struct coex_dm_8723b_2ant GLCoexDm8723b2Ant;
+static struct coex_dm_8723b_2ant *pCoexDm = &GLCoexDm8723b2Ant;
+static struct coex_sta_8723b_2ant GLCoexSta8723b2Ant;
+static struct coex_sta_8723b_2ant *pCoexSta = &GLCoexSta8723b2Ant;
 
 static const char *const GLBtInfoSrc8723b2Ant[] = {
"BT Info[wifi fw]",
diff --git a/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.h 
b/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.h
index 340444017327..1c220257e2e4 100644
--- a/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.h
+++ b/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.h
@@ -16,14 +16,14 @@
 
 #defineBTC_RSSI_COEX_THRESH_TOL_8723B_2ANT 2
 
-enum BT_INFO_SRC_8723B_2ANT {
+enum bt_info_src_8723b_2ant {
BT_INFO_SRC_8723B_2ANT_WIFI_FW= 0x0,
BT_INFO_SRC_8723B_2ANT_BT_RSP = 0x1,
BT_INFO_SRC_8723B_2ANT_BT_ACTIVE_SEND = 0x2,
BT_INFO_SRC_8723B_2ANT_MAX
 };
 
-enum BT_8723B_2ANT_BT_STATUS {
+enum bt_8723b_2ant_bt_status {
BT_8723B_2ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
BT_8723B_2ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
BT_8723B_2ANT_BT_STATUS_INQ_PAGE   = 0x2,
@@ -33,7 +33,7 @@ enum BT_8723B_2ANT_BT_STATUS {
BT_8723B_2ANT_BT_STATUS_MAX
 };
 
-enum BT_8723B_2ANT_COEX_ALGO {
+enum bt_8723b_2ant_coex_algo {
BT_8723B_2ANT_COEX_ALGO_UNDEFINED   = 0x0,
BT_8723B_2ANT_COEX_ALGO_SCO = 0x1,
BT_8723B_2ANT_COEX_ALGO_HID = 0x2,
@@ -48,7 +48,7 @@ enum BT_8723B_2ANT_COEX_ALGO {
BT_8723B_2ANT_COEX_ALGO_MAX = 0xb,
 };
 
-struct COEX_DM_8723B_2ANT {
+struct coex_dm_8723b_2ant {
/*  fw mechanism */
u8 preBtDecPwrLvl;
u8 curBtDecPwrLvl;
@@ -101,7 +101,7 @@ struct COEX_DM_8723B_2ANT {
u32 backup0x948;
 };
 
-struct COEX_STA_8723B_2ANT {
+struct coex_sta_8723b_2ant {
bool bBtLinkExist;
bool bScoExist;
bool bA2dpExist;
-- 
2.30.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 40/43] Staging: rtl8723bs: fix names in odm.h

2021-03-17 Thread Marco Cesati
This commit converts names of structs / enums
in hal/odm.h from ALL_CAPS format to lowercase

Signed-off-by: Marco Cesati 
---
 drivers/staging/rtl8723bs/core/rtw_odm.c  |   6 +-
 .../staging/rtl8723bs/hal/HalHWImg8723B_BB.c  |  10 +-
 .../staging/rtl8723bs/hal/HalHWImg8723B_BB.h  |   6 +-
 .../staging/rtl8723bs/hal/HalHWImg8723B_MAC.c |   6 +-
 .../staging/rtl8723bs/hal/HalHWImg8723B_MAC.h |   2 +-
 .../staging/rtl8723bs/hal/HalHWImg8723B_RF.c  |  12 +-
 .../staging/rtl8723bs/hal/HalHWImg8723B_RF.h  |   6 +-
 drivers/staging/rtl8723bs/hal/HalPhyRf.c  |   6 +-
 drivers/staging/rtl8723bs/hal/HalPhyRf.h  |  12 +-
 .../staging/rtl8723bs/hal/HalPhyRf_8723B.c|  52 +++
 .../staging/rtl8723bs/hal/HalPhyRf_8723B.h|   8 +-
 drivers/staging/rtl8723bs/hal/hal_com.c   |  10 +-
 .../staging/rtl8723bs/hal/hal_com_phycfg.c|   6 +-
 drivers/staging/rtl8723bs/hal/odm.c   | 100 ++---
 drivers/staging/rtl8723bs/hal/odm.h   | 140 +-
 .../staging/rtl8723bs/hal/odm_CfoTracking.c   |  16 +-
 drivers/staging/rtl8723bs/hal/odm_DIG.c   |  40 ++---
 .../rtl8723bs/hal/odm_DynamicBBPowerSaving.c  |   4 +-
 .../rtl8723bs/hal/odm_DynamicTxPower.c|   2 +-
 .../rtl8723bs/hal/odm_EdcaTurboCheck.c|   6 +-
 drivers/staging/rtl8723bs/hal/odm_HWConfig.c  |  18 +--
 drivers/staging/rtl8723bs/hal/odm_HWConfig.h  |  14 +-
 .../staging/rtl8723bs/hal/odm_NoiseMonitor.c  |   2 +-
 drivers/staging/rtl8723bs/hal/odm_PathDiv.c   |   4 +-
 .../rtl8723bs/hal/odm_RegConfig8723B.c|  16 +-
 .../rtl8723bs/hal/odm_RegConfig8723B.h|  16 +-
 drivers/staging/rtl8723bs/hal/odm_debug.c |   2 +-
 drivers/staging/rtl8723bs/hal/odm_debug.h |   2 +-
 drivers/staging/rtl8723bs/hal/rtl8723b_dm.c   |  10 +-
 .../staging/rtl8723bs/hal/rtl8723b_phycfg.c   |   4 +-
 drivers/staging/rtl8723bs/include/hal_data.h  |   2 +-
 31 files changed, 270 insertions(+), 270 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_odm.c 
b/drivers/staging/rtl8723bs/core/rtw_odm.c
index 87fed69e64d7..53f7cc0444ba 100644
--- a/drivers/staging/rtl8723bs/core/rtw_odm.c
+++ b/drivers/staging/rtl8723bs/core/rtw_odm.c
@@ -152,7 +152,7 @@ inline void rtw_odm_ability_set(struct adapter *adapter, 
u32 ability)
 void rtw_odm_adaptivity_parm_msg(void *sel, struct adapter *adapter)
 {
struct hal_com_data *pHalData = GET_HAL_DATA(adapter);
-   struct DM_ODM_T *odm = &pHalData->odmpriv;
+   struct dm_odm_t *odm = &pHalData->odmpriv;
 
DBG_871X_SEL_NL(sel, "%10s %16s %8s %10s %11s %14s\n",
"TH_L2H_ini", "TH_EDCCA_HL_diff", "IGI_Base",
@@ -173,7 +173,7 @@ void rtw_odm_adaptivity_parm_set(struct adapter *adapter, 
s8 TH_L2H_ini,
 u8 IGI_LowerBound)
 {
struct hal_com_data *pHalData = GET_HAL_DATA(adapter);
-   struct DM_ODM_T *odm = &pHalData->odmpriv;
+   struct dm_odm_t *odm = &pHalData->odmpriv;
 
odm->TH_L2H_ini = TH_L2H_ini;
odm->TH_EDCCA_HL_diff = TH_EDCCA_HL_diff;
@@ -186,7 +186,7 @@ void rtw_odm_adaptivity_parm_set(struct adapter *adapter, 
s8 TH_L2H_ini,
 void rtw_odm_get_perpkt_rssi(void *sel, struct adapter *adapter)
 {
struct hal_com_data *hal_data = GET_HAL_DATA(adapter);
-   struct DM_ODM_T *odm = &hal_data->odmpriv;
+   struct dm_odm_t *odm = &hal_data->odmpriv;
 
DBG_871X_SEL_NL(sel, "RxRate = %s, RSSI_A = %d(%%), RSSI_B = %d(%%)\n",
HDATA_RATE(odm->RxRate), odm->RSSI_A, odm->RSSI_B);
diff --git a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c 
b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c
index 4faa9038417d..016d257b90a0 100644
--- a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c
+++ b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c
@@ -9,7 +9,7 @@
 #include "odm_precomp.h"
 
 static bool CheckPositive(
-   struct DM_ODM_T *pDM_Odm, const u32 Condition1, const u32 Condition2
+   struct dm_odm_t *pDM_Odm, const u32 Condition1, const u32 Condition2
 )
 {
u8 _BoardType =
@@ -112,7 +112,7 @@ static bool CheckPositive(
 }
 
 static bool CheckNegative(
-   struct DM_ODM_T *pDM_Odm, const u32  Condition1, const u32 Condition2
+   struct dm_odm_t *pDM_Odm, const u32  Condition1, const u32 Condition2
 )
 {
return true;
@@ -257,7 +257,7 @@ static u32 Array_MP_8723B_AGC_TAB[] = {
 
 };
 
-void ODM_ReadAndConfig_MP_8723B_AGC_TAB(struct DM_ODM_T *pDM_Odm)
+void ODM_ReadAndConfig_MP_8723B_AGC_TAB(struct dm_odm_t *pDM_Odm)
 {
u32 i = 0;
u32 ArrayLen = ARRAY_SIZE(Array_MP_8723B_AGC_TAB);
@@ -526,7 +526,7 @@ static u32 Array_MP_8723B_PHY_REG[] = {
 
 };
 
-void ODM_ReadAndConfig_MP_8723B_PHY_REG(struct DM_ODM_T *pDM_Odm)
+void ODM_ReadAndConfig_MP_8723B_PHY_REG(struct dm_odm_t *pDM_Odm)
 {
u32 i = 0;
u32 ArrayLen = ARRAY_SIZE(Array_MP_8723B_PHY_REG);
@@ -606,7 +606,7 @@ static u32 Array_MP_8723B_PHY_REG_PG[] = {
0, 0, 0, 0x0e14, 0x, 0x263

Re: [PATCH] staging: comedi: das800: fix request_irq() warn

2021-03-17 Thread Tong Zhang
Thanks for sharing those best practices, Dan.
I was wondering if there is a spelling checker for git.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 0/3] Binder: Enable App Freezing Capability

2021-03-17 Thread Jann Horn
On Wed, Mar 17, 2021 at 7:00 PM Christian Brauner
 wrote:
> On Mon, Mar 15, 2021 at 06:16:27PM -0700, Li Li wrote:
> > To improve the user experience when switching between recently used
> > applications, the background applications which are not currently needed
> > are cached in the memory. Normally, a well designed application will not
> > consume valuable CPU resources in the background. However, it's possible
> > some applications are not able or willing to behave as expected, wasting
> > energy even after being cached.
> >
> > It is a good idea to freeze those applications when they're only being
> > kept alive for the sake of faster startup and energy saving. These kernel
> > patches will provide the necessary infrastructure for user space framework
> > to freeze and thaw a cached process, check the current freezing status and
> > correctly deal with outstanding binder transactions to frozen processes.

I just have some comments on the overall design:

This seems a bit convoluted to me; and I'm not sure whether this is
really something the kernel should get involved in, or whether this
patchset is operating at the right layer.

If there are non-binder threads that are misbehaving, could you
instead stop all those threads in pure userspace code (e.g. by sending
a thread-directed signal to all of them and letting the signal handler
sleep on a futex); and if the binder thread receives a transaction
that should be handled, wake up those threads again?

Or alternatively you could detect that the application is being woken
up frequently even though it's supposed to be idle (e.g. using
information from procfs), and kill it since you consider it to be
misbehaving?

Or if there are specific usage patterns you see frequently that you
consider to be wasting CPU resources (e.g. setting an interval timer
that fires in short intervals), you could try to delay such timers.


With your current approach, you're baking the assumption that all IPC
goes through binder into the kernel API; things like passing a file
descriptor to a pipe through binder or using shared futexes are no
longer usable for cross-process communication without making more
kernel changes. I'm not sure whether that's a good idea. On top of
that, if you freeze a process while it is in the middle of some
operation, resources associated with the operation will probably stay
in use for quite some time; for example, if an app is in the middle of
downloading some data over HTTP, and you freeze it, this may cause the
TCP connection to remain active and consume resources for send/receive
buffers on both the device and the server.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v10 5/9] staging: clocking-wizard: Add support for dynamic reconfiguration

2021-03-17 Thread Shubhrajyoti Datta
On Mon, Mar 15, 2021 at 12:37 PM Zhengxun Li  wrote:
>
> Hi Shubhrajyoti,
>
> My name is Zhengxun and I am the engineer from Macronix. We are
> using the platform PicoZed 7015/7030 SOM (System On Module),
> which is based on Xilinx Zynq®-7000 All Programmable (AP) SoC to
> verify our Flash driver. Of course, we are also using your clock
> wizard, our version seems to be v5.2, but something went wrong.
>
> +static int clk_wzrd_dynamic_reconfig(struct clk_hw *hw, unsigned long rate,
> + unsigned long parent_rate)
> +{
> + int err;
> + u32 value;
> + unsigned long flags = 0;
> + struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
> + void __iomem *div_addr = divider->base + divider->offset;
> +
> + if (divider->lock)
> + spin_lock_irqsave(divider->lock, flags);
> + else
> + __acquire(divider->lock);
> +
> + value = DIV_ROUND_CLOSEST(parent_rate, rate);
> +
> + /* Cap the value to max */
> + min_t(u32, value, WZRD_DR_MAX_INT_DIV_VALUE);
> +
> + /* Set divisor and clear phase offset */
> + writel(value, div_addr);
> + writel(0x00, div_addr + WZRD_DR_DIV_TO_PHASE_OFFSET);
>
> Why phase always set to zero? We want to support DTR operation in
> Flash driver. Can you add a set_phase function to adjust the phase?
>
The phase setting is a separate feature will address in a separate series.

>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel