From: Stanislaw Gruszka <sgruszka@redhat.com>
To: yhchuang@realtek.com
Cc: kvalo@codeaurora.org, Larry.Finger@lwfinger.net,
pkshih@realtek.com, tehuang@realtek.com,
linux-wireless@vger.kernel.org
Subject: Re: [RFC v3 07/12] rtw88: phy files
Date: Thu, 4 Oct 2018 16:10:15 +0200 [thread overview]
Message-ID: <20181004141015.GC20484@redhat.com> (raw)
In-Reply-To: <1538565659-29530-8-git-send-email-yhchuang@realtek.com>
On Wed, Oct 03, 2018 at 07:20:54PM +0800, yhchuang@realtek.com wrote:
> +void rtw_phy_cfg_bb(struct rtw_dev *rtwdev, const struct rtw_table *tbl,
> + u32 addr, u32 data)
> +{
> + if (addr == 0xfe)
> + msleep(50);
> + else if (addr == 0xfd)
> + mdelay(5);
> + else if (addr == 0xfc)
> + mdelay(1);
> + else if (addr == 0xfb)
> + usleep_range(50, 60);
> + else if (addr == 0xfa)
> + udelay(5);
> + else if (addr == 0xf9)
> + udelay(1);
> + else
> + rtw_write32(rtwdev, addr, data);
This mix of mdelay(), msleep(), udelay() and usleep_range() looks strange.
You should eigher use atomic versions *delay or non-atomic *sleep
versions .
> +#define bcd_to_dec_pwr_by_rate(val, i) \
> + ({ \
> + typeof(val) __val_ = val; \
> + typeof(i) __i_ = i; \
> + ((s8)((((__val_ >> (__i_ * 8 + 4)) & 0xF)) * 10 + \
> + ((__val_ >> (__i_ * 8)) & 0xF))); \
> + })
Can use bcd2bin from include/linux/bcd.h instead ?
Thanks
Stanislaw
next prev parent reply other threads:[~2018-10-04 14:10 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-03 11:20 [RFC v3 00/12] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips yhchuang
2018-10-03 11:20 ` [RFC v3 01/12] rtw88: main files yhchuang
2018-10-08 14:10 ` Johannes Berg
[not found] ` <201810081447.w98ElQfu018110@rtits1.realtek.com.tw>
2018-10-11 7:23 ` Tony Chuang
2018-10-11 7:30 ` Johannes Berg
2018-10-13 17:47 ` Kalle Valo
2018-10-22 3:40 ` Tony Chuang
2018-11-15 14:18 ` Kalle Valo
2018-10-03 11:20 ` [RFC v3 02/12] rtw88: core files yhchuang
2018-10-08 14:12 ` Johannes Berg
2018-10-03 11:20 ` [RFC v3 03/12] rtw88: hci files yhchuang
2018-10-03 11:20 ` [RFC v3 04/12] rtw88: trx files yhchuang
2018-10-03 11:20 ` [RFC v3 05/12] rtw88: mac files yhchuang
2018-10-08 13:38 ` Johannes Berg
2018-10-03 11:20 ` [RFC v3 06/12] rtw88: fw and efuse files yhchuang
2018-10-03 11:20 ` [RFC v3 07/12] rtw88: phy files yhchuang
2018-10-04 14:10 ` Stanislaw Gruszka [this message]
2018-10-08 2:28 ` Tony Chuang
2018-10-03 11:20 ` [RFC v3 08/12] rtw88: debug files yhchuang
2018-10-04 14:23 ` Stanislaw Gruszka
2018-10-08 7:57 ` Tony Chuang
2018-10-08 13:29 ` Johannes Berg
[not found] ` <201810081446.w98EkN0r017815@rtits1.realtek.com.tw>
2018-10-09 2:42 ` Tony Chuang
2018-10-03 11:20 ` [RFC v3 09/12] rtw88: chip files yhchuang
2018-10-04 14:36 ` Stanislaw Gruszka
2018-10-08 9:38 ` Tony Chuang
2018-10-03 11:20 ` [RFC v3 10/12] rtw88: 8822B init table yhchuang
2018-10-03 11:20 ` [RFC v3 11/12] rtw88: 8822C " yhchuang
2018-10-03 11:20 ` [RFC v3 12/12] rtw88: Kconfig & Makefile yhchuang
2018-10-08 14:00 ` Johannes Berg
[not found] ` <201810081447.w98ElIFH018051@rtits1.realtek.com.tw>
2018-10-09 5:10 ` Tony Chuang
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=20181004141015.GC20484@redhat.com \
--to=sgruszka@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
--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;
as well as URLs for NNTP newsgroup(s).