From: Joash Naidoo <joash.n09@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
dan.carpenter@oracle.com, straube.linux@gmail.com,
paskripkin@gmail.com, linux-staging@lists.linux.dev
Subject: Re: [PATCH v4] staging: r8188eu: fix too many leading tabs
Date: Sat, 01 Oct 2022 19:48:19 +0200 [thread overview]
Message-ID: <87ill3mkxw.fsf@gmail.com> (raw)
In-Reply-To: <YzSDSNDd/IIdMeiq@kroah.com>
Greg KH <gregkh@linuxfoundation.org> writes:
> On Wed, Sep 28, 2022 at 06:20:28PM +0200, Joash Naidoo wrote:
>> > But also, shouldn't you just be using the ip_hdr() call
>> > instead of doing
>> > the crazy cast above?
>>
>> I would need to investigate and test first before commenting.
>> If a change
>> had to be made, I believe it will go in a separate patch?
>
> Yes, that would be good to do as a patch series.
>
> thanks,
>
> greg k-h
Hi all
I want to investigate Greg's suggestion to replace the original
code's iph cast with ip_hdr(). Looking into the ip_hdr() function
it seems it effectively casts skb->head + skb->network_header
property (See [1, 2]) whereas the original code casts skb->data +
ETH_HLEN [3]. My goal was to use printk statements to see if
they're equivalent before making any actual changes.
Could anyone advise to a high level action which will trigger the
dhcp_flag_bcast() function, as seen in my patch. I have limited
knowledge but I would imagine this function is called when the
device broadcasts an IP address request from the DHCP server. I am
using dhcpcd as a client and I have tried to manually trigger this
action by deleting device's lease file and restarting dhcpcd.
Among trying other basic things, I have been unsuccessful at
triggering this function.
Looking further up the code at the rtw_xmit() function [4], I
learnt the following. Perhaps understanding br_port may also help
me.
void *br_port = NULL;
br_port = rcu_dereference(padapter->pnetdev->rx_handler_data);
// <-- this returns 0x00
if (br_port && check_fwstate(pmlmepriv, WIFI_STATION_STATE |
WIFI_ADHOC_STATE)) { // <-- false because of br_port, second
condition is true
res = rtw_br_client_tx(padapter, ppkt); // <-- later calls
the dhcp_flag_bcast() See [5]
if (res == -1) {
rtw_free_xmitframe(pxmitpriv, pxmitframe);
return -1;
}
}
[1]
https://elixir.bootlin.com/linux/v6.0-rc5/source/include/linux/ip.h#L19
[2]
https://elixir.bootlin.com/linux/v6.0-rc5/source/include/linux/skbuff.h#L2819
[3]
https://elixir.bootlin.com/linux/v6.0-rc5/source/drivers/staging/r8188eu/core/rtw_br_ext.c#L611
[4]
https://elixir.bootlin.com/linux/v6.0-rc5/source/drivers/staging/r8188eu/core/rtw_xmit.c#L1670
[5]
https://elixir.bootlin.com/linux/v6.0-rc5/source/drivers/staging/r8188eu/core/rtw_xmit.c#L1598
Thank you all for your time and support.
Kind regards,
Joash
prev parent reply other threads:[~2022-10-01 19:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-28 7:53 [PATCH v4] staging: r8188eu: fix too many leading tabs Joash Naidoo
2022-09-28 8:05 ` Greg KH
2022-09-28 16:20 ` Joash Naidoo
2022-09-28 17:24 ` Greg KH
2022-10-01 17:48 ` Joash Naidoo [this message]
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=87ill3mkxw.fsf@gmail.com \
--to=joash.n09@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-staging@lists.linux.dev \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.