[linux-pm] [RFC PATCH 1/2] orinoco: Use PM notifier to cache firmware for use during resume
Andrey Borzenkov
arvidjaar at mail.ru
Fri Oct 31 10:36:59 PDT 2008
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 at gmail.com>
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.linux-foundation.org/pipermail/linux-pm/attachments/20081031/69449789/attachment.pgp
More information about the linux-pm
mailing list