Search Linux Wireless

Re: [PATCH 2/5] rsi: add hci detach for hibernation and poweroff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Siva Rebbagondla <siva8118@xxxxxxxxx> writes:

> From: Siva Rebbagondla <siva.rebbagondla@xxxxxxxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxxxxxxx>
> ---
>  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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux