All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: <rmani@qca.qualcomm.com>
Cc: <linux-wireless@vger.kernel.org>, <ath6kl-devel@qualcomm.com>
Subject: Re: [PATCH v2 1/8] ath6kl: Re-architect suspend mode handling in ath6kl_sdio_suspend
Date: Tue, 24 Jan 2012 13:30:47 +0200	[thread overview]
Message-ID: <4F1E9667.1040504@qca.qualcomm.com> (raw)
In-Reply-To: <1327066544-23779-2-git-send-email-rmani@qca.qualcomm.com>

On 01/20/2012 03:35 PM, rmani@qca.qualcomm.com wrote:
> From: Raja Mani <rmani@qca.qualcomm.com>
> 
> Using this patch, the user can bypass existing auto
> suspend mode selection logic and force ath6kl to enter
> into the suspend mode what he/she wants.
> 
> If the user doesn't choose any suspend mode while doing
> insmod of the driver, auto suspend mode selection logic
> will kick in and choose suspend mode based on the host
> SDIO controller capability.
> 
> Generic module parameter is required to specify suspend
> mode including Deep Sleep and WOW while doing insmod.
> Renaming existing mod param variable suspend_cutpower
> would be sufficient to meet this requirement.
> 
> New module parameter suspend_mode can take any one of
> the below suspend state,
>    1. cut power
>    2. deep sleep
>    3. wow
> 
> Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>

Few comments:

> --- a/drivers/net/wireless/ath/ath6kl/core.c
> +++ b/drivers/net/wireless/ath/ath6kl/core.c
> @@ -25,12 +25,12 @@
>  #include "cfg80211.h"
>  
>  unsigned int debug_mask;
> -static bool suspend_cutpower;
> +static unsigned char suspend_mode;

IMHO uint is better, just like below.

>  static unsigned int uart_debug;
>  static unsigned int ath6kl_p2p;
>  
>  module_param(debug_mask, uint, 0644);
> -module_param(suspend_cutpower, bool, 0444);
> +module_param(suspend_mode, byte, 0644);
>  module_param(uart_debug, uint, 0644);
>  module_param(ath6kl_p2p, uint, 0644);

> --- a/drivers/net/wireless/ath/ath6kl/sdio.c
> +++ b/drivers/net/wireless/ath/ath6kl/sdio.c
> @@ -779,7 +779,7 @@ out:
>  	return ret;
>  }
>  
> -static int ath6kl_sdio_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow)
> +static int ath6kl_set_sdio_pm_keep_pwr_wake_irq(struct ath6kl *ar)

The function name doesn't need to be this long, ath6kl_sdio_pm_caps(),
or something like that, is enough. And I'm not really sure if this
function makes sense, it complicates the error handling.

> +	if (ar->suspend_mode == WLAN_POWER_STATE_WOW ||
> +	    (!ar->suspend_mode && wow)) {
> +
> +		ret = ath6kl_set_sdio_pm_keep_pwr_wake_irq(ar);
> +		if (ret)
> +			goto cut_pwr;

This changes functionality so that if MMC_PM_WAKE_SDIO_IRQ is not
supported we will fallback to cutpower, earlier we would go to deep
sleep mode. I guess that's ok, but it still is a functionality change.

Kalle

  reply	other threads:[~2012-01-24 11:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-20 13:35 [PATCH v2 0/8] Allow the user to define suspend mode rmani
2012-01-20 13:35 ` [PATCH v2 1/8] ath6kl: Re-architect suspend mode handling in ath6kl_sdio_suspend rmani
2012-01-24 11:30   ` Kalle Valo [this message]
2012-01-20 13:35 ` [PATCH v2 2/8] ath6kl: Add a new func to configure default WOW patterns for AP mode rmani
2012-01-24 11:36   ` Kalle Valo
2012-01-20 13:35 ` [PATCH v2 3/8] ath6kl: Add a new func to config default WOW patterns for non " rmani
2012-01-24 11:39   ` Kalle Valo
2012-01-20 13:35 ` [PATCH v2 4/8] ath6kl: Move WOW patterns config code to a separate function rmani
2012-01-24 11:44   ` Kalle Valo
2012-01-20 13:35 ` [PATCH v2 5/8] ath6kl: Configure WOW patterns while going to wow_suspend rmani
2012-01-20 13:35 ` [PATCH v2 6/8] ath6kl: Return a proper error code when not in connected state rmani
2012-01-24 11:45   ` Kalle Valo
2012-01-20 13:35 ` [PATCH v2 7/8] ath6kl: Add a support to handle the host sleep mode cmd processed event rmani
2012-01-24 11:46   ` Kalle Valo
2012-01-20 13:35 ` [PATCH v2 8/8] ath6kl: Wait for host sleep mode cmd processed event during WOW suspend rmani
2012-01-24 11:47 ` [PATCH v2 0/8] Allow the user to define suspend mode Kalle Valo
2012-01-30  6:12   ` Raja Mani

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=4F1E9667.1040504@qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath6kl-devel@qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rmani@qca.qualcomm.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.