staging:rtl8192u: Coding Style changes
cover 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(-)
Signature · 1 line
2.18.0
PATCH 1/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.
--- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 5 ----- 1 file changed, 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +0 -5
@@ -2,11 +2,7 @@#ifndef _BATYPE_H_#define _BATYPE_H_ -#define TOTAL_TXBA_NUM 16 -#define TOTAL_RXBA_NUM 16 -#define BA_SETUP_TIMEOUT 200 -#define BA_INACT_TIMEOUT 60000#define BA_POLICY_DELAYED 0#define BA_POLICY_IMMEDIATE 1
@@ -15,7 +11,6 @@#define ADDBA_STATUS_REFUSED 37#define ADDBA_STATUS_INVALID_PARAM 38 -#define DELBA_REASON_QSTA_LEAVING 36#define DELBA_REASON_END_BA 37#define DELBA_REASON_UNKNOWN_BA 38#define DELBA_REASON_TIMEOUT 39
Signature · 1 line
2.18.0
Greg KH
maintainerRe: [PATCH 01/17] staging:rtl8192u: Remove unused defines - Style
Quoted 9 lines · John Whitmore
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 <[email protected]>--- 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
Re: [PATCH 01/17] staging:rtl8192u: Remove unused defines - Style
Quoted 11 lines · Greg KH
Quoted 9 lines · John Whitmore
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 <[email protected]>--- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 5 ----- 1 file changed, 5 deletions(-)
Quoted 7 lines
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
Greg KH
maintainerRe: [PATCH 01/17] staging:rtl8192u: Remove unused defines - Style
Quoted 16 lines · John Whitmore
Quoted 15 lines · Greg KH
Quoted 9 lines · John Whitmore
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 <[email protected]>--- 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.
Quoted 8 lines
Quoted 3 lines
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.
Ok, thanks, I went through all of the staging patches today, I might have ended up looking at a few of them twice :)
greg k-h
PATCH 2/17 staging:rtl8192u: Refactor SEQUENCE_CONTROL - Style
In reply to John WhitmoreRemove 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 {
--- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 6 +++--- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +3 -3
@@ -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_SET BaParamSet;u16 BaTimeoutValue; - SEQUENCE_CONTROL BaStartSeqCtrl; + union sequence_control BaStartSeqCtrl; }BA_RECORD , *PBA_RECORD ;#endif //end _BATYPE_H_
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +2 -2
@@ -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.
Signature · 1 line
2.18.0
PATCH 3/17 staging:rtl8192u: Rename ShortData - Style
In reply to John WhitmoreRename 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.
--- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +1 -1
@@ -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 ;
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +1 -1
@@ -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? /*******************************************************************************************************************************
Signature · 1 line
2.18.0
PATCH 4/17 staging:rtl8192u: Rename member variables - Style
In reply to John WhitmoreRename 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.
--- 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(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +1 -1
@@ -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;
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +2 -2
@@ -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; };
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +1 -1
@@ -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 );
Signature · 1 line
2.18.0
PATCH 5/17 staging:rtl8192u: Refactor BA_PARAM_SET - Style
In reply to John WhitmoreRefactor 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.
--- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 6 +++--- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +3 -3
@@ -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_SET BaParamSet; +union ba_param_set BaParamSet;u16 BaTimeoutValue;union sequence_control BaStartSeqCtrl; }BA_RECORD , *PBA_RECORD ;
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +4 -4
@@ -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
Signature · 1 line
2.18.0
PATCH 6/17 staging:rtl8192u: Remove charData and rename shortData - Style
In reply to John WhitmoreThe 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.
--- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 3 +-- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +1 -2
@@ -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 ;
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +2 -2
@@ -90,7 +90,7 @@ static u8 RxTsDeleteBA(struct ieee80211_device *ieee, struct rx_ts_record *pRxTsvoid 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
Signature · 1 line
2.18.0
PATCH 7/17 staging:rtl8192u: Rename ba_param_set members - Style
In reply to John WhitmoreRename 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 TID to tid BufferSize to buffer_size
These are coding style changes which should have no impact on runtime code execution.
--- .../staging/rtl8192u/ieee80211/rtl819x_BA.h | 8 +++--- .../rtl8192u/ieee80211/rtl819x_BAProc.c | 28 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +4 -4
@@ -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; };
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +14 -14
@@ -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 sent. // If it is OK, then admitted. Or we can send DELBA to cancel BA mechanism. // -if (pBaParamSet->field.BAPolicy ==BA_POLICY_DELAYED ) { +if (pBaParamSet->field.ba_policy ==BA_POLICY_DELAYED ) {// Since this is a kind of ADDBA failed, we delay next ADDBA process. pTS->add_ba_req_delayed = true;DeActivateBAEntry (ieee, pAdmittedBA);
@@ -624,11 +624,11 @@ TsInitAddBA(DeActivateBAEntry (ieee, pBA); pBA->DialogToken++;// 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.BAPolicy = Policy;// Policy: Delayed or Immediate - pBA->BaParamSet.field.TID = pTS->ts_common_info.t_spec.ts_info.uc_tsid;// TID -// 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->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 +// buffer_size: This need to be set according to A-MPDU vector + pBA->BaParamSet.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->BaStartSeqCtrl.field.seq_num = (pTS->tx_cur_seq +3 ) %4096 ;// Block Ack will start after 3 packets later.
Signature · 1 line
2.18.0
PATCH 8/17 staging:rtl8192u: Refactor DELBA_PARAM_SET - Style
In reply to John WhitmoreRemove 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.
--- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 4 ++-- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +2 -2
@@ -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;
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +3 -3
@@ -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_SET pDelBaParamSet =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;
Signature · 1 line
2.18.0
PATCH 9/17 staging:rtl8192u: Refactor union delba_param_set - Style
In reply to John Whitmoreremove 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 TID to tid
These changes are all coding style changes which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 9 ++++----- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 12 ++++++------ 2 files changed, 10 insertions(+), 11 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +4 -5
@@ -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; };
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +6 -6
@@ -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__);
Signature · 1 line
2.18.0
PATCH 10/17 staging:rtl8192u: Refactor struct BA_RECORD - Style
In reply to John WhitmoreRemove 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.
--- .../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(-)
drivers/staging/rtl8192u/ieee80211/ieee80211.h +1 -1
@@ -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,
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +2 -2
@@ -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_
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +24 -24
171 lines not on this page · raw message
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +3 -3
@@ -78,8 +78,8 @@ struct ts_common_info {struct tx_ts_record {struct ts_common_info ts_common_info;u16 tx_cur_seq; -BA_RECORD tx_pending_ba_record; -BA_RECORD tx_admitted_ba_record; +struct ba_record tx_pending_ba_record; +struct ba_record tx_admitted_ba_record;u8 add_ba_req_in_progress;u8 add_ba_req_delayed;u8 using_ba;
@@ -93,7 +93,7 @@ struct rx_ts_record {u16 rx_timeout_indicate_seq;struct list_head rx_pending_pkt_list;struct timer_list rx_pkt_pending_timer; -BA_RECORD rx_admitted_ba_record; +struct ba_record rx_admitted_ba_record;u16 rx_last_seq_num;u8 rx_last_frag_num;u8 num;
Signature · 1 line
2.18.0
PATCH 11/17 staging:rtl8192u: Rename member variable Timer - Style
In reply to John WhitmoreRename 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.
--- 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(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +1 -1
@@ -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;
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +5 -5
@@ -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 *pBAstatic 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);
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +3 -3
@@ -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, TsInactTimeout,0 ); -timer_setup (&pRxTS->rx_admitted_ba_record.Timer, +timer_setup (&pRxTS->rx_admitted_ba_record.timer, RxBaInactTimeout,0 );timer_setup (&pRxTS->rx_pkt_pending_timer, RxPktPendingTimeout,0 );ResetRxTsEntry (pRxTS);
Signature · 1 line
2.18.0
PATCH 12/17 staging:rtl8192u: Rename bValid - Style
In reply to John WhitmoreRename 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.
--- .../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(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +1 -1
@@ -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;
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +1 -1
@@ -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;
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +11 -11
@@ -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 *pTxTsu8 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 *pRxTsstruct 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" );return -1 ; - }else if ((!pPendingBA->bValid) || (*pDialogToken != pPendingBA->DialogToken)) { + }else if ((!pPendingBA->valid) || (*pDialogToken != pPendingBA->DialogToken)) {IEEE80211_DEBUG (IEEE80211_DL_ERR ,"OnADDBARsp(): Recv ADDBA Rsp. BA invalid, DELBA! \n" ); ReasonCode =DELBA_REASON_UNKNOWN_BA ; goto OnADDBARsp_Reject;
@@ -617,7 +617,7 @@ TsInitAddBA( {struct ba_record *pBA = &pTS->tx_pending_ba_record; -if (pBA->bValid && !bOverwritePending) +if (pBA->valid && !bOverwritePending)return ;// Set parameters to "Pending" variable set
@@ -647,7 +647,7 @@ TsInitDelBA(struct ieee80211_device *ieee, struct ts_common_info *pTsCommonInfo,ieee80211_send_DELBA ( ieee, pTsCommonInfo->addr, - (pTxTs->tx_admitted_ba_record.bValid)?(&pTxTs->tx_admitted_ba_record):(&pTxTs->tx_pending_ba_record), + (pTxTs->tx_admitted_ba_record.valid)?(&pTxTs->tx_admitted_ba_record):(&pTxTs->tx_pending_ba_record), TxRxSelect,DELBA_REASON_END_BA ); }else if (TxRxSelect ==RX_DIR ) {
@@ -673,7 +673,7 @@ void BaSetupTimeOut(struct timer_list *t) pTxTs->add_ba_req_in_progress = false; pTxTs->add_ba_req_delayed = true; - pTxTs->tx_pending_ba_record.bValid = false; + pTxTs->tx_pending_ba_record.valid = false; }void TxBaInactTimeout (struct timer_list *t)
Signature · 1 line
2.18.0
PATCH 13/17 staging:rtl8192u: Rename DialogToken - Style
In reply to John WhitmoreRename 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.
--- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 2 +- .../staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +1 -1
@@ -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;
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +7 -7
@@ -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_record BA ;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
Signature · 1 line
2.18.0
PATCH 14/17 staging:rtl8192u: Rename BaParamSet - Style
In reply to John WhitmoreRename 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.
--- .../staging/rtl8192u/ieee80211/rtl819x_BA.h | 2 +- .../rtl8192u/ieee80211/rtl819x_BAProc.c | 28 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +1 -1
@@ -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; };
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +14 -14
@@ -90,7 +90,7 @@ static u8 RxTsDeleteBA(struct ieee80211_device *ieee, struct rx_ts_record *pRxTsvoid 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_record BA ; -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_record BA ; -BA .BaParamSet = *pBaParamSet; +BA .param_set = *pBaParamSet;ieee80211_send_DELBA (ieee, dst, &BA ,TX_DIR , ReasonCode);return 0 ; }
@@ -624,11 +624,11 @@ TsInitAddBA(DeActivateBAEntry (ieee, pBA); 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 + pBA->param_set.field.amsdu_support =0 ;// Do not support A-MSDU with A-MPDU now!! + pBA->param_set.field.ba_policy = Policy;// Policy: Delayed or Immediate + 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->BaParamSet.field.buffer_size =32 ;// 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->BaStartSeqCtrl.field.seq_num = (pTS->tx_cur_seq +3 ) %4096 ;// Block Ack will start after 3 packets later.
Signature · 1 line
2.18.0
PATCH 15/17 staging:rtl8192u: Rename BaTimeoutValue - Style
In reply to John WhitmoreRename 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.
--- drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 2 +- .../staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +1 -1
@@ -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; };
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +7 -7
@@ -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_record BA ;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 );
Signature · 1 line
2.18.0
PATCH 16/17 staging:rtl8192u: Rename BaStartSeqCtrl - Style
In reply to John WhitmoreRename 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.
--- 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(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +1 -1
@@ -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;
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +1 -1
@@ -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_
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +5 -5
@@ -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, sif (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 );
Signature · 1 line
2.18.0
PATCH 17/17 staging:rtl8192u: Remove commented out code and indent - Style
In reply to John WhitmoreRemove old commented out structure and clean up the indentation.
These are coding style changes which should have no impact on runtime code execution.
--- .../staging/rtl8192u/ieee80211/rtl819x_BA.h | 47 ++++++++----------- 1 file changed, 20 insertions(+), 27 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h +20 -27
@@ -2,26 +2,19 @@ #ifndef _BATYPE_H_ #define _BATYPE_H_ -#define BA_SETUP_TIMEOUT 200 +#define BA_SETUP_TIMEOUT 200 -#define BA_POLICY_DELAYED 0 -#define BA_POLICY_IMMEDIATE 1 +#define BA_POLICY_DELAYED 0 +#define BA_POLICY_IMMEDIATE 1 -#define ADDBA_STATUS_SUCCESS 0 +#define ADDBA_STATUS_SUCCESS 0 #define ADDBA_STATUS_REFUSED 37 #define ADDBA_STATUS_INVALID_PARAM 38 -#define DELBA_REASON_END_BA 37 -#define DELBA_REASON_UNKNOWN_BA 38 -#define DELBA_REASON_TIMEOUT 39 -/* 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 +#define DELBA_REASON_END_BA 37 +#define DELBA_REASON_UNKNOWN_BA 38 +#define DELBA_REASON_TIMEOUT 39 + 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; };
Signature · 1 line
2.18.0
Looks good. Thanks!
regards,
dan carpenter