summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/hif_usb.h
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2012-08-21 12:04:27 +0400
committerJohn W. Linville <linville@tuxdriver.com>2012-09-07 23:03:36 +0400
commit32e31de5c37856dba7f174970806e38199e53d81 (patch)
treed8d2446ec1b38f0aac30b6b8944a97319fb67ebc /drivers/net/wireless/ath/ath9k/hif_usb.h
parentee91592711ed90a1abfbb1b2ceadded11d685164 (diff)
downloadlinux-32e31de5c37856dba7f174970806e38199e53d81.tar.xz
wireless: ath9k-htc: only load firmware in need
It is not necessary to hold the firmware memory during the whole driver lifetime, and obviously it does waste memory. Suppose there are 4 ath9k-htc usb dongles working, kernel has to consume about 4*50KBytes RAM to cache firmware for all dongles. After applying the patch, kernel only caches one single firmware image in RAM for all ath9k-htc devices just during system suspend/resume cycle. When system is ready for loading firmware, ath9k-htc can request the loading from usersapce. During system resume, ath9k-htc still can load the firmware which was cached in kernel memory before system suspend. Cc: ath9k-devel@lists.ath9k.org Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com> Cc: Jouni Malinen <jouni@qca.qualcomm.com> Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Cc: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hif_usb.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/hif_usb.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.h b/drivers/net/wireless/ath/ath9k/hif_usb.h
index 487ff658b4c1..51496e74b83e 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.h
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.h
@@ -85,12 +85,14 @@ struct cmd_buf {
};
#define HIF_USB_START BIT(0)
+#define HIF_USB_READY BIT(1)
struct hif_device_usb {
struct usb_device *udev;
struct usb_interface *interface;
const struct usb_device_id *usb_device_id;
- const struct firmware *firmware;
+ const void *fw_data;
+ size_t fw_size;
struct completion fw_done;
struct htc_target *htc_handle;
struct hif_usb_tx tx;