DriverDev-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/6] staging: rtl8192e: ba_param_set union cleanups
@ 2021-02-19 10:12 William Durand
  2021-02-19 10:12 ` [PATCH 1/6] staging: rtl8192e: rename charData to char_data in ba_param_set union William Durand
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: William Durand @ 2021-02-19 10:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

This patchset fixes the checkpatch issues related to the `ba_param_set`
union defined in `rtl8192e/rtl819x_BA.h` (avoid camelcase).

William Durand (6):
  staging: rtl8192e: rename charData to char_data in ba_param_set union
  staging: rtl8192e: rename shortData to short_data in ba_param_set
    union
  staging: rtl8192e: rename BAPolicy to ba_policy in ba_param_set union
  staging: rtl8192e: rename BufferSize to buffer_size in ba_param_set
    union
  staging: rtl8192e: rename AMSDU_Support to amsdu_support in
    ba_param_set union
  staging: rtl8192e: rename TID to tid in ba_param_set union

 drivers/staging/rtl8192e/rtl819x_BA.h     | 12 +++++-----
 drivers/staging/rtl8192e/rtl819x_BAProc.c | 29 +++++++++++------------
 2 files changed, 20 insertions(+), 21 deletions(-)

--
2.30.0

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/6] staging: rtl8192e: rename charData to char_data in ba_param_set union
  2021-02-19 10:12 [PATCH 0/6] staging: rtl8192e: ba_param_set union cleanups William Durand
@ 2021-02-19 10:12 ` William Durand
  2021-02-19 10:12 ` [PATCH 2/6] staging: rtl8192e: rename shortData to short_data " William Durand
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: William Durand @ 2021-02-19 10:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

Fixes a checkpatch CHECK message.

Signed-off-by: William Durand <will+git@drnd.me>
---
 drivers/staging/rtl8192e/rtl819x_BA.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_BA.h b/drivers/staging/rtl8192e/rtl819x_BA.h
index b2a784fa051e..4fdff19bb4ae 100644
--- a/drivers/staging/rtl8192e/rtl819x_BA.h
+++ b/drivers/staging/rtl8192e/rtl819x_BA.h
@@ -28,7 +28,7 @@ union sequence_control {
 };

 union ba_param_set {
-	u8 charData[2];
+	u8 char_data[2];
 	u16 shortData;
 	struct {
 		u16 AMSDU_Support:1;
--
2.30.0

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/6] staging: rtl8192e: rename shortData to short_data in ba_param_set union
  2021-02-19 10:12 [PATCH 0/6] staging: rtl8192e: ba_param_set union cleanups William Durand
  2021-02-19 10:12 ` [PATCH 1/6] staging: rtl8192e: rename charData to char_data in ba_param_set union William Durand
@ 2021-02-19 10:12 ` William Durand
  2021-02-19 10:12 ` [PATCH 3/6] staging: rtl8192e: rename BAPolicy to ba_policy " William Durand
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: William Durand @ 2021-02-19 10:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

Fixes a checkpatch CHECK message.

Signed-off-by: William Durand <will+git@drnd.me>
---
 drivers/staging/rtl8192e/rtl819x_BA.h     | 2 +-
 drivers/staging/rtl8192e/rtl819x_BAProc.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_BA.h b/drivers/staging/rtl8192e/rtl819x_BA.h
index 4fdff19bb4ae..50e87ab1bbcf 100644
--- a/drivers/staging/rtl8192e/rtl819x_BA.h
+++ b/drivers/staging/rtl8192e/rtl819x_BA.h
@@ -29,7 +29,7 @@ union sequence_control {

 union ba_param_set {
 	u8 char_data[2];
-	u16 shortData;
+	u16 short_data;
 	struct {
 		u16 AMSDU_Support:1;
 		u16 BAPolicy:1;
diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index 07dade37d4eb..1d6fa6cae61c 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -58,7 +58,7 @@ static u8 RxTsDeleteBA(struct rtllib_device *ieee, struct rx_ts_record *pRxTs)
 void ResetBaEntry(struct ba_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;
@@ -107,7 +107,7 @@ static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *Dst,
 		tag += 2;
 	}

-	put_unaligned_le16(pBA->BaParamSet.shortData, tag);
+	put_unaligned_le16(pBA->BaParamSet.short_data, tag);
 	tag += 2;

 	put_unaligned_le16(pBA->BaTimeoutValue, tag);
--
2.30.0

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 3/6] staging: rtl8192e: rename BAPolicy to ba_policy in ba_param_set union
  2021-02-19 10:12 [PATCH 0/6] staging: rtl8192e: ba_param_set union cleanups William Durand
  2021-02-19 10:12 ` [PATCH 1/6] staging: rtl8192e: rename charData to char_data in ba_param_set union William Durand
  2021-02-19 10:12 ` [PATCH 2/6] staging: rtl8192e: rename shortData to short_data " William Durand
@ 2021-02-19 10:12 ` William Durand
  2021-02-19 10:12 ` [PATCH 4/6] staging: rtl8192e: rename BufferSize to buffer_size " William Durand
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: William Durand @ 2021-02-19 10:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

Fixes a checkpatch CHECK message.

Signed-off-by: William Durand <will+git@drnd.me>
---
 drivers/staging/rtl8192e/rtl819x_BA.h     | 2 +-
 drivers/staging/rtl8192e/rtl819x_BAProc.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_BA.h b/drivers/staging/rtl8192e/rtl819x_BA.h
index 50e87ab1bbcf..a36e4488b849 100644
--- a/drivers/staging/rtl8192e/rtl819x_BA.h
+++ b/drivers/staging/rtl8192e/rtl819x_BA.h
@@ -32,7 +32,7 @@ union ba_param_set {
 	u16 short_data;
 	struct {
 		u16 AMSDU_Support:1;
-		u16 BAPolicy:1;
+		u16 ba_policy:1;
 		u16 TID:4;
 		u16 BufferSize:10;
 	} field;
diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index 1d6fa6cae61c..b695a56a44b9 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -267,7 +267,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
 	}
 	pBA = &pTS->RxAdmittedBARecord;

-	if (pBaParamSet->field.BAPolicy == BA_POLICY_DELAYED) {
+	if (pBaParamSet->field.ba_policy == BA_POLICY_DELAYED) {
 		rc = ADDBA_STATUS_INVALID_PARAM;
 		netdev_warn(ieee->dev, "%s(): BA Policy is not correct\n",
 			    __func__);
@@ -300,7 +300,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_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;
 		rtllib_send_ADDBARsp(ieee, dst, &BA, rc);
 		return 0;
 	}
@@ -377,7 +377,7 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb)


 	if (*pStatusCode == ADDBA_STATUS_SUCCESS) {
-		if (pBaParamSet->field.BAPolicy == BA_POLICY_DELAYED) {
+		if (pBaParamSet->field.ba_policy == BA_POLICY_DELAYED) {
 			pTS->bAddBaReqDelayed = true;
 			DeActivateBAEntry(ieee, pAdmittedBA);
 			ReasonCode = DELBA_REASON_END_BA;
@@ -484,7 +484,7 @@ void TsInitAddBA(struct rtllib_device *ieee, struct tx_ts_record *pTS,

 	pBA->DialogToken++;
 	pBA->BaParamSet.field.AMSDU_Support = 0;
-	pBA->BaParamSet.field.BAPolicy = Policy;
+	pBA->BaParamSet.field.ba_policy = Policy;
 	pBA->BaParamSet.field.TID =
 			 pTS->TsCommonInfo.TSpec.f.TSInfo.field.ucTSID;
 	pBA->BaParamSet.field.BufferSize = 32;
--
2.30.0

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 4/6] staging: rtl8192e: rename BufferSize to buffer_size in ba_param_set union
  2021-02-19 10:12 [PATCH 0/6] staging: rtl8192e: ba_param_set union cleanups William Durand
                   ` (2 preceding siblings ...)
  2021-02-19 10:12 ` [PATCH 3/6] staging: rtl8192e: rename BAPolicy to ba_policy " William Durand
@ 2021-02-19 10:12 ` William Durand
  2021-02-19 10:12 ` [PATCH 5/6] staging: rtl8192e: rename AMSDU_Support to amsdu_support " William Durand
  2021-02-19 10:12 ` [PATCH 6/6] staging: rtl8192e: rename TID to tid " William Durand
  5 siblings, 0 replies; 7+ messages in thread
From: William Durand @ 2021-02-19 10:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

Fixes a checkpatch CHECK message.

Signed-off-by: William Durand <will+git@drnd.me>
---
 drivers/staging/rtl8192e/rtl819x_BA.h     | 2 +-
 drivers/staging/rtl8192e/rtl819x_BAProc.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_BA.h b/drivers/staging/rtl8192e/rtl819x_BA.h
index a36e4488b849..af25b4850975 100644
--- a/drivers/staging/rtl8192e/rtl819x_BA.h
+++ b/drivers/staging/rtl8192e/rtl819x_BA.h
@@ -34,7 +34,7 @@ union ba_param_set {
 		u16 AMSDU_Support:1;
 		u16 ba_policy:1;
 		u16 TID:4;
-		u16 BufferSize:10;
+		u16 buffer_size:10;
 	} field;
 };
 
diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index b695a56a44b9..17520fcbc1bb 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -284,9 +284,9 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
 
 	if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev) ||
 	   (ieee->pHTInfo->IOTAction & HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT))
-		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, 0);
 	rtllib_send_ADDBARsp(ieee, dst, pBA, ADDBA_STATUS_SUCCESS);
@@ -487,7 +487,7 @@ void TsInitAddBA(struct rtllib_device *ieee, struct tx_ts_record *pTS,
 	pBA->BaParamSet.field.ba_policy = Policy;
 	pBA->BaParamSet.field.TID =
 			 pTS->TsCommonInfo.TSpec.f.TSInfo.field.ucTSID;
-	pBA->BaParamSet.field.BufferSize = 32;
+	pBA->BaParamSet.field.buffer_size = 32;
 	pBA->BaTimeoutValue = 0;
 	pBA->BaStartSeqCtrl.field.seq_num = (pTS->TxCurSeq + 3) % 4096;
 
-- 
2.30.0

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 5/6] staging: rtl8192e: rename AMSDU_Support to amsdu_support in ba_param_set union
  2021-02-19 10:12 [PATCH 0/6] staging: rtl8192e: ba_param_set union cleanups William Durand
                   ` (3 preceding siblings ...)
  2021-02-19 10:12 ` [PATCH 4/6] staging: rtl8192e: rename BufferSize to buffer_size " William Durand
@ 2021-02-19 10:12 ` William Durand
  2021-02-19 10:12 ` [PATCH 6/6] staging: rtl8192e: rename TID to tid " William Durand
  5 siblings, 0 replies; 7+ messages in thread
From: William Durand @ 2021-02-19 10:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

This change does not fix a checkpatch issue but it is more consistent
with the rest of the union.

Signed-off-by: William Durand <will+git@drnd.me>
---
 drivers/staging/rtl8192e/rtl819x_BA.h     | 2 +-
 drivers/staging/rtl8192e/rtl819x_BAProc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_BA.h b/drivers/staging/rtl8192e/rtl819x_BA.h
index af25b4850975..1a8ca249ed23 100644
--- a/drivers/staging/rtl8192e/rtl819x_BA.h
+++ b/drivers/staging/rtl8192e/rtl819x_BA.h
@@ -31,7 +31,7 @@ union ba_param_set {
 	u8 char_data[2];
 	u16 short_data;
 	struct {
-		u16 AMSDU_Support:1;
+		u16 amsdu_support:1;
 		u16 ba_policy:1;
 		u16 TID:4;
 		u16 buffer_size:10;
diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index 17520fcbc1bb..002ec9a7a8c0 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -483,7 +483,7 @@ void TsInitAddBA(struct rtllib_device *ieee, struct tx_ts_record *pTS,
 	DeActivateBAEntry(ieee, pBA);

 	pBA->DialogToken++;
-	pBA->BaParamSet.field.AMSDU_Support = 0;
+	pBA->BaParamSet.field.amsdu_support = 0;
 	pBA->BaParamSet.field.ba_policy = Policy;
 	pBA->BaParamSet.field.TID =
 			 pTS->TsCommonInfo.TSpec.f.TSInfo.field.ucTSID;
--
2.30.0

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 6/6] staging: rtl8192e: rename TID to tid in ba_param_set union
  2021-02-19 10:12 [PATCH 0/6] staging: rtl8192e: ba_param_set union cleanups William Durand
                   ` (4 preceding siblings ...)
  2021-02-19 10:12 ` [PATCH 5/6] staging: rtl8192e: rename AMSDU_Support to amsdu_support " William Durand
@ 2021-02-19 10:12 ` William Durand
  5 siblings, 0 replies; 7+ messages in thread
From: William Durand @ 2021-02-19 10:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-kernel

This change uses lowercase for a field name to be more consistent with
the rest of the union.

Signed-off-by: William Durand <will+git@drnd.me>
---
 drivers/staging/rtl8192e/rtl819x_BA.h     | 2 +-
 drivers/staging/rtl8192e/rtl819x_BAProc.c | 9 ++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_BA.h b/drivers/staging/rtl8192e/rtl819x_BA.h
index 1a8ca249ed23..36280c62fa56 100644
--- a/drivers/staging/rtl8192e/rtl819x_BA.h
+++ b/drivers/staging/rtl8192e/rtl819x_BA.h
@@ -33,7 +33,7 @@ union ba_param_set {
 	struct {
 		u16 amsdu_support:1;
 		u16 ba_policy:1;
-		u16 TID:4;
+		u16 tid:4;
 		u16 buffer_size:10;
 	} field;
 };
diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index 002ec9a7a8c0..1f697e87ae8d 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -142,7 +142,7 @@ static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst,
 	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 rtllib_hdr_3addr));
 	if (!skb)
@@ -260,7 +260,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
 		goto OnADDBAReq_Fail;
 	}
 	if (!GetTs(ieee, (struct ts_common_info **)(&pTS), dst,
-	    (u8)(pBaParamSet->field.TID), RX_DIR, true)) {
+	    (u8)(pBaParamSet->field.tid), RX_DIR, true)) {
 		rc = ADDBA_STATUS_REFUSED;
 		netdev_warn(ieee->dev, "%s(): can't get TS\n", __func__);
 		goto OnADDBAReq_Fail;
@@ -346,7 +346,7 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb)


 	if (!GetTs(ieee, (struct ts_common_info **)(&pTS), dst,
-		   (u8)(pBaParamSet->field.TID), TX_DIR, false)) {
+		   (u8)(pBaParamSet->field.tid), TX_DIR, false)) {
 		netdev_warn(ieee->dev, "%s(): can't get TS\n", __func__);
 		ReasonCode = DELBA_REASON_UNKNOWN_BA;
 		goto OnADDBARsp_Reject;
@@ -485,8 +485,7 @@ void TsInitAddBA(struct rtllib_device *ieee, struct tx_ts_record *pTS,
 	pBA->DialogToken++;
 	pBA->BaParamSet.field.amsdu_support = 0;
 	pBA->BaParamSet.field.ba_policy = Policy;
-	pBA->BaParamSet.field.TID =
-			 pTS->TsCommonInfo.TSpec.f.TSInfo.field.ucTSID;
+	pBA->BaParamSet.field.tid = pTS->TsCommonInfo.TSpec.f.TSInfo.field.ucTSID;
 	pBA->BaParamSet.field.buffer_size = 32;
 	pBA->BaTimeoutValue = 0;
 	pBA->BaStartSeqCtrl.field.seq_num = (pTS->TxCurSeq + 3) % 4096;
--
2.30.0

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-19 10:12 [PATCH 0/6] staging: rtl8192e: ba_param_set union cleanups William Durand
2021-02-19 10:12 ` [PATCH 1/6] staging: rtl8192e: rename charData to char_data in ba_param_set union William Durand
2021-02-19 10:12 ` [PATCH 2/6] staging: rtl8192e: rename shortData to short_data " William Durand
2021-02-19 10:12 ` [PATCH 3/6] staging: rtl8192e: rename BAPolicy to ba_policy " William Durand
2021-02-19 10:12 ` [PATCH 4/6] staging: rtl8192e: rename BufferSize to buffer_size " William Durand
2021-02-19 10:12 ` [PATCH 5/6] staging: rtl8192e: rename AMSDU_Support to amsdu_support " William Durand
2021-02-19 10:12 ` [PATCH 6/6] staging: rtl8192e: rename TID to tid " William Durand

DriverDev-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/driverdev-devel/0 driverdev-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 driverdev-devel driverdev-devel/ https://lore.kernel.org/driverdev-devel \
		driverdev-devel@linuxdriverproject.org devel@driverdev.osuosl.org
	public-inbox-index driverdev-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxdriverproject.driverdev-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git