iwlagn: remove unused parameters from hw_params
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Fri, 26 Aug 2011 06:11:10 +0000 (23:11 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 29 Aug 2011 19:30:28 +0000 (15:30 -0400)
Some of them weren't used at all, the others always had the same value since
the driver split.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-1000.c
drivers/net/wireless/iwlwifi/iwl-2000.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-commands.h
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-shared.h
drivers/net/wireless/iwlwifi/iwl-trans.c

index bd0ce3993b527abd5eb665140f0697eeb4db1eec..7d60cd2f49c690af45249b7bcc1fff73223a6777 100644 (file)
@@ -129,10 +129,6 @@ static int iwl1000_hw_set_hw_params(struct iwl_priv *priv)
                        iwlagn_mod_params.num_of_queues;
 
        hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues;
-       hw_params(priv).scd_bc_tbls_size =
-                       priv->cfg->base_params->num_of_queues *
-                       sizeof(struct iwlagn_scd_bc_tbl);
-       hw_params(priv).tfd_size = sizeof(struct iwl_tfd);
        hw_params(priv).max_stations = IWLAGN_STATION_COUNT;
        priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID;
 
index 1a36edf05ee40a293270c5138da617729463707b..8d71eec3669995b8ce5c842cb274525eeaa04514 100644 (file)
@@ -126,10 +126,6 @@ static int iwl2000_hw_set_hw_params(struct iwl_priv *priv)
                        iwlagn_mod_params.num_of_queues;
 
        hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues;
-       hw_params(priv).scd_bc_tbls_size =
-               priv->cfg->base_params->num_of_queues *
-               sizeof(struct iwlagn_scd_bc_tbl);
-       hw_params(priv).tfd_size = sizeof(struct iwl_tfd);
        hw_params(priv).max_stations = IWLAGN_STATION_COUNT;
        priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID;
 
index 6048b3b8cd6a9a0de28eb31249600403b4ac42e6..55fdbf57df98712cf4d02dd66e98773261b52257 100644 (file)
@@ -157,10 +157,6 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
                        iwlagn_mod_params.num_of_queues;
 
        hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues;
-       hw_params(priv).scd_bc_tbls_size =
-                       priv->cfg->base_params->num_of_queues *
-                       sizeof(struct iwlagn_scd_bc_tbl);
-       hw_params(priv).tfd_size = sizeof(struct iwl_tfd);
        hw_params(priv).max_stations = IWLAGN_STATION_COUNT;
        priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID;
 
@@ -200,10 +196,6 @@ static int iwl5150_hw_set_hw_params(struct iwl_priv *priv)
                        iwlagn_mod_params.num_of_queues;
 
        hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues;
-       hw_params(priv).scd_bc_tbls_size =
-                       priv->cfg->base_params->num_of_queues *
-                       sizeof(struct iwlagn_scd_bc_tbl);
-       hw_params(priv).tfd_size = sizeof(struct iwl_tfd);
        hw_params(priv).max_stations = IWLAGN_STATION_COUNT;
        priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID;
 
index c2cba80fb73f2c50929f9e89d8e033113388d467..63089bc28d9c34e299147db99fe6f19232faab95 100644 (file)
@@ -146,10 +146,6 @@ static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
                        iwlagn_mod_params.num_of_queues;
 
        hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues;
-       hw_params(priv).scd_bc_tbls_size =
-                       priv->cfg->base_params->num_of_queues *
-                       sizeof(struct iwlagn_scd_bc_tbl);
-       hw_params(priv).tfd_size = sizeof(struct iwl_tfd);
        hw_params(priv).max_stations = IWLAGN_STATION_COUNT;
        priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID;
 
index bbdc475c74dde8b0eb2d08d208d47b80f5ceeeb1..61437438c8439089731f862fbb6bc9c0668c86c9 100644 (file)
@@ -3191,8 +3191,6 @@ static u32 iwl_hw_detect(struct iwl_priv *priv)
 
 static int iwl_set_hw_params(struct iwl_priv *priv)
 {
-       hw_params(priv).max_rxq_size = RX_QUEUE_SIZE;
-       hw_params(priv).max_rxq_log = RX_QUEUE_SIZE_LOG;
        if (iwlagn_mod_params.amsdu_size_8K)
                hw_params(priv).rx_page_order =
                        get_order(IWL_RX_BUF_SIZE_8K);
@@ -3200,8 +3198,6 @@ static int iwl_set_hw_params(struct iwl_priv *priv)
                hw_params(priv).rx_page_order =
                        get_order(IWL_RX_BUF_SIZE_4K);
 
-       hw_params(priv).max_beacon_itrvl = IWL_MAX_UCODE_BEACON_INTERVAL;
-
        if (iwlagn_mod_params.disable_11n)
                priv->cfg->sku &= ~EEPROM_SKU_CAP_11N_ENABLE;
 
index 86b974804ead19981168c232fc54ec038b5b8fdb..1426b2fb1c3a181987dd0c445dcabc2f9a96f7c9 100644 (file)
@@ -673,7 +673,6 @@ struct iwl_rxon_assoc_cmd {
 
 #define IWL_CONN_MAX_LISTEN_INTERVAL   10
 #define IWL_MAX_UCODE_BEACON_INTERVAL  4 /* 4096 */
-#define IWL39_MAX_UCODE_BEACON_INTERVAL        1 /* 1024 */
 
 /*
  * REPLY_RXON_TIMING = 0x14 (command, has simple generic response)
index cfc23c25e979a33be7aa13bf13327fa205782239..048c8e2578f589d7b2b92acfe59d24febce64b25 100644 (file)
@@ -359,7 +359,7 @@ int iwl_send_rxon_timing(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
                beacon_int = le16_to_cpu(ctx->timing.beacon_interval);
        } else {
                beacon_int = iwl_adjust_beacon_interval(beacon_int,
-                       hw_params(priv).max_beacon_itrvl * TIME_UNIT);
+                       IWL_MAX_UCODE_BEACON_INTERVAL * TIME_UNIT);
                ctx->timing.beacon_interval = cpu_to_le16(beacon_int);
        }
 
index 1229eb3c098cb18bc2c0cfb2f7318ce37b14e0e8..7145e48bd014e2546a2126f420dccb156548ed26 100644 (file)
@@ -121,12 +121,8 @@ struct iwl_mod_params {
 /**
  * struct iwl_hw_params
  * @max_txq_num: Max # Tx queues supported
- * @scd_bc_tbls_size: size of scheduler byte count tables
- * @tfd_size: TFD size
  * @tx/rx_chains_num: Number of TX/RX chains
  * @valid_tx/rx_ant: usable antennas
- * @max_rxq_size: Max # Rx frames in Rx queue (must be power-of-2)
- * @max_rxq_log: Log-base-2 of max_rxq_size
  * @rx_page_order: Rx buffer page order
  * @rx_wrt_ptr_reg: FH{39}_RSCSR_CHNL0_WPTR
  * @max_stations:
@@ -142,18 +138,13 @@ struct iwl_mod_params {
  */
 struct iwl_hw_params {
        u8 max_txq_num;
-       u16 scd_bc_tbls_size;
-       u32 tfd_size;
        u8  tx_chains_num;
        u8  rx_chains_num;
        u8  valid_tx_ant;
        u8  valid_rx_ant;
-       u16 max_rxq_size;
-       u16 max_rxq_log;
        u32 rx_page_order;
        u8  max_stations;
        u8  ht40_channel;
-       u8  max_beacon_itrvl;   /* in 1024 ms */
        u32 max_inst_size;
        u32 max_data_size;
        u32 ct_kill_threshold; /* value in hw-dependent units */
index 2ffacb2b2d770c61af80dd2dc5f36039a8010925..4f3fdcaa63bccbbc0068de9947fd2033b5d4a95e 100644 (file)
@@ -302,7 +302,7 @@ static int iwl_trans_txq_alloc(struct iwl_trans *trans,
                                struct iwl_tx_queue *txq, int slots_num,
                                u32 txq_id)
 {
-       size_t tfd_sz = hw_params(trans).tfd_size * TFD_QUEUE_SIZE_MAX;
+       size_t tfd_sz = sizeof(struct iwl_tfd) * TFD_QUEUE_SIZE_MAX;
        int i;
 
        if (WARN_ON(txq->meta || txq->cmd || txq->txb || txq->tfds))
@@ -448,7 +448,7 @@ static void iwl_tx_queue_free(struct iwl_trans *trans, int txq_id)
 
        /* De-alloc circular buffer of TFDs */
        if (txq->q.n_bd) {
-               dma_free_coherent(dev, hw_params(trans).tfd_size *
+               dma_free_coherent(dev, sizeof(struct iwl_tfd) *
                                  txq->q.n_bd, txq->tfds, txq->q.dma_addr);
                memset(&txq->q.dma_addr, 0, sizeof(txq->q.dma_addr));
        }
@@ -509,6 +509,9 @@ static int iwl_trans_tx_alloc(struct iwl_trans *trans)
        struct iwl_trans_pcie *trans_pcie =
                IWL_TRANS_GET_PCIE_TRANS(trans);
 
+       u16 scd_bc_tbls_size = priv->cfg->base_params->num_of_queues *
+                       sizeof(struct iwlagn_scd_bc_tbl);
+
        /*It is not allowed to alloc twice, so warn when this happens.
         * We cannot rely on the previous allocation, so free and fail */
        if (WARN_ON(priv->txq)) {
@@ -517,7 +520,7 @@ static int iwl_trans_tx_alloc(struct iwl_trans *trans)
        }
 
        ret = iwlagn_alloc_dma_ptr(trans, &trans_pcie->scd_bc_tbls,
-                               hw_params(trans).scd_bc_tbls_size);
+                                  scd_bc_tbls_size);
        if (ret) {
                IWL_ERR(trans, "Scheduler BC Table allocation failed\n");
                goto error;