[BUGFIX] iwlwifi: sdio: change when the SCD_GP_CTRL is set

There was a bug where the driver would update the SCD_GP_CTRL
periphery after the firmware had already loaded. This caused
the update of the periphery not to be recognized by the firmware.
Thus, in this case, instead of 31 queues, the firmware thought
it had only 20 queues.
Moved the update of the periphery to be before the firmware
is loaded in iwl_sdio_tx_init instead of iwl_sdio_tx_start
(just like it is in pcie).

type=bugfix
fixes=I27218a9f0e348f0c4376a4ba0f17a5be7ae42304
bug=cq:MWG100249765

Change-Id: Ia2d0220eece28239330e608d1f7833d98e2e4518
Signed-off-by: Oren Givon <oren.givon@intel.com>
Reviewed-on: https://git-amr-3.devtools.intel.com/gerrit/8496
Reviewed-by: Grumbach, Emmanuel <emmanuel.grumbach@intel.com>
Tested-by: ec ger unix iil jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
(cherry picked from commit 1ce884824679552906663652dec171c50704cabe)
Reviewed-on: https://git-amr-3.devtools.intel.com/gerrit/8501
x-iwlwifi-stack-dev: 47ed4535ccddaa2cb4ff1be25ce83a0dbe06e084
diff --git a/drivers/net/wireless/iwlwifi/trans_slave/sdio_tx.c b/drivers/net/wireless/iwlwifi/trans_slave/sdio_tx.c
index b7c1ea8..5a71070 100644
--- a/drivers/net/wireless/iwlwifi/trans_slave/sdio_tx.c
+++ b/drivers/net/wireless/iwlwifi/trans_slave/sdio_tx.c
@@ -305,13 +305,6 @@
 	/* set SCD CB size to 64 */
 	iwl_write_prph(trans, SCD_CB_SIZE, 0);
 
-	iwl_set_bits_prph(trans, SCD_GP_CTRL,
-			  SCD_GP_CTRL_AUTO_ACTIVE_MODE);
-
-	if (trans->cfg->base_params->num_of_queues > 20)
-		iwl_set_bits_prph(trans, SCD_GP_CTRL,
-				  SCD_GP_CTRL_ENABLE_31_QUEUES);
-
 	/* Set CB base pointer
 	 * Transaction to FH maps from PTFD entry in SNF to the actual TFD;
 	 * The FH assumes the data is address bits [35..8]
@@ -424,6 +417,13 @@
 	if (ret)
 		goto error_free;
 
+	iwl_set_bits_prph(trans, SCD_GP_CTRL,
+			  SCD_GP_CTRL_AUTO_ACTIVE_MODE);
+
+	if (trans->cfg->base_params->num_of_queues > 20)
+		iwl_set_bits_prph(trans, SCD_GP_CTRL,
+				  SCD_GP_CTRL_ENABLE_31_QUEUES);
+
 	return 0;
 
 error_free:
diff --git a/versions b/versions
index bcae27e..7893d5e 100644
--- a/versions
+++ b/versions
@@ -2,5 +2,5 @@
 BACKPORTED_KERNEL_VERSION="(see git)"
 BACKPORTED_KERNEL_NAME="iwlwifi"
 BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__
-BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:release/LinuxCore14:4628:38a59b3f"
+BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:release/LinuxCore14:4629:47ed4535"
 BACKPORTS_BRANCH_TSTAMP="Aug 26 2015 10:38:56"