From: Larry Finger <Larry.Finger@lwfinger.net>
To: Philipp Dreimann <philipp@dreimann.net>
Cc: linux-wireless@vger.kernel.org,
'Chaoming_Li' <chaoming_li@realsil.com.cn>
Subject: Re: [PATCH] rtl8192{ce,cu,de,se}: avoid problems because of possible ERFOFF -> ERFSLEEP -> .. transition
Date: Mon, 28 Nov 2011 18:42:29 -0600 [thread overview]
Message-ID: <4ED42A75.4010605@lwfinger.net> (raw)
In-Reply-To: <1322526100-6433-1-git-send-email-philipp@dreimann.net>
On 11/28/2011 06:21 PM, Philipp Dreimann wrote:
> Hello!
>
> I noticed that ppsc->rfpwr_state could be set to ERFSLEEP even
> though the device is actually in ERFOFF.
>
> Or am I missing something?
>
> BR,
> Philipp
>
> ---
> drivers/net/wireless/rtlwifi/rtl8192ce/phy.c | 3 ++-
> drivers/net/wireless/rtlwifi/rtl8192cu/phy.c | 3 ++-
> drivers/net/wireless/rtlwifi/rtl8192de/phy.c | 2 +-
> drivers/net/wireless/rtlwifi/rtl8192se/phy.c | 3 ++-
> 4 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c
> index 592a10a..7f6b933 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c
> @@ -569,7 +569,8 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
> }
> case ERFSLEEP:{
> if (ppsc->rfpwr_state == ERFOFF)
> - break;
> + return false;
> +
> for (queue_id = 0, i = 0;
> queue_id< RTL_PCI_MAX_TX_QUEUE_COUNT;) {
> ring =&pcipriv->dev.tx_ring[queue_id];
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c b/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c
> index 7285290..33ada66 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c
> @@ -548,7 +548,8 @@ static bool _rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw,
> break;
> case ERFSLEEP:
> if (ppsc->rfpwr_state == ERFOFF)
> - break;
> + return false;
> +
> for (queue_id = 0, i = 0;
> queue_id< RTL_PCI_MAX_TX_QUEUE_COUNT;) {
> ring =&pcipriv->dev.tx_ring[queue_id];
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
> index 3ac7af1..0883349 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
> @@ -3374,7 +3374,7 @@ bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw,
> break;
> case ERFSLEEP:
> if (ppsc->rfpwr_state == ERFOFF)
> - break;
> + return false;
>
> for (queue_id = 0, i = 0;
> queue_id< RTL_PCI_MAX_TX_QUEUE_COUNT;) {
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c
> index f27171a..539172e 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c
> @@ -602,7 +602,8 @@ bool rtl92s_phy_set_rf_power_state(struct ieee80211_hw *hw,
> }
> case ERFSLEEP:
> if (ppsc->rfpwr_state == ERFOFF)
> - break;
> + return false;
> +
>
> for (queue_id = 0, i = 0;
> queue_id< RTL_PCI_MAX_TX_QUEUE_COUNT;) {
Yes, it would be possible to jump from ERFSLEEP to ERFOFF in the code.
Chaoming: Is this what you want, or is it a bug?
Thanks,
Larry
next prev parent reply other threads:[~2011-11-29 0:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-29 0:21 [PATCH] rtl8192{ce,cu,de,se}: avoid problems because of possible ERFOFF -> ERFSLEEP -> .. transition Philipp Dreimann
2011-11-29 0:42 ` Larry Finger [this message]
2011-12-06 20:03 ` John W. Linville
-- strict thread matches above, loose matches on Subject: below --
2011-12-07 4:15 Larry Finger
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=4ED42A75.4010605@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=chaoming_li@realsil.com.cn \
--cc=linux-wireless@vger.kernel.org \
--cc=philipp@dreimann.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;
as well as URLs for NNTP newsgroup(s).