[PATCH] Staging: rtlwifi: base: fixed a brace coding style issue

2018-08-04 Thread Sohil Ladhani
linux-ker...@vger.kernel.org, Sohil Ladhani  
Bcc: 
Subject: [PATCH] Staging: rtlwifi: base: fixed a brace coding style issue
Reply-To: 

Fixed a coding style issue

Signed-off-by: Sohil Ladhani 
---
 drivers/staging/rtlwifi/base.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c
index 094827c1879a..654aa4e068ba 100644
--- a/drivers/staging/rtlwifi/base.c
+++ b/drivers/staging/rtlwifi/base.c
@@ -685,9 +685,8 @@ static void _rtl_query_protection_mode(struct ieee80211_hw 
*hw,
}
 }
 
-u8 rtl_mrate_idx_to_arfr_id(
-   struct ieee80211_hw *hw, u8 rate_index,
-   enum wireless_mode wirelessmode)
+u8 rtl_mrate_idx_to_arfr_id(struct ieee80211_hw *hw, u8 rate_index,
+   enum wireless_mode wirelessmode)
 {
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_phy *rtlphy = &rtlpriv->phy;
-- 
2.18.0

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


[PATCH] Staging: rtlwifi: base: fixed a brace coding style issue

2018-08-04 Thread Sohil Ladhani
Fixed a coding style issue

Signed-off-by: Sohil Ladhani 
---
 drivers/staging/rtlwifi/base.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c
index 094827c1879a..654aa4e068ba 100644
--- a/drivers/staging/rtlwifi/base.c
+++ b/drivers/staging/rtlwifi/base.c
@@ -685,9 +685,8 @@ static void _rtl_query_protection_mode(struct ieee80211_hw 
*hw,
}
 }
 
-u8 rtl_mrate_idx_to_arfr_id(
-   struct ieee80211_hw *hw, u8 rate_index,
-   enum wireless_mode wirelessmode)
+u8 rtl_mrate_idx_to_arfr_id(struct ieee80211_hw *hw, u8 rate_index,
+   enum wireless_mode wirelessmode)
 {
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_phy *rtlphy = &rtlpriv->phy;
-- 
2.18.0

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


Re: [PATCH] Staging: rtlwifi: base: fixed a brace coding style issue

2018-08-04 Thread Julia Lawall



On Sat, 4 Aug 2018, Sohil Ladhani wrote:

> linux-ker...@vger.kernel.org, Sohil Ladhani 
> Bcc:
> Subject: [PATCH] Staging: rtlwifi: base: fixed a brace coding style issue
> Reply-To:

It doesn't look right that the above text is in the message body when I
respond to it.  Send the patch to yourself first and be sure that
everything is ok.

Braces are {}.  The patch doesn't do anything with braces.  () are
parentheses.  But the patch doesn't really do anything with them either.
The patch actually moves around the function parameters.

> Fixed a coding style issue

This doesn't give much information.  What did you do and why?

julia

> Signed-off-by: Sohil Ladhani 
> ---
>  drivers/staging/rtlwifi/base.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c
> index 094827c1879a..654aa4e068ba 100644
> --- a/drivers/staging/rtlwifi/base.c
> +++ b/drivers/staging/rtlwifi/base.c
> @@ -685,9 +685,8 @@ static void _rtl_query_protection_mode(struct 
> ieee80211_hw *hw,
>   }
>  }
>
> -u8 rtl_mrate_idx_to_arfr_id(
> - struct ieee80211_hw *hw, u8 rate_index,
> - enum wireless_mode wirelessmode)
> +u8 rtl_mrate_idx_to_arfr_id(struct ieee80211_hw *hw, u8 rate_index,
> + enum wireless_mode wirelessmode)
>  {
>   struct rtl_priv *rtlpriv = rtl_priv(hw);
>   struct rtl_phy *rtlphy = &rtlpriv->phy;
> --
> 2.18.0
>
>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: rtlwifi: base: fixed a brace coding style issue

2018-08-04 Thread Julia Lawall



On Sat, 4 Aug 2018, Sohil Ladhani wrote:

> Fixed a coding style issue

This seems to fix the header problem.  But it is a patch on the same code
at the same place doing the same thing as the previous message.  So you
should say [PATCH v2] in the subject line, and then below the --- explain
what has changed as compared to the previous submission.

julia

>
> Signed-off-by: Sohil Ladhani 
> ---
>  drivers/staging/rtlwifi/base.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c
> index 094827c1879a..654aa4e068ba 100644
> --- a/drivers/staging/rtlwifi/base.c
> +++ b/drivers/staging/rtlwifi/base.c
> @@ -685,9 +685,8 @@ static void _rtl_query_protection_mode(struct 
> ieee80211_hw *hw,
>   }
>  }
>
> -u8 rtl_mrate_idx_to_arfr_id(
> - struct ieee80211_hw *hw, u8 rate_index,
> - enum wireless_mode wirelessmode)
> +u8 rtl_mrate_idx_to_arfr_id(struct ieee80211_hw *hw, u8 rate_index,
> + enum wireless_mode wirelessmode)
>  {
>   struct rtl_priv *rtlpriv = rtl_priv(hw);
>   struct rtl_phy *rtlphy = &rtlpriv->phy;
> --
> 2.18.0
>
>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtlwifi: base: Fixed line ending with parentheses

2018-08-04 Thread Sohil Ladhani
This patch fixes the "Lines should not end with a '('" problem reported by
checkpatch

Signed-off-by: Sohil Ladhani 
---
 drivers/staging/rtlwifi/base.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c
index 094827c1879a..654aa4e068ba 100644
--- a/drivers/staging/rtlwifi/base.c
+++ b/drivers/staging/rtlwifi/base.c
@@ -685,9 +685,8 @@ static void _rtl_query_protection_mode(struct ieee80211_hw 
*hw,
}
 }
 
-u8 rtl_mrate_idx_to_arfr_id(
-   struct ieee80211_hw *hw, u8 rate_index,
-   enum wireless_mode wirelessmode)
+u8 rtl_mrate_idx_to_arfr_id(struct ieee80211_hw *hw, u8 rate_index,
+   enum wireless_mode wirelessmode)
 {
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_phy *rtlphy = &rtlpriv->phy;
-- 
2.18.0

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


Re: [PATCH] Staging: rtlwifi: base: Fixed line ending with parentheses

2018-08-04 Thread Julia Lawall



On Sat, 4 Aug 2018, Sohil Ladhani wrote:

> This patch fixes the "Lines should not end with a '('" problem reported by
> checkpatch

There is still no v2 in the subject line, or explanation of what has
changed under the --- (I assume this is still the same place and the same
code; I didn't keep the old versions to check).

julia

>
> Signed-off-by: Sohil Ladhani 
> ---
>  drivers/staging/rtlwifi/base.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c
> index 094827c1879a..654aa4e068ba 100644
> --- a/drivers/staging/rtlwifi/base.c
> +++ b/drivers/staging/rtlwifi/base.c
> @@ -685,9 +685,8 @@ static void _rtl_query_protection_mode(struct 
> ieee80211_hw *hw,
>   }
>  }
>
> -u8 rtl_mrate_idx_to_arfr_id(
> - struct ieee80211_hw *hw, u8 rate_index,
> - enum wireless_mode wirelessmode)
> +u8 rtl_mrate_idx_to_arfr_id(struct ieee80211_hw *hw, u8 rate_index,
> + enum wireless_mode wirelessmode)
>  {
>   struct rtl_priv *rtlpriv = rtl_priv(hw);
>   struct rtl_phy *rtlphy = &rtlpriv->phy;
> --
> 2.18.0
>
>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0/7] staging:rtl8192u: Coding style changes

2018-08-04 Thread John Whitmore
Cleanup of the drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h file as
the QOS_TCLAS union was moved into this file, in a previous patch. The
type contained a number of naming issues.

John Whitmore (7):
  staging:rtl8192u: Remove typedef and rename QOS_TCLAS - Style
  staging:rtl8192u: Rename types in QOS_TCLAS union - Style
  staging:rtl8192u: Rename multiple variables - Style
  staging:rtl8192u: Remove blank line - Style
  staging:rtl8192u: Remove comments - Style
  staging:rtl8192u: Remove unused member variable - Style
  staging:rtl8192u: Replace magic number with defined constant - Style

 .../staging/rtl8192u/ieee80211/ieee80211.h|  2 +-
 .../rtl8192u/ieee80211/ieee80211_softmac.c|  2 +-
 .../staging/rtl8192u/ieee80211/rtl819x_TS.h   | 99 +--
 .../rtl8192u/ieee80211/rtl819x_TSProc.c   |  6 +-
 4 files changed, 54 insertions(+), 55 deletions(-)

-- 
2.18.0

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


[PATCH 4/7] staging:rtl8192u: Remove blank line - Style

2018-08-04 Thread John Whitmore
Removal of a blank like which causes a checkpatch issue.

This is a simple coding style change and should have no impact on
runtime code execution.

Signed-off-by: John Whitmore 
---
 drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h 
b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
index 508ed639cda5..93984e8e87c3 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
@@ -15,7 +15,6 @@ enum tr_select {
 };
 
 union qos_tclas {
-
struct type_general {
u8  priority;
u8  classifier_type;
-- 
2.18.0

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


[PATCH 2/7] staging:rtl8192u: Rename types in QOS_TCLAS union - Style

2018-08-04 Thread John Whitmore
Whilst none of the structures inside the qos_tclas union are used, their
names conflict with the coding standard being named in uppercase.
The names of all five have been changed to lowercase.

This is a style change, and since none of the structures are referenced,
these changes should have no impact on runtime code execution.

Signed-off-by: John Whitmore 
---
 .../staging/rtl8192u/ieee80211/rtl819x_TS.h   | 20 +--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h 
b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
index 823ba363e0ab..c352ba0bcd8f 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
@@ -16,22 +16,22 @@ enum tr_select {
 
 union qos_tclas {
 
-   struct _TYPE_GENERAL {
+   struct type_general {
u8  Priority;
u8  ClassifierType;
u8  Mask;
-   } TYPE_GENERAL;
+   } type_general;
 
-   struct _TYPE0_ETH {
+   struct type0_eth {
u8  Priority;
u8  ClassifierType;
u8  Mask;
u8  SrcAddr[6];
u8  DstAddr[6];
u16 Type;
-   } TYPE0_ETH;
+   } type0_eth;
 
-   struct _TYPE1_IPV4 {
+   struct type1_ipv4 {
u8  Priority;
u8  ClassifierType;
u8  Mask;
@@ -43,9 +43,9 @@ union qos_tclas {
u8  DSCP;
u8  Protocol;
u8  Reserved;
-   } TYPE1_IPV4;
+   } type1_ipv4;
 
-   struct _TYPE1_IPV6 {
+   struct type1_ipv6 {
u8  Priority;
u8  ClassifierType;
u8  Mask;
@@ -55,14 +55,14 @@ union qos_tclas {
u16 SrcPort;
u16 DstPort;
u8  FlowLabel[3];
-   } TYPE1_IPV6;
+   } type1_ipv6;
 
-   struct _TYPE2_8021Q {
+   struct type2_8021q {
u8  Priority;
u8  ClassifierType;
u8  Mask;
u16 TagType;
-   } TYPE2_8021Q;
+   } type2_8021q;
 };
 
 struct ts_common_info {
-- 
2.18.0

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


[PATCH 7/7] staging:rtl8192u: Replace magic number with defined constant - Style

2018-08-04 Thread John Whitmore
Replace the magic number '8' with defined constant which is normally used
'MAX_DEV_ADDR_SIZE'.

This is a coding style change which should have no impact on runtime code
execution.

Signed-off-by: John Whitmore 
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c 
b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index 51cb5e4658b0..212cc9ccbb96 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -217,7 +217,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct 
ieee80211_device *ieee
struct rtl_80211_hdr_3addr  *header =
(struct rtl_80211_hdr_3addr  *)skb->data;
 
-   struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + 8);
+   struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + 
MAX_DEV_ADDR_SIZE);
 
spin_lock_irqsave(&ieee->lock, flags);
 
-- 
2.18.0

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


[PATCH 6/7] staging:rtl8192u: Remove unused member variable - Style

2018-08-04 Thread John Whitmore
Remove name of 'reserved' bitfield member which is simply used to pad
the bitfield to a byte boundary. The actual bit has been left in place
so alignment should not change. The name, which is not required has
been removed.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore 
---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h 
b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 3cfeac0d7214..fc449806dab8 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -114,7 +114,7 @@ struct cb_desc {
u8 bBroadcast:1;
//u8 reserved2:2;
u8 drv_agg_enable:1;
-   u8 reserved2:1;
+   u8:1;
 
/* Tx Desc related element(12-19) */
u8 rata_index;
-- 
2.18.0

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


[PATCH 1/7] staging:rtl8192u: Remove typedef and rename QOS_TCLAS - Style

2018-08-04 Thread John Whitmore
Remove the typedef from the union QOS_TCLAS, which causes a checkpatch
issue with defining new types. In addition, as a type, the name should
be in lowercase so has been changed.

These are coding style changes and should have no impact on runtime
code execution.

Signed-off-by: John Whitmore 
---
 drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 6 +++---
 drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h 
b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
index 5cf00a2e08ae..823ba363e0ab 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
@@ -14,7 +14,7 @@ enum tr_select {
RX_DIR = 1,
 };
 
-typedef union _QOS_TCLAS {
+union qos_tclas {
 
struct _TYPE_GENERAL {
u8  Priority;
@@ -63,7 +63,7 @@ typedef union _QOS_TCLAS {
u8  Mask;
u16 TagType;
} TYPE2_8021Q;
-} QOS_TCLAS, *PQOS_TCLAS;
+};
 
 struct ts_common_info {
struct list_headlist;
@@ -71,7 +71,7 @@ struct ts_common_info {
struct timer_list   inact_timer;
u8  addr[6];
struct tspec_body   t_spec;
-   QOS_TCLAS   t_class[TCLAS_NUM];
+   union qos_tclas t_class[TCLAS_NUM];
u8  t_clas_proc;
u8  t_clas_num;
 };
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c 
b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
index de06cd11ab65..d46d8f468671 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
@@ -105,7 +105,7 @@ static void ResetTsCommonInfo(struct ts_common_info 
*pTsCommonInfo)
 {
eth_zero_addr(pTsCommonInfo->addr);
memset(&pTsCommonInfo->t_spec, 0, sizeof(struct tspec_body));
-   memset(&pTsCommonInfo->t_class, 0, sizeof(QOS_TCLAS)*TCLAS_NUM);
+   memset(&pTsCommonInfo->t_class, 0, sizeof(union qos_tclas)*TCLAS_NUM);
pTsCommonInfo->t_clas_proc = 0;
pTsCommonInfo->t_clas_num = 0;
 }
@@ -265,7 +265,7 @@ static struct ts_common_info *SearchAdmitTRStream(struct 
ieee80211_device *ieee,
 }
 
 static void MakeTSEntry(struct ts_common_info *pTsCommonInfo, u8 *Addr,
-   struct tspec_body *pTSPEC, PQOS_TCLAS pTCLAS, u8 
TCLAS_Num,
+   struct tspec_body *pTSPEC, union qos_tclas *pTCLAS, u8 
TCLAS_Num,
u8 TCLAS_Proc)
 {
u8  count;
@@ -279,7 +279,7 @@ static void MakeTSEntry(struct ts_common_info 
*pTsCommonInfo, u8 *Addr,
memcpy((u8 *)(&(pTsCommonInfo->t_spec)), (u8 *)pTSPEC, 
sizeof(struct tspec_body));
 
for(count = 0; count < TCLAS_Num; count++)
-   memcpy((u8 *)(&(pTsCommonInfo->t_class[count])), (u8 *)pTCLAS, 
sizeof(QOS_TCLAS));
+   memcpy((u8 *)(&(pTsCommonInfo->t_class[count])), (u8 *)pTCLAS, 
sizeof(union qos_tclas));
 
pTsCommonInfo->t_clas_proc = TCLAS_Proc;
pTsCommonInfo->t_clas_num = TCLAS_Num;
-- 
2.18.0

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


[PATCH 3/7] staging:rtl8192u: Rename multiple variables - Style

2018-08-04 Thread John Whitmore
All of the variables used within the structures of the union qos_tclas
cause checkpatch issue due to CamelCase naming. As none the member
variables are used in code all have been changed on one patch.

These changes are coding style in nature and should not impact runtime
code execution.

Signed-off-by: John Whitmore 
---
 .../staging/rtl8192u/ieee80211/rtl819x_TS.h   | 66 +--
 1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h 
b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
index c352ba0bcd8f..508ed639cda5 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
@@ -17,51 +17,51 @@ enum tr_select {
 union qos_tclas {
 
struct type_general {
-   u8  Priority;
-   u8  ClassifierType;
-   u8  Mask;
+   u8  priority;
+   u8  classifier_type;
+   u8  mask;
} type_general;
 
struct type0_eth {
-   u8  Priority;
-   u8  ClassifierType;
-   u8  Mask;
-   u8  SrcAddr[6];
-   u8  DstAddr[6];
-   u16 Type;
+   u8  priority;
+   u8  classifier_type;
+   u8  mask;
+   u8  src_addr[6];
+   u8  dst_addr[6];
+   u16 type;
} type0_eth;
 
struct type1_ipv4 {
-   u8  Priority;
-   u8  ClassifierType;
-   u8  Mask;
-   u8  Version;
-   u8  SrcIP[4];
-   u8  DstIP[4];
-   u16 SrcPort;
-   u16 DstPort;
-   u8  DSCP;
-   u8  Protocol;
-   u8  Reserved;
+   u8  priority;
+   u8  classifier_type;
+   u8  mask;
+   u8  version;
+   u8  src_ip[4];
+   u8  dst_ip[4];
+   u16 src_port;
+   u16 dst_port;
+   u8  dscp;
+   u8  protocol;
+   u8  reserved;
} type1_ipv4;
 
struct type1_ipv6 {
-   u8  Priority;
-   u8  ClassifierType;
-   u8  Mask;
-   u8  Version;
-   u8  SrcIP[16];
-   u8  DstIP[16];
-   u16 SrcPort;
-   u16 DstPort;
-   u8  FlowLabel[3];
+   u8  priority;
+   u8  classifier_type;
+   u8  mask;
+   u8  version;
+   u8  src_ip[16];
+   u8  dst_ip[16];
+   u16 src_port;
+   u16 dst_port;
+   u8  flow_label[3];
} type1_ipv6;
 
struct type2_8021q {
-   u8  Priority;
-   u8  ClassifierType;
-   u8  Mask;
-   u16 TagType;
+   u8  priority;
+   u8  classifier_type;
+   u8  mask;
+   u16 tag_type;
} type2_8021q;
 };
 
-- 
2.18.0

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


[PATCH 5/7] staging:rtl8192u: Remove comments - Style

2018-08-04 Thread John Whitmore
Removal of three comments. The comments in question do not add anything
to the understanding of the code, and if they are necessary it would
imply that the structure and its member variables are badly named.

This is a simple style change and should have no impact on runtime
code execution.

Signed-off-by: John Whitmore 
---
 drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h 
b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
index 93984e8e87c3..924d4b373099 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
@@ -78,8 +78,8 @@ struct ts_common_info {
 struct tx_ts_record {
struct ts_common_info   ts_common_info;
u16 tx_cur_seq;
-   BA_RECORD   tx_pending_ba_record;   /*  For BA 
Originator */
-   BA_RECORD   tx_admitted_ba_record;  /*  For BA 
Originator */
+   BA_RECORD   tx_pending_ba_record;
+   BA_RECORD   tx_admitted_ba_record;
u8  add_ba_req_in_progress;
u8  add_ba_req_delayed;
u8  using_ba;
@@ -93,7 +93,7 @@ struct rx_ts_record {
u16 rx_timeout_indicate_seq;
struct list_headrx_pending_pkt_list;
struct timer_list   rx_pkt_pending_timer;
-   BA_RECORD   rx_admitted_ba_record;   /*  For BA 
Recipient */
+   BA_RECORD   rx_admitted_ba_record;
u16 rx_last_seq_num;
u8  rx_last_frag_num;
u8  num;
-- 
2.18.0

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


Re: [PATCH v6 1/8] media: v4l: Add definitions for MPEG2 slice format and metadata

2018-08-04 Thread Hans Verkuil
Hi Paul,

Some comments below. It looks pretty good, it's mostly small things that I
commented upon.

On 07/25/2018 12:02 PM, Paul Kocialkowski wrote:
> Stateless video decoding engines require both the MPEG slices and
> associated metadata from the video stream in order to decode frames.
> 
> This introduces definitions for a new pixel format, describing buffers
> with MPEG2 slice data, as well as a control structure for passing the
> frame metadata to drivers.
> 
> This is based on work from both Florent Revest and Hugues Fruchet.
> 
> Signed-off-by: Paul Kocialkowski 
> ---
>  .../media/uapi/v4l/extended-controls.rst  | 122 ++
>  .../media/uapi/v4l/pixfmt-compressed.rst  |   5 +
>  drivers/media/v4l2-core/v4l2-ctrls.c  |  54 
>  drivers/media/v4l2-core/v4l2-ioctl.c  |   1 +
>  include/media/v4l2-ctrls.h|  18 ++-
>  include/uapi/linux/v4l2-controls.h|  43 ++
>  include/uapi/linux/videodev2.h|   5 +
>  7 files changed, 241 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/media/uapi/v4l/extended-controls.rst 
> b/Documentation/media/uapi/v4l/extended-controls.rst
> index 9f7312bf3365..4a29d89fd9ac 100644
> --- a/Documentation/media/uapi/v4l/extended-controls.rst
> +++ b/Documentation/media/uapi/v4l/extended-controls.rst
> @@ -1497,6 +1497,128 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
>  
>  
>  
> +.. _v4l2-mpeg-mpeg2:
> +
> +``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (struct)``
> +Specifies the slice parameters (also known as slice header) for the
> +associated MPEG-2 slice data. This includes all the necessary
> +parameters for configuring a hardware decoder pipeline for MPEG-2.

This seems to be mostly a representation of the MPEG-2 "Picture coding
extension" (6.2.3.1 in ISO/IEC 13818-2: 1995).

Is that correct? I think some references to the standard should be added
were appropriate.

> +
> +.. tabularcolumns:: |p{2.0cm}|p{4.0cm}|p{11.0cm}|
> +
> +.. c:type:: v4l2_ctrl_mpeg2_slice_params
> +
> +.. cssclass:: longtable
> +
> +.. flat-table:: struct v4l2_ctrl_mpeg2_slice_params
> +:header-rows:  0
> +:stub-columns: 0
> +:widths:   1 1 2
> +
> +* - __u32
> +  - ``slice_len``
> +  - Length (in bits) of the current slice data.
> +* - __u32
> +  - ``slice_pos``
> +  - Position (in bits) of the current slice data, relative to the
> +frame start.
> +* - __u16
> +  - ``width``
> +  - Width of the corresponding output frame for the current slice.
> +* - __u16
> +  - ``height``
> +  - Height of the corresponding output frame for the current slice.
> +* - __u8
> +  - ``slice_type``
> +  - Picture coding type for the frame covered by the current slice
> +(V4L2_MPEG2_SLICE_TYPE_I, V4L2_MPEG2_SLICE_TYPE_P or
> +V4L2_MPEG2_SLICE_PCT_B).
> +* - __u8
> +  - ``f_code[2][2]``
> +  - Motion vector codes.
> +* - __u8
> +  - ``intra_dc_precision``
> +  - Precision of Discrete Cosine transform (0: 8 bits precision,
> +1: 9 bits precision, 2: 10 bits precision, 11: 11 bits precision).
> +* - __u8
> +  - ``picture_structure``
> +  - Picture structure (1: interlaced top field,
> +2: interlaced bottom field, 3: progressive frame).
> +* - __u8
> +  - ``top_field_first``
> +  - If set to 1 and interlaced stream, top field is output first.
> +* - __u8
> +  - ``frame_pred_frame_dct``
> +  - If set to 1, only frame-DCT and frame prediction are used.
> +* - __u8
> +  - ``concealment_motion_vectors``
> +  -  If set to 1, motion vectors are coded for intra macroblocks.
> +* - __u8
> +  - ``q_scale_type``
> +  - This flag affects the inverse quantisation process.

quantization

The american spelling appears to be the standard in our documentation, so
let's stick to that.

> +* - __u8
> +  - ``intra_vlc_format``
> +  - This flag affects the decoding of transform coefficient data.
> +* - __u8
> +  - ``alternate_scan``
> +  - This flag affects the decoding of transform coefficient data.
> +* - __u8
> +  - ``backward_ref_index``
> +  - Index for the V4L2 buffer to use as backward reference, used with
> +B-coded and P-coded frames.
> +* - __u8
> +  - ``forward_ref_index``
> +  - Index for the V4L2 buffer to use as forward reference, used with
> +P-coded frames.
> +* - :cspan:`2`
> +
> +``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (struct)``
> +Specifies quantization matrices for the associated MPEG-2 slice data.
> +
> +.. tabularcolumns:: |p{2.0cm}|p{4.0cm}|p{11.0cm}|
> +
> +.. c:type:: v4l2_ctrl_mpeg2_quantization
> +
> +.. cssclass:: longtable
> +
> +.. flat-table:: struct v4l2_ctrl_mpeg2_quantization
> +:header-rows:  0
> +:stub-columns: 0
> +:widths:   1 1 2
> +
> +* - __u8
> +  - ``load_intra_quantiser_matrix``
> +   

Re: [PATCH v6 2/8] media: v4l: Add definition for Allwinner's MB32-tiled NV12 format

2018-08-04 Thread Hans Verkuil
On 07/25/2018 12:02 PM, Paul Kocialkowski wrote:
> This introduces support for Allwinner's MB32-tiled NV12 format, where
> each plane is divided into macroblocks of 32x32 pixels. Hence, the size
> of each plane has to be aligned to 32 bytes. The pixels inside each
> macroblock are coded as they would be if the macroblock was a single
> plane, line after line.
> 
> The MB32-tiled NV12 format is used by the video engine on Allwinner
> platforms: it is the default format for decoded frames (and the only one
> available in the oldest supported platforms).
> 
> Signed-off-by: Paul Kocialkowski 
> ---
>  Documentation/media/uapi/v4l/pixfmt-reserved.rst | 15 ++-
>  drivers/media/v4l2-core/v4l2-ioctl.c |  1 +
>  include/uapi/linux/videodev2.h   |  1 +
>  3 files changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/media/uapi/v4l/pixfmt-reserved.rst 
> b/Documentation/media/uapi/v4l/pixfmt-reserved.rst
> index 38af1472a4b4..9a68b6a787bf 100644
> --- a/Documentation/media/uapi/v4l/pixfmt-reserved.rst
> +++ b/Documentation/media/uapi/v4l/pixfmt-reserved.rst
> @@ -243,7 +243,20 @@ please make a proposal on the linux-media mailing list.
>   It is an opaque intermediate format and the MDP hardware must be
>   used to convert ``V4L2_PIX_FMT_MT21C`` to ``V4L2_PIX_FMT_NV12M``,
>   ``V4L2_PIX_FMT_YUV420M`` or ``V4L2_PIX_FMT_YVU420``.
> -
> +* .. _V4L2-PIX-FMT-MB32-NV12:
> +
> +  - ``V4L2_PIX_FMT_MB32_NV12``
> +  - 'MN12'
> +  - Two-planar NV12-based format used by the Allwinner video engine
> +hardware, with 32x32 tiles for the luminance plane and 32x64 tiles
> +for the chrominance plane. Each tile is a linear pixel data
> +representation within its own bounds. Each tile follows the previous
> +one linearly (as in, from left to right, top to bottom).

as in, -> as in:

> +
> +The frame dimensions are aligned to match an integer number of
> +tiles, resulting in 32-aligned resolutions for the luminance plane
> +and 16-aligned resolutions for the chrominance plane (with 2x2
> +subsampling).
>  
>  .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
>  
> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c 
> b/drivers/media/v4l2-core/v4l2-ioctl.c
> index 68e914b83a03..7e1c200de10d 100644
> --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> @@ -1331,6 +1331,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
>   case V4L2_PIX_FMT_SE401:descr = "GSPCA SE401"; break;
>   case V4L2_PIX_FMT_S5C_UYVY_JPG: descr = "S5C73MX interleaved 
> UYVY/JPEG"; break;
>   case V4L2_PIX_FMT_MT21C:descr = "Mediatek Compressed 
> Format"; break;
> + case V4L2_PIX_FMT_MB32_NV12:descr = "Allwinner tiled NV12 
> format"; break;

"Allwinner Tiled NV12 Format"

If it is Allwinner specific, then that should be in the PIX_FMT name as well:
something like V4L2_PIX_FMT_ALLWINNER_MB32_NV12 or perhaps SUNXI_MB32_NV12.

On the other hand, you could also see this as a variant of e.g. 
V4L2_PIX_FMT_NV12MT
or V4L2_PIX_FMT_NV12MT_16X16. In that case it is not necessarily Allwinner 
specific
since other devices might choose this format. You can go either way, as long
as it is consistent.

>   default:
>   WARN(1, "Unknown pixelformat 0x%08x\n", 
> fmt->pixelformat);
>   if (fmt->description[0])
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index d171361ed9b3..453d27142e31 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -670,6 +670,7 @@ struct v4l2_pix_format {
>  #define V4L2_PIX_FMT_Z16  v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 
> 16-bit */
>  #define V4L2_PIX_FMT_MT21Cv4l2_fourcc('M', 'T', '2', '1') /* Mediatek 
> compressed block mode  */
>  #define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel 
> Planar Greyscale 10-bit and Depth 16-bit */
> +#define V4L2_PIX_FMT_MB32_NV12 v4l2_fourcc('M', 'N', '1', '2') /* Allwinner 
> tiled NV12 format */
>  
>  /* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits 
> unused */
>  #define V4L2_PIX_FMT_IPU3_SBGGR10v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 
> packed 10-bit BGGR bayer */
> 

Regards,

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


Re: [PATCH v6 4/8] media: platform: Add Cedrus VPU decoder driver

2018-08-04 Thread Hans Verkuil
Hi Paul,

See below for my review comments. Mostly small fry, the main issue I found is
that there is no support for VIDIOC_DECODER_CMD. That's the proper way of
stopping a decoder. Don't rely on the deprecated allow_zero_bytesused field.

On 07/25/2018 12:02 PM, Paul Kocialkowski wrote:
> This introduces the Cedrus VPU driver that supports the VPU found in
> Allwinner SoCs, also known as Video Engine. It is implemented through
> a v4l2 m2m decoder device and a media device (used for media requests).
> So far, it only supports MPEG2 decoding.
> 
> Since this VPU is stateless, synchronization with media requests is
> required in order to ensure consistency between frame headers that
> contain metadata about the frame to process and the raw slice data that
> is used to generate the frame.
> 
> This driver was made possible thanks to the long-standing effort
> carried out by the linux-sunxi community in the interest of reverse
> engineering, documenting and implementing support for Allwinner VPU.
> 
> Signed-off-by: Paul Kocialkowski 
> ---
>  MAINTAINERS   |   7 +
>  drivers/staging/media/Kconfig |   2 +
>  drivers/staging/media/Makefile|   1 +
>  drivers/staging/media/sunxi/Kconfig   |  15 +
>  drivers/staging/media/sunxi/Makefile  |   1 +
>  drivers/staging/media/sunxi/cedrus/Kconfig|  14 +
>  drivers/staging/media/sunxi/cedrus/Makefile   |   3 +
>  drivers/staging/media/sunxi/cedrus/cedrus.c   | 419 +
>  drivers/staging/media/sunxi/cedrus/cedrus.h   | 166 +
>  .../staging/media/sunxi/cedrus/cedrus_dec.c   | 114 
>  .../staging/media/sunxi/cedrus/cedrus_dec.h   |  27 +
>  .../staging/media/sunxi/cedrus/cedrus_hw.c| 319 ++
>  .../staging/media/sunxi/cedrus/cedrus_hw.h|  29 +
>  .../staging/media/sunxi/cedrus/cedrus_mpeg2.c | 240 
>  .../staging/media/sunxi/cedrus/cedrus_regs.h  | 235 
>  .../staging/media/sunxi/cedrus/cedrus_video.c | 566 ++
>  .../staging/media/sunxi/cedrus/cedrus_video.h |  31 +
>  17 files changed, 2189 insertions(+)
>  create mode 100644 drivers/staging/media/sunxi/Kconfig
>  create mode 100644 drivers/staging/media/sunxi/Makefile
>  create mode 100644 drivers/staging/media/sunxi/cedrus/Kconfig
>  create mode 100644 drivers/staging/media/sunxi/cedrus/Makefile
>  create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus.c
>  create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus.h
>  create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_dec.c
>  create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_dec.h
>  create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_hw.c
>  create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_hw.h
>  create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_mpeg2.c
>  create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_regs.h
>  create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_video.c
>  create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_video.h
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 89853313c697..342504506a89 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -656,6 +656,13 @@ L:   linux-cry...@vger.kernel.org
>  S:   Maintained
>  F:   drivers/crypto/sunxi-ss/
>  
> +ALLWINNER VPU DRIVER
> +M:   Maxime Ripard 
> +M:   Paul Kocialkowski 
> +L:   linux-me...@vger.kernel.org
> +S:   Maintained
> +F:   drivers/staging/media/sunxi/cedrus/
> +
>  ALPHA PORT
>  M:   Richard Henderson 
>  M:   Ivan Kokshaysky 
> diff --git a/drivers/staging/media/Kconfig b/drivers/staging/media/Kconfig
> index db5cf67047ad..b3620a8f2d9f 100644
> --- a/drivers/staging/media/Kconfig
> +++ b/drivers/staging/media/Kconfig
> @@ -31,6 +31,8 @@ source "drivers/staging/media/mt9t031/Kconfig"
>  
>  source "drivers/staging/media/omap4iss/Kconfig"
>  
> +source "drivers/staging/media/sunxi/Kconfig"
> +
>  source "drivers/staging/media/tegra-vde/Kconfig"
>  
>  source "drivers/staging/media/zoran/Kconfig"
> diff --git a/drivers/staging/media/Makefile b/drivers/staging/media/Makefile
> index 503fbe47fa58..42948f805548 100644
> --- a/drivers/staging/media/Makefile
> +++ b/drivers/staging/media/Makefile
> @@ -5,5 +5,6 @@ obj-$(CONFIG_SOC_CAMERA_IMX074)   += imx074/
>  obj-$(CONFIG_SOC_CAMERA_MT9T031) += mt9t031/
>  obj-$(CONFIG_VIDEO_DM365_VPFE)   += davinci_vpfe/
>  obj-$(CONFIG_VIDEO_OMAP4)+= omap4iss/
> +obj-$(CONFIG_VIDEO_SUNXI)+= sunxi/
>  obj-$(CONFIG_TEGRA_VDE)  += tegra-vde/
>  obj-$(CONFIG_VIDEO_ZORAN)+= zoran/
> diff --git a/drivers/staging/media/sunxi/Kconfig 
> b/drivers/staging/media/sunxi/Kconfig
> new file mode 100644
> index ..c78d92240ceb
> --- /dev/null
> +++ b/drivers/staging/media/sunxi/Kconfig
> @@ -0,0 +1,15 @@
> +config VIDEO_SUNXI
> + bool "Allwinner sunXi family Video Devices"
> + depends on ARCH_SUNXI || COMPILE_TEST
> + help
> +   If you have an Allwinner SoC based on t

Re: [PATCH v6 0/8] Cedrus driver for the Allwinner Video Engine, using media requests

2018-08-04 Thread Hans Verkuil
On 07/25/2018 12:02 PM, Paul Kocialkowski wrote:
> This is the sixth iteration of the updated Cedrus driver,
> that supports the Video Engine found in most Allwinner SoCs, starting
> with the A10. It was tested on the A13, A20, A33 and H3.
> 
> The initial version of this driver[0] was originally written and
> submitted by Florent Revest using a previous version of the request API
> that is necessary to provide coherency between controls and the buffers
> they apply to.
> 
> The driver was adapted to use the latest version of the media request
> API[1], as submitted by Hand Verkuil. Media request API support is a
> hard requirement for the Cedrus driver.
> 
> The driver itself currently only supports MPEG2 and more codecs will be
> added to the driver eventually. The output frames provided by the
> Video Engine are in a multi-planar 32x32-tiled YUV format, with a plane
> for luminance (Y) and a plane for chrominance (UV). A specific format is
> introduced in the V4L2 API to describe it.
> 
> This implementation is based on the significant work that was conducted
> by various members of the linux-sunxi community for understanding and
> documenting the Video Engine's innards.
> 
> In addition to the media requests API, the following series are required
> for Cedrus:
> * vicodec: the Virtual Codec driver

This will appear in for 4.19.

> * allwinner: a64: add SRAM controller / system control
> * SRAM patches from the Cedrus VPU driver series version 5

What about these? Are they queued up for 4.19 as well?

I'll post a rebased reqv17 later today that includes the
"add v4l2_ctrl_request_hdl_find/put/ctrl_find functions" patch.

Regards,

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


Re: [PATCH v6 1/8] media: v4l: Add definitions for MPEG2 slice format and metadata

2018-08-04 Thread Hans Verkuil
On 07/25/2018 12:02 PM, Paul Kocialkowski wrote:
> Stateless video decoding engines require both the MPEG slices and
> associated metadata from the video stream in order to decode frames.
> 
> This introduces definitions for a new pixel format, describing buffers
> with MPEG2 slice data, as well as a control structure for passing the
> frame metadata to drivers.
> 
> This is based on work from both Florent Revest and Hugues Fruchet.
> 
> Signed-off-by: Paul Kocialkowski 
> ---
>  .../media/uapi/v4l/extended-controls.rst  | 122 ++
>  .../media/uapi/v4l/pixfmt-compressed.rst  |   5 +
>  drivers/media/v4l2-core/v4l2-ctrls.c  |  54 
>  drivers/media/v4l2-core/v4l2-ioctl.c  |   1 +
>  include/media/v4l2-ctrls.h|  18 ++-
>  include/uapi/linux/v4l2-controls.h|  43 ++
>  include/uapi/linux/videodev2.h|   5 +
>  7 files changed, 241 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/media/uapi/v4l/extended-controls.rst 
> b/Documentation/media/uapi/v4l/extended-controls.rst
> index 9f7312bf3365..4a29d89fd9ac 100644
> --- a/Documentation/media/uapi/v4l/extended-controls.rst
> +++ b/Documentation/media/uapi/v4l/extended-controls.rst
> @@ -1497,6 +1497,128 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
>  
>  
>  
> +.. _v4l2-mpeg-mpeg2:
> +
> +``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (struct)``
> +Specifies the slice parameters (also known as slice header) for the
> +associated MPEG-2 slice data. This includes all the necessary
> +parameters for configuring a hardware decoder pipeline for MPEG-2.
> +
> +.. tabularcolumns:: |p{2.0cm}|p{4.0cm}|p{11.0cm}|
> +
> +.. c:type:: v4l2_ctrl_mpeg2_slice_params
> +
> +.. cssclass:: longtable
> +
> +.. flat-table:: struct v4l2_ctrl_mpeg2_slice_params
> +:header-rows:  0
> +:stub-columns: 0
> +:widths:   1 1 2
> +
> +* - __u32
> +  - ``slice_len``
> +  - Length (in bits) of the current slice data.
> +* - __u32
> +  - ``slice_pos``
> +  - Position (in bits) of the current slice data, relative to the
> +frame start.
> +* - __u16
> +  - ``width``
> +  - Width of the corresponding output frame for the current slice.
> +* - __u16
> +  - ``height``
> +  - Height of the corresponding output frame for the current slice.
> +* - __u8
> +  - ``slice_type``
> +  - Picture coding type for the frame covered by the current slice
> +(V4L2_MPEG2_SLICE_TYPE_I, V4L2_MPEG2_SLICE_TYPE_P or
> +V4L2_MPEG2_SLICE_PCT_B).
> +* - __u8
> +  - ``f_code[2][2]``
> +  - Motion vector codes.
> +* - __u8
> +  - ``intra_dc_precision``
> +  - Precision of Discrete Cosine transform (0: 8 bits precision,
> +1: 9 bits precision, 2: 10 bits precision, 11: 11 bits precision).
> +* - __u8
> +  - ``picture_structure``
> +  - Picture structure (1: interlaced top field,
> +2: interlaced bottom field, 3: progressive frame).
> +* - __u8
> +  - ``top_field_first``
> +  - If set to 1 and interlaced stream, top field is output first.
> +* - __u8
> +  - ``frame_pred_frame_dct``
> +  - If set to 1, only frame-DCT and frame prediction are used.
> +* - __u8
> +  - ``concealment_motion_vectors``
> +  -  If set to 1, motion vectors are coded for intra macroblocks.
> +* - __u8
> +  - ``q_scale_type``
> +  - This flag affects the inverse quantisation process.
> +* - __u8
> +  - ``intra_vlc_format``
> +  - This flag affects the decoding of transform coefficient data.
> +* - __u8
> +  - ``alternate_scan``
> +  - This flag affects the decoding of transform coefficient data.
> +* - __u8
> +  - ``backward_ref_index``
> +  - Index for the V4L2 buffer to use as backward reference, used with
> +B-coded and P-coded frames.
> +* - __u8
> +  - ``forward_ref_index``
> +  - Index for the V4L2 buffer to use as forward reference, used with
> +P-coded frames.
> +* - :cspan:`2`
> +
> +``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (struct)``
> +Specifies quantization matrices for the associated MPEG-2 slice data.
> +
> +.. tabularcolumns:: |p{2.0cm}|p{4.0cm}|p{11.0cm}|
> +
> +.. c:type:: v4l2_ctrl_mpeg2_quantization
> +
> +.. cssclass:: longtable
> +
> +.. flat-table:: struct v4l2_ctrl_mpeg2_quantization
> +:header-rows:  0
> +:stub-columns: 0
> +:widths:   1 1 2
> +
> +* - __u8
> +  - ``load_intra_quantiser_matrix``
> +  - One bit to indicate whether to load the intra quantiser matrix.
> +* - __u32
> +  - ``load_non_intra_quantiser_matrix``
> +  - One bit to indicate whether to load the non-intra quantiser matrix.
> +* - __u32
> +  - ``load_chroma_intra_quantiser_matrix``
> +  - One bit to indicate whether to load the chroma intra quantiser 
> matrix,
> +only relevant for non-4:2:0 YUV formats.
> +* 

[PATCH 1/4] staging: rtl8188eu: rename rtw_IOL_applied

2018-08-04 Thread Michael Straube
Rename rtw_IOL_applied to be all lowercase.
rtw_IOL_applied -> rtw_iol_applied

Signed-off-by: Michael Straube 
---
 drivers/staging/rtl8188eu/core/rtw_efuse.c| 2 +-
 drivers/staging/rtl8188eu/core/rtw_iol.c  | 2 +-
 drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 4 ++--
 drivers/staging/rtl8188eu/include/rtw_iol.h   | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c 
b/drivers/staging/rtl8188eu/core/rtw_efuse.c
index b19aa26d1705..0fd306a808c4 100644
--- a/drivers/staging/rtl8188eu/core/rtw_efuse.c
+++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c
@@ -298,7 +298,7 @@ static s32 iol_read_efuse(struct adapter *padapter, u8 
txpktbuf_bndy, u16 offset
 
 void efuse_ReadEFuse(struct adapter *Adapter, u8 efuseType, u16 _offset, u16 
_size_byte, u8 *pbuf)
 {
-   if (rtw_IOL_applied(Adapter)) {
+   if (rtw_iol_applied(Adapter)) {
rtw_hal_power_on(Adapter);
iol_mode_enable(Adapter, 1);
iol_read_efuse(Adapter, 0, _offset, _size_byte, pbuf);
diff --git a/drivers/staging/rtl8188eu/core/rtw_iol.c 
b/drivers/staging/rtl8188eu/core/rtw_iol.c
index 6b97e9f2a77b..f7a86eac738e 100644
--- a/drivers/staging/rtl8188eu/core/rtw_iol.c
+++ b/drivers/staging/rtl8188eu/core/rtw_iol.c
@@ -7,7 +7,7 @@
 
 #include 
 
-bool rtw_IOL_applied(struct adapter *adapter)
+bool rtw_iol_applied(struct adapter *adapter)
 {
if (adapter->registrypriv.fw_iol == 1)
return true;
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c 
b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
index 8e7190b98692..607170775fa5 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
@@ -75,7 +75,7 @@ s32 rtl8188e_iol_efuse_patch(struct adapter *padapter)
s32 result = _SUCCESS;
 
DBG_88E("==> %s\n", __func__);
-   if (rtw_IOL_applied(padapter)) {
+   if (rtw_iol_applied(padapter)) {
iol_mode_enable(padapter, 1);
result = iol_execute(padapter, CMD_READ_EFUSE_MAP);
if (result == _SUCCESS)
@@ -207,7 +207,7 @@ s32 InitLLTTable(struct adapter *padapter, u8 txpktbuf_bndy)
u32 i;
u32 Last_Entry_Of_TxPktBuf = LAST_ENTRY_OF_TX_PKT_BUFFER;/*  176, 
22k */
 
-   if (rtw_IOL_applied(padapter)) {
+   if (rtw_iol_applied(padapter)) {
status = iol_InitLLTTable(padapter, txpktbuf_bndy);
} else {
for (i = 0; i < (txpktbuf_bndy - 1); i++) {
diff --git a/drivers/staging/rtl8188eu/include/rtw_iol.h 
b/drivers/staging/rtl8188eu/include/rtw_iol.h
index 53f5fe210e7b..f20b35e8d0a2 100644
--- a/drivers/staging/rtl8188eu/include/rtw_iol.h
+++ b/drivers/staging/rtl8188eu/include/rtw_iol.h
@@ -10,6 +10,6 @@
 #include 
 #include 
 
-bool rtw_IOL_applied(struct adapter  *adapter);
+bool rtw_iol_applied(struct adapter *adapter);
 
 #endif /* __RTW_IOL_H_ */
-- 
2.18.0

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


[PATCH 3/4] staging: rtl8188eu: remove redundant include

2018-08-04 Thread Michael Straube
The header osdep_service.h is included from drv_types.h,
so remove the redundant include.

Signed-off-by: Michael Straube 
---
 drivers/staging/rtl8188eu/include/rtw_iol.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_iol.h 
b/drivers/staging/rtl8188eu/include/rtw_iol.h
index f20b35e8d0a2..d713782d5cdc 100644
--- a/drivers/staging/rtl8188eu/include/rtw_iol.h
+++ b/drivers/staging/rtl8188eu/include/rtw_iol.h
@@ -7,7 +7,6 @@
 #ifndef __RTW_IOL_H_
 #define __RTW_IOL_H_
 
-#include 
 #include 
 
 bool rtw_iol_applied(struct adapter *adapter);
-- 
2.18.0

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


[PATCH 4/4] staging: rtl8188eu: remove unnecessary includes

2018-08-04 Thread Michael Straube
In the header rtw_iol.h there is only one function declared.
Remove the include of rtw_iol.h from files that do not use
this function.

Signed-off-by: Michael Straube 
---
 drivers/staging/rtl8188eu/hal/mac_cfg.c| 1 -
 drivers/staging/rtl8188eu/hal/phy.c| 1 -
 drivers/staging/rtl8188eu/hal/usb_halinit.c| 1 -
 drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 1 -
 4 files changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/mac_cfg.c 
b/drivers/staging/rtl8188eu/hal/mac_cfg.c
index 8e849228f376..370aa5cc55a7 100644
--- a/drivers/staging/rtl8188eu/hal/mac_cfg.c
+++ b/drivers/staging/rtl8188eu/hal/mac_cfg.c
@@ -7,7 +7,6 @@
 
 #include "odm_precomp.h"
 #include "phy.h"
-#include 
 
 /* MAC_REG.TXT */
 
diff --git a/drivers/staging/rtl8188eu/hal/phy.c 
b/drivers/staging/rtl8188eu/hal/phy.c
index 0fe2d53310f0..3c7cf8720df8 100644
--- a/drivers/staging/rtl8188eu/hal/phy.c
+++ b/drivers/staging/rtl8188eu/hal/phy.c
@@ -8,7 +8,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c 
b/drivers/staging/rtl8188eu/hal/usb_halinit.c
index 56fda8005d38..12864b648fa8 100644
--- a/drivers/staging/rtl8188eu/hal/usb_halinit.c
+++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c
@@ -11,7 +11,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #defineHAL_BB_ENABLE   1
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c 
b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index 19387d87185d..bee3c3a7a7a9 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -19,7 +19,6 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 
-- 
2.18.0

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


[PATCH 2/4] staging: rtl8188eu: remove unnecessary parentheses

2018-08-04 Thread Michael Straube
Remove unnecessary parentheses from if conditions.

Signed-off-by: Michael Straube 
---
 drivers/staging/rtl8188eu/core/rtw_iol.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_iol.c 
b/drivers/staging/rtl8188eu/core/rtw_iol.c
index f7a86eac738e..fc3c66201e59 100644
--- a/drivers/staging/rtl8188eu/core/rtw_iol.c
+++ b/drivers/staging/rtl8188eu/core/rtw_iol.c
@@ -12,8 +12,8 @@ bool rtw_iol_applied(struct adapter *adapter)
if (adapter->registrypriv.fw_iol == 1)
return true;
 
-   if ((adapter->registrypriv.fw_iol == 2) &&
-   (!adapter_to_dvobj(adapter)->ishighspeed))
+   if (adapter->registrypriv.fw_iol == 2 &&
+   !adapter_to_dvobj(adapter)->ishighspeed)
return true;
return false;
 }
-- 
2.18.0

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