aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-06-06 12:41:15 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-06-11 10:09:09 -0400
commit872907bb17fe2d8d01d0e9723f72f91cb4ea103f (patch)
tree73bf39a66c32e2764bfd354cae90f05d9599052d /drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
parent3f1e5f4a2b0993b6e81b5665b28568624f581b0f (diff)
iwlagn: don't check ucode subtype
The ucode subtypes keep changing, and there's no particular reason to be checking them (other than a paranoid sanity check). Since the numbers are also in conflict between different ucode images now, simply don't check them any more and rely on the images being built correctly. Also, to indicate that, rename the constants and the enum, moving it to a different file. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-ucode.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-ucode.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
index 97de5d9de67b..a5cb1f635637 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
@@ -602,12 +602,12 @@ static void iwlagn_alive_fn(struct iwl_priv *priv,
602 602
603int iwlagn_load_ucode_wait_alive(struct iwl_priv *priv, 603int iwlagn_load_ucode_wait_alive(struct iwl_priv *priv,
604 struct fw_img *image, 604 struct fw_img *image,
605 int subtype, int alternate_subtype) 605 enum iwlagn_ucode_type ucode_type)
606{ 606{
607 struct iwl_notification_wait alive_wait; 607 struct iwl_notification_wait alive_wait;
608 struct iwlagn_alive_data alive_data; 608 struct iwlagn_alive_data alive_data;
609 int ret; 609 int ret;
610 enum iwlagn_ucode_subtype old_type; 610 enum iwlagn_ucode_type old_type;
611 611
612 ret = iwlagn_start_device(priv); 612 ret = iwlagn_start_device(priv);
613 if (ret) 613 if (ret)
@@ -617,7 +617,7 @@ int iwlagn_load_ucode_wait_alive(struct iwl_priv *priv,
617 iwlagn_alive_fn, &alive_data); 617 iwlagn_alive_fn, &alive_data);
618 618
619 old_type = priv->ucode_type; 619 old_type = priv->ucode_type;
620 priv->ucode_type = subtype; 620 priv->ucode_type = ucode_type;
621 621
622 ret = iwlagn_load_given_ucode(priv, image); 622 ret = iwlagn_load_given_ucode(priv, image);
623 if (ret) { 623 if (ret) {
@@ -645,15 +645,6 @@ int iwlagn_load_ucode_wait_alive(struct iwl_priv *priv,
645 return -EIO; 645 return -EIO;
646 } 646 }
647 647
648 if (alive_data.subtype != subtype &&
649 alive_data.subtype != alternate_subtype) {
650 IWL_ERR(priv,
651 "Loaded ucode is not expected type (got %d, expected %d)!\n",
652 alive_data.subtype, subtype);
653 priv->ucode_type = old_type;
654 return -EIO;
655 }
656
657 ret = iwl_verify_ucode(priv, image); 648 ret = iwl_verify_ucode(priv, image);
658 if (ret) { 649 if (ret) {
659 priv->ucode_type = old_type; 650 priv->ucode_type = old_type;
@@ -685,7 +676,7 @@ int iwlagn_run_init_ucode(struct iwl_priv *priv)
685 if (!priv->ucode_init.code.len) 676 if (!priv->ucode_init.code.len)
686 return 0; 677 return 0;
687 678
688 if (priv->ucode_type != UCODE_SUBTYPE_NONE_LOADED) 679 if (priv->ucode_type != IWL_UCODE_NONE)
689 return 0; 680 return 0;
690 681
691 iwlagn_init_notification_wait(priv, &calib_wait, 682 iwlagn_init_notification_wait(priv, &calib_wait,
@@ -694,7 +685,7 @@ int iwlagn_run_init_ucode(struct iwl_priv *priv)
694 685
695 /* Will also start the device */ 686 /* Will also start the device */
696 ret = iwlagn_load_ucode_wait_alive(priv, &priv->ucode_init, 687 ret = iwlagn_load_ucode_wait_alive(priv, &priv->ucode_init,
697 UCODE_SUBTYPE_INIT, -1); 688 IWL_UCODE_INIT);
698 if (ret) 689 if (ret)
699 goto error; 690 goto error;
700 691