From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
Tree Davies <tdavies@darkphysics.net>
Cc: gregkh@linuxfoundation.org, anjan@momi.ca,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] Staging: rtl8192e: Remove variable bFirstSeg
Date: Mon, 11 Dec 2023 20:22:12 +0100 [thread overview]
Message-ID: <20793387-da59-4192-bb86-b20aeb127a65@gmail.com> (raw)
In-Reply-To: <2cdb678d-b784-411e-8913-eb7666e08ccc@suswa.mountain>
On 12/11/23 09:37, Dan Carpenter wrote:
> On Sun, Dec 10, 2023 at 11:37:02AM -0800, Tree Davies wrote:
>> Remove variable bFirstSeg as it is defined but never used.
>>
>> Signed-off-by: Tree Davies <tdavies@darkphysics.net>
>> ---
>> drivers/staging/rtl8192e/rtllib.h | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
>> index 0a8c44e497f5..c0a24826cd3b 100644
>> --- a/drivers/staging/rtl8192e/rtllib.h
>> +++ b/drivers/staging/rtl8192e/rtllib.h
>> @@ -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
>
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
diff --git a/drivers/staging/rtl8192e/rtllib.h
b/drivers/staging/rtl8192e/rtllib.h
index cc9070f39004..f29efc605ba9 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -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;
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c
b/drivers/staging/rtl8192e/rtllib_softmac.c
index ee527ba5d1a8..93292fc3faaf 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -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
next prev parent reply other threads:[~2023-12-11 19:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-10 19:37 [PATCH 0/4] Staging: rtl8192e: Remove unused variables in struct cb_desc Tree Davies
2023-12-10 19:37 ` [PATCH 1/4] Staging: rtl8192e: Remove variable bFirstSeg Tree Davies
2023-12-11 8:37 ` Dan Carpenter
2023-12-11 19:22 ` Philipp Hortmann [this message]
2023-12-12 9:44 ` Dan Carpenter
2023-12-10 19:37 ` [PATCH 2/4] Staging: rtl8192e: Remove variable bLastSeg Tree Davies
2023-12-10 19:37 ` [PATCH 3/4] Staging: rtl8192e: Remove variable bEncrypt Tree Davies
2023-12-10 19:37 ` [PATCH 4/4] Staging: rtl8192e: Remove variable macId Tree Davies
2023-12-10 20:40 ` [PATCH 0/4] Staging: rtl8192e: Remove unused variables in struct cb_desc Philipp Hortmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20793387-da59-4192-bb86-b20aeb127a65@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=anjan@momi.ca \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=tdavies@darkphysics.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox