Staging: rtl8192e: Remove unused variables in struct cb_desc
cover Staging: rtl8192e: Remove unused variables in struct cb_desc
This series removes a few unused variables from struct cb_desc in rtllib.h
Thank you in advance to reviewers.
~Tree
Tree Davies (4):
Staging: rtl8192e: Remove variable bFirstSeg
Staging: rtl8192e: Remove variable bLastSeg
Staging: rtl8192e: Remove variable bEncrypt
Staging: rtl8192e: Remove variable macId
drivers/staging/rtl8192e/rtllib.h | 4 ---- 1 file changed, 4 deletions(-)
Signature · 1 line
2.39.2
PATCH 1/4 Staging: rtl8192e: Remove variable bFirstSeg
Remove variable bFirstSeg as it is defined but never used.
--- drivers/staging/rtl8192e/rtllib.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/rtl8192e/rtllib.h +0 -1
@@ -103,7 +103,6 @@ struct cb_desc {/* Tx Desc Related flags (8-9) */ u8 bLastIniPkt:1; u8 bCmdOrInit:1; - u8 bFirstSeg:1; u8 bLastSeg:1; u8 bEncrypt:1; u8 tx_dis_rate_fallback:1;
Signature · 1 line
2.39.2
Re: [PATCH 1/4] Staging: rtl8192e: Remove variable bFirstSeg
Quoted 12 lines · Tree Davies
Remove variable bFirstSeg as it is defined but never used.
Signed-off-by Tree Davies <[email protected]>--- drivers/staging/rtl8192e/rtllib.h | 1 - 1 file changed, 1 deletion(-)drivers/staging/rtl8192e/rtllib.h +0
-0
drivers/staging/rtl8192e/rtllib.h struct cb_desc { · line 108
Quoted 7 lines
drivers/staging/rtl8192e/rtllib.h +0
-1@@ -103,7 +103,6 @@ struct cb_desc {/* Tx Desc Related flags (8-9) */ u8 bLastIniPkt:1; u8 bCmdOrInit:1; - u8 bFirstSeg:1; u8 bLastSeg:1; u8 bEncrypt:1; u8 tx_dis_rate_fallback:1;
I don't think you can remove these. They're part of the protocol for talking to the firmware.
regards,
dan carpenter
Re: [PATCH 1/4] Staging: rtl8192e: Remove variable bFirstSeg
Quoted 24 lines · Dan Carpenter
Quoted 12 lines · Tree Davies
Remove variable bFirstSeg as it is defined but never used.
Signed-off-by Tree Davies <[email protected]>--- drivers/staging/rtl8192e/rtllib.h | 1 - 1 file changed, 1 deletion(-)drivers/staging/rtl8192e/rtllib.h +0
-0drivers/staging/rtl8192e/rtllib.h struct cb_desc { · line 108
Quoted 7 lines
drivers/staging/rtl8192e/rtllib.h +0
-1@@ -103,7 +103,6 @@ struct cb_desc {/* Tx Desc Related flags (8-9) */ u8 bLastIniPkt:1; u8 bCmdOrInit:1; - u8 bFirstSeg:1; u8 bLastSeg:1; u8 bEncrypt:1; u8 tx_dis_rate_fallback:1;I don't think you can remove these. They're part of the protocol for talking to the firmware.
Quoted 3 lines
regards,
dan carpenter
Hi Dan,
thanks for your response.
struct cb_desc is used in conjunction with this line:
struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + 8); from skbuff.h:
/*
* This is the control buffer. It is free to use for every
* layer. Please put your private variables there. If you
* want to keep them across layers you have to do a skb_clone()
* first. This is owned by whoever has the skb queued ATM. */
char cb[48] __aligned(8);
I think it has to do with the sku buffer and can be changed.
Here a test:
kernel@matrix-ESPRIMO-P710:~/Documents/git/kernels/staging$ git diff
drivers/staging/rtl8192e/rtllib.h +1 -0
@@ -100,6 +100,7 @@ static inline void *netdev_priv_rsl(struct net_device *dev)/* defined for skb cb field */ /* At most 28 byte */ struct cb_desc { +u8 ph_temp[7 ];/* Tx Desc Related flags (8-9) */ u8 bLastIniPkt:1 ;u8 bCmdOrInit:1 ;
drivers/staging/rtl8192e/rtllib_softmac.c +3 -0
@@ -189,6 +189,9 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct rtllib_device *ieee)struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb +8 );spin_lock_irqsave (&ieee->lock, flags); +printk ("Setting tcb_desc !!!\n" ); + tcb_desc->ph_temp[0 ] =0xAA ; + tcb_desc->ph_temp[6 ] =0xAA ;/* called with 2nd param 0, no mgmt lock required */ rtllib_sta_wakeup (ieee,0 );
Here the log:
[ 9024.740612] rtl819xE 0000:03:00.0: Adapter(8192 PCI-E) is found - DeviceID=8192 [ 9025.773658] Setting tcb_desc !!! [ 9025.773783] Setting tcb_desc !!! [ 9025.797635] Setting tcb_desc !!! [ 9025.797701] Setting tcb_desc !!! [ 9025.849687] Setting tcb_desc !!! [ 9025.849743] Setting tcb_desc !!! [ 9025.977703] Setting tcb_desc !!! [ 9025.977740] Setting tcb_desc !!! [ 9026.105693] Setting tcb_desc !!!
Performance as expected OK.
Please reconsider your decision?
Thanks
Bye Philipp
Re: [PATCH 1/4] Staging: rtl8192e: Remove variable bFirstSeg
The struct talks about firmware and it has reserved bits so that's what confused me.
You know this code better than I do so since you're fine with it, then I'm fine with it.
regards,
dan carpenter
PATCH 2/4 Staging: rtl8192e: Remove variable bLastSeg
In reply to Tree DaviesRemove variable bLastSeg as it is defined but never used.
--- drivers/staging/rtl8192e/rtllib.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/rtl8192e/rtllib.h +0 -1
@@ -103,7 +103,6 @@ struct cb_desc {/* Tx Desc Related flags (8-9) */ u8 bLastIniPkt:1; u8 bCmdOrInit:1; - u8 bLastSeg:1; u8 bEncrypt:1; u8 tx_dis_rate_fallback:1; u8 tx_use_drv_assinged_rate:1;
Signature · 1 line
2.39.2
PATCH 3/4 Staging: rtl8192e: Remove variable bEncrypt
In reply to Tree DaviesRemove variable bEncrypt as it is defined but never used.
--- drivers/staging/rtl8192e/rtllib.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/rtl8192e/rtllib.h +0 -1
@@ -103,7 +103,6 @@ struct cb_desc {/* Tx Desc Related flags (8-9) */ u8 bLastIniPkt:1; u8 bCmdOrInit:1; - u8 bEncrypt:1; u8 tx_dis_rate_fallback:1; u8 tx_use_drv_assinged_rate:1; u8 bHwSec:1;
Signature · 1 line
2.39.2
PATCH 4/4 Staging: rtl8192e: Remove variable macId
In reply to Tree DaviesRemove variable macId as it is defined but never used.
--- drivers/staging/rtl8192e/rtllib.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/rtl8192e/rtllib.h +0 -1
@@ -136,7 +136,6 @@ struct cb_desc { u8 bAMSDU:1; u8 bFromAggrQ:1; u8 reserved6:6; -u8 macId;u8 priority;/* Tx firmware related element(20-27) */
Signature · 1 line
2.39.2
Quoted 6 lines · Tree Davies
This series removes a few unused variables from struct
cb_descinrtllib.hThank you in advance to reviewers.
~Tree
Quoted 9 lines
Tree Davies (4):
Staging: rtl8192e: Remove variable bFirstSeg
Staging: rtl8192e: Remove variable bLastSeg
Staging: rtl8192e: Remove variable bEncrypt
Staging: rtl8192e: Remove variable macIddrivers/staging/rtl8192e/rtllib.h | 4 ---- 1 file changed, 4 deletions(-)
Hi,
works.
Thanks for your support.
Bye Philipp