Search Linux Wireless

Re: [PATCH 08/11] iwlwifi: call apm stop on exit

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

 



On Thu, Aug 28, 2008 at 05:25:07PM +0800, Zhu Yi wrote:
> From: Gregory Greenman <gregory.greenman@xxxxxxxxx>
> 
> This patch calls apm stop on exit and suspend and sets STATUS_EXIT_PENDING
> accordingly. Without this patch hardware consumes power even after driver
> is removed or suspended.
> 
> Signed-off-by: Gregory Greenman <gregory.greenman@xxxxxxxxx>
> Signed-off-by: Mohamed Abbas <mohamed.abbas@xxxxxxxxx>
> Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx>
> Signed-off-by: Zhu Yi <yi.zhu@xxxxxxxxx>

The two hunks of this patch seem like two different fixes, and the
changelog only matches the first hunk.  When you resubmit this series
(which I presume you will be doing with better changelogs after
Marcel's commentary), please split this into two patches.

Thanks,

John

> ---
>  drivers/net/wireless/iwlwifi/iwl-agn.c |   16 +++++++++++-----
>  1 files changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
> index 4986137..b1cefb5 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-agn.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
> @@ -2189,7 +2189,10 @@ static void __iwl4965_down(struct iwl_priv *priv)
>  	udelay(5);
>  
>  	/* FIXME: apm_ops.suspend(priv) */
> -	priv->cfg->ops->lib->apm_ops.reset(priv);
> +	if (exit_pending || test_bit(STATUS_IN_SUSPEND, &priv->status))
> +		priv->cfg->ops->lib->apm_ops.stop(priv);
> +	else
> +		priv->cfg->ops->lib->apm_ops.reset(priv);
>  	priv->cfg->ops->lib->free_shared_mem(priv);
>  
>   exit:
> @@ -4371,15 +4374,18 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev)
>  	iwl_dbgfs_unregister(priv);
>  	sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group);
>  
> +	/* ieee80211_unregister_hw call wil cause iwl4965_mac_stop to
> +	 * to be called and iwl4965_down since we are removing the device
> +	 * we need to set STATUS_EXIT_PENDING bit.
> +	 */
> +	set_bit(STATUS_EXIT_PENDING, &priv->status);
>  	if (priv->mac80211_registered) {
>  		ieee80211_unregister_hw(priv->hw);
>  		priv->mac80211_registered = 0;
> +	} else {
> +		iwl4965_down(priv);
>  	}
>  
> -	set_bit(STATUS_EXIT_PENDING, &priv->status);
> -
> -	iwl4965_down(priv);
> -
>  	/* make sure we flush any pending irq or
>  	 * tasklet for the driver
>  	 */
> -- 
> 1.5.3.6
> 
> 

-- 
John W. Linville
linville@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux