From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: yhchuang@realtek.com
Cc: kvalo@codeaurora.org, linux-wireless@vger.kernel.org,
tehuang@realtek.com
Subject: Re: [PATCH v3 5/7] rtw88: 8821c: add query rx desc support
Date: Fri, 5 Jun 2020 12:44:04 +0200 [thread overview]
Message-ID: <20200605104404.msgfrpjqerd2eozx@linutronix.de> (raw)
In-Reply-To: <20200603093804.19779-6-yhchuang@realtek.com>
On 2020-06-03 17:38:02 [+0800], yhchuang@realtek.com wrote:
> diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821c.c b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
> --- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
> +++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
…
> +static void rtw8821c_query_rx_desc(struct rtw_dev *rtwdev, u8 *rx_desc,
> + struct rtw_rx_pkt_stat *pkt_stat,
> + struct ieee80211_rx_status *rx_status)
> +{
…
> +
> + hdr = (struct ieee80211_hdr *)(rx_desc + desc_sz + pkt_stat->shift +
> + pkt_stat->drv_info_sz);
I did some counting and hdr can be max. rx_desc+147 so it is fine in
terms of a bounds check.
In ff2f20f60cb84d1684379eb5be4c2285@realtek.com you suggested to merge
the function with 8821C/8822B/8822C. Did you change your mind or will
this happen later?
> + if (pkt_stat->phy_status) {
> + phy_status = rx_desc + desc_sz + pkt_stat->shift;
> + query_phy_status(rtwdev, phy_status, pkt_stat);
> + }
> +
> + rtw_rx_fill_rx_status(rtwdev, pkt_stat, hdr, rx_status, phy_status);
> +}
> +
Sebastian
next prev parent reply other threads:[~2020-06-05 10:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-03 9:37 [PATCH v3 0/7] rtw88: 8821c: add basic function routines yhchuang
2020-06-03 9:37 ` [PATCH v3 1/7] rtw88: 8821c: add basic functions yhchuang
2020-06-03 9:37 ` [PATCH v3 2/7] rtw88: 8821c: add set tx power index yhchuang
2020-06-03 9:38 ` [PATCH v3 3/7] rtw88: 8821c: add dig related settings yhchuang
2020-06-03 9:38 ` [PATCH v3 4/7] rtw88: 8821c: add set channel support yhchuang
2020-06-03 9:38 ` [PATCH v3 5/7] rtw88: 8821c: add query rx desc support yhchuang
2020-06-05 10:44 ` Sebastian Andrzej Siewior [this message]
2020-06-05 11:16 ` Tony Chuang
2020-06-03 9:38 ` [PATCH v3 6/7] rtw88: 8821c: add false alarm statistics yhchuang
2020-06-03 9:38 ` [PATCH v3 7/7] rtw88: 8821c: add phy calibration yhchuang
2020-06-05 11:18 ` [PATCH v3 0/7] rtw88: 8821c: add basic function routines Sebastian Andrzej Siewior
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=20200605104404.msgfrpjqerd2eozx@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=tehuang@realtek.com \
--cc=yhchuang@realtek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox