aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2009-10-16 01:18:59 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:48:27 -0400
commit5dc53163c24ad288cfa2369b14a073992e069908 (patch)
tree91af11beac51db9e396bdb8f77a18468cf9fda82
parent7fd6b12f329b7ec1c1e3ad49d701d2ac7ab42d9e (diff)
iwmc3200wifi: Set wiphy firmware version
Our wiphy firmware version is a combination of the UMAC and LMAC ones. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwmc3200wifi/fw.c7
-rw-r--r--drivers/net/wireless/iwmc3200wifi/iwm.h2
-rw-r--r--drivers/net/wireless/iwmc3200wifi/main.c4
3 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/fw.c b/drivers/net/wireless/iwmc3200wifi/fw.c
index f02d571b0a13..49067092d336 100644
--- a/drivers/net/wireless/iwmc3200wifi/fw.c
+++ b/drivers/net/wireless/iwmc3200wifi/fw.c
@@ -217,6 +217,13 @@ static int iwm_load_img(struct iwm_priv *iwm, const char *img_name)
217 IWM_BUILD_YEAR(build_date), IWM_BUILD_MONTH(build_date), 217 IWM_BUILD_YEAR(build_date), IWM_BUILD_MONTH(build_date),
218 IWM_BUILD_DAY(build_date)); 218 IWM_BUILD_DAY(build_date));
219 219
220 if (!strcmp(img_name, iwm->bus_ops->umac_name))
221 sprintf(iwm->umac_version, "%02X.%02X",
222 ver->major, ver->minor);
223
224 if (!strcmp(img_name, iwm->bus_ops->lmac_name))
225 sprintf(iwm->lmac_version, "%02X.%02X",
226 ver->major, ver->minor);
220 227
221 err_release_fw: 228 err_release_fw:
222 release_firmware(fw); 229 release_firmware(fw);
diff --git a/drivers/net/wireless/iwmc3200wifi/iwm.h b/drivers/net/wireless/iwmc3200wifi/iwm.h
index c4a01f2a6028..a9bf6bc97bea 100644
--- a/drivers/net/wireless/iwmc3200wifi/iwm.h
+++ b/drivers/net/wireless/iwmc3200wifi/iwm.h
@@ -294,6 +294,8 @@ struct iwm_priv {
294 int resp_ie_len; 294 int resp_ie_len;
295 295
296 struct iwm_fw_error_hdr *last_fw_err; 296 struct iwm_fw_error_hdr *last_fw_err;
297 char umac_version[8];
298 char lmac_version[8];
297 299
298 char private[0] __attribute__((__aligned__(NETDEV_ALIGN))); 300 char private[0] __attribute__((__aligned__(NETDEV_ALIGN)));
299}; 301};
diff --git a/drivers/net/wireless/iwmc3200wifi/main.c b/drivers/net/wireless/iwmc3200wifi/main.c
index 952701e6127e..f93e9139b0f2 100644
--- a/drivers/net/wireless/iwmc3200wifi/main.c
+++ b/drivers/net/wireless/iwmc3200wifi/main.c
@@ -628,6 +628,7 @@ static int __iwm_up(struct iwm_priv *iwm)
628{ 628{
629 int ret; 629 int ret;
630 struct iwm_notif *notif_reboot, *notif_ack = NULL; 630 struct iwm_notif *notif_reboot, *notif_ack = NULL;
631 struct wiphy *wiphy = iwm_to_wiphy(iwm);
631 632
632 ret = iwm_bus_enable(iwm); 633 ret = iwm_bus_enable(iwm);
633 if (ret) { 634 if (ret) {
@@ -689,6 +690,9 @@ static int __iwm_up(struct iwm_priv *iwm)
689 goto err_disable; 690 goto err_disable;
690 } 691 }
691 692
693 snprintf(wiphy->fw_version, sizeof(wiphy->fw_version), "L%s_U%s",
694 iwm->lmac_version, iwm->umac_version);
695
692 /* We configure the UMAC and enable the wifi module */ 696 /* We configure the UMAC and enable the wifi module */
693 ret = iwm_send_umac_config(iwm, 697 ret = iwm_send_umac_config(iwm,
694 cpu_to_le32(UMAC_RST_CTRL_FLG_WIFI_CORE_EN) | 698 cpu_to_le32(UMAC_RST_CTRL_FLG_WIFI_CORE_EN) |