Re: [RFC PATCH 1/2] orinoco: Use PM notifier to cache firmware for use during resume

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

 



On Friday 31 October 2008, David Kilroy wrote:
> When preparing for either suspend or hibernation, load the necessary
> firmware from userspace.
> 
> Upon error or resume, release the firmware.
> 
> Works for both Agere and Symbol firmware.
> 
> Signed-off by: David Kilroy <kilroyd@xxxxxxxxx>

This is on top of my old patch; was it ever accepted anywhere? I guess
it should be rediffed against clean tree.

> @@ -621,7 +620,7 @@ symbol_dl_image(struct orinoco_private *priv, const struct fw_info *fw,
>  	ret = hermes_init(hw);
>  
>  	/* hermes_reset() should return 0 with the secondary firmware */
> -	if (secondary && ret != 0)
> +	if (secondary && (ret != 0))

Extra parenthesis are redundant, are not they?

>  /********************************************************************/
> +/* Power management                                                 */
> +/********************************************************************/
> +
> +static int orinoco_pm_notifier(struct notifier_block *notifier,
> +			       unsigned long pm_event,
> +			       void *unused)

It probably should be conditional on CONFIG_PM somehow? 

> diff --git a/drivers/net/wireless/orinoco.h b/drivers/net/wireless/orinoco.h
> index 8c29538..5a9685a 100644
> --- a/drivers/net/wireless/orinoco.h
> +++ b/drivers/net/wireless/orinoco.h
> @@ -10,6 +10,7 @@
>  #define DRIVER_VERSION "0.15"
>  
>  #include <linux/interrupt.h>
> +#include <linux/suspend.h>
>  #include <linux/netdevice.h>
>  #include <linux/wireless.h>
>  #include <net/iw_handler.h>
> @@ -167,8 +168,11 @@ struct orinoco_private {
>  	unsigned int tkip_cm_active:1;
>  	unsigned int key_mgmt:3;
>  
> -	/* Cached in memory firmware to use in ->resume */
> -	const struct firmware *cached_fw;
> +	/* Cached in memory firmware to use during ->resume. */
> +	const struct firmware *cached_pri_fw;
> +	const struct firmware *cached_sta_fw;

I think name is badly chosen. It could be both STA and AP firmware;
I know that AP is not implemented currently, but it does not mean
it will never be and firmware is there if required.

I will test it once I sort out issue with booting 2.6.28. Right now
it stopped booting completely.

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux