]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/net/wireless/iwlwifi/iwl-5000.c
iwlwifi: update copyright year to 2009
[mv-sheeva.git] / drivers / net / wireless / iwlwifi / iwl-5000.c
index a738886b434f66e907eb332b81d1d28ca7fc09bb..429dcbeff16283692663f81643ee0c21fee140d8 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
  *
- * Copyright(c) 2007-2008 Intel Corporation. All rights reserved.
+ * Copyright(c) 2007 - 2009 Intel Corporation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
 #include "iwl-helpers.h"
 #include "iwl-5000-hw.h"
 
-#define IWL5000_UCODE_API  "-1"
+/* Highest firmware API version supported */
+#define IWL5000_UCODE_API_MAX 1
+#define IWL5150_UCODE_API_MAX 1
 
-#define IWL5000_MODULE_FIRMWARE "iwlwifi-5000" IWL5000_UCODE_API ".ucode"
+/* Lowest firmware API version supported */
+#define IWL5000_UCODE_API_MIN 1
+#define IWL5150_UCODE_API_MIN 1
+
+#define IWL5000_FW_PRE "iwlwifi-5000-"
+#define _IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE #api ".ucode"
+#define IWL5000_MODULE_FIRMWARE(api) _IWL5000_MODULE_FIRMWARE(api)
+
+#define IWL5150_FW_PRE "iwlwifi-5150-"
+#define _IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE #api ".ucode"
+#define IWL5150_MODULE_FIRMWARE(api) _IWL5150_MODULE_FIRMWARE(api)
 
 static const u16 iwl5000_default_queue_to_tx_fifo[] = {
        IWL_TX_FIFO_AC3,
@@ -61,7 +73,6 @@ static const u16 iwl5000_default_queue_to_tx_fifo[] = {
 /* FIXME: same implementation as 4965 */
 static int iwl5000_apm_stop_master(struct iwl_priv *priv)
 {
-       int ret = 0;
        unsigned long flags;
 
        spin_lock_irqsave(&priv->lock, flags);
@@ -69,17 +80,13 @@ static int iwl5000_apm_stop_master(struct iwl_priv *priv)
        /* set stop master bit */
        iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER);
 
-       ret = iwl_poll_bit(priv, CSR_RESET,
-                                 CSR_RESET_REG_FLAG_MASTER_DISABLED,
+       iwl_poll_direct_bit(priv, CSR_RESET,
                                  CSR_RESET_REG_FLAG_MASTER_DISABLED, 100);
-       if (ret < 0)
-               goto out;
 
-out:
        spin_unlock_irqrestore(&priv->lock, flags);
        IWL_DEBUG_INFO("stop master\n");
 
-       return ret;
+       return 0;
 }
 
 
@@ -108,9 +115,8 @@ static int iwl5000_apm_init(struct iwl_priv *priv)
        iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
 
        /* wait for clock stabilization */
-       ret = iwl_poll_bit(priv, CSR_GP_CNTRL,
-                         CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY,
-                         CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
+       ret = iwl_poll_direct_bit(priv, CSR_GP_CNTRL,
+                       CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
        if (ret < 0) {
                IWL_DEBUG_INFO("Failed to init the card\n");
                return ret;
@@ -177,9 +183,8 @@ static int iwl5000_apm_reset(struct iwl_priv *priv)
        iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
 
        /* wait for clock stabilization */
-       ret = iwl_poll_bit(priv, CSR_GP_CNTRL,
-                         CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY,
-                         CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
+       ret = iwl_poll_direct_bit(priv, CSR_GP_CNTRL,
+                       CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
        if (ret < 0) {
                IWL_DEBUG_INFO("Failed to init the card\n");
                goto out;
@@ -284,7 +289,7 @@ static u32 eeprom_indirect_address(const struct iwl_priv *priv, u32 address)
                offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_OTHERS);
                break;
        default:
-               IWL_ERROR("illegal indirect type: 0x%X\n",
+               IWL_ERR(priv, "illegal indirect type: 0x%X\n",
                address & INDIRECT_TYPE_MSK);
                break;
        }
@@ -338,9 +343,13 @@ static void iwl5000_gain_computation(struct iwl_priv *priv,
 
        if (!data->radio_write) {
                struct iwl_calib_chain_noise_gain_cmd cmd;
+
                memset(&cmd, 0, sizeof(cmd));
 
-               cmd.op_code = IWL_PHY_CALIBRATE_CHAIN_NOISE_GAIN_CMD;
+               cmd.hdr.op_code = IWL_PHY_CALIBRATE_CHAIN_NOISE_GAIN_CMD;
+               cmd.hdr.first_group = 0;
+               cmd.hdr.groups_num = 1;
+               cmd.hdr.data_valid = 1;
                cmd.delta_gain_1 = data->delta_gain_code[1];
                cmd.delta_gain_2 = data->delta_gain_code[2];
                iwl_send_cmd_pdu_async(priv, REPLY_PHY_CALIBRATION_CMD,
@@ -362,15 +371,21 @@ static void iwl5000_gain_computation(struct iwl_priv *priv,
 static void iwl5000_chain_noise_reset(struct iwl_priv *priv)
 {
        struct iwl_chain_noise_data *data = &priv->chain_noise_data;
+       int ret;
 
        if ((data->state == IWL_CHAIN_NOISE_ALIVE) && iwl_is_associated(priv)) {
                struct iwl_calib_chain_noise_reset_cmd cmd;
-
                memset(&cmd, 0, sizeof(cmd));
-               cmd.op_code = IWL_PHY_CALIBRATE_CHAIN_NOISE_RESET_CMD;
-               if (iwl_send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD,
-                       sizeof(cmd), &cmd))
-                       IWL_ERROR("Could not send REPLY_PHY_CALIBRATION_CMD\n");
+
+               cmd.hdr.op_code = IWL_PHY_CALIBRATE_CHAIN_NOISE_RESET_CMD;
+               cmd.hdr.first_group = 0;
+               cmd.hdr.groups_num = 1;
+               cmd.hdr.data_valid = 1;
+               ret = iwl_send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD,
+                                       sizeof(cmd), &cmd);
+               if (ret)
+                       IWL_ERR(priv,
+                               "Could not send REPLY_PHY_CALIBRATION_CMD\n");
                data->state = IWL_CHAIN_NOISE_ACCUMULATE;
                IWL_DEBUG_CALIB("Run chain_noise_calibrate\n");
        }
@@ -415,22 +430,33 @@ static const u8 *iwl5000_eeprom_query_addr(const struct iwl_priv *priv,
        return &priv->eeprom[address];
 }
 
+static s32 iwl5150_get_ct_threshold(struct iwl_priv *priv)
+{
+       const s32 volt2temp_coef = -5;
+       u16 *temp_calib = (u16 *)iwl_eeprom_query_addr(priv,
+                                               EEPROM_5000_TEMPERATURE);
+       /* offset =  temperate -  voltage / coef */
+       s32 offset = temp_calib[0] - temp_calib[1] / volt2temp_coef;
+       s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD) - offset;
+       return threshold * volt2temp_coef;
+}
+
 /*
  *  Calibration
  */
 static int iwl5000_set_Xtal_calib(struct iwl_priv *priv)
 {
-       u8 data[sizeof(struct iwl_calib_hdr) +
-               sizeof(struct iwl_cal_xtal_freq)];
-       struct iwl_calib_cmd *cmd = (struct iwl_calib_cmd *)data;
-       struct iwl_cal_xtal_freq *xtal = (struct iwl_cal_xtal_freq *)cmd->data;
+       struct iwl_calib_xtal_freq_cmd cmd;
        u16 *xtal_calib = (u16 *)iwl_eeprom_query_addr(priv, EEPROM_5000_XTAL);
 
-       cmd->hdr.op_code = IWL_PHY_CALIBRATE_CRYSTAL_FRQ_CMD;
-       xtal->cap_pin1 = (u8)xtal_calib[0];
-       xtal->cap_pin2 = (u8)xtal_calib[1];
+       cmd.hdr.op_code = IWL_PHY_CALIBRATE_CRYSTAL_FRQ_CMD;
+       cmd.hdr.first_group = 0;
+       cmd.hdr.groups_num = 1;
+       cmd.hdr.data_valid = 1;
+       cmd.cap_pin1 = (u8)xtal_calib[0];
+       cmd.cap_pin2 = (u8)xtal_calib[1];
        return iwl_calib_set(&priv->calib_results[IWL_CALIB_XTAL],
-                            data, sizeof(data));
+                            (u8 *)&cmd, sizeof(cmd));
 }
 
 static int iwl5000_send_calib_cfg(struct iwl_priv *priv)
@@ -466,6 +492,9 @@ static void iwl5000_rx_calib_result(struct iwl_priv *priv,
         * uCode. iwl_send_calib_results sends them in a row according to their
         * index. We sort them here */
        switch (hdr->op_code) {
+       case IWL_PHY_CALIBRATE_DC_CMD:
+               index = IWL_CALIB_DC;
+               break;
        case IWL_PHY_CALIBRATE_LO_CMD:
                index = IWL_CALIB_LO;
                break;
@@ -479,7 +508,7 @@ static void iwl5000_rx_calib_result(struct iwl_priv *priv,
                index = IWL_CALIB_BASE_BAND;
                break;
        default:
-               IWL_ERROR("Unknown calibration notification %d\n",
+               IWL_ERR(priv, "Unknown calibration notification %d\n",
                          hdr->op_code);
                return;
        }
@@ -552,7 +581,8 @@ static int iwl5000_load_given_ucode(struct iwl_priv *priv,
 {
        int ret = 0;
 
-       ret = iwl5000_load_section(priv, inst_image, RTC_INST_LOWER_BOUND);
+       ret = iwl5000_load_section(priv, inst_image,
+                                  IWL50_RTC_INST_LOWER_BOUND);
        if (ret)
                return ret;
 
@@ -560,19 +590,19 @@ static int iwl5000_load_given_ucode(struct iwl_priv *priv,
        ret = wait_event_interruptible_timeout(priv->wait_command_queue,
                                        priv->ucode_write_complete, 5 * HZ);
        if (ret == -ERESTARTSYS) {
-               IWL_ERROR("Could not load the INST uCode section due "
+               IWL_ERR(priv, "Could not load the INST uCode section due "
                        "to interrupt\n");
                return ret;
        }
        if (!ret) {
-               IWL_ERROR("Could not load the INST uCode section\n");
+               IWL_ERR(priv, "Could not load the INST uCode section\n");
                return -ETIMEDOUT;
        }
 
        priv->ucode_write_complete = 0;
 
        ret = iwl5000_load_section(
-               priv, data_image, RTC_DATA_LOWER_BOUND);
+               priv, data_image, IWL50_RTC_DATA_LOWER_BOUND);
        if (ret)
                return ret;
 
@@ -581,11 +611,11 @@ static int iwl5000_load_given_ucode(struct iwl_priv *priv,
        ret = wait_event_interruptible_timeout(priv->wait_command_queue,
                                priv->ucode_write_complete, 5 * HZ);
        if (ret == -ERESTARTSYS) {
-               IWL_ERROR("Could not load the INST uCode section due "
+               IWL_ERR(priv, "Could not load the INST uCode section due "
                        "to interrupt\n");
                return ret;
        } else if (!ret) {
-               IWL_ERROR("Could not load the DATA uCode section\n");
+               IWL_ERR(priv, "Could not load the DATA uCode section\n");
                return -ETIMEDOUT;
        } else
                ret = 0;
@@ -647,7 +677,8 @@ static void iwl5000_init_alive_start(struct iwl_priv *priv)
        iwl_clear_stations_table(priv);
        ret = priv->cfg->ops->lib->alive_notify(priv);
        if (ret) {
-               IWL_WARNING("Could not complete ALIVE transition: %d\n", ret);
+               IWL_WARN(priv,
+                       "Could not complete ALIVE transition: %d\n", ret);
                goto restart;
        }
 
@@ -796,12 +827,14 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
 {
        if ((priv->cfg->mod_params->num_of_queues > IWL50_NUM_QUEUES) ||
            (priv->cfg->mod_params->num_of_queues < IWL_MIN_NUM_QUEUES)) {
-               IWL_ERROR("invalid queues_num, should be between %d and %d\n",
-                         IWL_MIN_NUM_QUEUES, IWL50_NUM_QUEUES);
+               IWL_ERR(priv,
+                       "invalid queues_num, should be between %d and %d\n",
+                       IWL_MIN_NUM_QUEUES, IWL50_NUM_QUEUES);
                return -EINVAL;
        }
 
        priv->hw_params.max_txq_num = priv->cfg->mod_params->num_of_queues;
+       priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
        priv->hw_params.scd_bc_tbls_size =
                        IWL50_NUM_QUEUES * sizeof(struct iwl5000_scd_bc_tbl);
        priv->hw_params.max_stations = IWL5000_STATION_COUNT;
@@ -811,6 +844,8 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
        priv->hw_params.max_bsm_size = 0;
        priv->hw_params.fat_channel =  BIT(IEEE80211_BAND_2GHZ) |
                                        BIT(IEEE80211_BAND_5GHZ);
+       priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
+
        priv->hw_params.sens = &iwl5000_sensitivity;
 
        switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) {
@@ -845,7 +880,7 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
        case CSR_HW_REV_TYPE_5150:
                /* 5150 wants in Kelvin */
                priv->hw_params.ct_kill_threshold =
-                               CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD);
+                               iwl5150_get_ct_threshold(priv);
                break;
        }
 
@@ -862,7 +897,12 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
                        BIT(IWL_CALIB_BASE_BAND);
                break;
        case CSR_HW_REV_TYPE_5150:
-               priv->hw_params.calib_init_cfg = 0;
+               priv->hw_params.calib_init_cfg =
+                       BIT(IWL_CALIB_DC)               |
+                       BIT(IWL_CALIB_LO)               |
+                       BIT(IWL_CALIB_TX_IQ)            |
+                       BIT(IWL_CALIB_BASE_BAND);
+
                break;
        }
 
@@ -977,7 +1017,8 @@ static int iwl5000_txq_agg_enable(struct iwl_priv *priv, int txq_id,
 
        if ((IWL50_FIRST_AMPDU_QUEUE > txq_id) ||
            (IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES <= txq_id)) {
-               IWL_WARNING("queue number out of range: %d, must be %d to %d\n",
+               IWL_WARN(priv,
+                       "queue number out of range: %d, must be %d to %d\n",
                        txq_id, IWL50_FIRST_AMPDU_QUEUE,
                        IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES - 1);
                return -EINVAL;
@@ -1042,7 +1083,8 @@ static int iwl5000_txq_agg_disable(struct iwl_priv *priv, u16 txq_id,
 
        if ((IWL50_FIRST_AMPDU_QUEUE > txq_id) ||
            (IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES <= txq_id)) {
-               IWL_WARNING("queue number out of range: %d, must be %d to %d\n",
+               IWL_WARN(priv,
+                       "queue number out of range: %d, must be %d to %d\n",
                        txq_id, IWL50_FIRST_AMPDU_QUEUE,
                        IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES - 1);
                return -EINVAL;
@@ -1163,8 +1205,9 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv,
 
                        sc = le16_to_cpu(hdr->seq_ctrl);
                        if (idx != (SEQ_TO_SN(sc) & 0xff)) {
-                               IWL_ERROR("BUG_ON idx doesn't match seq control"
-                                         " idx=%d, seq_idx=%d, seq=%d\n",
+                               IWL_ERR(priv,
+                                       "BUG_ON idx doesn't match seq control"
+                                       " idx=%d, seq_idx=%d, seq=%d\n",
                                          idx, SEQ_TO_SN(sc),
                                          hdr->seq_ctrl);
                                return -1;
@@ -1220,7 +1263,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
        int freed;
 
        if ((index >= txq->q.n_bd) || (iwl_queue_used(&txq->q, index) == 0)) {
-               IWL_ERROR("Read index for DMA queue txq_id (%d) index %d "
+               IWL_ERR(priv, "Read index for DMA queue txq_id (%d) index %d "
                          "is out of range [0-%d] %d %d\n", txq_id,
                          index, txq->q.n_bd, txq->q.write_ptr,
                          txq->q.read_ptr);
@@ -1294,7 +1337,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
                iwl_txq_check_empty(priv, sta_id, tid, txq_id);
 
        if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
-               IWL_ERROR("TODO:  Implement Tx ABORT REQUIRED!!!\n");
+               IWL_ERR(priv, "TODO:  Implement Tx ABORT REQUIRED!!!\n");
 }
 
 /* Currently 5000 is the superset of everything */
@@ -1322,7 +1365,7 @@ static void iwl5000_rx_handler_setup(struct iwl_priv *priv)
 
 static int iwl5000_hw_valid_rtc_data_addr(u32 addr)
 {
-       return (addr >= RTC_DATA_LOWER_BOUND) &&
+       return (addr >= IWL50_RTC_DATA_LOWER_BOUND) &&
                (addr < IWL50_RTC_DATA_UPPER_BOUND);
 }
 
@@ -1426,7 +1469,7 @@ static int iwl5000_calc_rssi(struct iwl_priv *priv,
 
        /* dBm = max_rssi dB - agc dB - constant.
         * Higher AGC (higher radio gain) means lower signal. */
-       return max_rssi - agc - IWL_RSSI_OFFSET;
+       return max_rssi - agc - IWL49_RSSI_OFFSET;
 }
 
 static struct iwl_hcmd_ops iwl5000_hcmd = {
@@ -1492,7 +1535,6 @@ static struct iwl_ops iwl5000_ops = {
 static struct iwl_mod_params iwl50_mod_params = {
        .num_of_queues = IWL50_NUM_QUEUES,
        .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
-       .enable_qos = 1,
        .amsdu_size_8K = 1,
        .restart_fw = 1,
        /* the rest are 0 by default */
@@ -1501,7 +1543,9 @@ static struct iwl_mod_params iwl50_mod_params = {
 
 struct iwl_cfg iwl5300_agn_cfg = {
        .name = "5300AGN",
-       .fw_name = IWL5000_MODULE_FIRMWARE,
+       .fw_name_pre = IWL5000_FW_PRE,
+       .ucode_api_max = IWL5000_UCODE_API_MAX,
+       .ucode_api_min = IWL5000_UCODE_API_MIN,
        .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
        .ops = &iwl5000_ops,
        .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
@@ -1512,7 +1556,9 @@ struct iwl_cfg iwl5300_agn_cfg = {
 
 struct iwl_cfg iwl5100_bg_cfg = {
        .name = "5100BG",
-       .fw_name = IWL5000_MODULE_FIRMWARE,
+       .fw_name_pre = IWL5000_FW_PRE,
+       .ucode_api_max = IWL5000_UCODE_API_MAX,
+       .ucode_api_min = IWL5000_UCODE_API_MIN,
        .sku = IWL_SKU_G,
        .ops = &iwl5000_ops,
        .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
@@ -1523,7 +1569,9 @@ struct iwl_cfg iwl5100_bg_cfg = {
 
 struct iwl_cfg iwl5100_abg_cfg = {
        .name = "5100ABG",
-       .fw_name = IWL5000_MODULE_FIRMWARE,
+       .fw_name_pre = IWL5000_FW_PRE,
+       .ucode_api_max = IWL5000_UCODE_API_MAX,
+       .ucode_api_min = IWL5000_UCODE_API_MIN,
        .sku = IWL_SKU_A|IWL_SKU_G,
        .ops = &iwl5000_ops,
        .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
@@ -1534,7 +1582,9 @@ struct iwl_cfg iwl5100_abg_cfg = {
 
 struct iwl_cfg iwl5100_agn_cfg = {
        .name = "5100AGN",
-       .fw_name = IWL5000_MODULE_FIRMWARE,
+       .fw_name_pre = IWL5000_FW_PRE,
+       .ucode_api_max = IWL5000_UCODE_API_MAX,
+       .ucode_api_min = IWL5000_UCODE_API_MIN,
        .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
        .ops = &iwl5000_ops,
        .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
@@ -1545,7 +1595,22 @@ struct iwl_cfg iwl5100_agn_cfg = {
 
 struct iwl_cfg iwl5350_agn_cfg = {
        .name = "5350AGN",
-       .fw_name = IWL5000_MODULE_FIRMWARE,
+       .fw_name_pre = IWL5000_FW_PRE,
+       .ucode_api_max = IWL5000_UCODE_API_MAX,
+       .ucode_api_min = IWL5000_UCODE_API_MIN,
+       .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
+       .ops = &iwl5000_ops,
+       .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
+       .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
+       .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
+       .mod_params = &iwl50_mod_params,
+};
+
+struct iwl_cfg iwl5150_agn_cfg = {
+       .name = "5150AGN",
+       .fw_name_pre = IWL5150_FW_PRE,
+       .ucode_api_max = IWL5150_UCODE_API_MAX,
+       .ucode_api_min = IWL5150_UCODE_API_MIN,
        .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
        .ops = &iwl5000_ops,
        .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
@@ -1554,7 +1619,8 @@ struct iwl_cfg iwl5350_agn_cfg = {
        .mod_params = &iwl50_mod_params,
 };
 
-MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE);
+MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
+MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));
 
 module_param_named(disable50, iwl50_mod_params.disable, int, 0444);
 MODULE_PARM_DESC(disable50,
@@ -1562,12 +1628,10 @@ MODULE_PARM_DESC(disable50,
 module_param_named(swcrypto50, iwl50_mod_params.sw_crypto, bool, 0444);
 MODULE_PARM_DESC(swcrypto50,
                  "using software crypto engine (default 0 [hardware])\n");
-module_param_named(debug50, iwl50_mod_params.debug, int, 0444);
+module_param_named(debug50, iwl50_mod_params.debug, uint, 0444);
 MODULE_PARM_DESC(debug50, "50XX debug output mask");
 module_param_named(queues_num50, iwl50_mod_params.num_of_queues, int, 0444);
 MODULE_PARM_DESC(queues_num50, "number of hw queues in 50xx series");
-module_param_named(qos_enable50, iwl50_mod_params.enable_qos, int, 0444);
-MODULE_PARM_DESC(qos_enable50, "enable all 50XX QoS functionality");
 module_param_named(11n_disable50, iwl50_mod_params.disable_11n, int, 0444);
 MODULE_PARM_DESC(11n_disable50, "disable 50XX 11n functionality");
 module_param_named(amsdu_size_8K50, iwl50_mod_params.amsdu_size_8K, int, 0444);