[PATCH 00/17] staging:rtl8192u: Coding Style changes
This is a series of patches to clean up the header file: drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h John Whitmore (17): staging:rtl8192u: Remove unused defines - Style staging:rtl8192u: Refactor SEQUENCE_CONTROL - Style staging:rtl8192u: Rename ShortData - Style staging:rtl8192u: Rename member variables - Style staging:rtl8192u: Refactor BA_PARAM_SET - Style staging:rtl8192u: Remove charData and rename shortData - Style staging:rtl8192u: Rename ba_param_set members - Style staging:rtl8192u: Refactor DELBA_PARAM_SET - Style staging:rtl8192u: Refactor union delba_param_set - Style staging:rtl8192u: Refactor struct BA_RECORD - Style staging:rtl8192u: Rename member variable Timer - Style staging:rtl8192u: Rename bValid - Style staging:rtl8192u: Rename DialogToken - Style staging:rtl8192u: Rename BaParamSet - Style staging:rtl8192u: Rename BaTimeoutValue - Style staging:rtl8192u: Rename BaStartSeqCtrl - Style staging:rtl8192u: Remove commented out code and indent - Style .../staging/rtl8192u/ieee80211/ieee80211.h| 2 +- .../staging/rtl8192u/ieee80211/ieee80211_tx.c | 4 +- .../staging/rtl8192u/ieee80211/rtl819x_BA.h | 84 .../rtl8192u/ieee80211/rtl819x_BAProc.c | 184 +- .../staging/rtl8192u/ieee80211/rtl819x_TS.h | 6 +- .../rtl8192u/ieee80211/rtl819x_TSProc.c | 6 +- 6 files changed, 136 insertions(+), 150 deletions(-) -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/17] staging:rtl8192u: Refactor SEQUENCE_CONTROL - Style
Remove the 'typedef' from union SEQUENCE_CONTROL. This clears a checkpatch issue with defining new types. Additionally renamed the union to lowercase to comply with coding standard. These are coding style changes which should not impact runtime code execution. typedef union _SEQUENCE_CONTROL{ +union sequence_control { Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 6 +++--- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index 8a74faedf6d6..446de58f1849 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -22,13 +22,13 @@ struct ieee80211_ADDBA_Req{ } __attribute__ ((packed)); */ //Is this need?I put here just to make it easier to define structure BA_RECORD //WB -typedef union _SEQUENCE_CONTROL{ +union sequence_control { u16 ShortData; struct { u16 FragNum:4; u16 SeqNum:12; } field; -} SEQUENCE_CONTROL, *PSEQUENCE_CONTROL; +}; typedef union _BA_PARAM_SET { u8 charData[2]; @@ -57,7 +57,7 @@ typedef struct _BA_RECORD { u8 DialogToken; BA_PARAM_SETBaParamSet; u16 BaTimeoutValue; - SEQUENCE_CONTROLBaStartSeqCtrl; + union sequence_control BaStartSeqCtrl; } BA_RECORD, *PBA_RECORD; #endif //end _BATYPE_H_ diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index 01b631c2a180..c1fe42e0893c 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -324,7 +324,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) PBA_RECORD pBA = NULL; PBA_PARAM_SET pBaParamSet = NULL; u16 *pBaTimeoutVal = NULL; - PSEQUENCE_CONTROL pBaStartSeqCtrl = NULL; + union sequence_control *pBaStartSeqCtrl = NULL; struct rx_ts_record *pTS = NULL; if (skb->len < sizeof(struct rtl_80211_hdr_3addr) + 9) { @@ -344,7 +344,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) pDialogToken = tag + 2; //category+action pBaParamSet = (PBA_PARAM_SET)(tag + 3); //+DialogToken pBaTimeoutVal = (u16 *)(tag + 5); - pBaStartSeqCtrl = (PSEQUENCE_CONTROL)(req + 7); + pBaStartSeqCtrl = (union sequence_control *)(req + 7); netdev_info(ieee->dev, ">rx ADDBAREQ from :%pM\n", dst); //some other capability is not ready now. -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/17] staging:rtl8192u: Remove unused defines - Style
Remove a number of unused constant definitions. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index b6a76aae4832..8a74faedf6d6 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -2,11 +2,7 @@ #ifndef _BATYPE_H_ #define _BATYPE_H_ -#defineTOTAL_TXBA_NUM 16 -#defineTOTAL_RXBA_NUM 16 - #defineBA_SETUP_TIMEOUT200 -#defineBA_INACT_TIMEOUT6 #defineBA_POLICY_DELAYED 0 #defineBA_POLICY_IMMEDIATE 1 @@ -15,7 +11,6 @@ #defineADDBA_STATUS_REFUSED37 #defineADDBA_STATUS_INVALID_PARAM 38 -#defineDELBA_REASON_QSTA_LEAVING 36 #defineDELBA_REASON_END_BA 37 #defineDELBA_REASON_UNKNOWN_BA 38 #defineDELBA_REASON_TIMEOUT39 -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/17] staging:rtl8192u: Rename ShortData - Style
Rename the ShortData member variable to short_data. This clears a checkpatch issue with CamelCase naming. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index 446de58f1849..ec9bbddca3de 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -23,7 +23,7 @@ struct ieee80211_ADDBA_Req{ */ //Is this need?I put here just to make it easier to define structure BA_RECORD //WB union sequence_control { - u16 ShortData; + u16 short_data; struct { u16 FragNum:4; u16 SeqNum:12; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index c1fe42e0893c..6a95b47aa595 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -93,7 +93,7 @@ void ResetBaEntry(PBA_RECORD pBA) pBA->BaParamSet.shortData = 0; pBA->BaTimeoutValue = 0; pBA->DialogToken= 0; - pBA->BaStartSeqCtrl.ShortData = 0; + pBA->BaStartSeqCtrl.short_data = 0; } //These functions need porting here or not? /*** -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/17] staging:rtl8192u: Rename bValid - Style
Rename the member variable bValid to valid, this clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impatch on runtime code execution. Signed-off-by: John Whitmore --- .../staging/rtl8192u/ieee80211/ieee80211_tx.c | 2 +- .../staging/rtl8192u/ieee80211/rtl819x_BA.h | 2 +- .../rtl8192u/ieee80211/rtl819x_BAProc.c | 22 +-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c index a61e3805437d..a7850b04c81b 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c @@ -335,7 +335,7 @@ static void ieee80211_tx_query_agg_cap(struct ieee80211_device *ieee, printk("===>can't get TS\n"); return; } - if (!pTxTs->tx_admitted_ba_record.bValid) + if (!pTxTs->tx_admitted_ba_record.valid) { TsStartAddBaProcess(ieee, pTxTs); goto FORCED_AGG_SETTING; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index a36e8ecc6c59..9ec381c049aa 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -51,7 +51,7 @@ union delba_param_set { struct ba_record { struct timer_list timer; - u8 bValid; + u8 valid; u8 DialogToken; union ba_param_set BaParamSet; u16 BaTimeoutValue; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index 3e88333688ea..feac3cb371cd 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -18,7 +18,7 @@ / static void ActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA, u16 Time) { - pBA->bValid = true; + pBA->valid = true; if (Time != 0) mod_timer(&pBA->timer, jiffies + msecs_to_jiffies(Time)); } @@ -30,7 +30,7 @@ static void ActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA / static void DeActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA) { - pBA->bValid = false; + pBA->valid = false; del_timer_sync(&pBA->timer); } / @@ -47,13 +47,13 @@ static u8 TxTsDeleteBA(struct ieee80211_device *ieee, struct tx_ts_record *pTxTs u8 bSendDELBA = false; // Delete pending BA - if (pPendingBa->bValid) { + if (pPendingBa->valid) { DeActivateBAEntry(ieee, pPendingBa); bSendDELBA = true; } // Delete admitted BA - if (pAdmittedBa->bValid) { + if (pAdmittedBa->valid) { DeActivateBAEntry(ieee, pAdmittedBa); bSendDELBA = true; } @@ -73,7 +73,7 @@ static u8 RxTsDeleteBA(struct ieee80211_device *ieee, struct rx_ts_record *pRxTs struct ba_record *pBa = &pRxTs->rx_admitted_ba_record; u8 bSendDELBA = false; - if (pBa->bValid) { + if (pBa->valid) { DeActivateBAEntry(ieee, pBa); bSendDELBA = true; } @@ -89,7 +89,7 @@ static u8 RxTsDeleteBA(struct ieee80211_device *ieee, struct rx_ts_record *pRxTs / void ResetBaEntry(struct ba_record *pBA) { - pBA->bValid = false; + pBA->valid = false; pBA->BaParamSet.short_data = 0; pBA->BaTimeoutValue = 0; pBA->DialogToken= 0; @@ -478,11 +478,11 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) // Check if related BA is waiting for setup. // If not, reject by sending DELBA frame. // - if (pAdmittedBA->bValid) { + if (pAdmittedBA->valid) { // Since BA is already setup, we ignore all other ADDBA Response. IEEE80211_DEBUG(IEEE80211_DL_BA, "OnADDBARsp(): Recv ADDBA Rsp. Drop because already admit it! \n");
[PATCH 09/17] staging:rtl8192u: Refactor union delba_param_set - Style
remove member 'charData' from the union delba_param_set, as it is not used in code. The remaining member variables have all been renamed to clear the checkpatch issue with CamelCase naming. shortData to short_data Reserved to reserved Initiator to initiator TIDto tid These changes are all coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 9 - drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 12 ++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index 10e81c3c0ff1..008fe722af03 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -41,12 +41,11 @@ union ba_param_set { }; union delba_param_set { - u8 charData[2]; - u16 shortData; + u16 short_data; struct { - u16 Reserved:11; - u16 Initiator:1; - u16 TID:4; + u16 reserved:11; + u16 initiator:1; + u16 tid:4; } field; }; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index 931123faf9ed..e504d1eb2ccf 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -201,8 +201,8 @@ static struct sk_buff *ieee80211_DELBA( memset(&DelbaParamSet, 0, 2); - DelbaParamSet.field.Initiator = (TxRxSelect == TX_DIR) ? 1 : 0; - DelbaParamSet.field.TID = pBA->BaParamSet.field.tid; + DelbaParamSet.field.initiator = (TxRxSelect == TX_DIR) ? 1 : 0; + DelbaParamSet.field.tid = pBA->BaParamSet.field.tid; skb = dev_alloc_skb(len + sizeof(struct rtl_80211_hdr_3addr)); //need to add something others? FIXME if (!skb) { @@ -226,7 +226,7 @@ static struct sk_buff *ieee80211_DELBA( // DELBA Parameter Set - put_unaligned_le16(DelbaParamSet.shortData, tag); + put_unaligned_le16(DelbaParamSet.short_data, tag); tag += 2; // Reason Code @@ -565,14 +565,14 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb) dst = &delba->addr2[0]; pDelBaParamSet = (union delba_param_set *)&delba->payload[2]; - if (pDelBaParamSet->field.Initiator == 1) { + if (pDelBaParamSet->field.initiator == 1) { struct rx_ts_record *pRxTs; if (!GetTs( ieee, (struct ts_common_info **)&pRxTs, dst, - (u8)pDelBaParamSet->field.TID, + (u8)pDelBaParamSet->field.tid, RX_DIR, false)) { IEEE80211_DEBUG(IEEE80211_DL_ERR, "can't get TS for RXTS in %s()\n", __func__); @@ -587,7 +587,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb) ieee, (struct ts_common_info **)&pTxTs, dst, - (u8)pDelBaParamSet->field.TID, + (u8)pDelBaParamSet->field.tid, TX_DIR, false)) { IEEE80211_DEBUG(IEEE80211_DL_ERR, "can't get TS for TXTS in %s()\n", __func__); -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/17] staging:rtl8192u: Refactor DELBA_PARAM_SET - Style
Remove the typedef directive from union DELBA_PARAM_SET, to clear the checkpatch issue with CamelCase naming. Rename the union to lowercase to comply with the coding standard. These changes are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 4 ++-- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index 8beae1af63a1..10e81c3c0ff1 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -40,7 +40,7 @@ union ba_param_set { } field; }; -typedef union _DELBA_PARAM_SET { +union delba_param_set { u8 charData[2]; u16 shortData; struct { @@ -48,7 +48,7 @@ typedef union _DELBA_PARAM_SET { u16 Initiator:1; u16 TID:4; } field; -} DELBA_PARAM_SET, *PDELBA_PARAM_SET; +}; typedef struct _BA_RECORD { struct timer_list Timer; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index 42f458b4ece0..931123faf9ed 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -187,7 +187,7 @@ static struct sk_buff *ieee80211_DELBA( u16 ReasonCode ) { - DELBA_PARAM_SET DelbaParamSet; + union delba_param_set DelbaParamSet; struct sk_buff *skb = NULL; struct rtl_80211_hdr_3addr *Delba = NULL; u8 *tag = NULL; @@ -543,7 +543,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb) { struct rtl_80211_hdr_3addr *delba = NULL; - PDELBA_PARAM_SETpDelBaParamSet = NULL; + union delba_param_set *pDelBaParamSet = NULL; u8 *dst = NULL; if (skb->len < sizeof(struct rtl_80211_hdr_3addr) + 6) { @@ -563,7 +563,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb) IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA|IEEE80211_DL_BA, skb->data, skb->len); delba = (struct rtl_80211_hdr_3addr *)skb->data; dst = &delba->addr2[0]; - pDelBaParamSet = (PDELBA_PARAM_SET)&delba->payload[2]; + pDelBaParamSet = (union delba_param_set *)&delba->payload[2]; if (pDelBaParamSet->field.Initiator == 1) { struct rx_ts_record *pRxTs; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/17] staging:rtl8192u: Rename member variables - Style
Rename the member variables FragNum and SeqNum. This change clears a checkpatch issue with CamelCase naming. This is a coding style change and should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 4 ++-- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c index cc4049de975d..a61e3805437d 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c @@ -342,7 +342,7 @@ static void ieee80211_tx_query_agg_cap(struct ieee80211_device *ieee, } else if (!pTxTs->using_ba) { - if (SN_LESS(pTxTs->tx_admitted_ba_record.BaStartSeqCtrl.field.SeqNum, (pTxTs->tx_cur_seq + 1) % 4096)) + if (SN_LESS(pTxTs->tx_admitted_ba_record.BaStartSeqCtrl.field.seq_num, (pTxTs->tx_cur_seq + 1) % 4096)) pTxTs->using_ba = true; else goto FORCED_AGG_SETTING; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index ec9bbddca3de..6bbabd9e6562 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -25,8 +25,8 @@ struct ieee80211_ADDBA_Req{ union sequence_control { u16 short_data; struct { - u16 FragNum:4; - u16 SeqNum:12; + u16 frag_num:4; + u16 seq_num:12; } field; }; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index 6a95b47aa595..643fd891f476 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -630,7 +630,7 @@ TsInitAddBA( // BufferSize: This need to be set according to A-MPDU vector pBA->BaParamSet.field.BufferSize = 32; // BufferSize: This need to be set according to A-MPDU vector pBA->BaTimeoutValue = 0;// Timeout value: Set 0 to disable Timer - pBA->BaStartSeqCtrl.field.SeqNum = (pTS->tx_cur_seq + 3) % 4096; // Block Ack will start after 3 packets later. + pBA->BaStartSeqCtrl.field.seq_num = (pTS->tx_cur_seq + 3) % 4096; // Block Ack will start after 3 packets later. ActivateBAEntry(ieee, pBA, BA_SETUP_TIMEOUT); -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/17] staging:rtl8192u: Rename ba_param_set members - Style
Rename the member variables of union ba_param_set to clear the checkpatch issue with CamelCase naming: AMSDU_Support to amsdu_support BAPolicy to ba_policy TIDto tid BufferSize to buffer_size These are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- .../staging/rtl8192u/ieee80211/rtl819x_BA.h | 8 +++--- .../rtl8192u/ieee80211/rtl819x_BAProc.c | 28 +-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index d3730fc6c8fe..8beae1af63a1 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -33,10 +33,10 @@ union sequence_control { union ba_param_set { u16 short_data; struct { - u16 AMSDU_Support:1; - u16 BAPolicy:1; - u16 TID:4; - u16 BufferSize:10; + u16 amsdu_support:1; + u16 ba_policy:1; + u16 tid:4; + u16 buffer_size:10; } field; }; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index 1a9271548b94..42f458b4ece0 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -202,7 +202,7 @@ static struct sk_buff *ieee80211_DELBA( memset(&DelbaParamSet, 0, 2); DelbaParamSet.field.Initiator = (TxRxSelect == TX_DIR) ? 1 : 0; - DelbaParamSet.field.TID = pBA->BaParamSet.field.TID; + DelbaParamSet.field.TID = pBA->BaParamSet.field.tid; skb = dev_alloc_skb(len + sizeof(struct rtl_80211_hdr_3addr)); //need to add something others? FIXME if (!skb) { @@ -362,7 +362,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) ieee, (struct ts_common_info **)(&pTS), dst, - (u8)(pBaParamSet->field.TID), + (u8)(pBaParamSet->field.tid), RX_DIR, true)) { rc = ADDBA_STATUS_REFUSED; @@ -371,10 +371,10 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) } pBA = &pTS->rx_admitted_ba_record; // To Determine the ADDBA Req content - // We can do much more check here, including BufferSize, AMSDU_Support, Policy, StartSeqCtrl... + // We can do much more check here, including buffer_size, AMSDU_Support, Policy, StartSeqCtrl... // I want to check StartSeqCtrl to make sure when we start aggregation!!! // - if (pBaParamSet->field.BAPolicy == BA_POLICY_DELAYED) { + if (pBaParamSet->field.ba_policy == BA_POLICY_DELAYED) { rc = ADDBA_STATUS_INVALID_PARAM; IEEE80211_DEBUG(IEEE80211_DL_ERR, "BA Policy is not correct in %s()\n", __func__); goto OnADDBAReq_Fail; @@ -388,9 +388,9 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) pBA->BaStartSeqCtrl = *pBaStartSeqCtrl; //for half N mode we only aggregate 1 frame if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) - pBA->BaParamSet.field.BufferSize = 1; + pBA->BaParamSet.field.buffer_size = 1; else - pBA->BaParamSet.field.BufferSize = 32; + pBA->BaParamSet.field.buffer_size = 32; ActivateBAEntry(ieee, pBA, pBA->BaTimeoutValue); ieee80211_send_ADDBARsp(ieee, dst, pBA, ADDBA_STATUS_SUCCESS); @@ -403,7 +403,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) BA.BaParamSet = *pBaParamSet; BA.BaTimeoutValue = *pBaTimeoutVal; BA.DialogToken = *pDialogToken; - BA.BaParamSet.field.BAPolicy = BA_POLICY_IMMEDIATE; + BA.BaParamSet.field.ba_policy = BA_POLICY_IMMEDIATE; ieee80211_send_ADDBARsp(ieee, dst, &BA, rc); return 0; //we send RSP out. } @@ -461,7 +461,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) ieee, (struct ts_common_info **)(&pTS), dst, - (u8)(pBaParamSet->field.TID), + (u8)(pBaParamSet->field.tid), TX_DIR, false)) { IEEE80211_DEBUG(IEEE80211_DL_ERR, "can't get TS in %s()\n", __func__); @@ -498,7 +498,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) // We can compare the value of BA parameter set that Peer returned and Self s
[PATCH 10/17] staging:rtl8192u: Refactor struct BA_RECORD - Style
Remove the 'typedef' directive from the BA_RECORD structure, to clear the checkpatch issue with defining new types. Additionally rename the structure to lowercase to comply with the coding style. These changes are purely coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- .../staging/rtl8192u/ieee80211/ieee80211.h| 2 +- .../staging/rtl8192u/ieee80211/rtl819x_BA.h | 4 +- .../rtl8192u/ieee80211/rtl819x_BAProc.c | 48 +-- .../staging/rtl8192u/ieee80211/rtl819x_TS.h | 6 +-- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 3cfeac0d7214..c1d34d9ef2e5 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -2395,7 +2395,7 @@ void TsInitDelBA(struct ieee80211_device *ieee, void BaSetupTimeOut(struct timer_list *t); void TxBaInactTimeout(struct timer_list *t); void RxBaInactTimeout(struct timer_list *t); -void ResetBaEntry(PBA_RECORD pBA); +void ResetBaEntry(struct ba_record *pBA); //function in TS.c bool GetTs( struct ieee80211_device *ieee, diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index 008fe722af03..b1697cb483ff 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -49,13 +49,13 @@ union delba_param_set { } field; }; -typedef struct _BA_RECORD { +struct ba_record { struct timer_list Timer; u8 bValid; u8 DialogToken; union ba_param_set BaParamSet; u16 BaTimeoutValue; union sequence_control BaStartSeqCtrl; -} BA_RECORD, *PBA_RECORD; +}; #endif //end _BATYPE_H_ diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index e504d1eb2ccf..cb84335468ab 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -12,11 +12,11 @@ / *function: Activate BA entry. And if Time is nozero, start timer. - * input: PBA_RECORDpBA //BA entry to be enabled + * input: struct ba_record *pBA //BA entry to be enabled * u16Time //indicate time delay. * output: none / -static void ActivateBAEntry(struct ieee80211_device *ieee, PBA_RECORD pBA, u16 Time) +static void ActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA, u16 Time) { pBA->bValid = true; if (Time != 0) @@ -25,10 +25,10 @@ static void ActivateBAEntry(struct ieee80211_device *ieee, PBA_RECORD pBA, u16 T / *function: deactivate BA entry, including its timer. - * input: PBA_RECORDpBA //BA entry to be disabled + * input: struct ba_record *pBA //BA entry to be disabled * output: none / -static void DeActivateBAEntry(struct ieee80211_device *ieee, PBA_RECORD pBA) +static void DeActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA) { pBA->bValid = false; del_timer_sync(&pBA->Timer); @@ -42,8 +42,8 @@ static void DeActivateBAEntry(struct ieee80211_device *ieee, PBA_RECORD pBA) / static u8 TxTsDeleteBA(struct ieee80211_device *ieee, struct tx_ts_record *pTxTs) { - PBA_RECORD pAdmittedBa = &pTxTs->tx_admitted_ba_record; //These two BA entries must exist in TS structure - PBA_RECORD pPendingBa = &pTxTs->tx_pending_ba_record; + struct ba_record *pAdmittedBa = &pTxTs->tx_admitted_ba_record; //These two BA entries must exist in TS structure + struct ba_record *pPendingBa = &pTxTs->tx_pending_ba_record; u8 bSendDELBA = false; // Delete pending BA @@ -70,7 +70,7 @@ static u8 TxTsDeleteBA(struct ieee80211_device *ieee, struct tx_ts_record *pTxTs / static u8 RxTsDeleteBA(struct ieee80211_device *ieee, struct rx_ts_rec
[PATCH 06/17] staging:rtl8192u: Remove charData and rename shortData - Style
The union ba_param_set contains the member variable charData which is unused. The variable has been removed. Additionally the member variable shortData has been renamed to clear a checkpatch issue with CamelCase naming. These are coding style changes which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 3 +-- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index 44f820404347..d3730fc6c8fe 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -31,8 +31,7 @@ union sequence_control { }; union ba_param_set { - u8 charData[2]; - u16 shortData; + u16 short_data; struct { u16 AMSDU_Support:1; u16 BAPolicy:1; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index 469e3e9a0d2e..1a9271548b94 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -90,7 +90,7 @@ static u8 RxTsDeleteBA(struct ieee80211_device *ieee, struct rx_ts_record *pRxTs void ResetBaEntry(PBA_RECORD pBA) { pBA->bValid = false; - pBA->BaParamSet.shortData = 0; + pBA->BaParamSet.short_data = 0; pBA->BaTimeoutValue = 0; pBA->DialogToken= 0; pBA->BaStartSeqCtrl.short_data = 0; @@ -151,7 +151,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, P } // BA Parameter Set - put_unaligned_le16(pBA->BaParamSet.shortData, tag); + put_unaligned_le16(pBA->BaParamSet.short_data, tag); tag += 2; // BA Timeout Value -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/17] staging:rtl8192u: Rename DialogToken - Style
Rename the member variable DialogToken to dialog_token. This clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h| 2 +- .../staging/rtl8192u/ieee80211/rtl819x_BAProc.c| 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index 9ec381c049aa..94224f24 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -52,7 +52,7 @@ union delba_param_set { struct ba_record { struct timer_list timer; u8 valid; - u8 DialogToken; + u8 dialog_token; union ba_param_set BaParamSet; u16 BaTimeoutValue; union sequence_control BaStartSeqCtrl; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index feac3cb371cd..21398892b0e5 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -92,7 +92,7 @@ void ResetBaEntry(struct ba_record *pBA) pBA->valid = false; pBA->BaParamSet.short_data = 0; pBA->BaTimeoutValue = 0; - pBA->DialogToken= 0; + pBA->dialog_token = 0; pBA->BaStartSeqCtrl.short_data = 0; } //These functions need porting here or not? @@ -140,7 +140,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, s *tag++ = ACT_CAT_BA; *tag++ = type; // Dialog Token - *tag++ = pBA->DialogToken; + *tag++ = pBA->dialog_token; if (ACT_ADDBARSP == type) { // Status Code @@ -382,7 +382,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) // Admit the ADDBA Request // DeActivateBAEntry(ieee, pBA); - pBA->DialogToken = *pDialogToken; + pBA->dialog_token = *pDialogToken; pBA->BaParamSet = *pBaParamSet; pBA->BaTimeoutValue = *pBaTimeoutVal; pBA->BaStartSeqCtrl = *pBaStartSeqCtrl; @@ -402,7 +402,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) struct ba_recordBA; BA.BaParamSet = *pBaParamSet; BA.BaTimeoutValue = *pBaTimeoutVal; - BA.DialogToken = *pDialogToken; + BA.dialog_token = *pDialogToken; BA.BaParamSet.field.ba_policy = BA_POLICY_IMMEDIATE; ieee80211_send_ADDBARsp(ieee, dst, &BA, rc); return 0; //we send RSP out. @@ -482,7 +482,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) // Since BA is already setup, we ignore all other ADDBA Response. IEEE80211_DEBUG(IEEE80211_DL_BA, "OnADDBARsp(): Recv ADDBA Rsp. Drop because already admit it! \n"); return -1; - } else if ((!pPendingBA->valid) || (*pDialogToken != pPendingBA->DialogToken)) { + } else if ((!pPendingBA->valid) || (*pDialogToken != pPendingBA->dialog_token)) { IEEE80211_DEBUG(IEEE80211_DL_ERR, "OnADDBARsp(): Recv ADDBA Rsp. BA invalid, DELBA! \n"); ReasonCode = DELBA_REASON_UNKNOWN_BA; goto OnADDBARsp_Reject; @@ -510,7 +510,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) // // Admitted condition // - pAdmittedBA->DialogToken = *pDialogToken; + pAdmittedBA->dialog_token = *pDialogToken; pAdmittedBA->BaTimeoutValue = *pBaTimeoutVal; pAdmittedBA->BaStartSeqCtrl = pPendingBA->BaStartSeqCtrl; pAdmittedBA->BaParamSet = *pBaParamSet; @@ -623,7 +623,7 @@ TsInitAddBA( // Set parameters to "Pending" variable set DeActivateBAEntry(ieee, pBA); - pBA->DialogToken++; // DialogToken: Only keep the latest dialog token + pBA->dialog_token++;// DialogToken: Only keep the latest dialog token pBA->BaParamSet.field.amsdu_support = 0;// Do not support A-MSDU with A-MPDU now!! pBA->BaParamSet.field.ba_policy = Policy; // Policy: Delayed or Immediate pBA->BaParamSet.field.tid = pTS->ts_common_info.t_spec.ts_info.uc_tsid; // TID -- 2.18.0 __
[PATCH 14/17] staging:rtl8192u: Rename BaParamSet - Style
Rename the member variable BaParamSet to param_set. This clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- .../staging/rtl8192u/ieee80211/rtl819x_BA.h | 2 +- .../rtl8192u/ieee80211/rtl819x_BAProc.c | 28 +-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index 94224f24..64f20c124456 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -53,7 +53,7 @@ struct ba_record { struct timer_list timer; u8 valid; u8 dialog_token; - union ba_param_set BaParamSet; + union ba_param_set param_set; u16 BaTimeoutValue; union sequence_control BaStartSeqCtrl; }; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index 21398892b0e5..f3c98b9e2765 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -90,7 +90,7 @@ static u8 RxTsDeleteBA(struct ieee80211_device *ieee, struct rx_ts_record *pRxTs void ResetBaEntry(struct ba_record *pBA) { pBA->valid = false; - pBA->BaParamSet.short_data = 0; + pBA->param_set.short_data = 0; pBA->BaTimeoutValue = 0; pBA->dialog_token = 0; pBA->BaStartSeqCtrl.short_data = 0; @@ -151,7 +151,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, s } // BA Parameter Set - put_unaligned_le16(pBA->BaParamSet.short_data, tag); + put_unaligned_le16(pBA->param_set.short_data, tag); tag += 2; // BA Timeout Value @@ -202,7 +202,7 @@ static struct sk_buff *ieee80211_DELBA( memset(&DelbaParamSet, 0, 2); DelbaParamSet.field.initiator = (TxRxSelect == TX_DIR) ? 1 : 0; - DelbaParamSet.field.tid = pBA->BaParamSet.field.tid; + DelbaParamSet.field.tid = pBA->param_set.field.tid; skb = dev_alloc_skb(len + sizeof(struct rtl_80211_hdr_3addr)); //need to add something others? FIXME if (!skb) { @@ -383,14 +383,14 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) // DeActivateBAEntry(ieee, pBA); pBA->dialog_token = *pDialogToken; - pBA->BaParamSet = *pBaParamSet; + pBA->param_set = *pBaParamSet; pBA->BaTimeoutValue = *pBaTimeoutVal; pBA->BaStartSeqCtrl = *pBaStartSeqCtrl; //for half N mode we only aggregate 1 frame if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) - pBA->BaParamSet.field.buffer_size = 1; + pBA->param_set.field.buffer_size = 1; else - pBA->BaParamSet.field.buffer_size = 32; + pBA->param_set.field.buffer_size = 32; ActivateBAEntry(ieee, pBA, pBA->BaTimeoutValue); ieee80211_send_ADDBARsp(ieee, dst, pBA, ADDBA_STATUS_SUCCESS); @@ -400,10 +400,10 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) OnADDBAReq_Fail: { struct ba_recordBA; - BA.BaParamSet = *pBaParamSet; + BA.param_set = *pBaParamSet; BA.BaTimeoutValue = *pBaTimeoutVal; BA.dialog_token = *pDialogToken; - BA.BaParamSet.field.ba_policy = BA_POLICY_IMMEDIATE; + BA.param_set.field.ba_policy = BA_POLICY_IMMEDIATE; ieee80211_send_ADDBARsp(ieee, dst, &BA, rc); return 0; //we send RSP out. } @@ -513,7 +513,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) pAdmittedBA->dialog_token = *pDialogToken; pAdmittedBA->BaTimeoutValue = *pBaTimeoutVal; pAdmittedBA->BaStartSeqCtrl = pPendingBA->BaStartSeqCtrl; - pAdmittedBA->BaParamSet = *pBaParamSet; + pAdmittedBA->param_set = *pBaParamSet; DeActivateBAEntry(ieee, pAdmittedBA); ActivateBAEntry(ieee, pAdmittedBA, *pBaTimeoutVal); } else { @@ -527,7 +527,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) OnADDBARsp_Reject: { struct ba_recordBA; - BA.BaParamSet = *pBaParamSet; + BA.param_set = *pBaParamSet; ieee80211_send_DELBA(ieee, dst, &BA, TX_DIR, ReasonCode); return 0; } @@ -
[PATCH 11/17] staging:rtl8192u: Rename member variable Timer - Style
Rename the member variable Timer to all lowercase to clear the checkpatch issue with CamelCase naming. This change is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 10 +- drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index b1697cb483ff..a36e8ecc6c59 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -50,7 +50,7 @@ union delba_param_set { }; struct ba_record { - struct timer_list Timer; + struct timer_list timer; u8 bValid; u8 DialogToken; union ba_param_set BaParamSet; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index cb84335468ab..3e88333688ea 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -20,7 +20,7 @@ static void ActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA { pBA->bValid = true; if (Time != 0) - mod_timer(&pBA->Timer, jiffies + msecs_to_jiffies(Time)); + mod_timer(&pBA->timer, jiffies + msecs_to_jiffies(Time)); } / @@ -31,7 +31,7 @@ static void ActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA static void DeActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *pBA) { pBA->bValid = false; - del_timer_sync(&pBA->Timer); + del_timer_sync(&pBA->timer); } / *function: deactivete BA entry in Tx Ts, and send DELBA. @@ -669,7 +669,7 @@ TsInitDelBA(struct ieee80211_device *ieee, struct ts_common_info *pTsCommonInfo, / void BaSetupTimeOut(struct timer_list *t) { - struct tx_ts_record *pTxTs = from_timer(pTxTs, t, tx_pending_ba_record.Timer); + struct tx_ts_record *pTxTs = from_timer(pTxTs, t, tx_pending_ba_record.timer); pTxTs->add_ba_req_in_progress = false; pTxTs->add_ba_req_delayed = true; @@ -678,7 +678,7 @@ void BaSetupTimeOut(struct timer_list *t) void TxBaInactTimeout(struct timer_list *t) { - struct tx_ts_record *pTxTs = from_timer(pTxTs, t, tx_admitted_ba_record.Timer); + struct tx_ts_record *pTxTs = from_timer(pTxTs, t, tx_admitted_ba_record.timer); struct ieee80211_device *ieee = container_of(pTxTs, struct ieee80211_device, TxTsRecord[pTxTs->num]); TxTsDeleteBA(ieee, pTxTs); ieee80211_send_DELBA( @@ -691,7 +691,7 @@ void TxBaInactTimeout(struct timer_list *t) void RxBaInactTimeout(struct timer_list *t) { - struct rx_ts_record *pRxTs = from_timer(pRxTs, t, rx_admitted_ba_record.Timer); + struct rx_ts_record *pRxTs = from_timer(pRxTs, t, rx_admitted_ba_record.timer); struct ieee80211_device *ieee = container_of(pRxTs, struct ieee80211_device, RxTsRecord[pRxTs->num]); RxTsDeleteBA(ieee, pRxTs); diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c index d46d8f468671..317d275edeb0 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c @@ -151,9 +151,9 @@ void TSInitialize(struct ieee80211_device *ieee) timer_setup(&pTxTS->ts_common_info.inact_timer, TsInactTimeout, 0); timer_setup(&pTxTS->ts_add_ba_timer, TsAddBaProcess, 0); - timer_setup(&pTxTS->tx_pending_ba_record.Timer, BaSetupTimeOut, + timer_setup(&pTxTS->tx_pending_ba_record.timer, BaSetupTimeOut, 0); - timer_setup(&pTxTS->tx_admitted_ba_record.Timer, + timer_setup(&pTxTS->tx_admitted_ba_record.timer, TxBaInactTimeout, 0); ResetTxTsEntry(pTxTS); list_add_tail(&pTxTS->ts_common_info.list, &ieee->Tx_TS_Unused_List); @@ -171,7 +171,7 @@ void TSInitialize(struct ieee80211_device *ieee) 0); timer_setup(&pRxTS->ts_common_info.inact_timer, Ts
[PATCH 05/17] staging:rtl8192u: Refactor BA_PARAM_SET - Style
Refactor the union BA_PARAM_SET, firstly removing the 'typedef', this clears the checkpatch issue with defining new types. Secondly the union is renamed to lowercase to comply with the coding standard. These are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 6 +++--- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index 6bbabd9e6562..44f820404347 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -30,7 +30,7 @@ union sequence_control { } field; }; -typedef union _BA_PARAM_SET { +union ba_param_set { u8 charData[2]; u16 shortData; struct { @@ -39,7 +39,7 @@ typedef union _BA_PARAM_SET { u16 TID:4; u16 BufferSize:10; } field; -} BA_PARAM_SET, *PBA_PARAM_SET; +}; typedef union _DELBA_PARAM_SET { u8 charData[2]; @@ -55,7 +55,7 @@ typedef struct _BA_RECORD { struct timer_list Timer; u8 bValid; u8 DialogToken; - BA_PARAM_SETBaParamSet; + union ba_param_set BaParamSet; u16 BaTimeoutValue; union sequence_control BaStartSeqCtrl; } BA_RECORD, *PBA_RECORD; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index 643fd891f476..469e3e9a0d2e 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -322,7 +322,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) u16 rc = 0; u8 *dst = NULL, *pDialogToken = NULL, *tag = NULL; PBA_RECORD pBA = NULL; - PBA_PARAM_SET pBaParamSet = NULL; + union ba_param_set *pBaParamSet = NULL; u16 *pBaTimeoutVal = NULL; union sequence_control *pBaStartSeqCtrl = NULL; struct rx_ts_record *pTS = NULL; @@ -342,7 +342,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) dst = &req->addr2[0]; tag += sizeof(struct rtl_80211_hdr_3addr); pDialogToken = tag + 2; //category+action - pBaParamSet = (PBA_PARAM_SET)(tag + 3); //+DialogToken + pBaParamSet = (union ba_param_set *)(tag + 3); //+DialogToken pBaTimeoutVal = (u16 *)(tag + 5); pBaStartSeqCtrl = (union sequence_control *)(req + 7); @@ -423,7 +423,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) struct tx_ts_record *pTS = NULL; u8 *dst = NULL, *pDialogToken = NULL, *tag = NULL; u16 *pStatusCode = NULL, *pBaTimeoutVal = NULL; - PBA_PARAM_SET pBaParamSet = NULL; + union ba_param_set *pBaParamSet = NULL; u16 ReasonCode; if (skb->len < sizeof(struct rtl_80211_hdr_3addr) + 9) { @@ -439,7 +439,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) tag += sizeof(struct rtl_80211_hdr_3addr); pDialogToken = tag + 2; pStatusCode = (u16 *)(tag + 3); - pBaParamSet = (PBA_PARAM_SET)(tag + 5); + pBaParamSet = (union ba_param_set *)(tag + 5); pBaTimeoutVal = (u16 *)(tag + 7); // Check the capability -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/17] staging:rtl8192u: Rename BaStartSeqCtrl - Style
Rename BaStartSeqCtrl to start_seq_ctrl. This change clears the checkpatch issue with CamelCase naming. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 10 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c index a7850b04c81b..024fa2702546 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c @@ -342,7 +342,7 @@ static void ieee80211_tx_query_agg_cap(struct ieee80211_device *ieee, } else if (!pTxTs->using_ba) { - if (SN_LESS(pTxTs->tx_admitted_ba_record.BaStartSeqCtrl.field.seq_num, (pTxTs->tx_cur_seq + 1) % 4096)) + if (SN_LESS(pTxTs->tx_admitted_ba_record.start_seq_ctrl.field.seq_num, (pTxTs->tx_cur_seq + 1) % 4096)) pTxTs->using_ba = true; else goto FORCED_AGG_SETTING; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index 01c30b1f44d2..1a494ecf05ac 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -55,7 +55,7 @@ struct ba_record { u8 dialog_token; union ba_param_set param_set; u16 timeout_value; - union sequence_control BaStartSeqCtrl; + union sequence_control start_seq_ctrl; }; #endif //end _BATYPE_H_ diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index 102252749c0b..109445407cec 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -93,7 +93,7 @@ void ResetBaEntry(struct ba_record *pBA) pBA->param_set.short_data = 0; pBA->timeout_value = 0; pBA->dialog_token = 0; - pBA->BaStartSeqCtrl.short_data = 0; + pBA->start_seq_ctrl.short_data = 0; } //These functions need porting here or not? /*** @@ -160,7 +160,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, s if (ACT_ADDBAREQ == type) { // BA Start SeqCtrl - memcpy(tag, (u8 *)&(pBA->BaStartSeqCtrl), 2); + memcpy(tag, (u8 *)&(pBA->start_seq_ctrl), 2); tag += 2; } @@ -385,7 +385,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) pBA->dialog_token = *pDialogToken; pBA->param_set = *pBaParamSet; pBA->timeout_value = *pBaTimeoutVal; - pBA->BaStartSeqCtrl = *pBaStartSeqCtrl; + pBA->start_seq_ctrl = *pBaStartSeqCtrl; //for half N mode we only aggregate 1 frame if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) pBA->param_set.field.buffer_size = 1; @@ -512,7 +512,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) // pAdmittedBA->dialog_token = *pDialogToken; pAdmittedBA->timeout_value = *pBaTimeoutVal; - pAdmittedBA->BaStartSeqCtrl = pPendingBA->BaStartSeqCtrl; + pAdmittedBA->start_seq_ctrl = pPendingBA->start_seq_ctrl; pAdmittedBA->param_set = *pBaParamSet; DeActivateBAEntry(ieee, pAdmittedBA); ActivateBAEntry(ieee, pAdmittedBA, *pBaTimeoutVal); @@ -630,7 +630,7 @@ TsInitAddBA( // buffer_size: This need to be set according to A-MPDU vector pBA->param_set.field.buffer_size = 32; // buffer_size: This need to be set according to A-MPDU vector pBA->timeout_value = 0; // Timeout value: Set 0 to disable Timer - pBA->BaStartSeqCtrl.field.seq_num = (pTS->tx_cur_seq + 3) % 4096; // Block Ack will start after 3 packets later. + pBA->start_seq_ctrl.field.seq_num = (pTS->tx_cur_seq + 3) % 4096; // Block Ack will start after 3 packets later. ActivateBAEntry(ieee, pBA, BA_SETUP_TIMEOUT); -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 17/17] staging:rtl8192u: Remove commented out code and indent - Style
Remove old commented out structure and clean up the indentation. These are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- .../staging/rtl8192u/ieee80211/rtl819x_BA.h | 47 --- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index 1a494ecf05ac..1a727856ba53 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -2,26 +2,19 @@ #ifndef _BATYPE_H_ #define _BATYPE_H_ -#defineBA_SETUP_TIMEOUT200 +#defineBA_SETUP_TIMEOUT 200 -#defineBA_POLICY_DELAYED 0 -#defineBA_POLICY_IMMEDIATE 1 +#defineBA_POLICY_DELAYED0 +#defineBA_POLICY_IMMEDIATE 1 -#defineADDBA_STATUS_SUCCESS0 +#defineADDBA_STATUS_SUCCESS 0 #defineADDBA_STATUS_REFUSED37 #defineADDBA_STATUS_INVALID_PARAM 38 -#defineDELBA_REASON_END_BA 37 -#defineDELBA_REASON_UNKNOWN_BA 38 -#defineDELBA_REASON_TIMEOUT39 -/* whether need define BA Action frames here? -struct ieee80211_ADDBA_Req{ - struct ieee80211_header_data header; - u8 category; - u8 -} __attribute__ ((packed)); -*/ -//Is this need?I put here just to make it easier to define structure BA_RECORD //WB +#defineDELBA_REASON_END_BA 37 +#defineDELBA_REASON_UNKNOWN_BA 38 +#defineDELBA_REASON_TIMEOUT39 + union sequence_control { u16 short_data; struct { @@ -33,28 +26,28 @@ union sequence_control { union ba_param_set { u16 short_data; struct { - u16 amsdu_support:1; - u16 ba_policy:1; - u16 tid:4; - u16 buffer_size:10; + u16 amsdu_support:1; + u16 ba_policy:1; + u16 tid:4; + u16 buffer_size:10; } field; }; union delba_param_set { u16 short_data; struct { - u16 reserved:11; - u16 initiator:1; - u16 tid:4; + u16 reserved:11; + u16 initiator:1; + u16 tid:4; } field; }; struct ba_record { - struct timer_list timer; - u8 valid; - u8 dialog_token; - union ba_param_set param_set; - u16 timeout_value; + struct timer_list timer; + u8 valid; + u8 dialog_token; + union ba_param_set param_set; + u16 timeout_value; union sequence_control start_seq_ctrl; }; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 15/17] staging:rtl8192u: Rename BaTimeoutValue - Style
Rename BaTimeoutValue to timeout_value. This clears checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h| 2 +- .../staging/rtl8192u/ieee80211/rtl819x_BAProc.c| 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h index 64f20c124456..01c30b1f44d2 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h @@ -54,7 +54,7 @@ struct ba_record { u8 valid; u8 dialog_token; union ba_param_set param_set; - u16 BaTimeoutValue; + u16 timeout_value; union sequence_control BaStartSeqCtrl; }; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index f3c98b9e2765..102252749c0b 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -91,7 +91,7 @@ void ResetBaEntry(struct ba_record *pBA) { pBA->valid = false; pBA->param_set.short_data = 0; - pBA->BaTimeoutValue = 0; + pBA->timeout_value = 0; pBA->dialog_token = 0; pBA->BaStartSeqCtrl.short_data = 0; } @@ -155,7 +155,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, s tag += 2; // BA Timeout Value - put_unaligned_le16(pBA->BaTimeoutValue, tag); + put_unaligned_le16(pBA->timeout_value, tag); tag += 2; if (ACT_ADDBAREQ == type) { @@ -384,14 +384,14 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) DeActivateBAEntry(ieee, pBA); pBA->dialog_token = *pDialogToken; pBA->param_set = *pBaParamSet; - pBA->BaTimeoutValue = *pBaTimeoutVal; + pBA->timeout_value = *pBaTimeoutVal; pBA->BaStartSeqCtrl = *pBaStartSeqCtrl; //for half N mode we only aggregate 1 frame if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) pBA->param_set.field.buffer_size = 1; else pBA->param_set.field.buffer_size = 32; - ActivateBAEntry(ieee, pBA, pBA->BaTimeoutValue); + ActivateBAEntry(ieee, pBA, pBA->timeout_value); ieee80211_send_ADDBARsp(ieee, dst, pBA, ADDBA_STATUS_SUCCESS); // End of procedure. @@ -401,7 +401,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) { struct ba_recordBA; BA.param_set = *pBaParamSet; - BA.BaTimeoutValue = *pBaTimeoutVal; + BA.timeout_value = *pBaTimeoutVal; BA.dialog_token = *pDialogToken; BA.param_set.field.ba_policy = BA_POLICY_IMMEDIATE; ieee80211_send_ADDBARsp(ieee, dst, &BA, rc); @@ -511,7 +511,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) // Admitted condition // pAdmittedBA->dialog_token = *pDialogToken; - pAdmittedBA->BaTimeoutValue = *pBaTimeoutVal; + pAdmittedBA->timeout_value = *pBaTimeoutVal; pAdmittedBA->BaStartSeqCtrl = pPendingBA->BaStartSeqCtrl; pAdmittedBA->param_set = *pBaParamSet; DeActivateBAEntry(ieee, pAdmittedBA); @@ -629,7 +629,7 @@ TsInitAddBA( pBA->param_set.field.tid = pTS->ts_common_info.t_spec.ts_info.uc_tsid; // TID // buffer_size: This need to be set according to A-MPDU vector pBA->param_set.field.buffer_size = 32; // buffer_size: This need to be set according to A-MPDU vector - pBA->BaTimeoutValue = 0;// Timeout value: Set 0 to disable Timer + pBA->timeout_value = 0; // Timeout value: Set 0 to disable Timer pBA->BaStartSeqCtrl.field.seq_num = (pTS->tx_cur_seq + 3) % 4096; // Block Ack will start after 3 packets later. ActivateBAEntry(ieee, pBA, BA_SETUP_TIMEOUT); -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/21] staging:rtl8192u: Refactor enum VERSION_819xU - Style
Rename enumerated type VERSION_819xU to version_819xu to clear checkpatch issue with CamelCase naming. Additionally the constants defined by the type are renamed for the same reason. Remove the 'typedef' directive to clear the checkpatch issue with defining new types. The enumerated type has been moved to the file where the type is actually used, r8192U.h Additionally the memeber variable, which uses the type (card_8192_version), has been changed to use the type to enable compiler typechecking. These are coding style changes which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8190_rtl8256.c | 6 +++--- drivers/staging/rtl8192u/r8192U.h| 8 +++- drivers/staging/rtl8192u/r8192U_core.c | 8 drivers/staging/rtl8192u/r8192U_hw.h | 5 - drivers/staging/rtl8192u/r819xU_phy.c| 4 ++-- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index 9b7f822e9762..e60da2358343 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c @@ -37,9 +37,9 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev, enum ht_channel_width Bandwi switch (Bandwidth) { case HT_CHANNEL_WIDTH_20: - if (priv->card_8192_version == VERSION_819xU_A + if (priv->card_8192_version == VERSION_819XU_A || priv->card_8192_version - == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */ + == VERSION_819XU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */ rtl8192_phy_SetRFReg(dev, (enum rf90_radio_path_e)eRFPath, 0x0b, bMask12Bits, 0x100); /* phy para:1ba */ @@ -57,7 +57,7 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev, enum ht_channel_width Bandwi } break; case HT_CHANNEL_WIDTH_20_40: - if (priv->card_8192_version == VERSION_819xU_A || priv->card_8192_version == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */ + if (priv->card_8192_version == VERSION_819XU_A || priv->card_8192_version == VERSION_819XU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */ rtl8192_phy_SetRFReg(dev, (enum rf90_radio_path_e)eRFPath, 0x0b, bMask12Bits, 0x300); /* phy para:3ba */ rtl8192_phy_SetRFReg(dev, (enum rf90_radio_path_e)eRFPath, 0x2c, bMask12Bits, 0x3df); rtl8192_phy_SetRFReg(dev, (enum rf90_radio_path_e)eRFPath, 0x0e, bMask12Bits, 0x0a1); diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 94a148994069..ce287e2f79e1 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -798,6 +798,12 @@ typedef enum _tag_TxCmd_Config_Index { TXCMD__CTRL, } DCMD_TXCMD_OP; +enum version_819xu { + VERSION_819XU_A, // A-cut + VERSION_819XU_B, // B-cut + VERSION_819XU_C,// C-cut +}; + typedef struct r8192_priv { struct usb_device *udev; /* For maintain info from eeprom */ @@ -815,7 +821,7 @@ typedef struct r8192_priv { /* O: rtl8192, 1: rtl8185 V B/C, 2: rtl8185 V D */ short card_8192; /* If TCR reports card V B/C, this discriminates */ - u8 card_8192_version; + enum version_819xu card_8192_version; short enable_gpio0; enum card_type { PCI, MINIPCI, CARDBUS, USB diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index e218b5c20642..3b89f2669754 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2395,7 +2395,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) } else { priv->eeprom_vid = 0; priv->eeprom_pid = 0; - priv->card_8192_version = VERSION_819xU_B; + priv->card_8192_version = VERSION_819XU_B; priv->eeprom_ChannelPlan = 0; priv->eeprom_CustomerID = 0; } @@ -2422,7 +2422,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) priv->rf_type = RTL819X_DEFAULT_RF_TYPE; /* default 1T2R */ priv->rf_chip = RF_8256; - if (priv->card_8192_version == (u8)VERSION_819xU_A) { + if (priv->card_8192_version == VERSION_819XU_A) { /* read Tx power gain offset of l
[PATCH 02/21] staging:rtl8192u: Refactor RT_RF_TYPE_DEF - Style
Rename the enumerated type RT_RF_TYPE_DEF to rt_rf_type to comply with the coding standard, lower case type names. Removed the 'def' postscript which provides no additional information. The 'typedef' directive has been removed to clear the checkpatch issue with defining new types. The type has been moved to the file r8192U.h, where it is actually used by the member variable 'rf_type'. Previously the member variable used a 'u8' type so no compiler type checking is being performed. The type has been changed to the correct type. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h| 8 +++- drivers/staging/rtl8192u/r8192U_hw.h | 9 - 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index ce287e2f79e1..1b51601df1ee 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -804,6 +804,12 @@ enum version_819xu { VERSION_819XU_C,// C-cut }; +//added for different RF type +enum rt_rf_type { + RF_1T2R = 0, + RF_2T4R, +}; + typedef struct r8192_priv { struct usb_device *udev; /* For maintain info from eeprom */ @@ -844,7 +850,7 @@ typedef struct r8192_priv { struct mutex wx_mutex; - u8 rf_type; /* 0: 1T2R, 1: 2T4R */ + enum rt_rf_type rf_type; /* 0: 1T2R, 1: 2T4R */ RT_RF_TYPE_819xU rf_chip; short (*rf_set_sens)(struct net_device *dev, short sens); diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index 15e56003d97c..f91dd20fa568 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -20,15 +20,6 @@ #ifndef R8192_HW #define R8192_HW -//added for different RF type -typedef enum _RT_RF_TYPE_DEF { - RF_1T2R = 0, - RF_2T4R, - - RF_819X_MAX_TYPE -} RT_RF_TYPE_DEF; - - typedef enum _BaseBand_Config_Type { BaseBand_Config_PHY_REG = 0,//Radio Path A BaseBand_Config_AGC_TAB = 1,//Radio Path B -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/21] staging:rtl8192u: Rename EEPROM_TxPowerDiff - Style
Rename EEPROM_TxPowerDiff to EEPROM_TX_POWER_DIFF. This change clears the checkpatch issue with CamelCase naming. This change is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- drivers/staging/rtl8192u/r8192U_hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 3b89f2669754..913b8ed9dc56 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2425,7 +2425,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) if (priv->card_8192_version == VERSION_819XU_A) { /* read Tx power gain offset of legacy OFDM to HT rate */ if (bLoad_From_EEPOM) { - ret = eprom_read(dev, (EEPROM_TxPowerDiff >> 1)); + ret = eprom_read(dev, (EEPROM_TX_POWER_DIFF >> 1)); if (ret < 0) return ret; priv->EEPROMTxPowerDiff = ((u16)ret & 0xff00) >> 8; diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index 22f837f5b709..9b235579e8fd 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -37,7 +37,7 @@ #define EEPROM_PID 0x04 #define EEPROM_NODE_ADDRESS_BYTE_0 0x0C -#define EEPROM_TxPowerDiff 0x1F +#define EEPROM_TX_POWER_DIFF 0x1F #define EEPROM_ThermalMeter0x20 #define EEPROM_PwDiff 0x21//0x21 #define EEPROM_CrystalCap 0x22//0x22 -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/21] staging:rtl8192u: Rename EEPROM_ThermalMeter - Style
Rename EEPROM_ThermalMeter to EEPROM_THERMAL_METER. This change clears the checkpatch issue with CamelCase naming. This change is a coding style change which should not impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- drivers/staging/rtl8192u/r8192U_hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 913b8ed9dc56..5c9581bb4916 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2434,7 +2434,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) RT_TRACE(COMP_EPROM, "TxPowerDiff:%d\n", priv->EEPROMTxPowerDiff); /* read ThermalMeter from EEPROM */ if (bLoad_From_EEPOM) { - ret = eprom_read(dev, (EEPROM_ThermalMeter >> 1)); + ret = eprom_read(dev, (EEPROM_THERMAL_METER >> 1)); if (ret < 0) return ret; priv->EEPROMThermalMeter = (u8)((u16)ret & 0x00ff); diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index 9b235579e8fd..8a94a159e16c 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -38,7 +38,7 @@ #define EEPROM_NODE_ADDRESS_BYTE_0 0x0C #define EEPROM_TX_POWER_DIFF 0x1F -#define EEPROM_ThermalMeter0x20 +#define EEPROM_THERMAL_METER 0x20 #define EEPROM_PwDiff 0x21//0x21 #define EEPROM_CrystalCap 0x22//0x22 -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/21] staging:rtl8192u: Rename EEPROM_TxPwIndex_OFDM_24G - Style
Rename the constant EEPROM_TxPwIndex_OFDM_24G to EEPROM_TX_PW_INDEX_OFDM_24G, this change clears the checkpatch issue with CamelCase naming. This change is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_core.c | 4 ++-- drivers/staging/rtl8192u/r8192U_hw.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 7189249a898f..3742dd8410b2 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2483,10 +2483,10 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) RT_TRACE(COMP_EPROM, "CCK Tx Power Levl: 0x%02x\n", priv->EEPROMTxPowerLevelCCK); for (i = 0; i < 3; i++) { if (bLoad_From_EEPOM) { - ret = eprom_read(dev, (EEPROM_TxPwIndex_OFDM_24G + i) >> 1); + ret = eprom_read(dev, (EEPROM_TX_PW_INDEX_OFDM_24G + i) >> 1); if (ret < 0) return ret; - if (((EEPROM_TxPwIndex_OFDM_24G + i) % 2) == 0) + if (((EEPROM_TX_PW_INDEX_OFDM_24G + i) % 2) == 0) tmpValue = (u16)ret & 0x00ff; else tmpValue = ((u16)ret & 0xff00) >> 8; diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index 4cf3a7fc705e..a7d1a7f9faf0 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -43,7 +43,7 @@ #define EEPROM_CRYSTAL_CAP 0x22//0x22 #define EEPROM_TX_PW_INDEX_CCK 0x23//0x23 -#define EEPROM_TxPwIndex_OFDM_24G 0x24//0x24~0x26 +#define EEPROM_TX_PW_INDEX_OFDM_24G0x24//0x24~0x26 #define EEPROM_TxPwIndex_CCK_V10x29//0x29~0x2B #define EEPROM_TX_PW_INDEX_OFDM_24G_V1 0x2C//0x2C~0x2E #define EEPROM_TxPwIndex_Ver 0x27//0x27 -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/21] staging:rtl8192u: Refactor BaseBand_Config_Type - Style
Rename the type to baseband_config_type to clear the checkpatch issue with CamelCase naming. Remove the 'typedef' directive to clear the issue with defining new types. As it is only used in the file r819xU_phy.c the type has been moved to the r819xU_phy.h file. The enumerated type is only used as a parameter to the function rtl8192_phyConfigBB. Previously that parameter used type 'u8' so no compiler typechecking was being performed. The parameter type has been corrected. These changes are coding style changes and as such should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_hw.h | 4 drivers/staging/rtl8192u/r819xU_phy.c | 11 ++- drivers/staging/rtl8192u/r819xU_phy.h | 5 + 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index f91dd20fa568..0b5fb42e5427 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -20,10 +20,6 @@ #ifndef R8192_HW #define R8192_HW -typedef enum _BaseBand_Config_Type { - BaseBand_Config_PHY_REG = 0,//Radio Path A - BaseBand_Config_AGC_TAB = 1,//Radio Path B -} BaseBand_Config_Type, *PBaseBand_Config_Type; #defineRTL8187_REQT_READ 0xc0 #defineRTL8187_REQT_WRITE 0x40 #defineRTL8187_REQ_GET_REGS0x05 diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c index a6d7ad1f6d79..ee1e39e887ff 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c @@ -511,7 +511,8 @@ void rtl8192_phy_configmac(struct net_device *dev) * notice:BB parameters may change all the time, so please make *sure it has been synced with the newest. */ -static void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType) +static void rtl8192_phyConfigBB(struct net_device *dev, + enum baseband_config_type ConfigType) { u32 i; @@ -525,7 +526,7 @@ static void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType) Rtl8190AGCTAB_Array_Table = Rtl819XAGCTAB_ArrayDTM; } #endif - if (ConfigType == BaseBand_Config_PHY_REG) { + if (ConfigType == BASEBAND_CONFIG_PHY_REG) { for (i = 0; i < PHY_REG_1T2RArrayLength; i += 2) { rtl8192_setBBreg(dev, Rtl8192UsbPHY_REG_1T2RArray[i], bMaskDWord, @@ -535,7 +536,7 @@ static void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType) i, Rtl8192UsbPHY_REG_1T2RArray[i], Rtl8192UsbPHY_REG_1T2RArray[i+1]); } - } else if (ConfigType == BaseBand_Config_AGC_TAB) { + } else if (ConfigType == BASEBAND_CONFIG_AGC_TAB) { for (i = 0; i < AGCTAB_ArrayLength; i += 2) { rtl8192_setBBreg(dev, Rtl8192UsbAGCTAB_Array[i], bMaskDWord, Rtl8192UsbAGCTAB_Array[i+1]); @@ -802,7 +803,7 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev) rtl8192_setBBreg(dev, rFPGA0_RFMOD, bCCKEn|bOFDMEn, 0x0); /* BB Register Initilazation */ /* ==m==>Set PHY REG From Header<==m== */ - rtl8192_phyConfigBB(dev, BaseBand_Config_PHY_REG); + rtl8192_phyConfigBB(dev, BASEBAND_CONFIG_PHY_REG); /* Set BB reset de-Active */ read_nic_dword(dev, CPU_GEN, ®_u32); @@ -810,7 +811,7 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev) /* BB AGC table Initialization */ /* ==m==>Set PHY REG From Header<==m== */ - rtl8192_phyConfigBB(dev, BaseBand_Config_AGC_TAB); + rtl8192_phyConfigBB(dev, BASEBAND_CONFIG_AGC_TAB); /* Enable XSTAL */ write_nic_byte_E(dev, 0x5e, 0x00); diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h index c938fd8eb51c..8c2933264407 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.h +++ b/drivers/staging/rtl8192u/r819xU_phy.h @@ -7,6 +7,11 @@ #define MAX_RFDEPENDCMD_CNT 16 #define MAX_POSTCMD_CNT 16 +enum baseband_config_type { + BASEBAND_CONFIG_PHY_REG = 0,//Radio Path A + BASEBAND_CONFIG_AGC_TAB = 1,//Radio Path B +}; + enum switch_chan_cmd_id { CMD_ID_END, CMD_ID_SET_TX_PWR_LEVEL, -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/21] staging:rtl8192u: Make function rtl8192_phyConfigBB static
The function rtl8192_phyConfigBB is only used in the file in which it is defined so can be declared static. Additionally the prototype has been removed from the header file, as it is not used. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r819xU_phy.c | 2 +- drivers/staging/rtl8192u/r819xU_phy.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c index 8e6ed20848d8..a6d7ad1f6d79 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c @@ -511,7 +511,7 @@ void rtl8192_phy_configmac(struct net_device *dev) * notice:BB parameters may change all the time, so please make *sure it has been synced with the newest. */ -void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType) +static void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType) { u32 i; diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h index c7ec3182857f..c938fd8eb51c 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.h +++ b/drivers/staging/rtl8192u/r819xU_phy.h @@ -52,7 +52,6 @@ u32 rtl8192_phy_QueryRFReg(struct net_device *dev, enum rf90_radio_path_e e_rfpath, u32 reg_addr, u32 bitmask); void rtl8192_phy_configmac(struct net_device *dev); -void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType); u8 rtl8192_phy_checkBBAndRF(struct net_device *dev, enum hw90_block_e CheckBlock, enum rf90_radio_path_e e_rfpath); -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/21] staging:rtl8192u: Rename EEPROM_PwDiff - Style
Rename the constant EEPROM_PwDiff to EEPROM_PW_DIFF. This change clears the checkpatch issue with CamelCase naming. This is a coding style change which should not impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- drivers/staging/rtl8192u/r8192U_hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 5c9581bb4916..190d8e139b14 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2445,7 +2445,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) priv->TSSI_13dBm = priv->EEPROMThermalMeter * 100; /* read antenna tx power offset of B/C/D to A from EEPROM */ if (bLoad_From_EEPOM) { - ret = eprom_read(dev, (EEPROM_PwDiff >> 1)); + ret = eprom_read(dev, (EEPROM_PW_DIFF >> 1)); if (ret < 0) return ret; priv->EEPROMPwDiff = ((u16)ret & 0x0f00) >> 8; diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index 8a94a159e16c..c673e1e4083c 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -39,7 +39,7 @@ #define EEPROM_TX_POWER_DIFF 0x1F #define EEPROM_THERMAL_METER 0x20 -#define EEPROM_PwDiff 0x21//0x21 +#define EEPROM_PW_DIFF 0x21//0x21 #define EEPROM_CrystalCap 0x22//0x22 #define EEPROM_TxPwIndex_CCK 0x23//0x23 -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/21] staging:rtl8192u: Remove unused definitions - Style
Remove unused definitions from the r8192U_hw.h header file. These are coding style changes which should not impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_hw.h | 149 +-- 1 file changed, 1 insertion(+), 148 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index 0b5fb42e5427..ddb88fa098d5 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -29,24 +29,9 @@ #define MAX_RX_URB 16 #define R8180_MAX_RETRY 255 -//#define MAX_RX_NORMAL_URB 3 -//#define MAX_RX_COMMAND_URB 2 -#define RX_URB_SIZE 9100 - -#define BB_ANTATTEN_CHAN14 0x0c -#define BB_ANTENNA_B 0x40 -#define BB_HOST_BANG BIT(30) -#define BB_HOST_BANG_ENBIT(2) -#define BB_HOST_BANG_CLK BIT(1) -#define BB_HOST_BANG_RWBIT(3) -#define BB_HOST_BANG_DATA 1 +#define RX_URB_SIZE 9100 -//#if (RTL819X_FPGA_VER & RTL819X_FPGA_VIVI_070920) -#define AFR0x010 -#define AFR_CardBEnBIT(0) -#define AFR_CLKRUN_SEL BIT(1) -#define AFR_FuncRegEn BIT(2) #define RTL8190_EEPROM_ID 0x8129 #define EEPROM_VID 0x02 #define EEPROM_PID 0x04 @@ -63,24 +48,14 @@ #define EEPROM_TxPwIndex_OFDM_24G_V1 0x2C//0x2C~0x2E #define EEPROM_TxPwIndex_Ver 0x27//0x27 -#define EEPROM_Default_TxPowerDiff 0x0 #define EEPROM_Default_ThermalMeter0x7 #define EEPROM_Default_PwDiff 0x4 #define EEPROM_Default_CrystalCap 0x5 #define EEPROM_Default_TxPower 0x1010 #define EEPROM_Customer_ID 0x7B//0x7B:CustomerID #define EEPROM_ChannelPlan 0x16//0x7C -#define EEPROM_IC_VER 0x7d//0x7D -#define EEPROM_CRC 0x7e//0x7E~0x7F -#define EEPROM_CID_DEFAULT 0x0 -#define EEPROM_CID_CAMEO 0x1 #define EEPROM_CID_RUNTOP 0x2 -#define EEPROM_CID_Senao 0x3 -#define EEPROM_CID_TOSHIBA 0x4 // Toshiba setting, Merge by Jacken, 2008/01/31 -#define EEPROM_CID_NetCore 0x5 -#define EEPROM_CID_Nettronix 0x6 -#define EEPROM_CID_Pronet 0x7 #define EEPROM_CID_DLINK 0x8 #define AC_PARAM_TXOP_LIMIT_OFFSET 16 @@ -91,17 +66,13 @@ //#endif enum _RTL8192Usb_HW { - PCIF= 0x009, // PCI Function Register 0x0009h~0x000bh #defineBB_GLOBAL_RESET_BIT 0x1 BB_GLOBAL_RESET = 0x020, // BasebandGlobal Reset Register BSSIDR = 0x02E, // BSSID Register CMDR= 0x037, // Command register -#define CR_RST 0x10 #define CR_RE 0x08 #define CR_TE 0x04 -#define CR_MulRW 0x01 SIFS= 0x03E, // SIFS register - TCR = 0x040, // Transmit Configuration Register #define TCR_MXDMA_2048 7 #define TCR_LRL_OFFSET 0 @@ -114,26 +85,16 @@ enum _RTL8192Usb_HW { BIT(22) | BIT(23)) #define RX_FIFO_THRESHOLD_MASK (BIT(13) | BIT(14) | BIT(15)) #define RX_FIFO_THRESHOLD_SHIFT 13 -#define RX_FIFO_THRESHOLD_128 3 -#define RX_FIFO_THRESHOLD_256 4 -#define RX_FIFO_THRESHOLD_512 5 -#define RX_FIFO_THRESHOLD_1024 6 #define RX_FIFO_THRESHOLD_NONE 7 #define MAX_RX_DMA_MASK(BIT(8) | BIT(9) | BIT(10)) #define RCR_MXDMA_OFFSET 8 #define RCR_FIFO_OFFSET13 #define RCR_ONLYERLPKT BIT(31) // Early Receiving based on Packet Size. -#define RCR_ENCS2 BIT(30) // Enable Carrier Sense Detection Method 2 -#define RCR_ENCS1 BIT(29) // Enable Carrier Sense Detection Method 1 -#define RCR_ENMBID BIT(27) // Enable Multiple BssId. -#define RCR_ACKTXBW(BIT(24) | BIT(25)) // TXBW Setting of ACK frames #define RCR_CBSSID BIT(23) // Accept BSSID match packet #define RCR_APWRMGTBIT(22) // Accept power management packet -#defineRCR_ADD3BIT(21) // Accept address 3 match packet #define RCR_AMFBIT(20) // Accept management type frame #define RCR_ACFBIT(19) // Accept control type frame #define RCR_ADFBIT(18) // Accept data type frame -#define RCR_RXFTH BIT(13) // Rx FIFO Threshold #define RCR_AICV BIT(12) // Accept ICV error pa
[PATCH 15/21] staging:rtl8192u: rename EEPROM_TxPwIndex_Ver - Style
Rename the constant EEPROM_TxPwIndex_Ver to EEPROM_TX_PW_INDEX_VER, this clears the checkpatch issue with CamelCase naming. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- drivers/staging/rtl8192u/r8192U_hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 67b4597d351e..836be2a0b330 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2463,7 +2463,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) RT_TRACE(COMP_EPROM, "CrystalCap = %d\n", priv->EEPROMCrystalCap); /* get per-channel Tx power level */ if (bLoad_From_EEPOM) { - ret = eprom_read(dev, (EEPROM_TxPwIndex_Ver >> 1)); + ret = eprom_read(dev, (EEPROM_TX_PW_INDEX_VER >> 1)); if (ret < 0) return ret; priv->EEPROM_Def_Ver = ((u16)ret & 0xff00) >> 8; diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index d7f830bf9e94..f98e6c2cf414 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -46,7 +46,7 @@ #define EEPROM_TX_PW_INDEX_OFDM_24G0x24//0x24~0x26 #define EEPROM_TX_PW_INDEX_CCK_V1 0x29//0x29~0x2B #define EEPROM_TX_PW_INDEX_OFDM_24G_V1 0x2C//0x2C~0x2E -#define EEPROM_TxPwIndex_Ver 0x27//0x27 +#define EEPROM_TX_PW_INDEX_VER 0x27//0x27 #define EEPROM_Default_ThermalMeter0x7 #define EEPROM_Default_PwDiff 0x4 -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 17/21] staging:rtl8192u: Rename EEPROM_Default_PwDiff - Style
Rename the constant EEPROM_Default_PwDiff to EEPROM_DEFAULT_PW_DIFF, this clears the checkpatch issue with CamelCase naming. This change is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- drivers/staging/rtl8192u/r8192U_hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index b2853b90c496..adc8d2e7fb61 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2450,7 +2450,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) return ret; priv->EEPROMPwDiff = ((u16)ret & 0x0f00) >> 8; } else - priv->EEPROMPwDiff = EEPROM_Default_PwDiff; + priv->EEPROMPwDiff = EEPROM_DEFAULT_PW_DIFF; RT_TRACE(COMP_EPROM, "TxPwDiff:%d\n", priv->EEPROMPwDiff); /* Read CrystalCap from EEPROM */ if (bLoad_From_EEPOM) { diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index b485c7781d77..79826e289207 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -49,7 +49,7 @@ #define EEPROM_TX_PW_INDEX_VER 0x27//0x27 #define EEPROM_DEFAULT_THERNAL_METER 0x7 -#define EEPROM_Default_PwDiff 0x4 +#define EEPROM_DEFAULT_PW_DIFF 0x4 #define EEPROM_Default_CrystalCap 0x5 #define EEPROM_Default_TxPower 0x1010 #define EEPROM_Customer_ID 0x7B//0x7B:CustomerID -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/21] staging:rtl8192u: Reorder enum _RTL8192Usb_HW members - Style
Reorder the members of enum _RTL8192Usb_HW so that they are in order. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_hw.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index ddb88fa098d5..22f837f5b709 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -65,6 +65,8 @@ //#endif enum _RTL8192Usb_HW { + MAC0= 0x000, + MAC4= 0x004, #defineBB_GLOBAL_RESET_BIT 0x1 BB_GLOBAL_RESET = 0x020, // BasebandGlobal Reset Register @@ -180,8 +182,8 @@ enum _RTL8192Usb_HW { #define RRSR_48M BIT(10) #define RRSR_54M BIT(11) #define BRSR_AckShortPmb BIT(23) // CCK ACK: use Short Preamble or not. - RATR0 = 0x320, // Rate Adaptive Table register1 UFWP= 0x318, + RATR0 = 0x320, // Rate Adaptive Table register1 DRIVER_RSSI = 0x32c, // Driver tell Firmware current RSSI // // 8190 Rate Adaptive Table Register (offset 0x320, 4 byte) @@ -236,9 +238,6 @@ enum _RTL8192Usb_HW { #define EPROM_CK_BIT BIT(2) #define EPROM_W_BIT BIT(1) #define EPROM_R_BIT BIT(0) - - MAC0= 0x000, - MAC4= 0x004, }; // // 818xB AnaParm & AnaParm2 Register -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/21] staging:rtl8192u: Rename EEPROM_TxPwIndex_OFDM_24G_V1 - STYLE
Rename the constant EEPROM_TxPwIndex_OFDM_24G_V1 to EEPROM_TX_PW_INDEX_OFDM_24G_V1, this change clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_core.c | 4 ++-- drivers/staging/rtl8192u/r8192U_hw.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 83a61fcab53b..7189249a898f 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2517,12 +2517,12 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) *((u16 *)(&priv->EEPROMTxPowerLevelCCK_V1[1])) = tmpValue; if (bLoad_From_EEPOM) tmpValue = eprom_read(dev, - EEPROM_TxPwIndex_OFDM_24G_V1 >> 1); + EEPROM_TX_PW_INDEX_OFDM_24G_V1 >> 1); else tmpValue = 0x1010; *((u16 *)(&priv->EEPROMTxPowerLevelOFDM24G[0])) = tmpValue; if (bLoad_From_EEPOM) - tmpValue = eprom_read(dev, (EEPROM_TxPwIndex_OFDM_24G_V1 + 2) >> 1); + tmpValue = eprom_read(dev, (EEPROM_TX_PW_INDEX_OFDM_24G_V1 + 2) >> 1); else tmpValue = 0x10; priv->EEPROMTxPowerLevelOFDM24G[2] = (u8)tmpValue; diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index 437bb9212e47..4cf3a7fc705e 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -45,7 +45,7 @@ #define EEPROM_TX_PW_INDEX_CCK 0x23//0x23 #define EEPROM_TxPwIndex_OFDM_24G 0x24//0x24~0x26 #define EEPROM_TxPwIndex_CCK_V10x29//0x29~0x2B -#define EEPROM_TxPwIndex_OFDM_24G_V1 0x2C//0x2C~0x2E +#define EEPROM_TX_PW_INDEX_OFDM_24G_V1 0x2C//0x2C~0x2E #define EEPROM_TxPwIndex_Ver 0x27//0x27 #define EEPROM_Default_ThermalMeter0x7 -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/21] staging:rtl8192u: Rename EEPROM_TxPwIndex_CCK_V1 - Style
Rename the constant EEPROM_TxPwIndex_CCK_V1 to EEPROM_TX_PW_INDEX_CCK_V1, this clears the checkpatch issue with CamelCase naming. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_core.c | 4 ++-- drivers/staging/rtl8192u/r8192U_hw.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 3742dd8410b2..67b4597d351e 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2498,7 +2498,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) } } else if (priv->EEPROM_Def_Ver == 1) { if (bLoad_From_EEPOM) { - ret = eprom_read(dev, EEPROM_TxPwIndex_CCK_V1 >> 1); + ret = eprom_read(dev, EEPROM_TX_PW_INDEX_CCK_V1 >> 1); if (ret < 0) return ret; tmpValue = ((u16)ret & 0xff00) >> 8; @@ -2508,7 +2508,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) priv->EEPROMTxPowerLevelCCK_V1[0] = (u8)tmpValue; if (bLoad_From_EEPOM) { - ret = eprom_read(dev, (EEPROM_TxPwIndex_CCK_V1 + 2) >> 1); + ret = eprom_read(dev, (EEPROM_TX_PW_INDEX_CCK_V1 + 2) >> 1); if (ret < 0) return ret; tmpValue = (u16)ret; diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index a7d1a7f9faf0..d7f830bf9e94 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -44,7 +44,7 @@ #define EEPROM_TX_PW_INDEX_CCK 0x23//0x23 #define EEPROM_TX_PW_INDEX_OFDM_24G0x24//0x24~0x26 -#define EEPROM_TxPwIndex_CCK_V10x29//0x29~0x2B +#define EEPROM_TX_PW_INDEX_CCK_V1 0x29//0x29~0x2B #define EEPROM_TX_PW_INDEX_OFDM_24G_V1 0x2C//0x2C~0x2E #define EEPROM_TxPwIndex_Ver 0x27//0x27 -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/21] staging:rtl8192u: Rename EEPROM_TxPwIndex_CCK - Style
Rename the constant EEPROM_TxPwIndex_CCK to EEPROM_TX_PW_INDEX_CCK. This change clears the checkpatch issue with CamelCase naming. The change is coding style in nature so should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- drivers/staging/rtl8192u/r8192U_hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 1c9b9da5e65b..83a61fcab53b 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2474,7 +2474,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) int i; if (bLoad_From_EEPOM) { - ret = eprom_read(dev, (EEPROM_TxPwIndex_CCK >> 1)); + ret = eprom_read(dev, (EEPROM_TX_PW_INDEX_CCK >> 1)); if (ret < 0) return ret; priv->EEPROMTxPowerLevelCCK = ((u16)ret & 0xff) >> 8; diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index 78e4d15e2579..437bb9212e47 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -42,7 +42,7 @@ #define EEPROM_PW_DIFF 0x21//0x21 #define EEPROM_CRYSTAL_CAP 0x22//0x22 -#define EEPROM_TxPwIndex_CCK 0x23//0x23 +#define EEPROM_TX_PW_INDEX_CCK 0x23//0x23 #define EEPROM_TxPwIndex_OFDM_24G 0x24//0x24~0x26 #define EEPROM_TxPwIndex_CCK_V10x29//0x29~0x2B #define EEPROM_TxPwIndex_OFDM_24G_V1 0x2C//0x2C~0x2E -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/21] staging:rtl8192u: Rename EEPROM_CrystalCap - Style
Rename the constant EEPROM_CrystalCap to EEPROM_CRYSTAL_CAP. This clears the checkpatch issue with CamelCase naming. This is a coding style change which should not impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- drivers/staging/rtl8192u/r8192U_hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 190d8e139b14..1c9b9da5e65b 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2454,7 +2454,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) RT_TRACE(COMP_EPROM, "TxPwDiff:%d\n", priv->EEPROMPwDiff); /* Read CrystalCap from EEPROM */ if (bLoad_From_EEPOM) { - ret = eprom_read(dev, (EEPROM_CrystalCap >> 1)); + ret = eprom_read(dev, (EEPROM_CRYSTAL_CAP >> 1)); if (ret < 0) return ret; priv->EEPROMCrystalCap = (u16)ret & 0x0f; diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index c673e1e4083c..78e4d15e2579 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -40,7 +40,7 @@ #define EEPROM_TX_POWER_DIFF 0x1F #define EEPROM_THERMAL_METER 0x20 #define EEPROM_PW_DIFF 0x21//0x21 -#define EEPROM_CrystalCap 0x22//0x22 +#define EEPROM_CRYSTAL_CAP 0x22//0x22 #define EEPROM_TxPwIndex_CCK 0x23//0x23 #define EEPROM_TxPwIndex_OFDM_24G 0x24//0x24~0x26 -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/21] staging:rtl8192u: Rename EEPROM_Default_CrystalCap - Style
Rename the constant EEPROM_Default_CrystalCap to EEPROM_DEFAULT_CRYSTAL_CAP, this clears the checkpatch issue with CamelCase naming. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- drivers/staging/rtl8192u/r8192U_hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index adc8d2e7fb61..236c4dee7921 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2459,7 +2459,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) return ret; priv->EEPROMCrystalCap = (u16)ret & 0x0f; } else - priv->EEPROMCrystalCap = EEPROM_Default_CrystalCap; + priv->EEPROMCrystalCap = EEPROM_DEFAULT_CRYSTAL_CAP; RT_TRACE(COMP_EPROM, "CrystalCap = %d\n", priv->EEPROMCrystalCap); /* get per-channel Tx power level */ if (bLoad_From_EEPOM) { diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index 79826e289207..923d8ab5939d 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -50,7 +50,7 @@ #define EEPROM_DEFAULT_THERNAL_METER 0x7 #define EEPROM_DEFAULT_PW_DIFF 0x4 -#define EEPROM_Default_CrystalCap 0x5 +#define EEPROM_DEFAULT_CRYSTAL_CAP 0x5 #define EEPROM_Default_TxPower 0x1010 #define EEPROM_Customer_ID 0x7B//0x7B:CustomerID #define EEPROM_ChannelPlan 0x16//0x7C -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 00/21] staging:rtl8192u: r8192U_hw.h - Style
This series of patches contain simple coding style changes to the file r8192U_hw.h, most of the changes are to clear the CamelCase issue in checkpatch. To minimise the number of CamelCase names which have to be renamed the unused definitions have been removed from the header file. John Whitmore (21): staging:rtl8192u: Refactor enum VERSION_819xU - Style staging:rtl8192u: Refactor RT_RF_TYPE_DEF - Style staging:rtl8192u: Make function rtl8192_phyConfigBB static staging:rtl8192u: Refactor BaseBand_Config_Type - Style staging:rtl8192u: Remove unused definitions - Style staging:rtl8192u: Reorder enum _RTL8192Usb_HW members - Style staging:rtl8192u: Rename EEPROM_TxPowerDiff - Style staging:rtl8192u: Rename EEPROM_ThermalMeter - Style staging:rtl8192u: Rename EEPROM_PwDiff - Style staging:rtl8192u: Rename EEPROM_CrystalCap - Style staging:rtl8192u: Rename EEPROM_TxPwIndex_CCK - Style staging:rtl8192u: Rename EEPROM_TxPwIndex_OFDM_24G_V1 - STYLE staging:rtl8192u: Rename EEPROM_TxPwIndex_OFDM_24G - Style staging:rtl8192u: Rename EEPROM_TxPwIndex_CCK_V1 - Style staging:rtl8192u: rename EEPROM_TxPwIndex_Ver - Style staging:rtl8192u: Rename EEPROM_Default_ThermalMeter - Style staging:rtl8192u: Rename EEPROM_Default_PwDiff - Style staging:rtl8192u: Rename EEPROM_Default_CrystalCap - Style staging:rtl8192u: Rename EEPROM_Default_TxPower - Style staging:rtl8192u: Rename EEPROM_Customer_ID - Style staging:rtl8192u: Rename EEPROM_ChannelPlan - Style drivers/staging/rtl8192u/r8190_rtl8256.c | 6 +- drivers/staging/rtl8192u/r8192U.h| 16 +- drivers/staging/rtl8192u/r8192U_core.c | 44 ++--- drivers/staging/rtl8192u/r8192U_hw.h | 204 +++ drivers/staging/rtl8192u/r819xU_phy.c| 15 +- drivers/staging/rtl8192u/r819xU_phy.h| 6 +- 6 files changed, 71 insertions(+), 220 deletions(-) -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 20/21] staging:rtl8192u: Rename EEPROM_Customer_ID - Style
Rename the constant EEPROM_Customer_ID to EEPROM_CUSTOMER_ID, this change clears the checkpatch issue with CamelCase naming. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- drivers/staging/rtl8192u/r8192U_hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 5bb0602e8a20..905484ac439f 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2388,7 +2388,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) tmpValue = (u16)ret; priv->eeprom_ChannelPlan = (tmpValue & 0xff00) >> 8; priv->btxpowerdata_readfromEEPORM = true; - ret = eprom_read(dev, (EEPROM_Customer_ID >> 1)) >> 8; + ret = eprom_read(dev, (EEPROM_CUSTOMER_ID >> 1)) >> 8; if (ret < 0) return ret; priv->eeprom_CustomerID = (u16)ret; diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index af3f84065619..606ab46d1a0c 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -52,7 +52,7 @@ #define EEPROM_DEFAULT_PW_DIFF 0x4 #define EEPROM_DEFAULT_CRYSTAL_CAP 0x5 #define EEPROM_DEFAULT_TX_POWER0x1010 -#define EEPROM_Customer_ID 0x7B//0x7B:CustomerID +#define EEPROM_CUSTOMER_ID 0x7B//0x7B:CustomerID #define EEPROM_ChannelPlan 0x16//0x7C #define EEPROM_CID_RUNTOP 0x2 -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 21/21] staging:rtl8192u: Rename EEPROM_ChannelPlan - Style
Rename the constant EEPROM_ChannelPlan to EEPROM_CHANNEL_PLAN, this clears the checkpatch issue with CamelCase naming. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- drivers/staging/rtl8192u/r8192U_hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 905484ac439f..b65684ceea7a 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2382,7 +2382,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) if (ret < 0) return ret; priv->eeprom_pid = (u16)ret; - ret = eprom_read(dev, EEPROM_ChannelPlan >> 1); + ret = eprom_read(dev, EEPROM_CHANNEL_PLAN >> 1); if (ret < 0) return ret; tmpValue = (u16)ret; diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index 606ab46d1a0c..5a958335681d 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -53,7 +53,7 @@ #define EEPROM_DEFAULT_CRYSTAL_CAP 0x5 #define EEPROM_DEFAULT_TX_POWER0x1010 #define EEPROM_CUSTOMER_ID 0x7B//0x7B:CustomerID -#define EEPROM_ChannelPlan 0x16//0x7C +#define EEPROM_CHANNEL_PLAN0x16//0x7C #define EEPROM_CID_RUNTOP 0x2 #define EEPROM_CID_DLINK 0x8 -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/21] staging:rtl8192u: Rename EEPROM_Default_TxPower - Style
rename the constant EEPROM_Default_TxPower to EEPROM_DEFAULT_TX_POWER, this clears the checkpatch issue with CamelCase issue. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- drivers/staging/rtl8192u/r8192U_hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 236c4dee7921..5bb0602e8a20 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2430,7 +2430,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) return ret; priv->EEPROMTxPowerDiff = ((u16)ret & 0xff00) >> 8; } else - priv->EEPROMTxPowerDiff = EEPROM_Default_TxPower; + priv->EEPROMTxPowerDiff = EEPROM_DEFAULT_TX_POWER; RT_TRACE(COMP_EPROM, "TxPowerDiff:%d\n", priv->EEPROMTxPowerDiff); /* read ThermalMeter from EEPROM */ if (bLoad_From_EEPOM) { diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index 923d8ab5939d..af3f84065619 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -51,7 +51,7 @@ #define EEPROM_DEFAULT_THERNAL_METER 0x7 #define EEPROM_DEFAULT_PW_DIFF 0x4 #define EEPROM_DEFAULT_CRYSTAL_CAP 0x5 -#define EEPROM_Default_TxPower 0x1010 +#define EEPROM_DEFAULT_TX_POWER0x1010 #define EEPROM_Customer_ID 0x7B//0x7B:CustomerID #define EEPROM_ChannelPlan 0x16//0x7C -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/21] staging:rtl8192u: Rename EEPROM_Default_ThermalMeter - Style
Rename the constant EEPROM_Default_ThermalMeter to EEPROM_DEFAULT_THERNAL_METER, this change clears the checkpatch issue with CamelCase naming. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- drivers/staging/rtl8192u/r8192U_hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 836be2a0b330..b2853b90c496 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2439,7 +2439,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) return ret; priv->EEPROMThermalMeter = (u8)((u16)ret & 0x00ff); } else - priv->EEPROMThermalMeter = EEPROM_Default_ThermalMeter; + priv->EEPROMThermalMeter = EEPROM_DEFAULT_THERNAL_METER; RT_TRACE(COMP_EPROM, "ThermalMeter:%d\n", priv->EEPROMThermalMeter); /* for tx power track */ priv->TSSI_13dBm = priv->EEPROMThermalMeter * 100; diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h index f98e6c2cf414..b485c7781d77 100644 --- a/drivers/staging/rtl8192u/r8192U_hw.h +++ b/drivers/staging/rtl8192u/r8192U_hw.h @@ -48,7 +48,7 @@ #define EEPROM_TX_PW_INDEX_OFDM_24G_V1 0x2C//0x2C~0x2E #define EEPROM_TX_PW_INDEX_VER 0x27//0x27 -#define EEPROM_Default_ThermalMeter0x7 +#define EEPROM_DEFAULT_THERNAL_METER 0x7 #define EEPROM_Default_PwDiff 0x4 #define EEPROM_Default_CrystalCap 0x5 #define EEPROM_Default_TxPower 0x1010 -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/6] staging:rtl8192u: r8190_rtl8256.h - Style changes
This is a simple checkpatch cleanup of the file r8190_rtl8256.h, mostly to clear CamelCase naming problems. The directory contains a copying file which suggests GPL2.0 so that has been added as the missing SPDX-License-Identifier tag. John Whitmore (6): staging:rtl8192u: Rename PHY_SetRF8256Bandwidth() - Style staging:rtl8192u: Rename function PHY_RF8256_Config() - Style staging:rtl8192u: Refactor phy_RF8256_Config_ParaFile() - Style staging:rtl8192u: Rename PHY_SetRF8256CCKTxPower() - Style staging:rtl8192u: Rename PHY_SetRF8256OFDMTxPower() - Style staging:rtl8192u: Add SPDX-License-Identifier tag - Style drivers/staging/rtl8192u/r8190_rtl8256.c | 27 ++-- drivers/staging/rtl8192u/r8190_rtl8256.h | 11 +- drivers/staging/rtl8192u/r819xU_phy.c| 14 ++-- 3 files changed, 29 insertions(+), 23 deletions(-) -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/6] staging:rtl8192u: Rename PHY_SetRF8256Bandwidth() - Style
Rename the function PHY_SetRF8256Bandwidth() to phy_set_rf8256_bandwidth(). This change clears the checkpatch issue with CamelCase naming. The parameter Bandwidth has been renamed to bandwidth, for the same reason. Additionally a new line has been added to the parameter list of the function declaration in r8190_rtl8256.h to truncate the line length to the checkpatch limit. These changes are simple coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8190_rtl8256.c | 8 drivers/staging/rtl8192u/r8190_rtl8256.h | 3 ++- drivers/staging/rtl8192u/r819xU_phy.c| 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index 9b7f822e9762..8916a1069b38 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c @@ -23,7 +23,7 @@ * Note: 8226 support both 20M and 40 MHz *-- */ -void PHY_SetRF8256Bandwidth(struct net_device *dev, enum ht_channel_width Bandwidth) +void phy_set_rf8256_bandwidth(struct net_device *dev, enum ht_channel_width Bandwidth) { u8 eRFPath; struct r8192_priv *priv = ieee80211_priv(dev); @@ -53,7 +53,7 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev, enum ht_channel_width Bandwi (enum rf90_radio_path_e)eRFPath, 0x14, bMask12Bits, 0x5ab); } else { - RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown hardware version\n"); + RT_TRACE(COMP_ERR, "phy_set_rf8256_bandwidth(): unknown hardware version\n"); } break; case HT_CHANNEL_WIDTH_20_40: @@ -68,11 +68,11 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev, enum ht_channel_width Bandwi else rtl8192_phy_SetRFReg(dev, (enum rf90_radio_path_e)eRFPath, 0x14, bMask12Bits, 0x5ab); } else { - RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown hardware version\n"); + RT_TRACE(COMP_ERR, "phy_set_rf8256_bandwidth(): unknown hardware version\n"); } break; default: - RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown Bandwidth: %#X\n", Bandwidth); + RT_TRACE(COMP_ERR, "phy_set_rf8256_bandwidth(): unknown Bandwidth: %#X\n", Bandwidth); break; } diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.h b/drivers/staging/rtl8192u/r8190_rtl8256.h index 29b926cad14b..25f5c8b72e92 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.h +++ b/drivers/staging/rtl8192u/r8190_rtl8256.h @@ -14,7 +14,8 @@ #define RTL8225H #define RTL819X_TOTAL_RF_PATH 2 /* for 8192U */ -void PHY_SetRF8256Bandwidth(struct net_device *dev, enum ht_channel_width Bandwidth); +void phy_set_rf8256_bandwidth(struct net_device *dev, + enum ht_channel_width bandwidth); void PHY_RF8256_Config(struct net_device *dev); void phy_RF8256_Config_ParaFile(struct net_device *dev); void PHY_SetRF8256CCKTxPower(struct net_device *dev, u8powerlevel); diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c index 7ee10d49894b..77ded1efc3a3 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c @@ -1633,7 +1633,7 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev) break; case RF_8256: - PHY_SetRF8256Bandwidth(dev, priv->CurrentChannelBW); + phy_set_rf8256_bandwidth(dev, priv->CurrentChannelBW); break; case RF_8258: -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/6] staging:rtl8192u: Rename PHY_SetRF8256OFDMTxPower() - Style
Rename function PHY_SetRF8256OFDMTxPower() to phy_set_rf8256_ofdm_tx_power(), to clear the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8190_rtl8256.c | 2 +- drivers/staging/rtl8192u/r8190_rtl8256.h | 2 +- drivers/staging/rtl8192u/r819xU_phy.c| 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index e4abb15d2067..f11405076c2a 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c @@ -245,7 +245,7 @@ void phy_set_rf8256_cck_tx_power(struct net_device *dev, u8 powerlevel) } -void PHY_SetRF8256OFDMTxPower(struct net_device *dev, u8 powerlevel) +void phy_set_rf8256_ofdm_tx_power(struct net_device *dev, u8 powerlevel) { struct r8192_priv *priv = ieee80211_priv(dev); /* Joseph TxPower for 8192 testing */ diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.h b/drivers/staging/rtl8192u/r8190_rtl8256.h index c291f699eaf7..c943a367d9e4 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.h +++ b/drivers/staging/rtl8192u/r8190_rtl8256.h @@ -18,6 +18,6 @@ void phy_set_rf8256_bandwidth(struct net_device *dev, enum ht_channel_width bandwidth); void phy_rf8256_config(struct net_device *dev); void phy_set_rf8256_cck_tx_power(struct net_device *dev, u8 powerlevel); -void PHY_SetRF8256OFDMTxPower(struct net_device *dev, u8 powerlevel); +void phy_set_rf8256_ofdm_tx_power(struct net_device *dev, u8 powerlevel); #endif diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c index 69bc0afd4e5c..5429a118efd4 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c @@ -918,7 +918,7 @@ void rtl8192_phy_setTxPower(struct net_device *dev, u8 channel) case RF_8256: /* need further implement */ phy_set_rf8256_cck_tx_power(dev, powerlevel); - PHY_SetRF8256OFDMTxPower(dev, powerlevelOFDM24G); + phy_set_rf8256_ofdm_tx_power(dev, powerlevelOFDM24G); break; default: RT_TRACE((COMP_PHY|COMP_ERR), @@ -1066,7 +1066,7 @@ static void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel) case RF_8256: phy_set_rf8256_cck_tx_power(dev, powerlevel); - PHY_SetRF8256OFDMTxPower(dev, powerlevelOFDM24G); + phy_set_rf8256_ofdm_tx_power(dev, powerlevelOFDM24G); break; case RF_8258: -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/6] staging:rtl8192u: Rename function PHY_RF8256_Config() - Style
Rename the function PHY_RF8256_Config() to phy_rf8256_config(). This change clears the checkpatch issue with CamelCase naming. This is a simple coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8190_rtl8256.c | 4 ++-- drivers/staging/rtl8192u/r8190_rtl8256.h | 2 +- drivers/staging/rtl8192u/r819xU_phy.c| 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index 8916a1069b38..8cc7b0d46a02 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c @@ -85,7 +85,7 @@ void phy_set_rf8256_bandwidth(struct net_device *dev, enum ht_channel_width Band * Return: NONE *-- */ -void PHY_RF8256_Config(struct net_device *dev) +void phy_rf8256_config(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); /* Initialize general global value @@ -152,7 +152,7 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev) * TODO: this function should be removed on ASIC , Emily 2007.2.2 */ if (rtl8192_phy_checkBBAndRF(dev, HW90_BLOCK_RF, (enum rf90_radio_path_e)eRFPath)) { - RT_TRACE(COMP_ERR, "PHY_RF8256_Config():Check Radio[%d] Fail!!\n", eRFPath); + RT_TRACE(COMP_ERR, "phy_rf8256_config():Check Radio[%d] Fail!!\n", eRFPath); goto phy_RF8256_Config_ParaFile_Fail; } diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.h b/drivers/staging/rtl8192u/r8190_rtl8256.h index 25f5c8b72e92..b58aab020e51 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.h +++ b/drivers/staging/rtl8192u/r8190_rtl8256.h @@ -16,7 +16,7 @@ #define RTL819X_TOTAL_RF_PATH 2 /* for 8192U */ void phy_set_rf8256_bandwidth(struct net_device *dev, enum ht_channel_width bandwidth); -void PHY_RF8256_Config(struct net_device *dev); +void phy_rf8256_config(struct net_device *dev); void phy_RF8256_Config_ParaFile(struct net_device *dev); void PHY_SetRF8256CCKTxPower(struct net_device *dev, u8powerlevel); void PHY_SetRF8256OFDMTxPower(struct net_device *dev, u8 powerlevel); diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c index 77ded1efc3a3..4ecd12923b93 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c @@ -793,7 +793,7 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev) (enum rf90_radio_path_e)0); if (status != 0) { RT_TRACE((COMP_ERR | COMP_PHY), -"PHY_RF8256_Config(): Check PHY%d Fail!!\n", +"phy_rf8256_config(): Check PHY%d Fail!!\n", eCheckItem-1); return; } @@ -940,7 +940,7 @@ void rtl8192_phy_RFConfig(struct net_device *dev) switch (priv->rf_chip) { case RF_8256: - PHY_RF8256_Config(dev); + phy_rf8256_config(dev); break; default: RT_TRACE(COMP_ERR, "error chip id\n"); -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/6] staging:rtl8192u: Refactor phy_RF8256_Config_ParaFile() - Style
Rename the function phy_RF8256_Config_ParaFile() to phy_rf8256_config_para_file(). This change clears the checkpatch issue with CamelCase naming. Additionally as the function is only ever used in one file, (r8190_rtl8256.c), the function prototype has been removed from the header file, (r8190_rtl8256.h). These changes are purely coding style in nature and should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8190_rtl8256.c | 11 --- drivers/staging/rtl8192u/r8190_rtl8256.h | 1 - 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index 8cc7b0d46a02..7dbed5e4ea8b 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c @@ -14,6 +14,11 @@ #include "r819xU_phy.h" #include "r8190_rtl8256.h" +/* + * Forward declaration of local functions + */ +static void phy_rf8256_config_para_file(struct net_device *dev); + /*-- * Overview: set RF band width (20M or 40M) * Input: struct net_device* dev @@ -94,7 +99,7 @@ void phy_rf8256_config(struct net_device *dev) */ priv->NumTotalRFPath = RTL819X_TOTAL_RF_PATH; /* Config BB and RF */ - phy_RF8256_Config_ParaFile(dev); + phy_rf8256_config_para_file(dev); } /*-- * Overview:Interface to config 8256 @@ -103,7 +108,7 @@ void phy_rf8256_config(struct net_device *dev) * Return: NONE *-- */ -void phy_RF8256_Config_ParaFile(struct net_device *dev) +static void phy_rf8256_config_para_file(struct net_device *dev) { u32 u4RegValue = 0; u8 eRFPath; @@ -207,7 +212,7 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev) } if (ret) { - RT_TRACE(COMP_ERR, "phy_RF8256_Config_ParaFile():Radio[%d] Fail!!", eRFPath); + RT_TRACE(COMP_ERR, "phy_rf8256_config_para_file():Radio[%d] Fail!!", eRFPath); goto phy_RF8256_Config_ParaFile_Fail; } diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.h b/drivers/staging/rtl8192u/r8190_rtl8256.h index b58aab020e51..891d7510cea1 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.h +++ b/drivers/staging/rtl8192u/r8190_rtl8256.h @@ -17,7 +17,6 @@ void phy_set_rf8256_bandwidth(struct net_device *dev, enum ht_channel_width bandwidth); void phy_rf8256_config(struct net_device *dev); -void phy_RF8256_Config_ParaFile(struct net_device *dev); void PHY_SetRF8256CCKTxPower(struct net_device *dev, u8powerlevel); void PHY_SetRF8256OFDMTxPower(struct net_device *dev, u8 powerlevel); -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/6] staging:rtl8192u: Rename PHY_SetRF8256CCKTxPower() - Style
Rename the function PHY_SetRF8256CCKTxPower() to phy_set_rf8256_cck_tx_power(), to clear the checkpatch issue with CamelCase naming. This is a purely coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8190_rtl8256.c | 2 +- drivers/staging/rtl8192u/r8190_rtl8256.h | 2 +- drivers/staging/rtl8192u/r819xU_phy.c| 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index 7dbed5e4ea8b..e4abb15d2067 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c @@ -226,7 +226,7 @@ static void phy_rf8256_config_para_file(struct net_device *dev) } -void PHY_SetRF8256CCKTxPower(struct net_device *dev, u8 powerlevel) +void phy_set_rf8256_cck_tx_power(struct net_device *dev, u8 powerlevel) { u32 TxAGC = 0; struct r8192_priv *priv = ieee80211_priv(dev); diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.h b/drivers/staging/rtl8192u/r8190_rtl8256.h index 891d7510cea1..c291f699eaf7 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.h +++ b/drivers/staging/rtl8192u/r8190_rtl8256.h @@ -17,7 +17,7 @@ void phy_set_rf8256_bandwidth(struct net_device *dev, enum ht_channel_width bandwidth); void phy_rf8256_config(struct net_device *dev); -void PHY_SetRF8256CCKTxPower(struct net_device *dev, u8powerlevel); +void phy_set_rf8256_cck_tx_power(struct net_device *dev, u8 powerlevel); void PHY_SetRF8256OFDMTxPower(struct net_device *dev, u8 powerlevel); #endif diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c index 4ecd12923b93..69bc0afd4e5c 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c @@ -917,7 +917,7 @@ void rtl8192_phy_setTxPower(struct net_device *dev, u8 channel) switch (priv->rf_chip) { case RF_8256: /* need further implement */ - PHY_SetRF8256CCKTxPower(dev, powerlevel); + phy_set_rf8256_cck_tx_power(dev, powerlevel); PHY_SetRF8256OFDMTxPower(dev, powerlevelOFDM24G); break; default: @@ -1065,7 +1065,7 @@ static void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel) break; case RF_8256: - PHY_SetRF8256CCKTxPower(dev, powerlevel); + phy_set_rf8256_cck_tx_power(dev, powerlevel); PHY_SetRF8256OFDMTxPower(dev, powerlevelOFDM24G); break; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/6] staging:rtl8192u: Add SPDX-License-Identifier tag - Style
Add the missing SPDX-License-Identifier tag to clear the checkpatch issue. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8190_rtl8256.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.h b/drivers/staging/rtl8192u/r8190_rtl8256.h index c943a367d9e4..9ea67f86f911 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.h +++ b/drivers/staging/rtl8192u/r8190_rtl8256.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * This is part of the rtl8180-sa2400 driver * released under the GPL (See file COPYING for details). -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 01/17] staging:rtl8192u: Remove unused defines - Style
On Mon, Aug 27, 2018 at 07:27:19PM +0200, Greg KH wrote: > On Tue, Aug 21, 2018 at 06:15:21PM +0100, John Whitmore wrote: > > Remove a number of unused constant definitions. > > > > This is a coding style change which should have no impact on runtime > > code execution. > > > > Signed-off-by: John Whitmore > > --- > > drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 5 - > > 1 file changed, 5 deletions(-) > > Is this series a duplicate of a prebious series? > > it doesn't apply at all to my tree now. > > totally confused, > > greg k-h Sorry didn't mean to confuse you, but now you've got your own back ;) After this message I got an automated email to say that the patch had been applied. I'll give it a few days for the changes to make it into staging-next and if needs be I will resubmit the patch. Apologies also for sending a snap response from gmail web App. I still haven't learned that it adds html by default. jwhitmore ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/4] staging:rtl8192u: Style and a question?
This short series of coding style changes clears the remaining checkpatch issues in the files r8180_93cx6.h and dot11d.h. The file dot11d.h does still contain lines over the 80 character limit, but most of these lines are MACRO definitions, and I'm not sure splitting them will add anything to the style and readability of the code. My question is with respect to the member variable 'enabled' which has been refactored in the third patch of the series. I've renamed the variable to 'dot11d_enabled', (in addition to changing it's type as suggested by checkpatch), so that it is easier to search for in code. Now that it is easier to search for 'dot11d_enabled' and it's associated macro IS_DOT11D_ENABLE(ieee) it becomes apparent that the variable is initialised to FALSE, (and elsewhere '0'), but appears never to be set. The function dot11d_update_country_ie(), in file dot11d.c, states in its header block comment that it assumes that the value of dot11d_enabled is true. The dot11d_info structure is allocated: ieee->dot11d_info = kzalloc(sizeof(struct rt_dot11d_info), GFP_KERNEL); And dot11d_enabled could be set with a memcopy or a memset, but if it is being set I've missed it completely. There may be a kernel specific mechanism which I'm not yet familiar with? In my ignorance I'd be tempted to remove all code which relies on the variable being True, but then that function dot11d_update_country_ie() specifically assumes it's true and is an exported symbol. John Whitmore (4): staging:rtl8192u: Remove unused definitions - Style staging:rtl8192u: Add required SPDX-License-Identifier - Style staging:rtl8192u: Refactor member variable enabled - Style staging:rtl8192u: Rename member pDot11dInfo - Style drivers/staging/rtl8192u/ieee80211/dot11d.c | 66 +-- drivers/staging/rtl8192u/ieee80211/dot11d.h | 6 +- .../staging/rtl8192u/ieee80211/ieee80211.h| 2 +- .../rtl8192u/ieee80211/ieee80211_softmac.c| 8 +-- drivers/staging/rtl8192u/r8180_93cx6.h| 19 +- drivers/staging/rtl8192u/r8192U_core.c| 2 +- 6 files changed, 43 insertions(+), 60 deletions(-) -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/4] staging:rtl8192u: Remove unused definitions - Style
Remove unused definitions from the file r8180_93cx6.h. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8180_93cx6.h | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/staging/rtl8192u/r8180_93cx6.h b/drivers/staging/rtl8192u/r8180_93cx6.h index 643d465e7105..bfbef1a16159 100644 --- a/drivers/staging/rtl8192u/r8180_93cx6.h +++ b/drivers/staging/rtl8192u/r8180_93cx6.h @@ -21,22 +21,4 @@ #define EPROM_DELAY 10 -#define EPROM_ANAPARAM_ADDRLWORD 0xd -#define EPROM_ANAPARAM_ADDRHWORD 0xe - -#define EPROM_RFCHIPID 0x6 -#define EPROM_TXPW_BASE 0x05 -#define EPROM_RFCHIPID_RTL8225U 5 -#define EPROM_RF_PARAM 0x4 -#define EPROM_CONFIG2 0xc - -#define EPROM_VERSION 0x1E -#define MAC_ADR 0x7 - -#define CIS 0x18 - -#define EPROM_TXPW0 0x16 -#define EPROM_TXPW2 0x1b -#define EPROM_TXPW1 0x3d - int eprom_read(struct net_device *dev, u32 addr); /* reads a 16 bits word */ -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/4] staging:rtl8192u: Refactor member variable enabled - Style
The structure rt_dot11d_info contains a memeber variable 'enabled', which causes a checkpatch issue as it is declared as being of type bool. The type of the variable has been changed to a 'u8', to clear the issue. Additionally to aid searching for the member variable in code it has been renamed from 'enabled' to 'dot11d_enabled'. These are purely coding style changes which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/dot11d.c | 2 +- drivers/staging/rtl8192u/ieee80211/dot11d.h | 4 ++-- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c index d3b13f0cfc09..f3aa60cb3227 100644 --- a/drivers/staging/rtl8192u/ieee80211/dot11d.c +++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c @@ -7,7 +7,7 @@ void dot11d_init(struct ieee80211_device *ieee) { struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee); - pDot11dInfo->enabled = false; + pDot11dInfo->dot11d_enabled = false; pDot11dInfo->state = DOT11D_STATE_NONE; pDot11dInfo->country_ie_len = 0; diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h index be59f720ae20..df37678b806d 100644 --- a/drivers/staging/rtl8192u/ieee80211/dot11d.h +++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h @@ -28,12 +28,12 @@ struct rt_dot11d_info { u8 max_tx_pwr_dbm_list[MAX_CHANNEL_NUMBER + 1]; enum dot11d_state state; - bool enabled; /* dot11MultiDomainCapabilityEnabled */ + u8 dot11d_enabled; /* dot11MultiDomainCapabilityEnabled */ }; #define GET_DOT11D_INFO(ieee_dev) ((struct rt_dot11d_info *)((ieee_dev)->pDot11dInfo)) -#define IS_DOT11D_ENABLE(ieee_dev) (GET_DOT11D_INFO(ieee_dev)->enabled) +#define IS_DOT11D_ENABLE(ieee_dev) (GET_DOT11D_INFO(ieee_dev)->dot11d_enabled) #define IS_COUNTRY_IE_VALID(ieee_dev) (GET_DOT11D_INFO(ieee_dev)->country_ie_len > 0) #define IS_EQUAL_CIE_SRC(ieee_dev, addr) ether_addr_equal(GET_DOT11D_INFO(ieee_dev)->country_ie_src_addr, addr) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 6b22aaa40ff9..34ea47366b72 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -211,7 +211,7 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv) /* this flag enabled to follow 11d country IE setting, * otherwise, it shall follow global domain settings. */ - GET_DOT11D_INFO(ieee)->enabled = 0; + GET_DOT11D_INFO(ieee)->dot11d_enabled = 0; dot11d_reset(ieee); ieee->bGlobalDomain = true; break; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/4] staging:rtl8192u: Add required SPDX-License-Identifier - Style
Add the required SPDX-License-Identifier to the file r8180_93cx6.h, this clears a checkpatch issue. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8180_93cx6.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/rtl8192u/r8180_93cx6.h b/drivers/staging/rtl8192u/r8180_93cx6.h index bfbef1a16159..0cdd00a4f7b8 100644 --- a/drivers/staging/rtl8192u/r8180_93cx6.h +++ b/drivers/staging/rtl8192u/r8180_93cx6.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * This is part of rtl8187 OpenSource driver * Copyright (C) Andrea Merello 2004-2005 -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/4] staging:rtl8192u: Rename member pDot11dInfo - Style
Rename 'pDot11dInfo', this member variable of the structure ieee80211_device causes a checkpatch issue, CamelCase naming. The member has been renamed 'dot11d_info' to clear this issue. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/dot11d.c | 66 +-- drivers/staging/rtl8192u/ieee80211/dot11d.h | 2 +- .../staging/rtl8192u/ieee80211/ieee80211.h| 2 +- .../rtl8192u/ieee80211/ieee80211_softmac.c| 8 +-- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c index f3aa60cb3227..e152528c9409 100644 --- a/drivers/staging/rtl8192u/ieee80211/dot11d.c +++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c @@ -5,14 +5,14 @@ void dot11d_init(struct ieee80211_device *ieee) { - struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee); + struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(ieee); - pDot11dInfo->dot11d_enabled = false; + dot11d_info->dot11d_enabled = false; - pDot11dInfo->state = DOT11D_STATE_NONE; - pDot11dInfo->country_ie_len = 0; - memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER + 1); - memset(pDot11dInfo->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1); + dot11d_info->state = DOT11D_STATE_NONE; + dot11d_info->country_ie_len = 0; + memset(dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER + 1); + memset(dot11d_info->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1); RESET_CIE_WATCHDOG(ieee); netdev_info(ieee->dev, "dot11d_init()\n"); @@ -23,19 +23,19 @@ EXPORT_SYMBOL(dot11d_init); void dot11d_reset(struct ieee80211_device *ieee) { u32 i; - struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee); + struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(ieee); /* Clear old channel map */ - memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1); - memset(pDot11dInfo->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1); + memset(dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER+1); + memset(dot11d_info->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1); /* Set new channel map */ for (i = 1; i <= 11; i++) - (pDot11dInfo->channel_map)[i] = 1; + (dot11d_info->channel_map)[i] = 1; for (i = 12; i <= 14; i++) - (pDot11dInfo->channel_map)[i] = 2; + (dot11d_info->channel_map)[i] = 2; - pDot11dInfo->state = DOT11D_STATE_NONE; - pDot11dInfo->country_ie_len = 0; + dot11d_info->state = DOT11D_STATE_NONE; + dot11d_info->country_ie_len = 0; RESET_CIE_WATCHDOG(ieee); } EXPORT_SYMBOL(dot11d_reset); @@ -52,12 +52,12 @@ EXPORT_SYMBOL(dot11d_reset); void dot11d_update_country_ie(struct ieee80211_device *dev, u8 *pTaddr, u16 CoutryIeLen, u8 *pCoutryIe) { - struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev); + struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(dev); u8 i, j, NumTriples, MaxChnlNum; struct chnl_txpower_triple *pTriple; - memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1); - memset(pDot11dInfo->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1); + memset(dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER+1); + memset(dot11d_info->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1); MaxChnlNum = 0; NumTriples = (CoutryIeLen - 3) / 3; /* skip 3-byte country string. */ pTriple = (struct chnl_txpower_triple *)(pCoutryIe + 3); @@ -78,8 +78,8 @@ void dot11d_update_country_ie(struct ieee80211_device *dev, u8 *pTaddr, } for (j = 0; j < pTriple->num_channels; j++) { - pDot11dInfo->channel_map[pTriple->first_channel + j] = 1; - pDot11dInfo->max_tx_pwr_dbm_list[pTriple->first_channel + j] = pTriple->max_tx_pwr_dbm; + dot11d_info->channel_map[pTriple->first_channel + j] = 1; + dot11d_info->max_tx_pwr_dbm_list[pTriple->first_channel + j] = pTriple->max_tx_pwr_dbm; MaxChnlNum = pTriple->first_channel + j; } @@ -87,29 +87,29 @@ void dot11d_update_country_ie(struct ieee80211_device *dev, u8 *pTaddr, } netdev_info(dev->dev, "Channel List:"); for (i = 1; i <= MAX_CHANNEL_NUMBER; i++) - if (pDot11dInfo->channel_map[i] > 0) + if (dot11d_info->channel_map[i] > 0) netdev_info(dev->dev, " %d", i); netdev_info(dev->dev, "\n"); UPDATE_CIE_SRC(dev, pTaddr)
Re: [PATCH 3/4] staging:rtl8192u: Refactor member variable enabled - Style
On Wed, Aug 29, 2018 at 02:20:33PM +0300, Dan Carpenter wrote: > Like you mentioned in the 0/4 email, the right thing to do here is just > to delete all references to ->enabled. > Thank you for your response, I'll do that in a future series of patches. jwhitmore ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 00/21] staging:rtl8192u: Refactor ht_capability_ele - Style
This series of patchs is a coding style clean up of the structure ht_capability_ele. The changes are all simply changes of the member names, to remove the CamelCase naming. A number of the member have been renamed with the prefix 'not_used...' to emphasise the fact that member is not used in code. At a future time the structure might be stripped of these member variables, but for the moment they have been left, as I'm not sure that the size of the structure is not significant, and possibly mapped to Hardware. John Whitmore (21): staging:rtl8192u: Rename AdvCoding - Style staging:rtl8192u: Rename ChlWidth - Style staging:rtl8192u: Rename MimoPwrSave - Style staging:rtl8192u: Rename GreenField - Style staging:rtl8192u: Rename ShortGI20Mhz - Style staging:rtl8192u: Rename ShortGI40Mhz - Style staging:rtl8192u: Rename TxSTBC - Style staging:rtl8192u: Rename RxSTBC - Style staging:rtl8192u: Rename DelayBA - Style staging:rtl8192u: Rename MaxAMSDUSize - Style staging:rtl8192u: Rename DssCCk - Style staging:rtl8192u: Rename PSMP - Style staging:rtl8192u: Rename Rsvd1 - Style staging:rtl8192u: Rename LSigTxopProtect - Style staging:rtl8192u: Rename MaxRxAMPDUFactor - Style staging:rtl8192u: Rename MPDUDensity - Style staging:rtl8192u: Rename Rsvd2 - Style staging:rtl8192u: Rename MCS - Style staging:rtl8192u: Rename ExtHTCapInfo - Style staging:rtl8192u: Rename TxBFCap - Style staging:rtl8192u: Rename ASCap - Style .../staging/rtl8192u/ieee80211/ieee80211_wx.c | 10 +- .../staging/rtl8192u/ieee80211/rtl819x_HT.h | 42 +++ .../rtl8192u/ieee80211/rtl819x_HTProc.c | 115 -- 3 files changed, 75 insertions(+), 92 deletions(-) -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/21] staging:rtl8192u: Rename MimoPwrSave - Style
Rename the bitfield name MimoPwrSave, to clear the checkpatch issue with CamelCase naming, to 'mimo_power_save'. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index d79126853cd3..069f93e77c46 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -41,7 +41,7 @@ struct ht_capability_ele { //HT capability info u8 not_used_adv_coding:1; u8 chl_width:1; - u8 MimoPwrSave:2; + u8 mimo_power_save:2; u8 GreenField:1; u8 ShortGI20Mhz:1; u8 ShortGI40Mhz:1; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index d9c2a2df8d0e..7cb18c2f6d93 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -556,7 +556,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u pCapELE->chl_width = (pHT->bRegBW40MHz ? 1 : 0); // pCapELE->chl_width = (pHT->bRegBW40MHz?1:0); - pCapELE->MimoPwrSave= pHT->SelfMimoPs; + pCapELE->mimo_power_save= pHT->SelfMimoPs; pCapELE->GreenField = 0; // This feature is not supported now!! pCapELE->ShortGI20Mhz = 1; // We can receive Short GI!! pCapELE->ShortGI40Mhz = 1; // We can receive Short GI!! @@ -1052,7 +1052,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee) /* * Config MIMO Power Save setting */ - pHTInfo->PeerMimoPs = pPeerHTCap->MimoPwrSave; + pHTInfo->PeerMimoPs = pPeerHTCap->mimo_power_save; if (pHTInfo->PeerMimoPs == MIMO_PS_STATIC) pMcsFilter = MCS_FILTER_1SS; else -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style
Rename the bit field element AdvCoding, as it causes a checkpatch issue with CamelCase naming. As the element is not actually used in code it has been renamed to 'not_used_adv_coding'. The single line of code which initialises the bit has been removed, as the field is unused. This is a purely coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index 64d5359cf7e2..66a0274077d3 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -39,7 +39,7 @@ enum ht_extension_chan_offset { struct ht_capability_ele { //HT capability info - u8 AdvCoding:1; + u8 not_used_adv_coding:1; u8 ChlWidth:1; u8 MimoPwrSave:2; u8 GreenField:1; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 9bf52cebe4cd..d7f73a5831da 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -550,7 +550,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u } //HT capability info - pCapELE->AdvCoding = 0; // This feature is not supported now!! if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) pCapELE->ChlWidth = 0; else -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/21] staging:rtl8192u: Rename ShortGI40Mhz - Style
Rename the bitfield member 'ShortGI40Mhz' to 'short_gi40_mhz', this clears the checkpatch issue with CamelCase naming. This change is a simple coding style change, which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 10 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c index a0e91763e7f3..a6fe975902bb 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c @@ -156,7 +156,7 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee, ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[0]; is40M = (ht_cap->chl_width)?1:0; isShortGI = (ht_cap->chl_width)? - ((ht_cap->ShortGI40Mhz)?1:0): + ((ht_cap->short_gi40_mhz)?1:0): ((ht_cap->short_gi20_mhz)?1:0); max_mcs = HTGetHighestMCSRate(ieee, ht_cap->MCS, MCS_FILTER_ALL); diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index 64fd6a4f3bcd..23f8ee39e32d 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -44,7 +44,7 @@ struct ht_capability_ele { u8 mimo_power_save:2; u8 not_used_green_field:1; u8 short_gi20_mhz:1; - u8 ShortGI40Mhz:1; + u8 short_gi40_mhz:1; u8 TxSTBC:1; u8 RxSTBC:2; u8 DelayBA:1; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index fe8d75d8bd96..54c56cec612f 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -144,7 +144,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString) IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupported Channel Width = %s\n", (pCapELE->chl_width) ? "20MHz" : "20/40MHz"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport Short GI for 20M = %s\n", (pCapELE->short_gi20_mhz) ? "YES" : "NO"); - IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport Short GI for 40M = %s\n", (pCapELE->ShortGI40Mhz) ? "YES" : "NO"); + IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport Short GI for 40M = %s\n", (pCapELE->short_gi40_mhz) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport TX STBC = %s\n", (pCapELE->TxSTBC) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMax AMSDU Size = %s\n", (pCapELE->MaxAMSDUSize) ? "3839" : "7935"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->DssCCk) ? "YES" : "NO"); @@ -248,7 +248,7 @@ static bool IsHTHalfNmodeSGI(struct ieee80211_device *ieee, bool is40MHz) else if (!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) // station in half n mode retValue = false; else if (is40MHz) { // ap support 40 bw - if (((struct ht_capability_ele *)(pHTInfo->PeerHTCapBuf))->ShortGI40Mhz) // ap support 40 bw short GI + if (((struct ht_capability_ele *)(pHTInfo->PeerHTCapBuf))->short_gi40_mhz) // ap support 40 bw short GI retValue = true; else retValue = false; @@ -558,9 +558,9 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u // pCapELE->chl_width = (pHT->bRegBW40MHz?1:0); pCapELE->mimo_power_save= pHT->SelfMimoPs; pCapELE->short_gi20_mhz = 1; // We can receive Short GI!! - pCapELE->ShortGI40Mhz = 1; // We can receive Short GI!! + pCapELE->short_gi40_mhz = 1; // We can receive Short GI!! //DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r", - //pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->ShortGI40Mhz); + //pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz); pCapELE->TxSTBC = 1; pCapELE->RxSTBC = 0; pCapELE->DelayBA= 0;// Do not support now!! @@ -946,7 +946,7 @@ void HTOnAssocRsp(struct ieee8021
[PATCH 02/21] staging:rtl8192u: Rename ChlWidth - Style
Rename 'ChlWidth', member variable of the structure ht_capability_ele. This change is to clear the checkpatch issue with CamelCase naming. The bitfield's name has been changed to 'chl_width'. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- .../staging/rtl8192u/ieee80211/ieee80211_wx.c| 4 ++-- drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 16 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c index fa59c712c74b..514445dc542e 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c @@ -154,8 +154,8 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee, ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[4]; else ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[0]; - is40M = (ht_cap->ChlWidth)?1:0; - isShortGI = (ht_cap->ChlWidth)? + is40M = (ht_cap->chl_width)?1:0; + isShortGI = (ht_cap->chl_width)? ((ht_cap->ShortGI40Mhz)?1:0): ((ht_cap->ShortGI20Mhz)?1:0); diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index 66a0274077d3..d79126853cd3 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -40,7 +40,7 @@ enum ht_extension_chan_offset { struct ht_capability_ele { //HT capability info u8 not_used_adv_coding:1; - u8 ChlWidth:1; + u8 chl_width:1; u8 MimoPwrSave:2; u8 GreenField:1; u8 ShortGI20Mhz:1; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index d7f73a5831da..d9c2a2df8d0e 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -142,7 +142,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString) } IEEE80211_DEBUG(IEEE80211_DL_HT, ". Called by %s\n", TitleString); - IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupported Channel Width = %s\n", (pCapELE->ChlWidth) ? "20MHz" : "20/40MHz"); + IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupported Channel Width = %s\n", (pCapELE->chl_width) ? "20MHz" : "20/40MHz"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport Short GI for 20M = %s\n", (pCapELE->ShortGI20Mhz) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport Short GI for 40M = %s\n", (pCapELE->ShortGI40Mhz) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport TX STBC = %s\n", (pCapELE->TxSTBC) ? "YES" : "NO"); @@ -230,7 +230,7 @@ static bool IsHTHalfNmode40Bandwidth(struct ieee80211_device *ieee) retValue = false; else if (!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) // station in half n mode retValue = false; - else if (((struct ht_capability_ele *)(pHTInfo->PeerHTCapBuf))->ChlWidth) // ap support 40 bw + else if (((struct ht_capability_ele *)(pHTInfo->PeerHTCapBuf))->chl_width) // ap support 40 bw retValue = true; else retValue = false; @@ -551,17 +551,17 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u //HT capability info if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) - pCapELE->ChlWidth = 0; + pCapELE->chl_width = 0; else - pCapELE->ChlWidth = (pHT->bRegBW40MHz ? 1 : 0); + pCapELE->chl_width = (pHT->bRegBW40MHz ? 1 : 0); -// pCapELE->ChlWidth = (pHT->bRegBW40MHz?1:0); +// pCapELE->chl_width = (pHT->bRegBW40MHz?1:0); pCapELE->MimoPwrSave= pHT->SelfMimoPs; pCapELE->GreenField = 0; // This feature is not supported now!! pCapELE->ShortGI20Mhz = 1; // We can receive Short GI!! pCapELE->ShortGI40Mhz = 1; // We can receive Short GI!! //DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r", - //pCapELE->ChlWidth, pCapELE->ShortGI20Mhz, pCapELE->ShortGI40Mhz); + //pCapELE->chl_width, pCapELE->ShortGI20Mhz, pCapELE->ShortGI4
[PATCH 04/21] staging:rtl8192u: Rename GreenField - Style
Rename the bit field member GreenField, this change clears the checkpatch issue with CamelCase naming. As the member is no longer used the name has been changed to 'not_used_green_field', and the redundant line of initialisation code 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/rtl819x_HT.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index 069f93e77c46..705d811cbe01 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -42,7 +42,7 @@ struct ht_capability_ele { u8 not_used_adv_coding:1; u8 chl_width:1; u8 mimo_power_save:2; - u8 GreenField:1; + u8 not_used_green_field:1; u8 ShortGI20Mhz:1; u8 ShortGI40Mhz:1; u8 TxSTBC:1; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 7cb18c2f6d93..73745d8406aa 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -557,7 +557,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u // pCapELE->chl_width = (pHT->bRegBW40MHz?1:0); pCapELE->mimo_power_save= pHT->SelfMimoPs; - pCapELE->GreenField = 0; // This feature is not supported now!! pCapELE->ShortGI20Mhz = 1; // We can receive Short GI!! pCapELE->ShortGI40Mhz = 1; // We can receive Short GI!! //DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r", -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/21] staging:rtl8192u: Rename ShortGI20Mhz - Style
Rename the bitfield member 'ShortGI20Mhz' to 'short_gi20_mhz'. This change clears the checkpatch issue with CamelCase naming of variables. The change if purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 10 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c index 514445dc542e..a0e91763e7f3 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c @@ -157,7 +157,7 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee, is40M = (ht_cap->chl_width)?1:0; isShortGI = (ht_cap->chl_width)? ((ht_cap->ShortGI40Mhz)?1:0): - ((ht_cap->ShortGI20Mhz)?1:0); + ((ht_cap->short_gi20_mhz)?1:0); max_mcs = HTGetHighestMCSRate(ieee, ht_cap->MCS, MCS_FILTER_ALL); rate = MCS_DATA_RATE[is40M][isShortGI][max_mcs&0x7f]; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index 705d811cbe01..64fd6a4f3bcd 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -43,7 +43,7 @@ struct ht_capability_ele { u8 chl_width:1; u8 mimo_power_save:2; u8 not_used_green_field:1; - u8 ShortGI20Mhz:1; + u8 short_gi20_mhz:1; u8 ShortGI40Mhz:1; u8 TxSTBC:1; u8 RxSTBC:2; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 73745d8406aa..fe8d75d8bd96 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -143,7 +143,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString) IEEE80211_DEBUG(IEEE80211_DL_HT, ". Called by %s\n", TitleString); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupported Channel Width = %s\n", (pCapELE->chl_width) ? "20MHz" : "20/40MHz"); - IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport Short GI for 20M = %s\n", (pCapELE->ShortGI20Mhz) ? "YES" : "NO"); + IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport Short GI for 20M = %s\n", (pCapELE->short_gi20_mhz) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport Short GI for 40M = %s\n", (pCapELE->ShortGI40Mhz) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport TX STBC = %s\n", (pCapELE->TxSTBC) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMax AMSDU Size = %s\n", (pCapELE->MaxAMSDUSize) ? "3839" : "7935"); @@ -253,7 +253,7 @@ static bool IsHTHalfNmodeSGI(struct ieee80211_device *ieee, bool is40MHz) else retValue = false; } else { - if (((struct ht_capability_ele *)(pHTInfo->PeerHTCapBuf))->ShortGI20Mhz) // ap support 40 bw short GI + if (((struct ht_capability_ele *)(pHTInfo->PeerHTCapBuf))->short_gi20_mhz) // ap support 40 bw short GI retValue = true; else retValue = false; @@ -557,10 +557,10 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u // pCapELE->chl_width = (pHT->bRegBW40MHz?1:0); pCapELE->mimo_power_save= pHT->SelfMimoPs; - pCapELE->ShortGI20Mhz = 1; // We can receive Short GI!! + pCapELE->short_gi20_mhz = 1; // We can receive Short GI!! pCapELE->ShortGI40Mhz = 1; // We can receive Short GI!! //DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r", - //pCapELE->chl_width, pCapELE->ShortGI20Mhz, pCapELE->ShortGI40Mhz); + //pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->ShortGI40Mhz); pCapELE->TxSTBC = 1; pCapELE->RxSTBC = 0; pCapELE->DelayBA= 0;// Do not support now!! @@ -944,7 +944,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee) * TODO: */ pHTInfo->bCurShortGI20MHz = pHTInfo->bRegShortGI20MHz && - (pPeerHTCap->S
[PATCH 08/21] staging:rtl8192u: Rename RxSTBC - Style
Rename the bitfield member RxSTBC, since its use of CamelCase naming causes a checkpatch issue. Because the member is not actually used in code the variable has been renamed to 'not_used_rx_stbc'. The single line of code which initialised the member 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/rtl819x_HT.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index ab61c9e81c2c..994ff0f30a07 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -46,7 +46,7 @@ struct ht_capability_ele { u8 short_gi20_mhz:1; u8 short_gi40_mhz:1; u8 not_used_tx_stbc:1; - u8 RxSTBC:2; + u8 not_used_rx_stbc:2; u8 DelayBA:1; u8 MaxAMSDUSize:1; u8 DssCCk:1; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 65c377094278..c0789ddfd024 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -560,7 +560,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u pCapELE->short_gi40_mhz = 1; // We can receive Short GI!! //DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r", //pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz); - pCapELE->RxSTBC = 0; pCapELE->DelayBA= 0;// Do not support now!! pCapELE->MaxAMSDUSize = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0; pCapELE->DssCCk = ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ? 1 : 0) : 0); -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/21] staging:rtl8192u: Rename DelayBA - Style
Rename the bitfield member DelayBA, since its use of CamelCase naming causes a checkpatch issue. Since the member is not actually used in code the name has been changed to 'not_used_delay_ba'. The one line of initialisation code has been removed. This is a coding style change which should not impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index 994ff0f30a07..864bb9db2433 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -47,7 +47,7 @@ struct ht_capability_ele { u8 short_gi40_mhz:1; u8 not_used_tx_stbc:1; u8 not_used_rx_stbc:2; - u8 DelayBA:1; + u8 not_used_delay_ba:1; u8 MaxAMSDUSize:1; u8 DssCCk:1; u8 PSMP:1; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index c0789ddfd024..bc1d8e9221aa 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -560,7 +560,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u pCapELE->short_gi40_mhz = 1; // We can receive Short GI!! //DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r", //pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz); - pCapELE->DelayBA= 0;// Do not support now!! pCapELE->MaxAMSDUSize = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0; pCapELE->DssCCk = ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ? 1 : 0) : 0); pCapELE->PSMP = 0; // Do not support now!! -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/21] staging:rtl8192u: Rename MaxAMSDUSize - Style
Rename the bitfield member variable 'MaxAMSDUSize' to 'max_amsdu_size', this clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 9 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index 864bb9db2433..e4693832e1d6 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -48,7 +48,7 @@ struct ht_capability_ele { u8 not_used_tx_stbc:1; u8 not_used_rx_stbc:2; u8 not_used_delay_ba:1; - u8 MaxAMSDUSize:1; + u8 max_amsdu_size:1; u8 DssCCk:1; u8 PSMP:1; u8 Rsvd1:1; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index bc1d8e9221aa..7fb31638f60d 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -145,7 +145,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString) IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupported Channel Width = %s\n", (pCapELE->chl_width) ? "20MHz" : "20/40MHz"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport Short GI for 20M = %s\n", (pCapELE->short_gi20_mhz) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport Short GI for 40M = %s\n", (pCapELE->short_gi40_mhz) ? "YES" : "NO"); - IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMax AMSDU Size = %s\n", (pCapELE->MaxAMSDUSize) ? "3839" : "7935"); + IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMax AMSDU Size = %s\n", (pCapELE->max_amsdu_size) ? "3839" : "7935"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->DssCCk) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMax AMPDU Factor = %d\n", pCapELE->MaxRxAMPDUFactor); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMPDU Density = %d\n", pCapELE->MPDUDensity); @@ -560,7 +560,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u pCapELE->short_gi40_mhz = 1; // We can receive Short GI!! //DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r", //pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz); - pCapELE->MaxAMSDUSize = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0; + pCapELE->max_amsdu_size = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0; pCapELE->DssCCk = ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ? 1 : 0) : 0); pCapELE->PSMP = 0; // Do not support now!! pCapELE->LSigTxopProtect= 0; // Do not support now!! @@ -569,7 +569,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u * MAC HT parameters info * TODO: Nedd to take care of this part */ - IEEE80211_DEBUG(IEEE80211_DL_HT, "TX HT cap/info ele BW=%d MaxAMSDUSize:%d DssCCk:%d\n", pCapELE->chl_width, pCapELE->MaxAMSDUSize, pCapELE->DssCCk); + IEEE80211_DEBUG(IEEE80211_DL_HT, "TX HT cap/info ele BW=%d max_amsdu_size:%d DssCCk:%d\n", pCapELE->chl_width, pCapELE->max_amsdu_size, pCapELE->DssCCk); if (IsEncrypt) { pCapELE->MPDUDensity= 7; // 8us @@ -963,7 +963,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee) */ pHTInfo->bCurrent_AMSDU_Support = pHTInfo->bAMSDU_Support; - nMaxAMSDUSize = (pPeerHTCap->MaxAMSDUSize == 0) ? 3839 : 7935; + nMaxAMSDUSize = (pPeerHTCap->max_amsdu_size == 0) ? 3839 : 7935; if (pHTInfo->nAMSDU_MaxSize > nMaxAMSDUSize) pHTInfo->nCurrent_AMSDU_MaxSize = nMaxAMSDUSize; @@ -1169,7 +1169,6 @@ void HTInitializeBssDesc(PBSS_HT pBssHT) void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee, struct ieee80211_network *pNetwork) { PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo; -// u16 nMaxAMSDUSize; // struct ht_capability_ele *pPeerHTCap = (struct ht_capability_ele *)pNetwork->bssht.bdHTCapBuf; // PHT_INFORMATION_ELE pPeerHTInfo = (PHT_INFORMATION_ELE)pNetwork->bssht.bdHTInfoBuf; // u8* pMcsFilter; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/21] staging:rtl8192u: Rename LSigTxopProtect - Style
Rename the bitfield member 'LSigTxopProtect', since it currently causes a checkpatch issue due to its use of CamelCase naming. Since the member is not actually used in code it has been renamed to 'not_used_l_sig_txop_protect', and the singe initialisation line of code has been removed. This is purely a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index 132a6da3bf51..040660a46bca 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -52,7 +52,7 @@ struct ht_capability_ele { u8 dss_cck:1; u8 not_used_psmp:1; u8 not_used_rsvd1:1; - u8 LSigTxopProtect:1; + u8 not_used_l_sig_txop_protect:1; //MAC HT parameters info u8 MaxRxAMPDUFactor:2; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 2ea9fa3b6e0a..ec96e14a2bed 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -562,7 +562,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u //pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz); pCapELE->max_amsdu_size = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0; pCapELE->dss_cck= ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ? 1 : 0) : 0); - pCapELE->LSigTxopProtect= 0; // Do not support now!! /* * MAC HT parameters info -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/21] staging:rtl8192u: Rename PSMP - Style
Rename the bitfield member variable 'PSMP', since its uppercase name conflicts the coding standard on naming. Because the variable is not actually used in code it has been renamed to 'not_used_psmp'. The one line of initialisation code has been removed. This is a coding style change which should not impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index fd04461bcaf8..7f11257e2675 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -50,7 +50,7 @@ struct ht_capability_ele { u8 not_used_delay_ba:1; u8 max_amsdu_size:1; u8 dss_cck:1; - u8 PSMP:1; + u8 not_used_psmp:1; u8 Rsvd1:1; u8 LSigTxopProtect:1; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 299d486fad0d..2ea9fa3b6e0a 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -562,7 +562,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u //pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz); pCapELE->max_amsdu_size = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0; pCapELE->dss_cck= ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ? 1 : 0) : 0); - pCapELE->PSMP = 0; // Do not support now!! pCapELE->LSigTxopProtect= 0; // Do not support now!! /* -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/21] staging:rtl8192u: Rename TxSTBC - Style
Rename the bitfield member TxSTBC. As it stands the name causes a checkpatch issue due to its use of CamelCase naming style. Because the member is not actually used in the code the name has been changed to 'not_used_tx_stbc'. The two lines of code, one for initialisation and one for debug logging have 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/rtl819x_HT.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index 23f8ee39e32d..ab61c9e81c2c 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -45,7 +45,7 @@ struct ht_capability_ele { u8 not_used_green_field:1; u8 short_gi20_mhz:1; u8 short_gi40_mhz:1; - u8 TxSTBC:1; + u8 not_used_tx_stbc:1; u8 RxSTBC:2; u8 DelayBA:1; u8 MaxAMSDUSize:1; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 54c56cec612f..65c377094278 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -145,7 +145,6 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString) IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupported Channel Width = %s\n", (pCapELE->chl_width) ? "20MHz" : "20/40MHz"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport Short GI for 20M = %s\n", (pCapELE->short_gi20_mhz) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport Short GI for 40M = %s\n", (pCapELE->short_gi40_mhz) ? "YES" : "NO"); - IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport TX STBC = %s\n", (pCapELE->TxSTBC) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMax AMSDU Size = %s\n", (pCapELE->MaxAMSDUSize) ? "3839" : "7935"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->DssCCk) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMax AMPDU Factor = %d\n", pCapELE->MaxRxAMPDUFactor); @@ -561,7 +560,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u pCapELE->short_gi40_mhz = 1; // We can receive Short GI!! //DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r", //pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz); - pCapELE->TxSTBC = 1; pCapELE->RxSTBC = 0; pCapELE->DelayBA= 0;// Do not support now!! pCapELE->MaxAMSDUSize = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/21] staging:rtl8192u: Rename DssCCk - Style
Rename the bitfield member 'DssCCk' to 'dss_cck', this clears the checkpatch issue with CamelCase naming. This is a coding style change which should not impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index e4693832e1d6..fd04461bcaf8 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -49,7 +49,7 @@ struct ht_capability_ele { u8 not_used_rx_stbc:2; u8 not_used_delay_ba:1; u8 max_amsdu_size:1; - u8 DssCCk:1; + u8 dss_cck:1; u8 PSMP:1; u8 Rsvd1:1; u8 LSigTxopProtect:1; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 7fb31638f60d..299d486fad0d 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -146,7 +146,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString) IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport Short GI for 20M = %s\n", (pCapELE->short_gi20_mhz) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport Short GI for 40M = %s\n", (pCapELE->short_gi40_mhz) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMax AMSDU Size = %s\n", (pCapELE->max_amsdu_size) ? "3839" : "7935"); - IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->DssCCk) ? "YES" : "NO"); + IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->dss_cck) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMax AMPDU Factor = %d\n", pCapELE->MaxRxAMPDUFactor); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMPDU Density = %d\n", pCapELE->MPDUDensity); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMCS Rate Set = [%x][%x][%x][%x][%x]\n", pCapELE->MCS[0],\ @@ -561,7 +561,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u //DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r", //pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz); pCapELE->max_amsdu_size = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0; - pCapELE->DssCCk = ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ? 1 : 0) : 0); + pCapELE->dss_cck= ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ? 1 : 0) : 0); pCapELE->PSMP = 0; // Do not support now!! pCapELE->LSigTxopProtect= 0; // Do not support now!! @@ -569,7 +569,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u * MAC HT parameters info * TODO: Nedd to take care of this part */ - IEEE80211_DEBUG(IEEE80211_DL_HT, "TX HT cap/info ele BW=%d max_amsdu_size:%d DssCCk:%d\n", pCapELE->chl_width, pCapELE->max_amsdu_size, pCapELE->DssCCk); + IEEE80211_DEBUG(IEEE80211_DL_HT, "TX HT cap/info ele BW=%d max_amsdu_size:%d dss_cck:%d\n", pCapELE->chl_width, pCapELE->max_amsdu_size, pCapELE->dss_cck); if (IsEncrypt) { pCapELE->MPDUDensity= 7; // 8us @@ -956,7 +956,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee) * TODO: */ pHTInfo->bCurSuppCCK = pHTInfo->bRegSuppCCK && - (pPeerHTCap->DssCCk == 1); + (pPeerHTCap->dss_cck == 1); /* * Config and configure A-MSDU setting -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 15/21] staging:rtl8192u: Rename MaxRxAMPDUFactor - Style
Rename the bitfield member 'MaxRxAMPDUFactor' to 'max_rx_ampdu_factor', this clears the checkpatch issue with CamelCase naming. The change is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 16 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index 040660a46bca..12db4ac9703b 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -55,7 +55,7 @@ struct ht_capability_ele { u8 not_used_l_sig_txop_protect:1; //MAC HT parameters info - u8 MaxRxAMPDUFactor:2; + u8 max_rx_ampdu_factor:2; u8 MPDUDensity:3; u8 Rsvd2:3; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index ec96e14a2bed..4fc919ebd10b 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -147,7 +147,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString) IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport Short GI for 40M = %s\n", (pCapELE->short_gi40_mhz) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMax AMSDU Size = %s\n", (pCapELE->max_amsdu_size) ? "3839" : "7935"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->dss_cck) ? "YES" : "NO"); - IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMax AMPDU Factor = %d\n", pCapELE->MaxRxAMPDUFactor); + IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMax AMPDU Factor = %d\n", pCapELE->max_rx_ampdu_factor); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMPDU Density = %d\n", pCapELE->MPDUDensity); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMCS Rate Set = [%x][%x][%x][%x][%x]\n", pCapELE->MCS[0],\ pCapELE->MCS[1], pCapELE->MCS[2], pCapELE->MCS[3], pCapELE->MCS[4]); @@ -571,9 +571,9 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u if (IsEncrypt) { pCapELE->MPDUDensity= 7; // 8us - pCapELE->MaxRxAMPDUFactor = 2; // 2 is for 32 K and 3 is 64K + pCapELE->max_rx_ampdu_factor = 2; // 2 is for 32 K and 3 is 64K } else { - pCapELE->MaxRxAMPDUFactor = 3; // 2 is for 32 K and 3 is 64K + pCapELE->max_rx_ampdu_factor = 3; // 2 is for 32 K and 3 is 64K pCapELE->MPDUDensity= 0; // no density } @@ -978,8 +978,8 @@ void HTOnAssocRsp(struct ieee80211_device *ieee) */ if (!pHTInfo->bRegRT2RTAggregation) { // Decide AMPDU Factor according to protocol handshake - if (pHTInfo->AMPDU_Factor > pPeerHTCap->MaxRxAMPDUFactor) - pHTInfo->CurrentAMPDUFactor = pPeerHTCap->MaxRxAMPDUFactor; + if (pHTInfo->AMPDU_Factor > pPeerHTCap->max_rx_ampdu_factor) + pHTInfo->CurrentAMPDUFactor = pPeerHTCap->max_rx_ampdu_factor; else pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor; } else { @@ -990,12 +990,12 @@ void HTOnAssocRsp(struct ieee80211_device *ieee) if (ieee->current_network.bssht.bdRT2RTAggregation) { if (ieee->pairwise_key_type != KEY_TYPE_NA) // Realtek may set 32k in security mode and 64k for others - pHTInfo->CurrentAMPDUFactor = pPeerHTCap->MaxRxAMPDUFactor; + pHTInfo->CurrentAMPDUFactor = pPeerHTCap->max_rx_ampdu_factor; else pHTInfo->CurrentAMPDUFactor = HT_AGG_SIZE_64K; } else { - if (pPeerHTCap->MaxRxAMPDUFactor < HT_AGG_SIZE_32K) - pHTInfo->CurrentAMPDUFactor = pPeerHTCap->MaxRxAMPDUFactor; + if (pPeerHTCap->max_rx_ampdu_factor < HT_AGG_SIZE_32K) + pHTInfo->CurrentAMPDUFactor = pPeerHTCap->max_rx_ampdu_factor; else pHTInfo->CurrentAMPDUFactor = HT_AGG_SIZE_32K; } -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 20/21] staging:rtl8192u: Rename TxBFCap - Style
Rename the member variable 'TxBFCap', since it causes a checkpatch issue with CamelCase naming. The variable has been renamed to 'not_used_tx_bf_cap', since the member is not actually used, apart from initialisation, which has been removed. This is a coding style change which should not have an impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index b4a412d8f61c..fa4c0ab43703 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -66,7 +66,7 @@ struct ht_capability_ele { u16 not_used_ext_ht_cap_info; //TXBF Capabilities - u8 TxBFCap[4]; + u8 not_used_tx_bf_cap[4]; //Antenna Selection Capabilities u8 ASCap; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index fe7682d8e258..3e2172b6008b 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -599,9 +599,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u pCapELE->cap_mcs[i] = 0; } - //TXBF Capabilities - memset(pCapELE->TxBFCap, 0, 4); - //Antenna Selection Capabilities pCapELE->ASCap = 0; //add 2 to give space for element ID and len when construct frames -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/21] staging:rtl8192u: Rename MPDUDensity - Style
Rename the bitfield member 'MPDUDensity' to 'mpdu_density', this clears the checkpatch issue with CamelCase naming. This is a coding style change which should not have an impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h| 2 +- .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c| 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index 12db4ac9703b..9066f309bac9 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -56,7 +56,7 @@ struct ht_capability_ele { //MAC HT parameters info u8 max_rx_ampdu_factor:2; - u8 MPDUDensity:3; + u8 mpdu_density:3; u8 Rsvd2:3; //Supported MCS set diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 4fc919ebd10b..19c4903b572f 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -99,9 +99,9 @@ void HTUpdateDefaultSetting(struct ieee80211_device *ieee) #endif /* * 8190 only, Realtek proprietary aggregation mode -* Set MPDUDensity=2, 1: Set MPDUDensity=2(32k) for Realtek AP and set MPDUDensity=0(8k) for others +* Set mpdu_density=2, 1: Set mpdu_density=2(32k) for Realtek AP and set mpdu_density=0(8k) for others */ - pHTInfo->bRegRT2RTAggregation = 1;//0: Set MPDUDensity=2, 1: Set MPDUDensity=2(32k) for Realtek AP and set MPDUDensity=0(8k) for others + pHTInfo->bRegRT2RTAggregation = 1;//0: Set mpdu_density=2, 1: Set mpdu_density=2(32k) for Realtek AP and set mpdu_density=0(8k) for others // For Rx Reorder Control pHTInfo->bRegRxReorderEnable = 1; @@ -148,7 +148,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString) IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMax AMSDU Size = %s\n", (pCapELE->max_amsdu_size) ? "3839" : "7935"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->dss_cck) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMax AMPDU Factor = %d\n", pCapELE->max_rx_ampdu_factor); - IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMPDU Density = %d\n", pCapELE->MPDUDensity); + IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMPDU Density = %d\n", pCapELE->mpdu_density); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMCS Rate Set = [%x][%x][%x][%x][%x]\n", pCapELE->MCS[0],\ pCapELE->MCS[1], pCapELE->MCS[2], pCapELE->MCS[3], pCapELE->MCS[4]); } @@ -570,11 +570,11 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u IEEE80211_DEBUG(IEEE80211_DL_HT, "TX HT cap/info ele BW=%d max_amsdu_size:%d dss_cck:%d\n", pCapELE->chl_width, pCapELE->max_amsdu_size, pCapELE->dss_cck); if (IsEncrypt) { - pCapELE->MPDUDensity= 7; // 8us + pCapELE->mpdu_density = 7; // 8us pCapELE->max_rx_ampdu_factor = 2; // 2 is for 32 K and 3 is 64K } else { pCapELE->max_rx_ampdu_factor = 3; // 2 is for 32 K and 3 is 64K - pCapELE->MPDUDensity= 0; // no density + pCapELE->mpdu_density = 0; // no density } //Supported MCS set @@ -1005,10 +1005,10 @@ void HTOnAssocRsp(struct ieee80211_device *ieee) * <2> Set AMPDU Minimum MPDU Start Spacing * 802.11n 3.0 section 9.7d.3 */ - if (pHTInfo->MPDU_Density > pPeerHTCap->MPDUDensity) + if (pHTInfo->MPDU_Density > pPeerHTCap->mpdu_density) pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density; else - pHTInfo->CurrentMPDUDensity = pPeerHTCap->MPDUDensity; + pHTInfo->CurrentMPDUDensity = pPeerHTCap->mpdu_density; if (ieee->pairwise_key_type != KEY_TYPE_NA) pHTInfo->CurrentMPDUDensity = 7; // 8us // Force TX AMSDU -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/21] staging:rtl8192u: Rename MCS - Style
Rename the member 'MCS' to 'cap_mcs', since the uppercase name conflicts with the coding standard. The 'cap' has been prepended to make the variable easier to find in the code. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- .../staging/rtl8192u/ieee80211/ieee80211_wx.c | 2 +- .../staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- .../rtl8192u/ieee80211/rtl819x_HTProc.c | 20 +-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c index a6fe975902bb..a96cc5c01b10 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c @@ -159,7 +159,7 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee, ((ht_cap->short_gi40_mhz)?1:0): ((ht_cap->short_gi20_mhz)?1:0); - max_mcs = HTGetHighestMCSRate(ieee, ht_cap->MCS, MCS_FILTER_ALL); + max_mcs = HTGetHighestMCSRate(ieee, ht_cap->cap_mcs, MCS_FILTER_ALL); rate = MCS_DATA_RATE[is40M][isShortGI][max_mcs&0x7f]; if (rate > max_rate) max_rate = rate; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index 2b73279b45d8..edd0c00307bf 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -60,7 +60,7 @@ struct ht_capability_ele { u8 not_used_rsvd2:3; //Supported MCS set - u8 MCS[16]; + u8 cap_mcs[16]; //Extended HT Capability Info u16 ExtHTCapInfo; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 19c4903b572f..625d117e5a8f 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -149,8 +149,8 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString) IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->dss_cck) ? "YES" : "NO"); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMax AMPDU Factor = %d\n", pCapELE->max_rx_ampdu_factor); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMPDU Density = %d\n", pCapELE->mpdu_density); - IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMCS Rate Set = [%x][%x][%x][%x][%x]\n", pCapELE->MCS[0],\ - pCapELE->MCS[1], pCapELE->MCS[2], pCapELE->MCS[3], pCapELE->MCS[4]); + IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMCS Rate Set = [%x][%x][%x][%x][%x]\n", pCapELE->cap_mcs[0],\ + pCapELE->cap_mcs[1], pCapELE->cap_mcs[2], pCapELE->cap_mcs[3], pCapELE->cap_mcs[4]); } /* @@ -578,15 +578,15 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u } //Supported MCS set - memcpy(pCapELE->MCS, ieee->Regdot11HTOperationalRateSet, 16); + memcpy(pCapELE->cap_mcs, ieee->Regdot11HTOperationalRateSet, 16); if (pHT->IOTAction & HT_IOT_ACT_DISABLE_MCS15) - pCapELE->MCS[1] &= 0x7f; + pCapELE->cap_mcs[1] &= 0x7f; if (pHT->IOTAction & HT_IOT_ACT_DISABLE_MCS14) - pCapELE->MCS[1] &= 0xbf; + pCapELE->cap_mcs[1] &= 0xbf; if (pHT->IOTAction & HT_IOT_ACT_DISABLE_ALL_2SS) - pCapELE->MCS[1] &= 0x00; + pCapELE->cap_mcs[1] &= 0x00; /* * 2008.06.12 @@ -596,7 +596,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u int i; for (i = 1; i < 16; i++) - pCapELE->MCS[i] = 0; + pCapELE->cap_mcs[i] = 0; } //Extended HT Capability Info @@ -1037,10 +1037,10 @@ void HTOnAssocRsp(struct ieee80211_device *ieee) * Handle Ralink AP bad MCS rate set condition. Joseph. * This fix the bug of Ralink AP. This may be removed in the future. */ - if (pPeerHTCap->MCS[0] == 0) - pPeerHTCap->MCS[0] = 0xff; + if (pPeerHTCap->cap_mcs[0] == 0) + pPeerHTCap->cap_mcs[0] = 0xff; - HTFilterMCSRate(ieee, pPeerHTCap->MCS, ieee->dot11HTOperationalRateSet); + HTFilterMCSRate(ieee, pPeerHTCap->cap_mcs, ieee->dot11HTOperationalRateSet); /* * Config MIMO Power Save setting -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 21/21] staging:rtl8192u: Rename ASCap - Style
Rename the member variable ASCap, as it causes a checkpatch issue with CamelCase naming. The member has been renamed to 'not_used_as_cap', since it is not actually used in code, apart from initialisation, which 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/rtl819x_HT.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index fa4c0ab43703..f46d7f3ed7e4 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -69,7 +69,7 @@ struct ht_capability_ele { u8 not_used_tx_bf_cap[4]; //Antenna Selection Capabilities - u8 ASCap; + u8 not_used_as_cap; } __packed; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 3e2172b6008b..a1fb971f737c 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -599,8 +599,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u pCapELE->cap_mcs[i] = 0; } - //Antenna Selection Capabilities - pCapELE->ASCap = 0; //add 2 to give space for element ID and len when construct frames if (pHT->ePeerHTSpecVer == HT_SPEC_VER_EWC) *len = 30 + 2; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 17/21] staging:rtl8192u: Rename Rsvd2 - Style
Rename the bitfield member 'Rsvd2', since it causes a checkpatch issue due to it's use of CamelCase naming. The member has been renamed to 'not_used_rsvd2', since it is not actually used in the code. This is a coding style change which should not impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index 9066f309bac9..2b73279b45d8 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -57,7 +57,7 @@ struct ht_capability_ele { //MAC HT parameters info u8 max_rx_ampdu_factor:2; u8 mpdu_density:3; - u8 Rsvd2:3; + u8 not_used_rsvd2:3; //Supported MCS set u8 MCS[16]; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/21] staging:rtl8192u: Rename ExtHTCapInfo - Style
Rename the member variable 'ExtHTCapInfo', since it causes a checkpatch issue, due to its use of CamelCase naming. The name has been changed to 'not_used_ext_ht_cap_info' since the member variable is not actually used, apart from an initialisation which 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/rtl819x_HT.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index edd0c00307bf..b4a412d8f61c 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -63,7 +63,7 @@ struct ht_capability_ele { u8 cap_mcs[16]; //Extended HT Capability Info - u16 ExtHTCapInfo; + u16 not_used_ext_ht_cap_info; //TXBF Capabilities u8 TxBFCap[4]; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 625d117e5a8f..fe7682d8e258 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -599,9 +599,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u pCapELE->cap_mcs[i] = 0; } - //Extended HT Capability Info - memset(&pCapELE->ExtHTCapInfo, 0, 2); - //TXBF Capabilities memset(pCapELE->TxBFCap, 0, 4); -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/21] staging:rtl8192u: Rename Rsvd1 - Style
Rename the bitfield member 'Rsvd1', since its name causes a checkpatch issue due to the use of CamelCase naming. The name has been changed to 'not_used_rsvd1' since the variable is not actually used in code. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h index 7f11257e2675..132a6da3bf51 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h @@ -51,7 +51,7 @@ struct ht_capability_ele { u8 max_amsdu_size:1; u8 dss_cck:1; u8 not_used_psmp:1; - u8 Rsvd1:1; + u8 not_used_rsvd1:1; u8 LSigTxopProtect:1; //MAC HT parameters info -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style
On Wed, Aug 29, 2018 at 04:21:54PM -0500, Larry Finger wrote: > On 08/29/2018 04:14 PM, Joe Perches wrote: > > On Wed, 2018-08-29 at 21:35 +0100, John Whitmore wrote: > > > Rename the bit field element AdvCoding, as it causes a checkpatch issue > > > with CamelCase naming. As the element is not actually used in code it > > > has been renamed to 'not_used_adv_coding'. > > > > > > The single line of code which initialises the bit has been removed, > > > as the field is unused. > > > > > > This is a purely coding style change which should have no impact > > > on runtime code execution. > > > > Hi John. > > > > Other than the somewhat useful code style cleanups, is there > > a point at which you will feel comfortable doing actual code > > changes to this driver? > > > > Perhaps support for the chipset could be converted to use > > mac80211 and moved into the directory with the other realtek > > drivers in drivers/net/wireless/realtek/rtl8xxxu/... > > > > Larry? What do you think? > > First of all, if a variable is not used, then it should be removed, not > merely renamed to satisfy checkpatch. > > All the Realtek USB devices should be added to rtl8xxxu, not merely moved > into that directory. Jes Sorensen created a well-designed driver the is > structured to permit addition of different initialization routines, etc. > That said, the conversion will not be easy. In addition, it will require > having your hands on a real device - a requirement that I cannot meet for > the RTL8192U. > > Larry > Oops... it probably doesn't look like it, at the moment, but 'actual code changes to this driver' was where I'm hoping to get to. There's a lot of stuff in the header files, including member variables, which are not used in the code. I was hoping to strip these out incrementally to minimise the amount of source code that has to be understood. I'm not familiar with the overall network, or 80211, subsystem architecture, but it's hard to see why this driver has it's own private ieee80211.h file. I totally agree that the unused variables should be removed, and they will be, if we can accept that they are in fact unused && size doesn't matter. The structure in question 'struct ht_capability_ele' is used in, what I consider to be, a strange way in the file ieee80211_wx.c. struct ht_capability_ele *ht_cap = NULL; ... ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[4]; ... ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[0]; I have been trying to find a datasheet for this device but to date me query strings haven't given me much joy. I must try and get my hands on the device in question. Thank ye for your comments, and sorry for the "somewhat useful" changes to date, but doing these changes is letting me get the hang of this code, which I refuse to comment on because there are probably guidelines on using naughty language on here. ;) When I see lines like these two: ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[4]; ... ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[0]; I think that size might very well matter for the moment. The BSS_HT structure is farther down the header file so when I clean up that struct things might be clearer. I can only hope. jwhitmore ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style
On Thu, Aug 30, 2018 at 11:26:28AM +0300, Dan Carpenter wrote: > On Thu, Aug 30, 2018 at 11:23:05AM +0300, Dan Carpenter wrote: > > On Wed, Aug 29, 2018 at 09:35:27PM +0100, John Whitmore wrote: > > > Rename the bit field element AdvCoding, as it causes a checkpatch issue > > > with CamelCase naming. As the element is not actually used in code it > > > has been renamed to 'not_used_adv_coding'. > > > > > > The single line of code which initialises the bit has been removed, > > > as the field is unused. > > > > > > This is a purely coding style change which should have no impact > > > on runtime code execution. > > > > > > Signed-off-by: John Whitmore > > > --- > > > drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +- > > > drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 - > > > 2 files changed, 1 insertion(+), 2 deletions(-) > > > > > > diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h > > > b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h > > > index 64d5359cf7e2..66a0274077d3 100644 > > > --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h > > > +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h > > > @@ -39,7 +39,7 @@ enum ht_extension_chan_offset { > > > > > > struct ht_capability_ele { > > > //HT capability info > > > - u8 AdvCoding:1; > > > + u8 not_used_adv_coding:1; > > > > I can't review any more of this patchset when this is the first line... > > > > That email wasn't very clear. If you think some of your patches are > going to be more controversial than others, put them at the very end so > we can at least apply part of the patchset. > > regards, > dan carpenter > Thanks for the clarification, I needed it ;) I'm not sure I consider any of the patches in the series as being controversial. They are all just simple name changes of member variables. As a number of the variables are not used in code the names have been changed to reflect that fact. If I'd renamed them and left out the 'not_used_' prefix would the changes not be controversial? I don't think the fact that the members are unused is a biggy. What might appear to be controversial is that I didn't simply remove the members. I haven't done that because I'm not yet satisfied that the structure's size is insignificant. As soon as I am happy that the size of the structure is not important, to runtime code execution, there'll be a patch which removes a number of 'not_used_...' members from a structure. Alternatively if the size if important there might be a patch which renames a number of unused bitfield members to reserved_1, reserved_2, reserved_3 Perhaps I should have held off this patch set until I had satisfied myself that the size either, does or does not, matter and combine all changes into one series of patches. On the other hand I've added an extra step which can be reviewed and clearly see the incremental changes. I'm happy enough for the whole patch set to be rejected for the moment, but I'd be even happier if on review somebody pointed out that a member which I have decided is unused in the code is actually used and a patch gets rejected on those grounds. If everybody accepts this series, that asserts that members are unused, the next step is easy either way. jwhitmore ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style
On Thu, Aug 30, 2018 at 03:34:01PM -0700, Joe Perches wrote: > On Wed, 2018-08-29 at 22:55 +0100, John Whitmore wrote: > > On Wed, Aug 29, 2018 at 04:21:54PM -0500, Larry Finger wrote: > > > On 08/29/2018 04:14 PM, Joe Perches wrote: > [] > > > > Perhaps support for the chipset could be converted to use > > > > mac80211 and moved into the directory with the other realtek > > > > drivers in drivers/net/wireless/realtek/rtl8xxxu/... > [] > > > All the Realtek USB devices should be added to rtl8xxxu, not merely moved > > > into that directory. Jes Sorensen created a well-designed driver the is > > > structured to permit addition of different initialization routines, etc. > > > That said, the conversion will not be easy. In addition, it will require > > > having your hands on a real device - a requirement that I cannot meet for > > > the RTL8192U. > [] > > > Oops... it probably doesn't look like it, at the moment, but 'actual code > > changes to this driver' was where I'm hoping to get to. There's a lot of > > stuff in the header files, including member variables, which are not used > > in the code. I was hoping to strip these out incrementally to minimise > > the amount of source code that has to be understood. I'm not familiar > > with the overall network, or 80211, subsystem architecture, but it's hard > > to see why this driver has it's own private ieee80211.h file. > > That's true and the reason why this code should > eventually be deleted if possible and its functionality > integrated into the existing realtek/rtl8u code. > > > I must try and get my hands on the device in question. > > That'd be good, though likely this device is obsolete. > Good luck finding one. > Maybe if the whole driver was deleted nobody would notice ;) Thanks for your help. I'm afraid I carried on in the same vain cleaning stuff up but I do have to look at realtek/rtl8u, thanks for pointing out where the goalposts are, miles away ;) > > Thank ye for your comments, and sorry for the "somewhat useful" changes > > to date, but doing these changes is letting me get the hang of this code, > > which I refuse to comment on because there are probably guidelines on using > > naughty language on here. ;) > > Feel free. > > The one look I took at any existing multi-platform realtek > code with all the #ifdefs made me not want look at it again. > > https://github.com/hadess/rtl8723bs/ > > I said a naughty under my breath too. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/20] staging:rtl8192u: Remove unused functions - Style
Remove unused function declarations. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 10 -- drivers/staging/rtl8192u/r8192U_core.c | 7 --- 2 files changed, 17 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 70bbd1fadcca..b3e6ce2acedb 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -1103,22 +1103,12 @@ void force_pci_posting(struct net_device *dev); void rtl8192_rtx_disable(struct net_device *dev); void rtl8192_rx_enable(struct net_device *dev); -void rtl8192_tx_enable(struct net_device *dev); -void rtl8192_disassociate(struct net_device *dev); -void rtl8185_set_rf_pins_enable(struct net_device *dev, u32 a); - -void rtl8192_set_anaparam(struct net_device *dev, u32 a); -void rtl8185_set_anaparam2(struct net_device *dev, u32 a); void rtl8192_update_msr(struct net_device *dev); int rtl8192_down(struct net_device *dev); int rtl8192_up(struct net_device *dev); void rtl8192_commit(struct net_device *dev); void rtl8192_set_chan(struct net_device *dev, short ch); -void write_phy(struct net_device *dev, u8 adr, u8 data); -void write_phy_cck(struct net_device *dev, u8 adr, u32 data); -void write_phy_ofdm(struct net_device *dev, u8 adr, u32 data); -void rtl8185_tx_antenna(struct net_device *dev, u8 ant); void rtl8192_set_rxconf(struct net_device *dev); void rtl819xusb_beacon_tx(struct net_device *dev, u16 tx_rate); diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 12783b88eb58..98bb40c50f40 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -830,13 +830,6 @@ void rtl8192_rx_enable(struct net_device *dev) rtl8192_rx_initiate(dev); } - -void rtl8192_tx_enable(struct net_device *dev) -{ -} - - - void rtl8192_rtx_disable(struct net_device *dev) { u8 cmd; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/20] staging:rtl8192u: Rename PHY_Beacon_RSSI_SLID_WIN_MAX - Style
Rename the Macro PHY_Beacon_RSSI_SLID_WIN_MAX to PHY_BEACON_RSSI_SLID_WIN_MAX, this clears the checkpatch issue with CamelCase naming. This is purely a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 528c50be3894..87c1a69b2e1c 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -150,7 +150,7 @@ extern u32 rt_global_debug_component; #define RTL819X_DEFAULT_RF_TYPE RF_1T2R #define IEEE80211_WATCH_DOG_TIME2000 -#definePHY_Beacon_RSSI_SLID_WIN_MAX10 +#definePHY_BEACON_RSSI_SLID_WIN_MAX10 /* For Tx Power Tracking */ #defineOFDM_Table_Length 19 #defineCCK_Table_length12 diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index dd87cee6604b..4d43176bdb6c 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -3997,15 +3997,15 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, if (pprevious_stats->bPacketBeacon) { /* record the beacon pwdb to the sliding window. */ - if (slide_beacon_adc_pwdb_statistics++ >= PHY_Beacon_RSSI_SLID_WIN_MAX) { - slide_beacon_adc_pwdb_statistics = PHY_Beacon_RSSI_SLID_WIN_MAX; + if (slide_beacon_adc_pwdb_statistics++ >= PHY_BEACON_RSSI_SLID_WIN_MAX) { + slide_beacon_adc_pwdb_statistics = PHY_BEACON_RSSI_SLID_WIN_MAX; last_beacon_adc_pwdb = priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index]; priv->stats.Slide_Beacon_Total -= last_beacon_adc_pwdb; } priv->stats.Slide_Beacon_Total += pprevious_stats->RxPWDBAll; priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index] = pprevious_stats->RxPWDBAll; slide_beacon_adc_pwdb_index++; - if (slide_beacon_adc_pwdb_index >= PHY_Beacon_RSSI_SLID_WIN_MAX) + if (slide_beacon_adc_pwdb_index >= PHY_BEACON_RSSI_SLID_WIN_MAX) slide_beacon_adc_pwdb_index = 0; pprevious_stats->RxPWDBAll = priv->stats.Slide_Beacon_Total / slide_beacon_adc_pwdb_statistics; if (pprevious_stats->RxPWDBAll >= 3) -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/20] staging:rtl8192u: Rename Offset - Style
Rename the member variable 'Offset' to 'offset', this clears the checkpatch issue with CamelCase naming. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 9931ede1524b..8aaea1d8cf50 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -159,7 +159,7 @@ extern u32 rt_global_debug_component; struct tx_desc_819x_usb { /* DWORD 0 */ u16 pkt_size; - u8 Offset; + u8 offset; u8 Reserved0:3; u8 CmdInit:1; u8 LastSeg:1; diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 2a3cb0f1ac07..d4af6cc01fc6 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1516,7 +1516,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb) /* DWORD 0 */ tx_desc->LINIP = 0; tx_desc->CmdInit = 1; - tx_desc->Offset = sizeof(struct tx_fwinfo_819x_usb) + 8; + tx_desc->offset = sizeof(struct tx_fwinfo_819x_usb) + 8; tx_desc->pkt_size = (skb->len - TX_PACKET_SHIFT_BYTES) & 0x; /*DWORD 1*/ -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 15/20] staging:rtl8192u: Rename Reserved... structure members - Style
Rename the 'Reserved...' members of the 'tx_desc_819x_usb' structure to 'reserved...'. This change clears the checkpatch issue with CamelCase naming. This is a simple coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 8aaea1d8cf50..5d643870a1e3 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -160,7 +160,7 @@ struct tx_desc_819x_usb { /* DWORD 0 */ u16 pkt_size; u8 offset; - u8 Reserved0:3; + u8 reserved0:3; u8 CmdInit:1; u8 LastSeg:1; u8 FirstSeg:1; @@ -177,7 +177,7 @@ struct tx_desc_819x_usb { u8 PIFS:1; u8 QueueSelect:5; u8 NoACM:1; - u8 Reserved1:2; + u8 reserved1:2; u8 SecCAMID:5; u8 SecDescAssign:1; u8 SecType:2; @@ -185,13 +185,13 @@ struct tx_desc_819x_usb { /* DWORD 2 */ u16 TxBufferSize; u8 ResvForPaddingLen:7; - u8 Reserved3:1; - u8 Reserved4; + u8 reserved3:1; + u8 reserved4; /* DWORD 3, 4, 5 */ - u32 Reserved5; - u32 Reserved6; - u32 Reserved7; + u32 reserved5; + u32 reserved6; + u32 reserved7; }; struct tx_desc_cmd_819x_usb { -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/20] staging:rtl8192u: Rename LINIP - Style
Rename the member variable 'LINIP' to 'linip', this change is to conform to the coding style guidelines, member variables in lowercase. This is a simple coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 66efa59eabf0..68e82b32a88e 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -164,7 +164,7 @@ struct tx_desc_819x_usb { u8 cmd_init:1; u8 last_seg:1; u8 first_seg:1; - u8 LINIP:1; + u8 linip:1; u8 OWN:1; /* DWORD 1 */ diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index a4d1b55a1117..911d0214b48a 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1514,7 +1514,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb) /* Fill Tx descriptor */ memset(tx_desc, 0, sizeof(struct tx_desc_819x_usb)); /* DWORD 0 */ - tx_desc->LINIP = 0; + tx_desc->linip = 0; tx_desc->cmd_init = 1; tx_desc->offset = sizeof(struct tx_fwinfo_819x_usb) + 8; tx_desc->pkt_size = (skb->len - TX_PACKET_SHIFT_BYTES) & 0x; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/20] staging:rtl8192u: Rename CmdInit - Style
Rename the member variable 'CmdInit, to 'cmd_init', this change clears the checkpatch issue with CamelCase naming. This is a simple coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 5d643870a1e3..4d29b7427a0e 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -161,7 +161,7 @@ struct tx_desc_819x_usb { u16 pkt_size; u8 offset; u8 reserved0:3; - u8 CmdInit:1; + u8 cmd_init:1; u8 LastSeg:1; u8 FirstSeg:1; u8 LINIP:1; diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index d4af6cc01fc6..b385c686370b 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1515,7 +1515,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb) memset(tx_desc, 0, sizeof(struct tx_desc_819x_usb)); /* DWORD 0 */ tx_desc->LINIP = 0; - tx_desc->CmdInit = 1; + tx_desc->cmd_init = 1; tx_desc->offset = sizeof(struct tx_fwinfo_819x_usb) + 8; tx_desc->pkt_size = (skb->len - TX_PACKET_SHIFT_BYTES) & 0x; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/20] staging:rtl8192u: Rename FirstSeg - Style
Rename the member variable 'FirstSeg' to 'first_seg', this change clears the checkpatch issue with CamelCase naming. This is a simple coding style change and as such should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 672cbfa688f7..66efa59eabf0 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -163,7 +163,7 @@ struct tx_desc_819x_usb { u8 reserved0:3; u8 cmd_init:1; u8 last_seg:1; - u8 FirstSeg:1; + u8 first_seg:1; u8 LINIP:1; u8 OWN:1; diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index dfbba1177470..a4d1b55a1117 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1556,7 +1556,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb) * all of the descriptors */ /* DWORD 0 */ - tx_desc->FirstSeg = 1; + tx_desc->first_seg = 1; tx_desc->last_seg = 1; tx_desc->OWN = 1; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 17/20] staging:rtl8192u: Rename LastSeg - Style
Rename the member variable 'LastSeg' to 'last_seg', this change clears the checkpatch issue with CamelCase naming. This is a simple coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 4d29b7427a0e..672cbfa688f7 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -162,7 +162,7 @@ struct tx_desc_819x_usb { u8 offset; u8 reserved0:3; u8 cmd_init:1; - u8 LastSeg:1; + u8 last_seg:1; u8 FirstSeg:1; u8 LINIP:1; u8 OWN:1; diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index b385c686370b..dfbba1177470 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1557,7 +1557,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb) */ /* DWORD 0 */ tx_desc->FirstSeg = 1; - tx_desc->LastSeg = 1; + tx_desc->last_seg = 1; tx_desc->OWN = 1; /* DWORD 2 */ -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/20] staging:rtl8192u: Rename RTL819xU_MODULE_NAME - Style
Rename the MACRO RTL819xU_MODULE_NAME to RTL819XU_MODULE_NAME, this clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 4dcfcb4d3911..81a7072a6285 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -40,7 +40,7 @@ #include "ieee80211/ieee80211.h" #define RTL8192U -#define RTL819xU_MODULE_NAME "rtl819xU" +#define RTL819XU_MODULE_NAME "rtl819xU" /* HW security */ #define MAX_KEY_LEN 61 #define KEY_BUF_SIZE5 diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 98bb40c50f40..b3d32ea29fee 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -128,7 +128,7 @@ static void rtl8192_usb_disconnect(struct usb_interface *intf); static struct usb_driver rtl8192_usb_driver = { - .name = RTL819xU_MODULE_NAME, /* Driver name */ + .name = RTL819XU_MODULE_NAME, /* Driver name */ .id_table = rtl8192_usb_id_tbl, /* PCI_ID table */ .probe = rtl8192_usb_probe, /* probe fn */ .disconnect = rtl8192_usb_disconnect, /* remove fn */ @@ -627,7 +627,7 @@ static int __maybe_unused proc_get_stats_rx(struct seq_file *m, void *v) static void rtl8192_proc_module_init(void) { RT_TRACE(COMP_INIT, "Initializing proc filesystem"); - rtl8192_proc = proc_mkdir(RTL819xU_MODULE_NAME, init_net.proc_net); + rtl8192_proc = proc_mkdir(RTL819XU_MODULE_NAME, init_net.proc_net); } static void rtl8192_proc_init_one(struct net_device *dev) -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style
Yet another series of patchs to cleanup and clear some checkpatch isses, this time the file r8192U.h. These are all simple changes which are mostly renaming variables. A MACRO has been removed as it's not used in the code, and added SPDX-License-Identifier. John Whitmore (20): staging:rtl8192u: Remove write_cam() - Style staging:rtl8192u: Remove read_cam() - Style staging:rtl8192u: Remove unused functions - Style staging:rtl8192u: Add SPDX-License-Identifier - Style staging:rtl8192u: Rename RTL819xU_MODULE_NAME - Style staging:rtl8192u: Rename Rx_Smooth_Factor - Style staging:rtl8192u: Refactor RT_TRACE - Style staging:rtl8192u: Fix space characters - Style staging:rtl8192u: Remove RT_DEBUG_DATA - Style staging:rtl8192u: Rename PHY_Beacon_RSSI_SLID_WIN_MAX - Style staging:rtl8192u: Rename OFDM_Table_Length - Style staging:rtl8192u: Rename CCK_Table_length - Style staging:rtl8192u: Rename PktSize Style staging:rtl8192u: Rename Offset - Style staging:rtl8192u: Rename Reserved... structure members - Style staging:rtl8192u: Rename CmdInit - Style staging:rtl8192u: Rename LastSeg - Style staging:rtl8192u: Rename FirstSeg - Style staging:rtl8192u: Rename LINIP - Style staging:rtl8192u: Rename OWN - Style drivers/staging/rtl8192u/r8192U.h | 82 -- drivers/staging/rtl8192u/r8192U_core.c | 67 +++-- drivers/staging/rtl8192u/r8192U_dm.c | 22 +++ 3 files changed, 58 insertions(+), 113 deletions(-) -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/20] staging:rtl8192u: Remove write_cam() - Style
Remove the function write_cam() as it is unused. Simple style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 1 - drivers/staging/rtl8192u/r8192U_core.c | 7 --- 2 files changed, 8 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 1b51601df1ee..77324a471de1 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -1092,7 +1092,6 @@ short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb); short rtl8192_tx(struct net_device *dev, struct sk_buff *skb); u32 read_cam(struct net_device *dev, u8 addr); -void write_cam(struct net_device *dev, u8 addr, u32 data); int read_nic_byte(struct net_device *dev, int x, u8 *data); int read_nic_byte_E(struct net_device *dev, int x, u8 *data); diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 6b22aaa40ff9..caa618a845df 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -237,13 +237,6 @@ static void CamResetAllEntry(struct net_device *dev) write_nic_dword(dev, RWCAM, ulcommand); } - -void write_cam(struct net_device *dev, u8 addr, u32 data) -{ - write_nic_dword(dev, WCAMI, data); - write_nic_dword(dev, RWCAM, BIT(31) | BIT(16) | (addr & 0xff)); -} - u32 read_cam(struct net_device *dev, u8 addr) { u32 data; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/20] staging:rtl8192u: Add SPDX-License-Identifier - Style
Add SPDX-License-Identifier tag to the start of header file. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index b3e6ce2acedb..4dcfcb4d3911 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * This is part of rtl8187 OpenSource driver. * Copyright (C) Andrea Merello 2004-2005 -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/20] staging:rtl8192u: Refactor RT_TRACE - Style
Refactor the MACRO RT_TRACE to add parentheses around the parameter 'component', this clears the checkpatch warning with respect to precedence issues. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index b5ad69af8dac..c613894a6088 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -52,7 +52,7 @@ extern u32 rt_global_debug_component; #define RT_TRACE(component, x, args...) \ do {\ - if (rt_global_debug_component & component) \ + if (rt_global_debug_component & (component))\ pr_debug("RTL8192U: " x "\n", ##args); \ } while (0) -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/20] staging:rtl8192u: Remove read_cam() - Style
Remove the function read_cam(), as it is unused in code. Simple style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 2 -- drivers/staging/rtl8192u/r8192U_core.c | 9 - 2 files changed, 11 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 77324a471de1..70bbd1fadcca 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -1091,8 +1091,6 @@ bool init_firmware(struct net_device *dev); short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb); short rtl8192_tx(struct net_device *dev, struct sk_buff *skb); -u32 read_cam(struct net_device *dev, u8 addr); - int read_nic_byte(struct net_device *dev, int x, u8 *data); int read_nic_byte_E(struct net_device *dev, int x, u8 *data); int read_nic_dword(struct net_device *dev, int x, u32 *data); diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index caa618a845df..12783b88eb58 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -237,15 +237,6 @@ static void CamResetAllEntry(struct net_device *dev) write_nic_dword(dev, RWCAM, ulcommand); } -u32 read_cam(struct net_device *dev, u8 addr) -{ - u32 data; - - write_nic_dword(dev, RWCAM, 0x8000 | (addr & 0xff)); - read_nic_dword(dev, 0xa8, &data); - return data; -} - int write_nic_byte_E(struct net_device *dev, int indx, u8 data) { int status; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/20] staging:rtl8192u: Rename PktSize Style
Rename the member variable 'PktSize' to 'pkt_size', this change clears the checkpatch issue with CamelCase naming. This is a simple coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index e86a4b35a1f4..9931ede1524b 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -158,7 +158,7 @@ extern u32 rt_global_debug_component; /* For rtl819x */ struct tx_desc_819x_usb { /* DWORD 0 */ - u16 PktSize; + u16 pkt_size; u8 Offset; u8 Reserved0:3; u8 CmdInit:1; diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 4d43176bdb6c..2a3cb0f1ac07 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1517,7 +1517,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb) tx_desc->LINIP = 0; tx_desc->CmdInit = 1; tx_desc->Offset = sizeof(struct tx_fwinfo_819x_usb) + 8; - tx_desc->PktSize = (skb->len - TX_PACKET_SHIFT_BYTES) & 0x; + tx_desc->pkt_size = (skb->len - TX_PACKET_SHIFT_BYTES) & 0x; /*DWORD 1*/ tx_desc->SecCAMID = 0; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 20/20] staging:rtl8192u: Rename OWN - Style
Rename the member variable 'OWN' to 'own', this is to comply with the coding standard, where variables are named in lowercase. This is a simple coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 68e82b32a88e..f963b664e221 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -165,7 +165,7 @@ struct tx_desc_819x_usb { u8 last_seg:1; u8 first_seg:1; u8 linip:1; - u8 OWN:1; + u8 own:1; /* DWORD 1 */ u8 TxFWInfoSize; diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 911d0214b48a..4d0f70ec31ac 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1558,7 +1558,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb) /* DWORD 0 */ tx_desc->first_seg = 1; tx_desc->last_seg = 1; - tx_desc->OWN = 1; + tx_desc->own = 1; /* DWORD 2 */ tx_desc->TxBufferSize = (u32)(skb->len - USB_HWDESC_HEADER_LEN); -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/20] staging:rtl8192u: Fix space characters - Style
Fix the spacing issues, remove space after cast operation, and replace spaces at start of line with tab. These changes are purely coding style changes to resolve checkpatch issues. There should be no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index c613894a6088..e65a893fd084 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -112,7 +112,7 @@ extern u32 rt_global_debug_component; do {\ if ((rt_global_debug_component & (level)) == (level)) { \ int i; \ - u8 *pdata = (u8 *) data;\ + u8 *pdata = (u8 *)data; \ pr_debug("RTL8192U: %s()\n", __func__); \ for (i = 0; i < (int)(datalen); i++) { \ printk("%2x ", pdata[i]); \ @@ -877,9 +877,9 @@ typedef struct r8192_priv { int rx_inx; #endif - struct sk_buff_head rx_queue; - struct sk_buff_head skb_queue; - struct work_struct qos_activate; + struct sk_buff_head rx_queue; + struct sk_buff_head skb_queue; + struct work_struct qos_activate; short tx_urb_index; atomic_t tx_pending[0x10]; /* UART_PRIORITY + 1 */ @@ -1027,7 +1027,7 @@ typedef struct r8192_priv { u8 nrxAMPDU_aggr_num; /* For gpio */ -bool bHwRadioOff; + bool bHwRadioOff; u32 reset_count; bool bpbc_pressed; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/20] staging:rtl8192u: Rename OFDM_Table_Length - Style
Rename the defined constant OFDM_Table_Length to OFDM_TABLE_LENGTH, this clears the checkpatch issue with CamelCase naming. This is a simple coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h| 2 +- drivers/staging/rtl8192u/r8192U_dm.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 87c1a69b2e1c..6edbc8146e82 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -152,7 +152,7 @@ extern u32 rt_global_debug_component; #define IEEE80211_WATCH_DOG_TIME2000 #definePHY_BEACON_RSSI_SLID_WIN_MAX10 /* For Tx Power Tracking */ -#defineOFDM_Table_Length 19 +#defineOFDM_TABLE_LENGTH 19 #defineCCK_Table_length12 /* For rtl819x */ diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c index 5fb5f583f703..19b3b11c5edb 100644 --- a/drivers/staging/rtl8192u/r8192U_dm.c +++ b/drivers/staging/rtl8192u/r8192U_dm.c @@ -454,7 +454,7 @@ static void dm_bandwidth_autoswitch(struct net_device *dev) } /* dm_BandwidthAutoSwitch */ /* OFDM default at 0db, index=6. */ -static u32 OFDMSwingTable[OFDM_Table_Length] = { +static u32 OFDMSwingTable[OFDM_TABLE_LENGTH] = { 0x7f8001fe, /* 0, +6db */ 0x71c001c7, /* 1, +5db */ 0x65400195, /* 2, +4db */ @@ -672,7 +672,7 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev) if (!priv->btxpower_trackingInit) { /* Query OFDM default setting */ tmpRegA = rtl8192_QueryBBReg(dev, rOFDM0_XATxIQImbalance, bMaskDWord); - for (i = 0; i < OFDM_Table_Length; i++) { /* find the index */ + for (i = 0; i < OFDM_TABLE_LENGTH; i++) { /* find the index */ if (tmpRegA == OFDMSwingTable[i]) { priv->OFDM_index = (u8)i; RT_TRACE(COMP_POWER_TRACKING, "Initial reg0x%x = 0x%x, OFDM_index=0x%x\n", @@ -716,8 +716,8 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev) if (priv->ThermalMeter[0] >= (u8)tmpRegA) { /* lower temperature */ tmpOFDMindex = tmpCCK20Mindex = 6+(priv->ThermalMeter[0]-(u8)tmpRegA); tmpCCK40Mindex = tmpCCK20Mindex - 6; - if (tmpOFDMindex >= OFDM_Table_Length) - tmpOFDMindex = OFDM_Table_Length-1; + if (tmpOFDMindex >= OFDM_TABLE_LENGTH) + tmpOFDMindex = OFDM_TABLE_LENGTH - 1; if (tmpCCK20Mindex >= CCK_Table_length) tmpCCK20Mindex = CCK_Table_length-1; if (tmpCCK40Mindex >= CCK_Table_length) -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/20] staging:rtl8192u: Remove RT_DEBUG_DATA - Style
Remove the RT_DEBUG_DATA Macro. The macro causes a number of checkpatch issues, and is not actually used in code, so can simply be removed without issue. This is a coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 20 1 file changed, 20 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index e65a893fd084..528c50be3894 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -103,28 +103,8 @@ extern u32 rt_global_debug_component; #expr, __FILE__, __func__, __LINE__); \ } \ } while (0) -/* - * Debug out data buf. - * If you want to print DATA buffer related BA, - * please set ieee80211_debug_level to DATA|BA - */ -#define RT_DEBUG_DATA(level, data, datalen) \ - do {\ - if ((rt_global_debug_component & (level)) == (level)) { \ - int i; \ - u8 *pdata = (u8 *)data; \ - pr_debug("RTL8192U: %s()\n", __func__); \ - for (i = 0; i < (int)(datalen); i++) { \ - printk("%2x ", pdata[i]); \ - if ((i+1)%16 == 0) \ - printk("\n"); \ - } \ - printk("\n"); \ - } \ - } while (0) #else #define RTL8192U_ASSERT(expr) do {} while (0) -#define RT_DEBUG_DATA(level, data, datalen) do {} while (0) #endif /* RTL8169_DEBUG */ /* Queue Select Value in TxDesc */ -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/20] staging:rtl8192u: Rename CCK_Table_length - Style
Rename the constant CCK_Table_length to CCK_TABLE_LENGTH, this clears the checkpatch issue with CamelCase naming. This is a simple coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h| 2 +- drivers/staging/rtl8192u/r8192U_dm.c | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 6edbc8146e82..e86a4b35a1f4 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -153,7 +153,7 @@ extern u32 rt_global_debug_component; #definePHY_BEACON_RSSI_SLID_WIN_MAX10 /* For Tx Power Tracking */ #defineOFDM_TABLE_LENGTH 19 -#defineCCK_Table_length12 +#defineCCK_TABLE_LENGTH12 /* For rtl819x */ struct tx_desc_819x_usb { diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c index 19b3b11c5edb..874da0620936 100644 --- a/drivers/staging/rtl8192u/r8192U_dm.c +++ b/drivers/staging/rtl8192u/r8192U_dm.c @@ -476,7 +476,7 @@ static u32 OFDMSwingTable[OFDM_TABLE_LENGTH] = { 0x1040 /* 18, -12db */ }; -static u8 CCKSwingTable_Ch1_Ch13[CCK_Table_length][8] = { +static u8 CCKSwingTable_Ch1_Ch13[CCK_TABLE_LENGTH][8] = { {0x36, 0x35, 0x2e, 0x25, 0x1c, 0x12, 0x09, 0x04}, /* 0, +0db ===> CCK40M default */ {0x30, 0x2f, 0x29, 0x21, 0x19, 0x10, 0x08, 0x03}, /* 1, -1db */ {0x2b, 0x2a, 0x25, 0x1e, 0x16, 0x0e, 0x07, 0x03}, /* 2, -2db */ @@ -491,7 +491,7 @@ static u8 CCKSwingTable_Ch1_Ch13[CCK_Table_length][8] = { {0x0f, 0x0f, 0x0d, 0x0b, 0x08, 0x05, 0x03, 0x01}/* 11, -11db */ }; -static u8 CCKSwingTable_Ch14[CCK_Table_length][8] = { +static u8 CCKSwingTable_Ch14[CCK_TABLE_LENGTH][8] = { {0x36, 0x35, 0x2e, 0x1b, 0x00, 0x00, 0x00, 0x00}, /* 0, +0db ===> CCK40M default */ {0x30, 0x2f, 0x29, 0x18, 0x00, 0x00, 0x00, 0x00}, /* 1, -1db */ {0x2b, 0x2a, 0x25, 0x15, 0x00, 0x00, 0x00, 0x00}, /* 2, -2db */ @@ -682,7 +682,7 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev) /* Query CCK default setting From 0xa22 */ TempCCk = rtl8192_QueryBBReg(dev, rCCK0_TxFilter1, bMaskByte2); - for (i = 0; i < CCK_Table_length; i++) { + for (i = 0; i < CCK_TABLE_LENGTH; i++) { if (TempCCk == (u32)CCKSwingTable_Ch1_Ch13[i][0]) { priv->CCK_index = (u8) i; RT_TRACE(COMP_POWER_TRACKING, "Initial reg0x%x = 0x%x, CCK_index=0x%x\n", @@ -718,10 +718,10 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev) tmpCCK40Mindex = tmpCCK20Mindex - 6; if (tmpOFDMindex >= OFDM_TABLE_LENGTH) tmpOFDMindex = OFDM_TABLE_LENGTH - 1; - if (tmpCCK20Mindex >= CCK_Table_length) - tmpCCK20Mindex = CCK_Table_length-1; - if (tmpCCK40Mindex >= CCK_Table_length) - tmpCCK40Mindex = CCK_Table_length-1; + if (tmpCCK20Mindex >= CCK_TABLE_LENGTH) + tmpCCK20Mindex = CCK_TABLE_LENGTH - 1; + if (tmpCCK40Mindex >= CCK_TABLE_LENGTH) + tmpCCK40Mindex = CCK_TABLE_LENGTH - 1; } else { tmpval = (u8)tmpRegA - priv->ThermalMeter[0]; -- 2.18.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/20] staging:rtl8192u: Rename Rx_Smooth_Factor - Style
Rename the MACRO Rx_Smooth_Factor to RX_SMOOTH_FACTOR, this clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 20 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 81a7072a6285..b5ad69af8dac 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -45,7 +45,7 @@ #define MAX_KEY_LEN 61 #define KEY_BUF_SIZE5 -#defineRx_Smooth_Factor20 +#defineRX_SMOOTH_FACTOR20 #define DMESG(x, a...) #define DMESGW(x, a...) #define DMESGE(x, a...) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index b3d32ea29fee..dd87cee6604b 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -3975,13 +3975,13 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, pprevious_stats->RxMIMOSignalStrength[rfpath]; if (pprevious_stats->RxMIMOSignalStrength[rfpath] > priv->stats.rx_rssi_percentage[rfpath]) { priv->stats.rx_rssi_percentage[rfpath] = - ((priv->stats.rx_rssi_percentage[rfpath] * (Rx_Smooth_Factor - 1)) + - (pprevious_stats->RxMIMOSignalStrength[rfpath])) / (Rx_Smooth_Factor); + ((priv->stats.rx_rssi_percentage[rfpath] * (RX_SMOOTH_FACTOR - 1)) + + (pprevious_stats->RxMIMOSignalStrength[rfpath])) / (RX_SMOOTH_FACTOR); priv->stats.rx_rssi_percentage[rfpath] = priv->stats.rx_rssi_percentage[rfpath] + 1; } else { priv->stats.rx_rssi_percentage[rfpath] = - ((priv->stats.rx_rssi_percentage[rfpath] * (Rx_Smooth_Factor - 1)) + - (pprevious_stats->RxMIMOSignalStrength[rfpath])) / (Rx_Smooth_Factor); + ((priv->stats.rx_rssi_percentage[rfpath] * (RX_SMOOTH_FACTOR - 1)) + + (pprevious_stats->RxMIMOSignalStrength[rfpath])) / (RX_SMOOTH_FACTOR); } RT_TRACE(COMP_DBG, "priv->stats.rx_rssi_percentage[rfPath] = %d\n", @@ -4026,13 +4026,13 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, pprevious_stats->RxPWDBAll; if (pprevious_stats->RxPWDBAll > (u32)priv->undecorated_smoothed_pwdb) { priv->undecorated_smoothed_pwdb = - (((priv->undecorated_smoothed_pwdb) * (Rx_Smooth_Factor - 1)) + -(pprevious_stats->RxPWDBAll)) / (Rx_Smooth_Factor); + (((priv->undecorated_smoothed_pwdb) * (RX_SMOOTH_FACTOR - 1)) + +(pprevious_stats->RxPWDBAll)) / (RX_SMOOTH_FACTOR); priv->undecorated_smoothed_pwdb = priv->undecorated_smoothed_pwdb + 1; } else { priv->undecorated_smoothed_pwdb = - (((priv->undecorated_smoothed_pwdb) * (Rx_Smooth_Factor - 1)) + -(pprevious_stats->RxPWDBAll)) / (Rx_Smooth_Factor); + (((priv->undecorated_smoothed_pwdb) * (RX_SMOOTH_FACTOR - 1)) + +(pprevious_stats->RxPWDBAll)) / (RX_SMOOTH_FACTOR); } } @@ -4075,8 +4075,8 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, if (priv->stats.rx_evm_percentage[nspatial_stream] == 0) /* initialize */ priv->stats.rx_evm_percentage[nspatial_stream] = pprevious_stats->RxMIMOSignalQuality[nspatial_stream]; priv->stats.rx_evm_percentage[nspatial_stream] = - ((priv->stats.rx_evm_percentage[nspatial_stream] * (Rx_Smooth_Factor - 1)) + - (pprevious_stats->RxMIMOSignalQuality[nspatial_stream] * 1)) / (Rx_Smooth_Factor); + ((priv->stats.rx_evm_percentage[nspatial_stream] * (RX_SMOOTH_FACTOR - 1)) + +