diff options
author | Gregory Greenman <gregory.greenman@intel.com> | 2008-08-04 04:00:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-04 15:09:12 -0400 |
commit | da99c4b6c25964b90c79f19beccda208df1a865a (patch) | |
tree | b16752072e71c6491e18c3ef50e064d858a66452 /drivers/net/wireless/iwlwifi/iwl-5000.c | |
parent | 4c43e0d0ecd5196ed5c67f64ed2f1860770eed34 (diff) |
iwlwifi: memory allocation optimization
This patch optimizes memory allocation. The cmd member of
iwl_tx_queue was allocated previously as a continuous block
of memory. This patch allocates separate memory chunks for each command
and maps/unmaps these chunks in the run time.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-5000.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 1d793c093f1a..56dbc8144a34 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -939,8 +939,8 @@ static void iwl5000_txq_update_byte_cnt_tbl(struct iwl_priv *priv, | |||
939 | len = byte_cnt + IWL_TX_CRC_SIZE + IWL_TX_DELIMITER_SIZE; | 939 | len = byte_cnt + IWL_TX_CRC_SIZE + IWL_TX_DELIMITER_SIZE; |
940 | 940 | ||
941 | if (txq_id != IWL_CMD_QUEUE_NUM) { | 941 | if (txq_id != IWL_CMD_QUEUE_NUM) { |
942 | sta = txq->cmd[txq->q.write_ptr].cmd.tx.sta_id; | 942 | sta = txq->cmd[txq->q.write_ptr]->cmd.tx.sta_id; |
943 | sec_ctl = txq->cmd[txq->q.write_ptr].cmd.tx.sec_ctl; | 943 | sec_ctl = txq->cmd[txq->q.write_ptr]->cmd.tx.sec_ctl; |
944 | 944 | ||
945 | switch (sec_ctl & TX_CMD_SEC_MSK) { | 945 | switch (sec_ctl & TX_CMD_SEC_MSK) { |
946 | case TX_CMD_SEC_CCM: | 946 | case TX_CMD_SEC_CCM: |
@@ -979,7 +979,7 @@ static void iwl5000_txq_inval_byte_cnt_tbl(struct iwl_priv *priv, | |||
979 | u8 sta = 0; | 979 | u8 sta = 0; |
980 | 980 | ||
981 | if (txq_id != IWL_CMD_QUEUE_NUM) | 981 | if (txq_id != IWL_CMD_QUEUE_NUM) |
982 | sta = txq->cmd[txq->q.read_ptr].cmd.tx.sta_id; | 982 | sta = txq->cmd[txq->q.read_ptr]->cmd.tx.sta_id; |
983 | 983 | ||
984 | shared_data->queues_byte_cnt_tbls[txq_id].tfd_offset[txq->q.read_ptr]. | 984 | shared_data->queues_byte_cnt_tbls[txq_id].tfd_offset[txq->q.read_ptr]. |
985 | val = cpu_to_le16(1 | (sta << 12)); | 985 | val = cpu_to_le16(1 | (sta << 12)); |