The shared status bits are a mixture of transport and op mode bits.
Some are used just by one or the other, some are shared.  Begin the
de-tangling of these bits.
Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
 
 int iwl_dvm_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
 {
-       if (iwl_is_rfkill(priv->shrd) || iwl_is_ctkill(priv->shrd)) {
+       if (iwl_is_rfkill(priv->shrd) || iwl_is_ctkill(priv)) {
                IWL_WARN(priv, "Not sending command - %s KILL\n",
                         iwl_is_rfkill(priv->shrd) ? "RF" : "CT");
                return -EIO;
 
                IWL_DEBUG_TEMP(priv, "entering CT_KILL state when "
                                "temperature timer expired\n");
                tt->state = IWL_TI_CT_KILL;
-               set_bit(STATUS_CT_KILL, &priv->shrd->status);
+               set_bit(STATUS_CT_KILL, &priv->status);
                iwl_perform_ct_kill_task(priv, true);
        }
 }
                }
                mutex_lock(&priv->mutex);
                if (old_state == IWL_TI_CT_KILL)
-                       clear_bit(STATUS_CT_KILL, &priv->shrd->status);
+                       clear_bit(STATUS_CT_KILL, &priv->status);
                if (tt->state != IWL_TI_CT_KILL &&
                    iwl_power_update_mode(priv, true)) {
                        /* TT state not updated
                         * try again during next temperature read
                         */
                        if (old_state == IWL_TI_CT_KILL)
-                               set_bit(STATUS_CT_KILL, &priv->shrd->status);
+                               set_bit(STATUS_CT_KILL, &priv->status);
                        tt->state = old_state;
                        IWL_ERR(priv, "Cannot update power mode, "
                                        "TT state not updated\n");
                } else {
                        if (tt->state == IWL_TI_CT_KILL) {
                                if (force) {
-                                       set_bit(STATUS_CT_KILL,
-                                               &priv->shrd->status);
+                                       set_bit(STATUS_CT_KILL, &priv->status);
                                        iwl_perform_ct_kill_task(priv, true);
                                } else {
                                        iwl_prepare_ct_kill_task(priv);
                }
                mutex_lock(&priv->mutex);
                if (old_state == IWL_TI_CT_KILL)
-                       clear_bit(STATUS_CT_KILL, &priv->shrd->status);
+                       clear_bit(STATUS_CT_KILL, &priv->status);
                if (tt->state != IWL_TI_CT_KILL &&
                    iwl_power_update_mode(priv, true)) {
                        /* TT state not updated
                        IWL_ERR(priv, "Cannot update power mode, "
                                        "TT state not updated\n");
                        if (old_state == IWL_TI_CT_KILL)
-                               set_bit(STATUS_CT_KILL, &priv->shrd->status);
+                               set_bit(STATUS_CT_KILL, &priv->status);
                        tt->state = old_state;
                } else {
                        IWL_DEBUG_TEMP(priv,
                                if (force) {
                                        IWL_DEBUG_TEMP(priv,
                                                "Enter IWL_TI_CT_KILL\n");
-                                       set_bit(STATUS_CT_KILL,
-                                               &priv->shrd->status);
+                                       set_bit(STATUS_CT_KILL, &priv->status);
                                        iwl_perform_ct_kill_task(priv, true);
                                } else {
                                        iwl_prepare_ct_kill_task(priv);
 
        return test_bit(STATUS_ALIVE, &shrd->status);
 }
 
-static inline int iwl_is_init(struct iwl_shared *shrd)
-{
-       return test_bit(STATUS_INIT, &shrd->status);
-}
-
 static inline int iwl_is_rfkill_hw(struct iwl_shared *shrd)
 {
        return test_bit(STATUS_RF_KILL_HW, &shrd->status);
        return iwl_is_rfkill_hw(shrd);
 }
 
-static inline int iwl_is_ctkill(struct iwl_shared *shrd)
+static inline int iwl_is_ctkill(struct iwl_priv *priv)
 {
-       return test_bit(STATUS_CT_KILL, &shrd->status);
+       return test_bit(STATUS_CT_KILL, &priv->status);
 }
 
 static inline int iwl_is_ready_rf(struct iwl_shared *shrd)
 
        pos += scnprintf(buf + pos, bufsz - pos, "STATUS_RF_KILL_HW:\t %d\n",
                test_bit(STATUS_RF_KILL_HW, &priv->shrd->status));
        pos += scnprintf(buf + pos, bufsz - pos, "STATUS_CT_KILL:\t\t %d\n",
-               test_bit(STATUS_CT_KILL, &priv->shrd->status));
-       pos += scnprintf(buf + pos, bufsz - pos, "STATUS_INIT:\t\t %d\n",
-               test_bit(STATUS_INIT, &priv->shrd->status));
+               test_bit(STATUS_CT_KILL, &priv->status));
        pos += scnprintf(buf + pos, bufsz - pos, "STATUS_ALIVE:\t\t %d\n",
                test_bit(STATUS_ALIVE, &priv->shrd->status));
        pos += scnprintf(buf + pos, bufsz - pos, "STATUS_READY:\t\t %d\n",
                test_bit(STATUS_READY, &priv->shrd->status));
-       pos += scnprintf(buf + pos, bufsz - pos, "STATUS_TEMPERATURE:\t %d\n",
-               test_bit(STATUS_TEMPERATURE, &priv->shrd->status));
        pos += scnprintf(buf + pos, bufsz - pos, "STATUS_GEO_CONFIGURED:\t %d\n",
                test_bit(STATUS_GEO_CONFIGURED, &priv->shrd->status));
        pos += scnprintf(buf + pos, bufsz - pos, "STATUS_EXIT_PENDING:\t %d\n",
 
        /*data shared among all the driver's layers */
        struct iwl_shared *shrd;
        const struct iwl_fw *fw;
+       unsigned long status;
 
        spinlock_t sta_lock;
        struct mutex mutex;
 
  * @hw_base: pci hardware address support
  * @ucode_write_complete: indicates that the ucode has been copied.
  * @ucode_write_waitq: wait queue for uCode load
+ * @status - transport specific status flags
  */
 struct iwl_trans_pcie {
        struct iwl_rx_queue rxq;
 
        bool ucode_write_complete;
        wait_queue_head_t ucode_write_waitq;
+       unsigned long status;
 };
 
 #define IWL_TRANS_GET_PCIE_TRANS(_iwl_trans) \
 
                        0x800FFFFF);
        }
 
-       set_bit(STATUS_INIT, &trans->shrd->status);
-
        return 0;
 }