diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-09-06 12:31:21 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-14 13:56:39 -0400 |
commit | 7a10e3e4076d09779da5a02b0ab6ce551d964d48 (patch) | |
tree | 834513ac8bc52836c94f4df3676e4125174f8f74 /drivers/net | |
parent | 41f5e0475c7c04b17b207736146187636b04eb4c (diff) |
iwlagn: iwl-trans.c can't dereference iwl_priv any more
This reaches encapsulation for this file. In order to reach this:
* move priv->valid_context to iwl_shared
* move the last_rejected initialization to the upper layer
* define a wrapper iwl_nic_config in the upper layer that calls to
cfg->lib->ops->nic_config
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-ucode.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-csr.h | 18 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 38 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-shared.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-int-pcie.h | 15 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans.c | 12 |
10 files changed, 58 insertions, 52 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 7c036b9c2b30..13018872f776 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -659,7 +659,7 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control) | |||
659 | IWL_SCD_BE_MSK | IWL_SCD_BK_MSK | | 659 | IWL_SCD_BE_MSK | IWL_SCD_BK_MSK | |
660 | IWL_SCD_MGMT_MSK; | 660 | IWL_SCD_MGMT_MSK; |
661 | if ((flush_control & BIT(IWL_RXON_CTX_PAN)) && | 661 | if ((flush_control & BIT(IWL_RXON_CTX_PAN)) && |
662 | (priv->valid_contexts != BIT(IWL_RXON_CTX_BSS))) | 662 | (priv->shrd->valid_contexts != BIT(IWL_RXON_CTX_BSS))) |
663 | flush_cmd.fifo_control |= IWL_PAN_SCD_VO_MSK | | 663 | flush_cmd.fifo_control |= IWL_PAN_SCD_VO_MSK | |
664 | IWL_PAN_SCD_VI_MSK | IWL_PAN_SCD_BE_MSK | | 664 | IWL_PAN_SCD_VI_MSK | IWL_PAN_SCD_BE_MSK | |
665 | IWL_PAN_SCD_BK_MSK | IWL_PAN_SCD_MGMT_MSK | | 665 | IWL_PAN_SCD_BK_MSK | IWL_PAN_SCD_MGMT_MSK | |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index ea4895a66eb1..00e6fc59e459 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |||
@@ -311,7 +311,7 @@ int iwlagn_set_pan_params(struct iwl_priv *priv) | |||
311 | int slot0 = 300, slot1 = 0; | 311 | int slot0 = 300, slot1 = 0; |
312 | int ret; | 312 | int ret; |
313 | 313 | ||
314 | if (priv->valid_contexts == BIT(IWL_RXON_CTX_BSS)) | 314 | if (priv->shrd->valid_contexts == BIT(IWL_RXON_CTX_BSS)) |
315 | return 0; | 315 | return 0; |
316 | 316 | ||
317 | BUILD_BUG_ON(NUM_IWL_RXON_CTX != 2); | 317 | BUILD_BUG_ON(NUM_IWL_RXON_CTX != 2); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c index 8b14d24849b9..ea31d7674df3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c | |||
@@ -349,6 +349,7 @@ int iwlagn_send_bt_env(struct iwl_priv *priv, u8 action, u8 type) | |||
349 | 349 | ||
350 | static int iwlagn_alive_notify(struct iwl_priv *priv) | 350 | static int iwlagn_alive_notify(struct iwl_priv *priv) |
351 | { | 351 | { |
352 | struct iwl_rxon_context *ctx; | ||
352 | int ret; | 353 | int ret; |
353 | 354 | ||
354 | if (!priv->tx_cmd_pool) | 355 | if (!priv->tx_cmd_pool) |
@@ -361,6 +362,8 @@ static int iwlagn_alive_notify(struct iwl_priv *priv) | |||
361 | return -ENOMEM; | 362 | return -ENOMEM; |
362 | 363 | ||
363 | iwl_trans_tx_start(trans(priv)); | 364 | iwl_trans_tx_start(trans(priv)); |
365 | for_each_context(priv, ctx) | ||
366 | ctx->last_tx_rejected = false; | ||
364 | 367 | ||
365 | ret = iwlagn_send_wimax_coex(priv); | 368 | ret = iwlagn_send_wimax_coex(priv); |
366 | if (ret) | 369 | if (ret) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 484f889a886e..7f6c58ebbc44 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -623,9 +623,9 @@ static void iwl_init_context(struct iwl_priv *priv, u32 ucode_flags) | |||
623 | * The default context is always valid, | 623 | * The default context is always valid, |
624 | * the PAN context depends on uCode. | 624 | * the PAN context depends on uCode. |
625 | */ | 625 | */ |
626 | priv->valid_contexts = BIT(IWL_RXON_CTX_BSS); | 626 | priv->shrd->valid_contexts = BIT(IWL_RXON_CTX_BSS); |
627 | if (ucode_flags & IWL_UCODE_TLV_FLAGS_PAN) | 627 | if (ucode_flags & IWL_UCODE_TLV_FLAGS_PAN) |
628 | priv->valid_contexts |= BIT(IWL_RXON_CTX_PAN); | 628 | priv->shrd->valid_contexts |= BIT(IWL_RXON_CTX_PAN); |
629 | 629 | ||
630 | for (i = 0; i < NUM_IWL_RXON_CTX; i++) | 630 | for (i = 0; i < NUM_IWL_RXON_CTX; i++) |
631 | priv->contexts[i].ctxid = i; | 631 | priv->contexts[i].ctxid = i; |
@@ -2880,7 +2880,7 @@ static int iwl_mac_remain_on_channel(struct ieee80211_hw *hw, | |||
2880 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_PAN]; | 2880 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_PAN]; |
2881 | int err = 0; | 2881 | int err = 0; |
2882 | 2882 | ||
2883 | if (!(priv->valid_contexts & BIT(IWL_RXON_CTX_PAN))) | 2883 | if (!(priv->shrd->valid_contexts & BIT(IWL_RXON_CTX_PAN))) |
2884 | return -EOPNOTSUPP; | 2884 | return -EOPNOTSUPP; |
2885 | 2885 | ||
2886 | if (!(ctx->interface_modes & BIT(NL80211_IFTYPE_P2P_CLIENT))) | 2886 | if (!(ctx->interface_modes & BIT(NL80211_IFTYPE_P2P_CLIENT))) |
@@ -2945,7 +2945,7 @@ static int iwl_mac_cancel_remain_on_channel(struct ieee80211_hw *hw) | |||
2945 | { | 2945 | { |
2946 | struct iwl_priv *priv = hw->priv; | 2946 | struct iwl_priv *priv = hw->priv; |
2947 | 2947 | ||
2948 | if (!(priv->valid_contexts & BIT(IWL_RXON_CTX_PAN))) | 2948 | if (!(priv->shrd->valid_contexts & BIT(IWL_RXON_CTX_PAN))) |
2949 | return -EOPNOTSUPP; | 2949 | return -EOPNOTSUPP; |
2950 | 2950 | ||
2951 | mutex_lock(&priv->shrd->mutex); | 2951 | mutex_lock(&priv->shrd->mutex); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index a600b82e7fcf..9270f990b2dd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -1870,3 +1870,9 @@ void iwl_set_hw_rfkill_state(struct iwl_priv *priv, bool state) | |||
1870 | { | 1870 | { |
1871 | wiphy_rfkill_set_hw_state(priv->hw->wiphy, state); | 1871 | wiphy_rfkill_set_hw_state(priv->hw->wiphy, state); |
1872 | } | 1872 | } |
1873 | |||
1874 | void iwl_nic_config(struct iwl_priv *priv) | ||
1875 | { | ||
1876 | priv->cfg->lib->nic_config(priv); | ||
1877 | |||
1878 | } | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-csr.h b/drivers/net/wireless/iwlwifi/iwl-csr.h index d6dbb0423045..b9f3267e720c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-csr.h +++ b/drivers/net/wireless/iwlwifi/iwl-csr.h | |||
@@ -439,4 +439,22 @@ | |||
439 | */ | 439 | */ |
440 | #define HBUS_TARG_WRPTR (HBUS_BASE+0x060) | 440 | #define HBUS_TARG_WRPTR (HBUS_BASE+0x060) |
441 | 441 | ||
442 | /********************************************************** | ||
443 | * CSR values | ||
444 | **********************************************************/ | ||
445 | /* | ||
446 | * host interrupt timeout value | ||
447 | * used with setting interrupt coalescing timer | ||
448 | * the CSR_INT_COALESCING is an 8 bit register in 32-usec unit | ||
449 | * | ||
450 | * default interrupt coalescing timer is 64 x 32 = 2048 usecs | ||
451 | * default interrupt coalescing calibration timer is 16 x 32 = 512 usecs | ||
452 | */ | ||
453 | #define IWL_HOST_INT_TIMEOUT_MAX (0xFF) | ||
454 | #define IWL_HOST_INT_TIMEOUT_DEF (0x40) | ||
455 | #define IWL_HOST_INT_TIMEOUT_MIN (0x0) | ||
456 | #define IWL_HOST_INT_CALIB_TIMEOUT_MAX (0xFF) | ||
457 | #define IWL_HOST_INT_CALIB_TIMEOUT_DEF (0x10) | ||
458 | #define IWL_HOST_INT_CALIB_TIMEOUT_MIN (0x0) | ||
459 | |||
442 | #endif /* !__iwl_csr_h__ */ | 460 | #endif /* !__iwl_csr_h__ */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index bbda6725a751..8438a33e17ee 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -117,21 +117,6 @@ struct iwl_channel_info { | |||
117 | u8 ht40_extension_channel; /* HT_IE_EXT_CHANNEL_* */ | 117 | u8 ht40_extension_channel; /* HT_IE_EXT_CHANNEL_* */ |
118 | }; | 118 | }; |
119 | 119 | ||
120 | #define IWL_TX_FIFO_BK 0 /* shared */ | ||
121 | #define IWL_TX_FIFO_BE 1 | ||
122 | #define IWL_TX_FIFO_VI 2 /* shared */ | ||
123 | #define IWL_TX_FIFO_VO 3 | ||
124 | #define IWL_TX_FIFO_BK_IPAN IWL_TX_FIFO_BK | ||
125 | #define IWL_TX_FIFO_BE_IPAN 4 | ||
126 | #define IWL_TX_FIFO_VI_IPAN IWL_TX_FIFO_VI | ||
127 | #define IWL_TX_FIFO_VO_IPAN 5 | ||
128 | /* re-uses the VO FIFO, uCode will properly flush/schedule */ | ||
129 | #define IWL_TX_FIFO_AUX 5 | ||
130 | #define IWL_TX_FIFO_UNUSED -1 | ||
131 | |||
132 | /* AUX (TX during scan dwell) queue */ | ||
133 | #define IWL_AUX_QUEUE 10 | ||
134 | |||
135 | /* | 120 | /* |
136 | * Minimum number of queues. MAX_NUM is defined in hw specific files. | 121 | * Minimum number of queues. MAX_NUM is defined in hw specific files. |
137 | * Set the minimum to accommodate | 122 | * Set the minimum to accommodate |
@@ -544,9 +529,6 @@ struct iwl_chain_noise_data { | |||
544 | #define EEPROM_SEM_TIMEOUT 10 /* milliseconds */ | 529 | #define EEPROM_SEM_TIMEOUT 10 /* milliseconds */ |
545 | #define EEPROM_SEM_RETRY_LIMIT 1000 /* number of attempts (not time) */ | 530 | #define EEPROM_SEM_RETRY_LIMIT 1000 /* number of attempts (not time) */ |
546 | 531 | ||
547 | #define IWL_TRAFFIC_ENTRIES (256) | ||
548 | #define IWL_TRAFFIC_ENTRY_SIZE (64) | ||
549 | |||
550 | enum { | 532 | enum { |
551 | MEASUREMENT_READY = (1 << 0), | 533 | MEASUREMENT_READY = (1 << 0), |
552 | MEASUREMENT_ACTIVE = (1 << 1), | 534 | MEASUREMENT_ACTIVE = (1 << 1), |
@@ -688,21 +670,6 @@ struct iwl_event_log { | |||
688 | }; | 670 | }; |
689 | 671 | ||
690 | /* | 672 | /* |
691 | * host interrupt timeout value | ||
692 | * used with setting interrupt coalescing timer | ||
693 | * the CSR_INT_COALESCING is an 8 bit register in 32-usec unit | ||
694 | * | ||
695 | * default interrupt coalescing timer is 64 x 32 = 2048 usecs | ||
696 | * default interrupt coalescing calibration timer is 16 x 32 = 512 usecs | ||
697 | */ | ||
698 | #define IWL_HOST_INT_TIMEOUT_MAX (0xFF) | ||
699 | #define IWL_HOST_INT_TIMEOUT_DEF (0x40) | ||
700 | #define IWL_HOST_INT_TIMEOUT_MIN (0x0) | ||
701 | #define IWL_HOST_INT_CALIB_TIMEOUT_MAX (0xFF) | ||
702 | #define IWL_HOST_INT_CALIB_TIMEOUT_DEF (0x10) | ||
703 | #define IWL_HOST_INT_CALIB_TIMEOUT_MIN (0x0) | ||
704 | |||
705 | /* | ||
706 | * This is the threshold value of plcp error rate per 100mSecs. It is | 673 | * This is the threshold value of plcp error rate per 100mSecs. It is |
707 | * used to set and check for the validity of plcp_delta. | 674 | * used to set and check for the validity of plcp_delta. |
708 | */ | 675 | */ |
@@ -933,9 +900,6 @@ struct iwl_priv { | |||
933 | /*TODO: remove these pointers - use bus(priv) instead */ | 900 | /*TODO: remove these pointers - use bus(priv) instead */ |
934 | struct iwl_bus *bus; /* bus specific data */ | 901 | struct iwl_bus *bus; /* bus specific data */ |
935 | 902 | ||
936 | /* microcode/device supports multiple contexts */ | ||
937 | u8 valid_contexts; | ||
938 | |||
939 | /* max number of station keys */ | 903 | /* max number of station keys */ |
940 | u8 sta_key_max_num; | 904 | u8 sta_key_max_num; |
941 | 905 | ||
@@ -1163,7 +1127,7 @@ iwl_rxon_ctx_from_vif(struct ieee80211_vif *vif) | |||
1163 | #define for_each_context(priv, ctx) \ | 1127 | #define for_each_context(priv, ctx) \ |
1164 | for (ctx = &priv->contexts[IWL_RXON_CTX_BSS]; \ | 1128 | for (ctx = &priv->contexts[IWL_RXON_CTX_BSS]; \ |
1165 | ctx < &priv->contexts[NUM_IWL_RXON_CTX]; ctx++) \ | 1129 | ctx < &priv->contexts[NUM_IWL_RXON_CTX]; ctx++) \ |
1166 | if (priv->valid_contexts & BIT(ctx->ctxid)) | 1130 | if (priv->shrd->valid_contexts & BIT(ctx->ctxid)) |
1167 | 1131 | ||
1168 | static inline int iwl_is_associated_ctx(struct iwl_rxon_context *ctx) | 1132 | static inline int iwl_is_associated_ctx(struct iwl_rxon_context *ctx) |
1169 | { | 1133 | { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h index 73ea5e7a1f99..03f4c6418a66 100644 --- a/drivers/net/wireless/iwlwifi/iwl-shared.h +++ b/drivers/net/wireless/iwlwifi/iwl-shared.h | |||
@@ -213,6 +213,7 @@ struct iwl_tid_data { | |||
213 | * @ucode_owner: IWL_OWNERSHIP_* | 213 | * @ucode_owner: IWL_OWNERSHIP_* |
214 | * @cmd_queue: command queue number | 214 | * @cmd_queue: command queue number |
215 | * @status: STATUS_* | 215 | * @status: STATUS_* |
216 | * @valid_contexts: microcode/device supports multiple contexts | ||
216 | * @bus: pointer to the bus layer data | 217 | * @bus: pointer to the bus layer data |
217 | * @priv: pointer to the upper layer data | 218 | * @priv: pointer to the upper layer data |
218 | * @hw_params: see struct iwl_hw_params | 219 | * @hw_params: see struct iwl_hw_params |
@@ -233,6 +234,7 @@ struct iwl_shared { | |||
233 | u8 cmd_queue; | 234 | u8 cmd_queue; |
234 | unsigned long status; | 235 | unsigned long status; |
235 | bool wowlan; | 236 | bool wowlan; |
237 | u8 valid_contexts; | ||
236 | 238 | ||
237 | struct iwl_bus *bus; | 239 | struct iwl_bus *bus; |
238 | struct iwl_priv *priv; | 240 | struct iwl_priv *priv; |
@@ -387,6 +389,7 @@ void iwl_stop_tx_ba_trans_ready(struct iwl_priv *priv, | |||
387 | enum iwl_rxon_context_id ctx, | 389 | enum iwl_rxon_context_id ctx, |
388 | u8 sta_id, u8 tid); | 390 | u8 sta_id, u8 tid); |
389 | void iwl_set_hw_rfkill_state(struct iwl_priv *priv, bool state); | 391 | void iwl_set_hw_rfkill_state(struct iwl_priv *priv, bool state); |
392 | void iwl_nic_config(struct iwl_priv *priv); | ||
390 | void iwl_apm_stop(struct iwl_priv *priv); | 393 | void iwl_apm_stop(struct iwl_priv *priv); |
391 | int iwl_apm_init(struct iwl_priv *priv); | 394 | int iwl_apm_init(struct iwl_priv *priv); |
392 | void iwlagn_fw_error(struct iwl_priv *priv, bool ondemand); | 395 | void iwlagn_fw_error(struct iwl_priv *priv, bool ondemand); |
@@ -408,6 +411,9 @@ static inline void iwl_print_rx_config_cmd(struct iwl_priv *priv, u8 ctxid); | |||
408 | #define IWL_CMD(x) case x: return #x | 411 | #define IWL_CMD(x) case x: return #x |
409 | #define IWL_MASK(lo, hi) ((1 << (hi)) | ((1 << (hi)) - (1 << (lo)))) | 412 | #define IWL_MASK(lo, hi) ((1 << (hi)) | ((1 << (hi)) - (1 << (lo)))) |
410 | 413 | ||
414 | #define IWL_TRAFFIC_ENTRIES (256) | ||
415 | #define IWL_TRAFFIC_ENTRY_SIZE (64) | ||
416 | |||
411 | /***************************************************** | 417 | /***************************************************** |
412 | * DRIVER STATUS FUNCTIONS | 418 | * DRIVER STATUS FUNCTIONS |
413 | ******************************************************/ | 419 | ******************************************************/ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-int-pcie.h b/drivers/net/wireless/iwlwifi/iwl-trans-int-pcie.h index c5720cd4f346..8047e955a27b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-int-pcie.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans-int-pcie.h | |||
@@ -436,4 +436,19 @@ static inline u8 get_cmd_index(struct iwl_queue *q, u32 index) | |||
436 | return index & (q->n_window - 1); | 436 | return index & (q->n_window - 1); |
437 | } | 437 | } |
438 | 438 | ||
439 | #define IWL_TX_FIFO_BK 0 /* shared */ | ||
440 | #define IWL_TX_FIFO_BE 1 | ||
441 | #define IWL_TX_FIFO_VI 2 /* shared */ | ||
442 | #define IWL_TX_FIFO_VO 3 | ||
443 | #define IWL_TX_FIFO_BK_IPAN IWL_TX_FIFO_BK | ||
444 | #define IWL_TX_FIFO_BE_IPAN 4 | ||
445 | #define IWL_TX_FIFO_VI_IPAN IWL_TX_FIFO_VI | ||
446 | #define IWL_TX_FIFO_VO_IPAN 5 | ||
447 | /* re-uses the VO FIFO, uCode will properly flush/schedule */ | ||
448 | #define IWL_TX_FIFO_AUX 5 | ||
449 | #define IWL_TX_FIFO_UNUSED -1 | ||
450 | |||
451 | /* AUX (TX during scan dwell) queue */ | ||
452 | #define IWL_AUX_QUEUE 10 | ||
453 | |||
439 | #endif /* __iwl_trans_int_pcie_h__ */ | 454 | #endif /* __iwl_trans_int_pcie_h__ */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.c b/drivers/net/wireless/iwlwifi/iwl-trans.c index 28fbaa2517a0..5bf6250612ec 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans.c | |||
@@ -71,9 +71,7 @@ | |||
71 | #include "iwl-prph.h" | 71 | #include "iwl-prph.h" |
72 | #include "iwl-shared.h" | 72 | #include "iwl-shared.h" |
73 | #include "iwl-eeprom.h" | 73 | #include "iwl-eeprom.h" |
74 | 74 | #include "iwl-agn-hw.h" | |
75 | /* TODO: the transport layer should not include this */ | ||
76 | #include "iwl-core.h" | ||
77 | 75 | ||
78 | static int iwl_trans_rx_alloc(struct iwl_trans *trans) | 76 | static int iwl_trans_rx_alloc(struct iwl_trans *trans) |
79 | { | 77 | { |
@@ -638,7 +636,7 @@ static int iwl_nic_init(struct iwl_trans *trans) | |||
638 | 636 | ||
639 | iwl_set_pwr_vmain(trans); | 637 | iwl_set_pwr_vmain(trans); |
640 | 638 | ||
641 | priv(trans)->cfg->lib->nic_config(priv(trans)); | 639 | iwl_nic_config(priv(trans)); |
642 | 640 | ||
643 | /* Allocate the RX queue, or reset if it is already allocated */ | 641 | /* Allocate the RX queue, or reset if it is already allocated */ |
644 | iwl_rx_init(trans); | 642 | iwl_rx_init(trans); |
@@ -831,8 +829,6 @@ static void iwl_trans_txq_set_sched(struct iwl_trans *trans, u32 mask) | |||
831 | static void iwl_trans_pcie_tx_start(struct iwl_trans *trans) | 829 | static void iwl_trans_pcie_tx_start(struct iwl_trans *trans) |
832 | { | 830 | { |
833 | const struct queue_to_fifo_ac *queue_to_fifo; | 831 | const struct queue_to_fifo_ac *queue_to_fifo; |
834 | struct iwl_rxon_context *ctx; | ||
835 | struct iwl_priv *priv = priv(trans); | ||
836 | struct iwl_trans_pcie *trans_pcie = | 832 | struct iwl_trans_pcie *trans_pcie = |
837 | IWL_TRANS_GET_PCIE_TRANS(trans); | 833 | IWL_TRANS_GET_PCIE_TRANS(trans); |
838 | u32 a; | 834 | u32 a; |
@@ -900,7 +896,7 @@ static void iwl_trans_pcie_tx_start(struct iwl_trans *trans) | |||
900 | iwl_trans_txq_set_sched(trans, IWL_MASK(0, 7)); | 896 | iwl_trans_txq_set_sched(trans, IWL_MASK(0, 7)); |
901 | 897 | ||
902 | /* map queues to FIFOs */ | 898 | /* map queues to FIFOs */ |
903 | if (priv->valid_contexts != BIT(IWL_RXON_CTX_BSS)) | 899 | if (trans->shrd->valid_contexts != BIT(IWL_RXON_CTX_BSS)) |
904 | queue_to_fifo = iwlagn_ipan_queue_to_tx_fifo; | 900 | queue_to_fifo = iwlagn_ipan_queue_to_tx_fifo; |
905 | else | 901 | else |
906 | queue_to_fifo = iwlagn_default_queue_to_tx_fifo; | 902 | queue_to_fifo = iwlagn_default_queue_to_tx_fifo; |
@@ -912,8 +908,6 @@ static void iwl_trans_pcie_tx_start(struct iwl_trans *trans) | |||
912 | sizeof(trans_pcie->queue_stopped)); | 908 | sizeof(trans_pcie->queue_stopped)); |
913 | for (i = 0; i < 4; i++) | 909 | for (i = 0; i < 4; i++) |
914 | atomic_set(&trans_pcie->queue_stop_count[i], 0); | 910 | atomic_set(&trans_pcie->queue_stop_count[i], 0); |
915 | for_each_context(priv, ctx) | ||
916 | ctx->last_tx_rejected = false; | ||
917 | 911 | ||
918 | /* reset to 0 to enable all the queue first */ | 912 | /* reset to 0 to enable all the queue first */ |
919 | trans_pcie->txq_ctx_active_msk = 0; | 913 | trans_pcie->txq_ctx_active_msk = 0; |