iwlwifi: check for STATUS_EXIT_PENDING when send RXON command
[pandora-kernel.git] / drivers / net / wireless / iwlwifi / iwl-3945.c
index a97c099..cac9647 100644 (file)
@@ -116,7 +116,7 @@ void iwl3945_disable_events(struct iwl_priv *priv)
        u32 base;               /* SRAM address of event log header */
        u32 disable_ptr;        /* SRAM address of event-disable bitmap array */
        u32 array_size;         /* # of u32 entries in array */
-       u32 evt_disable[IWL_EVT_DISABLE_SIZE] = {
+       static const u32 evt_disable[IWL_EVT_DISABLE_SIZE] = {
                0x00000000,     /*   31 -    0  Event id numbers */
                0x00000000,     /*   63 -   32 */
                0x00000000,     /*   95 -   64 */
@@ -297,7 +297,7 @@ static void iwl3945_tx_queue_reclaim(struct iwl_priv *priv,
        if (iwl_queue_space(q) > q->low_mark && (txq_id >= 0) &&
                        (txq_id != IWL39_CMD_QUEUE_NUM) &&
                        priv->mac80211_registered)
-               iwl_wake_queue(priv, txq_id);
+               iwl_wake_queue(priv, txq);
 }
 
 /**
@@ -1784,6 +1784,9 @@ int iwl3945_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
        int rc = 0;
        bool new_assoc = !!(staging_rxon->filter_flags & RXON_FILTER_ASSOC_MSK);
 
+       if (test_bit(STATUS_EXIT_PENDING, &priv->status))
+               return -EINVAL;
+
        if (!iwl_is_alive(priv))
                return -1;
 
@@ -2727,7 +2730,9 @@ static struct iwl_lib_ops iwl3945_lib = {
        },
        .send_tx_power  = iwl3945_send_tx_power,
        .is_valid_rtc_data_addr = iwl3945_hw_valid_rtc_data_addr,
-       .isr = iwl_isr_legacy,
+       .isr_ops = {
+               .isr = iwl_isr_legacy,
+       },
        .recover_from_tx_stall = iwl_bg_monitor_recover,
        .check_plcp_health = iwl3945_good_plcp_health,
 
@@ -2747,7 +2752,7 @@ static const struct iwl_legacy_ops iwl3945_legacy_ops = {
 static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = {
        .get_hcmd_size = iwl3945_get_hcmd_size,
        .build_addsta_hcmd = iwl3945_build_addsta_hcmd,
-       .tx_cmd_protection = iwlcore_tx_cmd_protection,
+       .tx_cmd_protection = iwl_legacy_tx_cmd_protection,
        .request_scan = iwl3945_request_scan,
        .post_scan = iwl3945_post_scan,
 };
@@ -2786,6 +2791,7 @@ static struct iwl_cfg iwl3945_bg_cfg = {
        .ops = &iwl3945_ops,
        .mod_params = &iwl3945_mod_params,
        .base_params = &iwl3945_base_params,
+       .led_mode = IWL_LED_BLINK,
 };
 
 static struct iwl_cfg iwl3945_abg_cfg = {
@@ -2798,6 +2804,7 @@ static struct iwl_cfg iwl3945_abg_cfg = {
        .ops = &iwl3945_ops,
        .mod_params = &iwl3945_mod_params,
        .base_params = &iwl3945_base_params,
+       .led_mode = IWL_LED_BLINK,
 };
 
 DEFINE_PCI_DEVICE_TABLE(iwl3945_hw_card_ids) = {