aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-04-28 10:27:09 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-05-06 13:46:17 -0400
commit94b00658ffc719427c9c09d7920957bc35915c6f (patch)
treecbc98ff565745d31f586edb6017bcc17f79ceaae
parentccb6c1c0ec2b76a41c8c85747b1a671e71b97e64 (diff)
iwlagn: remove bytecount indirection
All AGN devices need the bytecount table, so remove the indirection and make the functions static again. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-1000.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-2000.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c17
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.h5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h5
7 files changed, 8 insertions, 31 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index 3da8cf27dcb9..b4c81931e136 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -171,8 +171,6 @@ static int iwl1000_hw_set_hw_params(struct iwl_priv *priv)
171 171
172static struct iwl_lib_ops iwl1000_lib = { 172static struct iwl_lib_ops iwl1000_lib = {
173 .set_hw_params = iwl1000_hw_set_hw_params, 173 .set_hw_params = iwl1000_hw_set_hw_params,
174 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
175 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
176 .txq_set_sched = iwlagn_txq_set_sched, 174 .txq_set_sched = iwlagn_txq_set_sched,
177 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, 175 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
178 .txq_free_tfd = iwl_hw_txq_free_tfd, 176 .txq_free_tfd = iwl_hw_txq_free_tfd,
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
index bca462c47e37..89b8da7a6c8b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
@@ -252,8 +252,6 @@ static int iwl2030_hw_channel_switch(struct iwl_priv *priv,
252 252
253static struct iwl_lib_ops iwl2000_lib = { 253static struct iwl_lib_ops iwl2000_lib = {
254 .set_hw_params = iwl2000_hw_set_hw_params, 254 .set_hw_params = iwl2000_hw_set_hw_params,
255 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
256 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
257 .txq_set_sched = iwlagn_txq_set_sched, 255 .txq_set_sched = iwlagn_txq_set_sched,
258 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, 256 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
259 .txq_free_tfd = iwl_hw_txq_free_tfd, 257 .txq_free_tfd = iwl_hw_txq_free_tfd,
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 561f2cd65dd4..98f81df166e3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -339,8 +339,6 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv,
339 339
340static struct iwl_lib_ops iwl5000_lib = { 340static struct iwl_lib_ops iwl5000_lib = {
341 .set_hw_params = iwl5000_hw_set_hw_params, 341 .set_hw_params = iwl5000_hw_set_hw_params,
342 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
343 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
344 .txq_set_sched = iwlagn_txq_set_sched, 342 .txq_set_sched = iwlagn_txq_set_sched,
345 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, 343 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
346 .txq_free_tfd = iwl_hw_txq_free_tfd, 344 .txq_free_tfd = iwl_hw_txq_free_tfd,
@@ -376,8 +374,6 @@ static struct iwl_lib_ops iwl5000_lib = {
376 374
377static struct iwl_lib_ops iwl5150_lib = { 375static struct iwl_lib_ops iwl5150_lib = {
378 .set_hw_params = iwl5150_hw_set_hw_params, 376 .set_hw_params = iwl5150_hw_set_hw_params,
379 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
380 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
381 .txq_set_sched = iwlagn_txq_set_sched, 377 .txq_set_sched = iwlagn_txq_set_sched,
382 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, 378 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
383 .txq_free_tfd = iwl_hw_txq_free_tfd, 379 .txq_free_tfd = iwl_hw_txq_free_tfd,
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 6045457cc722..a7921f9a03c6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -278,8 +278,6 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
278 278
279static struct iwl_lib_ops iwl6000_lib = { 279static struct iwl_lib_ops iwl6000_lib = {
280 .set_hw_params = iwl6000_hw_set_hw_params, 280 .set_hw_params = iwl6000_hw_set_hw_params,
281 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
282 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
283 .txq_set_sched = iwlagn_txq_set_sched, 281 .txq_set_sched = iwlagn_txq_set_sched,
284 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, 282 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
285 .txq_free_tfd = iwl_hw_txq_free_tfd, 283 .txq_free_tfd = iwl_hw_txq_free_tfd,
@@ -316,8 +314,6 @@ static struct iwl_lib_ops iwl6000_lib = {
316 314
317static struct iwl_lib_ops iwl6030_lib = { 315static struct iwl_lib_ops iwl6030_lib = {
318 .set_hw_params = iwl6000_hw_set_hw_params, 316 .set_hw_params = iwl6000_hw_set_hw_params,
319 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
320 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
321 .txq_set_sched = iwlagn_txq_set_sched, 317 .txq_set_sched = iwlagn_txq_set_sched,
322 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, 318 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
323 .txq_free_tfd = iwl_hw_txq_free_tfd, 319 .txq_free_tfd = iwl_hw_txq_free_tfd,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 5445fd6a5a91..26601b7048f2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -98,9 +98,9 @@ static inline int get_fifo_from_tid(struct iwl_rxon_context *ctx, u16 tid)
98/** 98/**
99 * iwlagn_txq_update_byte_cnt_tbl - Set up entry in Tx byte-count array 99 * iwlagn_txq_update_byte_cnt_tbl - Set up entry in Tx byte-count array
100 */ 100 */
101void iwlagn_txq_update_byte_cnt_tbl(struct iwl_priv *priv, 101static void iwlagn_txq_update_byte_cnt_tbl(struct iwl_priv *priv,
102 struct iwl_tx_queue *txq, 102 struct iwl_tx_queue *txq,
103 u16 byte_cnt) 103 u16 byte_cnt)
104{ 104{
105 struct iwlagn_scd_bc_tbl *scd_bc_tbl = priv->scd_bc_tbls.addr; 105 struct iwlagn_scd_bc_tbl *scd_bc_tbl = priv->scd_bc_tbls.addr;
106 int write_ptr = txq->q.write_ptr; 106 int write_ptr = txq->q.write_ptr;
@@ -136,8 +136,8 @@ void iwlagn_txq_update_byte_cnt_tbl(struct iwl_priv *priv,
136 tfd_offset[TFD_QUEUE_SIZE_MAX + write_ptr] = bc_ent; 136 tfd_offset[TFD_QUEUE_SIZE_MAX + write_ptr] = bc_ent;
137} 137}
138 138
139void iwlagn_txq_inval_byte_cnt_tbl(struct iwl_priv *priv, 139static void iwlagn_txq_inval_byte_cnt_tbl(struct iwl_priv *priv,
140 struct iwl_tx_queue *txq) 140 struct iwl_tx_queue *txq)
141{ 141{
142 struct iwlagn_scd_bc_tbl *scd_bc_tbl = priv->scd_bc_tbls.addr; 142 struct iwlagn_scd_bc_tbl *scd_bc_tbl = priv->scd_bc_tbls.addr;
143 int txq_id = txq->q.id; 143 int txq_id = txq->q.id;
@@ -766,8 +766,8 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
766 766
767 /* Set up entry for this TFD in Tx byte-count array */ 767 /* Set up entry for this TFD in Tx byte-count array */
768 if (info->flags & IEEE80211_TX_CTL_AMPDU) 768 if (info->flags & IEEE80211_TX_CTL_AMPDU)
769 priv->cfg->ops->lib->txq_update_byte_cnt_tbl(priv, txq, 769 iwlagn_txq_update_byte_cnt_tbl(priv, txq,
770 le16_to_cpu(tx_cmd->len)); 770 le16_to_cpu(tx_cmd->len));
771 771
772 pci_dma_sync_single_for_device(priv->pci_dev, txcmd_phys, 772 pci_dma_sync_single_for_device(priv->pci_dev, txcmd_phys,
773 firstlen, PCI_DMA_BIDIRECTIONAL); 773 firstlen, PCI_DMA_BIDIRECTIONAL);
@@ -1246,8 +1246,7 @@ int iwlagn_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
1246 txq_id >= IWLAGN_FIRST_AMPDU_QUEUE); 1246 txq_id >= IWLAGN_FIRST_AMPDU_QUEUE);
1247 tx_info->skb = NULL; 1247 tx_info->skb = NULL;
1248 1248
1249 if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl) 1249 iwlagn_txq_inval_byte_cnt_tbl(priv, txq);
1250 priv->cfg->ops->lib->txq_inval_byte_cnt_tbl(priv, txq);
1251 1250
1252 priv->cfg->ops->lib->txq_free_tfd(priv, txq); 1251 priv->cfg->ops->lib->txq_free_tfd(priv, txq);
1253 } 1252 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index aa398b6dab1f..fe33fe8aa418 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -139,11 +139,6 @@ void iwlagn_set_wr_ptrs(struct iwl_priv *priv,
139void iwlagn_tx_queue_set_status(struct iwl_priv *priv, 139void iwlagn_tx_queue_set_status(struct iwl_priv *priv,
140 struct iwl_tx_queue *txq, 140 struct iwl_tx_queue *txq,
141 int tx_fifo_id, int scd_retry); 141 int tx_fifo_id, int scd_retry);
142void iwlagn_txq_update_byte_cnt_tbl(struct iwl_priv *priv,
143 struct iwl_tx_queue *txq,
144 u16 byte_cnt);
145void iwlagn_txq_inval_byte_cnt_tbl(struct iwl_priv *priv,
146 struct iwl_tx_queue *txq);
147void iwlagn_txq_set_sched(struct iwl_priv *priv, u32 mask); 142void iwlagn_txq_set_sched(struct iwl_priv *priv, u32 mask);
148void iwl_free_tfds_in_queue(struct iwl_priv *priv, 143void iwl_free_tfds_in_queue(struct iwl_priv *priv,
149 int sta_id, int tid, int freed); 144 int sta_id, int tid, int freed);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 9d7e36d0fb2a..5b5b0cce4a54 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -128,11 +128,6 @@ struct iwl_lib_ops {
128 /* set hw dependent parameters */ 128 /* set hw dependent parameters */
129 int (*set_hw_params)(struct iwl_priv *priv); 129 int (*set_hw_params)(struct iwl_priv *priv);
130 /* Handling TX */ 130 /* Handling TX */
131 void (*txq_update_byte_cnt_tbl)(struct iwl_priv *priv,
132 struct iwl_tx_queue *txq,
133 u16 byte_cnt);
134 void (*txq_inval_byte_cnt_tbl)(struct iwl_priv *priv,
135 struct iwl_tx_queue *txq);
136 void (*txq_set_sched)(struct iwl_priv *priv, u32 mask); 131 void (*txq_set_sched)(struct iwl_priv *priv, u32 mask);
137 int (*txq_attach_buf_to_tfd)(struct iwl_priv *priv, 132 int (*txq_attach_buf_to_tfd)(struct iwl_priv *priv,
138 struct iwl_tx_queue *txq, 133 struct iwl_tx_queue *txq,