All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Siva Rebbagondla <siva8118@gmail.com>
Cc: linux-wireless@vger.kernel.org,
	Rishikesh Basu <rishikesh.basu@redpinesignals.com>,
	Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>,
	Ganapathiraju Kondraju <ganapathi.kondraju@redpinesignals.com>,
	krishna.pedda@redpinesignals.com
Subject: Re: [PATCH 2/5] rsi: add hci detach for hibernation and poweroff
Date: Mon, 28 Jan 2019 11:29:18 +0200	[thread overview]
Message-ID: <87d0oh166p.fsf@codeaurora.org> (raw)
In-Reply-To: <1548397802-12180-3-git-send-email-siva8118@gmail.com> (Siva Rebbagondla's message of "Fri, 25 Jan 2019 11:59:59 +0530")

Siva Rebbagondla <siva8118@gmail.com> writes:

> From: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
>
> As we missed to detach HCI, while entering power off or hibernation,
> an extra hci interface gets created whenever system is woken up, to
> avoid this we added hci_detach() in rsi_disconnect(), rsi_freeze(),
> and rsi_shutdown() functions which are invoked for these tests.
> This patch fixes the issue
>
> Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
> ---
>  drivers/net/wireless/rsi/rsi_91x_sdio.c | 21 +++++++++++++++++++--
>  drivers/net/wireless/rsi/rsi_91x_usb.c  |  6 ++++++
>  2 files changed, 25 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
> index b412b65e..59ff778 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
> @@ -1131,7 +1131,12 @@ static void rsi_disconnect(struct sdio_func *pfunction)
>  
>  	rsi_mac80211_detach(adapter);
>  	mdelay(10);
> -
> +#ifdef CONFIG_RSI_COEX
> +	if (adapter->priv->coex_mode > 1 && adapter->priv->bt_adapter) {
> +		rsi_bt_ops.detach(adapter->priv->bt_adapter);
> +		adapter->priv->bt_adapter = NULL;
> +	}
> +#endif

Ifdefs are ugly, avoid them as much as possible. Would this work:

        if (IS_ENABLED(CONFIG_RSI_COEX) &&
            adapter->priv->coex_mode > 1 &&
            adapter->priv->bt_adapter)

BTW, why do you need the ifdef anyway, isn't it enough to check for
coex_mode?


-- 
Kalle Valo

  reply	other threads:[~2019-01-28  9:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25  6:29 [PATCH 0/5] rsi: wowlan debug support and fixes Siva Rebbagondla
2019-01-25  6:29 ` [PATCH 1/5] rsi: Add debug support for wowlan wakeup confirmation Siva Rebbagondla
2019-01-25  6:29 ` [PATCH 2/5] rsi: add hci detach for hibernation and poweroff Siva Rebbagondla
2019-01-28  9:29   ` Kalle Valo [this message]
2019-01-28  9:38     ` Siva Rebbagondla
2019-01-25  6:30 ` [PATCH 3/5] rsi: fix wowlan wakeup issue for hibernate(S4) Siva Rebbagondla
2019-01-25  6:30 ` [PATCH 4/5] rsi: resolve power save issue after S4 resume Siva Rebbagondla
2019-01-25  6:30 ` [PATCH 5/5] rsi: fix for wowlan wakeup failure Siva Rebbagondla

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=87d0oh166p.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=ganapathi.kondraju@redpinesignals.com \
    --cc=krishna.pedda@redpinesignals.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rishikesh.basu@redpinesignals.com \
    --cc=siva.rebbagondla@redpinesignals.com \
    --cc=siva8118@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.