Second attempt correcting my initial attempt where I left '_t'
and '_e' trailing the structures defined. These have now been
corrected.
John Whitmore (15):
staging:rtl8192u: Remove typedef of struct cmpk_txfb_t - Style
staging:rtl8192u: Remove unused CMPK_TX_SET_CONFIG_SIZE - Style
staging:rtl8192u: Removed unused CMPK_RX_DBG_MSG_SIZE - Style
staging:rtl8192u: Correct spelling in comments - style
staging:rtl8192u: Remove typedef of cmpk_intr_sta_t - Style
staging:rtl8192u: Remove typedef of cmpk_set_cfg_t - Style
staging:rtl8192u: Refactor use of enum dm_dig_sta_e - Style
staging:rtl8192u: Refactor enum dm_ratr_sta_e usage - Style
staging:rtl8192u: Remove enum dm_dig_op_e - Style
staging:rtl8192u: Refactor enum dm_dig_alg_e - Style
staging:rtl8192u: Remove unused enum dm_dig_dbg_e - Style
staging:rtl8192u: Refactor dm_dig_connect_e - Style
staging:rtl8192u: Refactor enum dm_dig_pd_th_e - Style
staging:rtl8192u: Refactor enum dm_dig_cs_ratio_e - Style
staging:rtl8192u: Refactor enum DM_CCK_Rx_Path_Method - Style
drivers/staging/rtl8192u/r8192U.h | 10 +-
drivers/staging/rtl8192u/r8192U_dm.c | 91 -----------------
drivers/staging/rtl8192u/r8192U_dm.h | 122 ++++++++---------------
drivers/staging/rtl8192u/r819xU_cmdpkt.c | 16 +--
drivers/staging/rtl8192u/r819xU_cmdpkt.h | 24 ++---
5 files changed, 70 insertions(+), 193 deletions(-)
--
2.18.0
Add the required spaces around '+' and '*' operators. This is a
coding style change to clear the checkpatch issue. There should be
no impact on runtime code execution.
Signed-off-by: John Whitmore <[email protected]>
---
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
index 8ee9370520f3..92afa9dc9663 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
@@ -7,7 +7,7 @@
#define AC_PARAM_SIZE 4
#define WMM_PARAM_ELE_BODY_LEN 18
-#define WMM_PARAM_ELEMENT_SIZE (8+(4*AC_PARAM_SIZE))
+#define WMM_PARAM_ELEMENT_SIZE (8 + (4 * AC_PARAM_SIZE))
//
// ACI/AIFSN Field.
--
2.18.0
Rename the union ACI_AIFSN to aci_aifsn and remove the typedef directive.
The removal of the typedef clears the checkpatch issue with defining
new types. The renaming is to adhere to the coding style where types
are name in lower case.
These changes are coding style changes which should have no impact on
runtime execution.
Signed-off-by: John Whitmore <[email protected]>
---
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h | 6 +++---
drivers/staging/rtl8192u/r8192U_dm.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
index 92afa9dc9663..5856bf87c5dc 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
@@ -13,7 +13,7 @@
// ACI/AIFSN Field.
// Ref: WMM spec 2.2.2: WME Parameter Element, p.12.
//
-typedef union _ACI_AIFSN {
+union aci_aifsn {
u8 charData;
struct {
@@ -22,7 +22,7 @@ typedef union _ACI_AIFSN {
u8 ACI:2;
u8 Reserved:1;
} f; // Field
-} ACI_AIFSN, *PACI_AIFSN;
+};
//
// ECWmin/ECWmax field.
@@ -45,7 +45,7 @@ typedef union _AC_PARAM {
u8 charData[4];
struct {
- ACI_AIFSN AciAifsn;
+ union aci_aifsn AciAifsn;
ECW Ecw;
u16 TXOPLimit;
} f; // Field
diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index c4e4e3ba394b..04c08ca8a0bb 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -2333,7 +2333,7 @@ static void dm_check_edca_turbo(
{
/* TODO: Modified this part and try to set acm control in only 1 IO processing!! */
- PACI_AIFSN pAciAifsn = (PACI_AIFSN)&(qos_parameters->aifs[0]);
+ union aci_aifsn *pAciAifsn = (union aci_aifsn *)&(qos_parameters->aifs[0]);
u8 AcmCtrl;
read_nic_byte(dev, AcmHwCtrl, &AcmCtrl);
--
2.18.0
Rename the member variables of union aci_aifsn, which should be named
in lowercase. The only member variable, of this union, which is
actually used is 'acm'.
This are coding style changes which should have no impact on runtime
code execution.
Signed-off-by: John Whitmore <[email protected]>
---
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h | 10 +++++-----
drivers/staging/rtl8192u/r8192U_dm.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
index 5856bf87c5dc..901b85139d3b 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
@@ -14,13 +14,13 @@
// Ref: WMM spec 2.2.2: WME Parameter Element, p.12.
//
union aci_aifsn {
- u8 charData;
+ u8 char_data;
struct {
- u8 AIFSN:4;
- u8 ACM:1;
- u8 ACI:2;
- u8 Reserved:1;
+ u8 aifsn:4;
+ u8 acm:1;
+ u8 aci:2;
+ u8 reserved:1;
} f; // Field
};
diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index 04c08ca8a0bb..7dc912dd53af 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -2338,7 +2338,7 @@ static void dm_check_edca_turbo(
read_nic_byte(dev, AcmHwCtrl, &AcmCtrl);
- if (pAciAifsn->f.ACM) { /* ACM bit is 1. */
+ if (pAciAifsn->f.acm) { /* acm bit is 1. */
AcmCtrl |= AcmHw_BeqEn;
} else { /* ACM bit is 0. */
AcmCtrl &= (~AcmHw_BeqEn);
--
2.18.0
Correct the spelling of a number of comments, which cause a checkpatch
issue. This is purely a coding style change which should have no impact
on runtime code execution.
Signed-off-by: John Whitmore <[email protected]>
---
drivers/staging/rtl8192u/r819xU_cmdpkt.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
index 50218d9a406b..d2e07b0ff30b 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
@@ -53,7 +53,7 @@ struct cmd_pkt_tx_feedback {
};
/* 2. RX side: Interrupt status packet. It includes Beacon State,
- * Beacon Timer Interrupt and other useful informations in MAC ISR Reg.
+ * Beacon Timer Interrupt and other useful information in MAC ISR Reg.
*/
typedef struct tag_cmd_pkt_interrupt_status {
u8 element_id; /* Command packet type. */
@@ -80,7 +80,7 @@ typedef struct tag_cmd_pkt_set_configuration {
u32 mask;
} cmpk_set_cfg_t;
-/* 4. Both side : TX/RX query configuraton packet. The query structure is the
+/* 4. Both side : TX/RX query configuration packet. The query structure is the
* same as set configuration.
*/
#define cmpk_query_cfg_t cmpk_set_cfg_t
--
2.18.0
Remove the unused macro definition CMPK_RX_DBG_MSG_SIZE. This is a
coding style change which should have no impact on runtime code
execution.
Signed-off-by: John Whitmore <[email protected]>
---
drivers/staging/rtl8192u/r819xU_cmdpkt.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
index fab982668b44..50218d9a406b 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
@@ -5,7 +5,6 @@
#define CMPK_RX_TX_FB_SIZE sizeof(struct cmd_pkt_tx_feedback) /* 20 */
#define CMPK_BOTH_QUERY_CONFIG_SIZE sizeof(cmpk_set_cfg_t) /* 16 */
#define CMPK_RX_TX_STS_SIZE sizeof(cmpk_tx_status_t)
-#define CMPK_RX_DBG_MSG_SIZE sizeof(cmpk_rx_dbginfo_t)
#define CMPK_TX_RAHIS_SIZE sizeof(cmpk_tx_rahis_t)
/* 2008/05/08 amy For USB constant. */
--
2.18.0
Remove the typedef of the structure cmpk_txfb_t. This clears the
checkpatch issue with defining new types.
Additionally the type is renamed from cmpk_txfb_t to cmd_pkt_tx_feedback
removing the '_t' as the typedef has been removed.
These changes are purely coding style in nature and should have no
impact on runtime code execution.
Signed-off-by: John Whitmore <[email protected]>
---
drivers/staging/rtl8192u/r819xU_cmdpkt.c | 8 ++++----
drivers/staging/rtl8192u/r819xU_cmdpkt.h | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
index 3140b3413f91..630cf612f265 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
@@ -66,7 +66,7 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)
* Overview:
*
* Input: PADAPTER pAdapter
- * CMPK_TXFB_T *psTx_FB
+ * STRUCT CMD_PKT_TX_FEEDBACK *psTx_FB
*
* Output: NONE
*
@@ -78,7 +78,7 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)
*
*---------------------------------------------------------------------------
*/
-static void cmpk_count_txstatistic(struct net_device *dev, cmpk_txfb_t *pstx_fb)
+static void cmpk_count_txstatistic(struct net_device *dev, struct cmd_pkt_tx_feedback *pstx_fb)
{
struct r8192_priv *priv = ieee80211_priv(dev);
#ifdef ENABLE_PS
@@ -163,7 +163,7 @@ static void cmpk_count_txstatistic(struct net_device *dev, cmpk_txfb_t *pstx_fb)
static void cmpk_handle_tx_feedback(struct net_device *dev, u8 *pmsg)
{
struct r8192_priv *priv = ieee80211_priv(dev);
- cmpk_txfb_t rx_tx_fb;
+ struct cmd_pkt_tx_feedback rx_tx_fb;
priv->stats.txfeedback++;
@@ -173,7 +173,7 @@ static void cmpk_handle_tx_feedback(struct net_device *dev, u8 *pmsg)
* endian type before copy the message copy.
*/
/* Use pointer to transfer structure memory. */
- memcpy((u8 *)&rx_tx_fb, pmsg, sizeof(cmpk_txfb_t));
+ memcpy((u8 *)&rx_tx_fb, pmsg, sizeof(struct cmd_pkt_tx_feedback));
/* 2. Use tx feedback info to count TX statistics. */
cmpk_count_txstatistic(dev, &rx_tx_fb);
/* Comment previous method for TX statistic function. */
diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
index 0eb6b2321c9c..756e08bd341a 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
@@ -2,7 +2,7 @@
#ifndef R819XUSB_CMDPKT_H
#define R819XUSB_CMDPKT_H
/* Different command packet have dedicated message length and definition. */
-#define CMPK_RX_TX_FB_SIZE sizeof(cmpk_txfb_t) /* 20 */
+#define CMPK_RX_TX_FB_SIZE sizeof(struct cmd_pkt_tx_feedback) /* 20 */
#define CMPK_TX_SET_CONFIG_SIZE sizeof(cmpk_set_cfg_t) /* 16 */
#define CMPK_BOTH_QUERY_CONFIG_SIZE sizeof(cmpk_set_cfg_t) /* 16 */
#define CMPK_RX_TX_STS_SIZE sizeof(cmpk_tx_status_t)
@@ -19,7 +19,7 @@
/*------------------------------Define structure----------------------------*/
/* Define different command packet structure. */
/* 1. RX side: TX feedback packet. */
-typedef struct tag_cmd_pkt_tx_feedback {
+struct cmd_pkt_tx_feedback {
/* DWORD 0 */
u8 element_id; /* Command packet type. */
u8 length; /* Command packet length. */
@@ -52,7 +52,7 @@ typedef struct tag_cmd_pkt_tx_feedback {
/* DWORD 5 */
u16 reserve3;
u16 duration;
-} cmpk_txfb_t;
+};
/* 2. RX side: Interrupt status packet. It includes Beacon State,
* Beacon Timer Interrupt and other useful informations in MAC ISR Reg.
--
2.18.0
Remove the unused macro CMPK_TX_SET_CONFIG_SIZE. This is a coding style
change which should not impact runtime code execution.
Signed-off-by: John Whitmore <[email protected]>
---
drivers/staging/rtl8192u/r819xU_cmdpkt.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
index 756e08bd341a..fab982668b44 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
@@ -3,7 +3,6 @@
#define R819XUSB_CMDPKT_H
/* Different command packet have dedicated message length and definition. */
#define CMPK_RX_TX_FB_SIZE sizeof(struct cmd_pkt_tx_feedback) /* 20 */
-#define CMPK_TX_SET_CONFIG_SIZE sizeof(cmpk_set_cfg_t) /* 16 */
#define CMPK_BOTH_QUERY_CONFIG_SIZE sizeof(cmpk_set_cfg_t) /* 16 */
#define CMPK_RX_TX_STS_SIZE sizeof(cmpk_tx_status_t)
#define CMPK_RX_DBG_MSG_SIZE sizeof(cmpk_rx_dbginfo_t)
--
2.18.0
On Sun, Jul 29, 2018 at 10:05:15PM +0100, John Whitmore wrote:
> Rename the union ACI_AIFSN to aci_aifsn and remove the typedef directive.
>
> The removal of the typedef clears the checkpatch issue with defining
> new types. The renaming is to adhere to the coding style where types
> are name in lower case.
>
> These changes are coding style changes which should have no impact on
> runtime execution.
>
> Signed-off-by: John Whitmore <[email protected]>
> ---
> drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h | 6 +++---
> drivers/staging/rtl8192u/r8192U_dm.c | 2 +-
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
Again :(
Ignore - Sorry sent by mistake, forgot to clean out previous patches.
On Sun, Jul 29, 2018 at 10:05:17PM +0100, John Whitmore wrote:
> Rename the member variables of union aci_aifsn, which should be named
> in lowercase. The only member variable, of this union, which is
> actually used is 'acm'.
>
> This are coding style changes which should have no impact on runtime
> code execution.
>
> Signed-off-by: John Whitmore <[email protected]>
> ---
> drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h | 10 +++++-----
Ignore - Sorry sent by mistake, forgot to clean out previous patches.
On Sun, Jul 29, 2018 at 10:05:11PM +0100, John Whitmore wrote:
> Second attempt correcting my initial attempt where I left '_t'
> and '_e' trailing the structures defined. These have now been
> corrected.
>
> John Whitmore (15):
> staging:rtl8192u: Remove typedef of struct cmpk_txfb_t - Style
> staging:rtl8192u: Remove unused CMPK_TX_SET_CONFIG_SIZE - Style
> staging:rtl8192u: Removed unused CMPK_RX_DBG_MSG_SIZE - Style
> staging:rtl8192u: Correct spelling in comments - style
> staging:rtl8192u: Remove typedef of cmpk_intr_sta_t - Style
> staging:rtl8192u: Remove typedef of cmpk_set_cfg_t - Style
> staging:rtl8192u: Refactor use of enum dm_dig_sta_e - Style
> staging:rtl8192u: Refactor enum dm_ratr_sta_e usage - Style
> staging:rtl8192u: Remove enum dm_dig_op_e - Style
> staging:rtl8192u: Refactor enum dm_dig_alg_e - Style
> staging:rtl8192u: Remove unused enum dm_dig_dbg_e - Style
> staging:rtl8192u: Refactor dm_dig_connect_e - Style
> staging:rtl8192u: Refactor enum dm_dig_pd_th_e - Style
> staging:rtl8192u: Refactor enum dm_dig_cs_ratio_e - Style
> staging:rtl8192u: Refactor enum DM_CCK_Rx_Path_Method - Style
>
> drivers/staging/rtl8192u/r8192U.h | 10 +-
> drivers/staging/rtl8192u/r8192U_dm.c | 91 -----------------
> drivers/staging/rtl8192u/r8192U_dm.h | 122 ++++++++---------------
> drivers/staging/rtl8192u/r819xU_cmdpkt.c | 16 +--
> drivers/staging/rtl8192u/r819xU_cmdpkt.h | 24 ++---
> 5 files changed, 70 insertions(+), 193 deletions(-)
>
> --
> 2.18.0
>
I made a mistake and sent patches when I had old patches still left
from a previous :( That meant a few patch xx/08 were sent.
I then resent the proper patch set xx/15 but in hindsight I should have
bumped the version to 3?
Scissors :(