diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-07-08 11:46:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-11 15:02:04 -0400 |
commit | bdfbf0924ab05e02d28e50bd2d5024097642a78d (patch) | |
tree | 5702f76263d17ec20051690a6bb0b88205ad6fe2 /drivers | |
parent | 02f6f659b0080e60021aae3503163576f88c5ba8 (diff) |
iwlagn: provide heplers to access the transport ops
This removes the for priv->trans.ops->...
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')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-calib.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-ucode.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-led.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-power.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sv-open.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans.h | 41 |
17 files changed, 104 insertions, 50 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 0c5105f24ee4..835ed7a295e2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include "iwl-agn.h" | 46 | #include "iwl-agn.h" |
47 | #include "iwl-agn-hw.h" | 47 | #include "iwl-agn-hw.h" |
48 | #include "iwl-5000-hw.h" | 48 | #include "iwl-5000-hw.h" |
49 | #include "iwl-trans.h" | ||
49 | 50 | ||
50 | /* Highest firmware API version supported */ | 51 | /* Highest firmware API version supported */ |
51 | #define IWL5000_UCODE_API_MAX 5 | 52 | #define IWL5000_UCODE_API_MAX 5 |
@@ -314,7 +315,7 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv, | |||
314 | return -EFAULT; | 315 | return -EFAULT; |
315 | } | 316 | } |
316 | 317 | ||
317 | return priv->trans.ops->send_cmd(priv, &hcmd); | 318 | return trans_send_cmd(priv, &hcmd); |
318 | } | 319 | } |
319 | 320 | ||
320 | static struct iwl_lib_ops iwl5000_lib = { | 321 | static struct iwl_lib_ops iwl5000_lib = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index ced3bbea643e..f03448f40f87 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include "iwl-helpers.h" | 45 | #include "iwl-helpers.h" |
46 | #include "iwl-agn-hw.h" | 46 | #include "iwl-agn-hw.h" |
47 | #include "iwl-6000-hw.h" | 47 | #include "iwl-6000-hw.h" |
48 | #include "iwl-trans.h" | ||
48 | 49 | ||
49 | /* Highest firmware API version supported */ | 50 | /* Highest firmware API version supported */ |
50 | #define IWL6000_UCODE_API_MAX 4 | 51 | #define IWL6000_UCODE_API_MAX 4 |
@@ -254,7 +255,7 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, | |||
254 | return -EFAULT; | 255 | return -EFAULT; |
255 | } | 256 | } |
256 | 257 | ||
257 | return priv->trans.ops->send_cmd(priv, &hcmd); | 258 | return trans_send_cmd(priv, &hcmd); |
258 | } | 259 | } |
259 | 260 | ||
260 | static struct iwl_lib_ops iwl6000_lib = { | 261 | static struct iwl_lib_ops iwl6000_lib = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c index e7c74fcb55c0..2ec3863306b1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c | |||
@@ -66,6 +66,7 @@ | |||
66 | #include "iwl-dev.h" | 66 | #include "iwl-dev.h" |
67 | #include "iwl-core.h" | 67 | #include "iwl-core.h" |
68 | #include "iwl-agn-calib.h" | 68 | #include "iwl-agn-calib.h" |
69 | #include "iwl-trans.h" | ||
69 | 70 | ||
70 | /***************************************************************************** | 71 | /***************************************************************************** |
71 | * INIT calibrations framework | 72 | * INIT calibrations framework |
@@ -96,7 +97,7 @@ int iwl_send_calib_results(struct iwl_priv *priv) | |||
96 | hcmd.len[0] = priv->calib_results[i].buf_len; | 97 | hcmd.len[0] = priv->calib_results[i].buf_len; |
97 | hcmd.data[0] = priv->calib_results[i].buf; | 98 | hcmd.data[0] = priv->calib_results[i].buf; |
98 | hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY; | 99 | hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY; |
99 | ret = priv->trans.ops->send_cmd(priv, &hcmd); | 100 | ret = trans_send_cmd(priv, &hcmd); |
100 | if (ret) { | 101 | if (ret) { |
101 | IWL_ERR(priv, "Error %d iteration %d\n", | 102 | IWL_ERR(priv, "Error %d iteration %d\n", |
102 | ret, i); | 103 | ret, i); |
@@ -482,7 +483,7 @@ static int iwl_sensitivity_write(struct iwl_priv *priv) | |||
482 | memcpy(&(priv->sensitivity_tbl[0]), &(cmd.table[0]), | 483 | memcpy(&(priv->sensitivity_tbl[0]), &(cmd.table[0]), |
483 | sizeof(u16)*HD_TABLE_SIZE); | 484 | sizeof(u16)*HD_TABLE_SIZE); |
484 | 485 | ||
485 | return priv->trans.ops->send_cmd(priv, &cmd_out); | 486 | return trans_send_cmd(priv, &cmd_out); |
486 | } | 487 | } |
487 | 488 | ||
488 | /* Prepare a SENSITIVITY_CMD, send to uCode if values have changed */ | 489 | /* Prepare a SENSITIVITY_CMD, send to uCode if values have changed */ |
@@ -546,7 +547,7 @@ static int iwl_enhance_sensitivity_write(struct iwl_priv *priv) | |||
546 | &(cmd.enhance_table[HD_INA_NON_SQUARE_DET_OFDM_INDEX]), | 547 | &(cmd.enhance_table[HD_INA_NON_SQUARE_DET_OFDM_INDEX]), |
547 | sizeof(u16)*ENHANCE_HD_TABLE_ENTRIES); | 548 | sizeof(u16)*ENHANCE_HD_TABLE_ENTRIES); |
548 | 549 | ||
549 | return priv->trans.ops->send_cmd(priv, &cmd_out); | 550 | return trans_send_cmd(priv, &cmd_out); |
550 | } | 551 | } |
551 | 552 | ||
552 | void iwl_init_sensitivity(struct iwl_priv *priv) | 553 | void iwl_init_sensitivity(struct iwl_priv *priv) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c index 406bf59bd441..4d7674c0c721 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "iwl-core.h" | 36 | #include "iwl-core.h" |
37 | #include "iwl-io.h" | 37 | #include "iwl-io.h" |
38 | #include "iwl-agn.h" | 38 | #include "iwl-agn.h" |
39 | #include "iwl-trans.h" | ||
39 | 40 | ||
40 | int iwlagn_send_tx_ant_config(struct iwl_priv *priv, u8 valid_tx_ant) | 41 | int iwlagn_send_tx_ant_config(struct iwl_priv *priv, u8 valid_tx_ant) |
41 | { | 42 | { |
@@ -45,7 +46,7 @@ int iwlagn_send_tx_ant_config(struct iwl_priv *priv, u8 valid_tx_ant) | |||
45 | 46 | ||
46 | if (IWL_UCODE_API(priv->ucode_ver) > 1) { | 47 | if (IWL_UCODE_API(priv->ucode_ver) > 1) { |
47 | IWL_DEBUG_HC(priv, "select valid tx ant: %u\n", valid_tx_ant); | 48 | IWL_DEBUG_HC(priv, "select valid tx ant: %u\n", valid_tx_ant); |
48 | return priv->trans.ops->send_cmd_pdu(priv, | 49 | return trans_send_cmd_pdu(priv, |
49 | TX_ANT_CONFIGURATION_CMD, | 50 | TX_ANT_CONFIGURATION_CMD, |
50 | CMD_SYNC, | 51 | CMD_SYNC, |
51 | sizeof(struct iwl_tx_ant_config_cmd), | 52 | sizeof(struct iwl_tx_ant_config_cmd), |
@@ -117,7 +118,7 @@ static void iwlagn_gain_computation(struct iwl_priv *priv, | |||
117 | priv->_agn.phy_calib_chain_noise_gain_cmd); | 118 | priv->_agn.phy_calib_chain_noise_gain_cmd); |
118 | cmd.delta_gain_1 = data->delta_gain_code[1]; | 119 | cmd.delta_gain_1 = data->delta_gain_code[1]; |
119 | cmd.delta_gain_2 = data->delta_gain_code[2]; | 120 | cmd.delta_gain_2 = data->delta_gain_code[2]; |
120 | priv->trans.ops->send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD, | 121 | trans_send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD, |
121 | CMD_ASYNC, sizeof(cmd), &cmd); | 122 | CMD_ASYNC, sizeof(cmd), &cmd); |
122 | 123 | ||
123 | data->radio_write = 1; | 124 | data->radio_write = 1; |
@@ -146,7 +147,7 @@ static void iwlagn_chain_noise_reset(struct iwl_priv *priv) | |||
146 | memset(&cmd, 0, sizeof(cmd)); | 147 | memset(&cmd, 0, sizeof(cmd)); |
147 | iwl_set_calib_hdr(&cmd.hdr, | 148 | iwl_set_calib_hdr(&cmd.hdr, |
148 | priv->_agn.phy_calib_chain_noise_reset_cmd); | 149 | priv->_agn.phy_calib_chain_noise_reset_cmd); |
149 | ret = priv->trans.ops->send_cmd_pdu(priv, | 150 | ret = trans_send_cmd_pdu(priv, |
150 | REPLY_PHY_CALIBRATION_CMD, | 151 | REPLY_PHY_CALIBRATION_CMD, |
151 | CMD_SYNC, sizeof(cmd), &cmd); | 152 | CMD_SYNC, sizeof(cmd), &cmd); |
152 | if (ret) | 153 | if (ret) |
@@ -293,7 +294,7 @@ int iwlagn_set_pan_params(struct iwl_priv *priv) | |||
293 | cmd.slots[0].width = cpu_to_le16(slot0); | 294 | cmd.slots[0].width = cpu_to_le16(slot0); |
294 | cmd.slots[1].width = cpu_to_le16(slot1); | 295 | cmd.slots[1].width = cpu_to_le16(slot1); |
295 | 296 | ||
296 | ret = priv->trans.ops->send_cmd_pdu(priv, REPLY_WIPAN_PARAMS, CMD_SYNC, | 297 | ret = trans_send_cmd_pdu(priv, REPLY_WIPAN_PARAMS, CMD_SYNC, |
297 | sizeof(cmd), &cmd); | 298 | sizeof(cmd), &cmd); |
298 | if (ret) | 299 | if (ret) |
299 | IWL_ERR(priv, "Error setting PAN parameters (%d)\n", ret); | 300 | IWL_ERR(priv, "Error setting PAN parameters (%d)\n", ret); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 39664c9bbff7..cfe945c58fd1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include "iwl-agn-hw.h" | 39 | #include "iwl-agn-hw.h" |
40 | #include "iwl-agn.h" | 40 | #include "iwl-agn.h" |
41 | #include "iwl-sta.h" | 41 | #include "iwl-sta.h" |
42 | #include "iwl-trans.h" | ||
42 | 43 | ||
43 | static inline u32 iwlagn_get_scd_ssn(struct iwlagn_tx_resp *tx_resp) | 44 | static inline u32 iwlagn_get_scd_ssn(struct iwlagn_tx_resp *tx_resp) |
44 | { | 45 | { |
@@ -540,7 +541,7 @@ int iwlagn_send_tx_power(struct iwl_priv *priv) | |||
540 | else | 541 | else |
541 | tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD; | 542 | tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD; |
542 | 543 | ||
543 | return priv->trans.ops->send_cmd_pdu(priv, tx_ant_cfg_cmd, CMD_SYNC, | 544 | return trans_send_cmd_pdu(priv, tx_ant_cfg_cmd, CMD_SYNC, |
544 | sizeof(tx_power_cmd), &tx_power_cmd); | 545 | sizeof(tx_power_cmd), &tx_power_cmd); |
545 | } | 546 | } |
546 | 547 | ||
@@ -714,7 +715,7 @@ int iwlagn_hw_nic_init(struct iwl_priv *priv) | |||
714 | priv->cfg->ops->lib->apm_ops.config(priv); | 715 | priv->cfg->ops->lib->apm_ops.config(priv); |
715 | 716 | ||
716 | /* Allocate the RX queue, or reset if it is already allocated */ | 717 | /* Allocate the RX queue, or reset if it is already allocated */ |
717 | priv->trans.ops->rx_init(priv); | 718 | trans_rx_init(priv); |
718 | 719 | ||
719 | iwlagn_rx_replenish(priv); | 720 | iwlagn_rx_replenish(priv); |
720 | 721 | ||
@@ -728,7 +729,7 @@ int iwlagn_hw_nic_init(struct iwl_priv *priv) | |||
728 | spin_unlock_irqrestore(&priv->lock, flags); | 729 | spin_unlock_irqrestore(&priv->lock, flags); |
729 | 730 | ||
730 | /* Allocate or reset and init all Tx and Command queues */ | 731 | /* Allocate or reset and init all Tx and Command queues */ |
731 | if (priv->trans.ops->tx_init(priv)) | 732 | if (trans_tx_init(priv)) |
732 | return -ENOMEM; | 733 | return -ENOMEM; |
733 | 734 | ||
734 | if (priv->cfg->base_params->shadow_reg_enable) { | 735 | if (priv->cfg->base_params->shadow_reg_enable) { |
@@ -1360,7 +1361,7 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
1360 | if (ret) | 1361 | if (ret) |
1361 | return ret; | 1362 | return ret; |
1362 | 1363 | ||
1363 | ret = priv->trans.ops->send_cmd(priv, &cmd); | 1364 | ret = trans_send_cmd(priv, &cmd); |
1364 | if (ret) { | 1365 | if (ret) { |
1365 | clear_bit(STATUS_SCAN_HW, &priv->status); | 1366 | clear_bit(STATUS_SCAN_HW, &priv->status); |
1366 | iwlagn_set_pan_params(priv); | 1367 | iwlagn_set_pan_params(priv); |
@@ -1466,7 +1467,7 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control) | |||
1466 | flush_cmd.fifo_control); | 1467 | flush_cmd.fifo_control); |
1467 | flush_cmd.flush_control = cpu_to_le16(flush_control); | 1468 | flush_cmd.flush_control = cpu_to_le16(flush_control); |
1468 | 1469 | ||
1469 | return priv->trans.ops->send_cmd(priv, &cmd); | 1470 | return trans_send_cmd(priv, &cmd); |
1470 | } | 1471 | } |
1471 | 1472 | ||
1472 | void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control) | 1473 | void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control) |
@@ -1658,12 +1659,12 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv) | |||
1658 | if (priv->cfg->bt_params->bt_session_2) { | 1659 | if (priv->cfg->bt_params->bt_session_2) { |
1659 | memcpy(&bt_cmd_2000.basic, &basic, | 1660 | memcpy(&bt_cmd_2000.basic, &basic, |
1660 | sizeof(basic)); | 1661 | sizeof(basic)); |
1661 | ret = priv->trans.ops->send_cmd_pdu(priv, REPLY_BT_CONFIG, | 1662 | ret = trans_send_cmd_pdu(priv, REPLY_BT_CONFIG, |
1662 | CMD_SYNC, sizeof(bt_cmd_2000), &bt_cmd_2000); | 1663 | CMD_SYNC, sizeof(bt_cmd_2000), &bt_cmd_2000); |
1663 | } else { | 1664 | } else { |
1664 | memcpy(&bt_cmd_6000.basic, &basic, | 1665 | memcpy(&bt_cmd_6000.basic, &basic, |
1665 | sizeof(basic)); | 1666 | sizeof(basic)); |
1666 | ret = priv->trans.ops->send_cmd_pdu(priv, REPLY_BT_CONFIG, | 1667 | ret = trans_send_cmd_pdu(priv, REPLY_BT_CONFIG, |
1667 | CMD_SYNC, sizeof(bt_cmd_6000), &bt_cmd_6000); | 1668 | CMD_SYNC, sizeof(bt_cmd_6000), &bt_cmd_6000); |
1668 | } | 1669 | } |
1669 | if (ret) | 1670 | if (ret) |
@@ -2311,8 +2312,8 @@ void iwlagn_stop_device(struct iwl_priv *priv) | |||
2311 | * already dead. | 2312 | * already dead. |
2312 | */ | 2313 | */ |
2313 | if (test_bit(STATUS_DEVICE_ENABLED, &priv->status)) { | 2314 | if (test_bit(STATUS_DEVICE_ENABLED, &priv->status)) { |
2314 | priv->trans.ops->tx_stop(priv); | 2315 | trans_tx_stop(priv); |
2315 | priv->trans.ops->rx_stop(priv); | 2316 | trans_rx_stop(priv); |
2316 | 2317 | ||
2317 | /* Power-down device's busmaster DMA clocks */ | 2318 | /* Power-down device's busmaster DMA clocks */ |
2318 | iwl_write_prph(priv, APMG_CLK_DIS_REG, | 2319 | iwl_write_prph(priv, APMG_CLK_DIS_REG, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index c365295cc59f..d32cee1a758a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include "iwl-core.h" | 30 | #include "iwl-core.h" |
31 | #include "iwl-agn-calib.h" | 31 | #include "iwl-agn-calib.h" |
32 | #include "iwl-helpers.h" | 32 | #include "iwl-helpers.h" |
33 | #include "iwl-trans.h" | ||
33 | 34 | ||
34 | static int iwlagn_disable_bss(struct iwl_priv *priv, | 35 | static int iwlagn_disable_bss(struct iwl_priv *priv, |
35 | struct iwl_rxon_context *ctx, | 36 | struct iwl_rxon_context *ctx, |
@@ -39,7 +40,7 @@ static int iwlagn_disable_bss(struct iwl_priv *priv, | |||
39 | int ret; | 40 | int ret; |
40 | 41 | ||
41 | send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 42 | send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
42 | ret = priv->trans.ops->send_cmd_pdu(priv, ctx->rxon_cmd, | 43 | ret = trans_send_cmd_pdu(priv, ctx->rxon_cmd, |
43 | CMD_SYNC, sizeof(*send), send); | 44 | CMD_SYNC, sizeof(*send), send); |
44 | 45 | ||
45 | send->filter_flags = old_filter; | 46 | send->filter_flags = old_filter; |
@@ -65,7 +66,7 @@ static int iwlagn_disable_pan(struct iwl_priv *priv, | |||
65 | 66 | ||
66 | send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 67 | send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
67 | send->dev_type = RXON_DEV_TYPE_P2P; | 68 | send->dev_type = RXON_DEV_TYPE_P2P; |
68 | ret = priv->trans.ops->send_cmd_pdu(priv, ctx->rxon_cmd, | 69 | ret = trans_send_cmd_pdu(priv, ctx->rxon_cmd, |
69 | CMD_SYNC, sizeof(*send), send); | 70 | CMD_SYNC, sizeof(*send), send); |
70 | 71 | ||
71 | send->filter_flags = old_filter; | 72 | send->filter_flags = old_filter; |
@@ -91,7 +92,7 @@ static int iwlagn_disconn_pan(struct iwl_priv *priv, | |||
91 | int ret; | 92 | int ret; |
92 | 93 | ||
93 | send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 94 | send->filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
94 | ret = priv->trans.ops->send_cmd_pdu(priv, ctx->rxon_cmd, CMD_SYNC, | 95 | ret = trans_send_cmd_pdu(priv, ctx->rxon_cmd, CMD_SYNC, |
95 | sizeof(*send), send); | 96 | sizeof(*send), send); |
96 | 97 | ||
97 | send->filter_flags = old_filter; | 98 | send->filter_flags = old_filter; |
@@ -120,7 +121,7 @@ static void iwlagn_update_qos(struct iwl_priv *priv, | |||
120 | ctx->qos_data.qos_active, | 121 | ctx->qos_data.qos_active, |
121 | ctx->qos_data.def_qos_parm.qos_flags); | 122 | ctx->qos_data.def_qos_parm.qos_flags); |
122 | 123 | ||
123 | ret = priv->trans.ops->send_cmd_pdu(priv, ctx->qos_cmd, CMD_SYNC, | 124 | ret = trans_send_cmd_pdu(priv, ctx->qos_cmd, CMD_SYNC, |
124 | sizeof(struct iwl_qosparam_cmd), | 125 | sizeof(struct iwl_qosparam_cmd), |
125 | &ctx->qos_data.def_qos_parm); | 126 | &ctx->qos_data.def_qos_parm); |
126 | if (ret) | 127 | if (ret) |
@@ -179,7 +180,7 @@ static int iwlagn_send_rxon_assoc(struct iwl_priv *priv, | |||
179 | ctx->staging.ofdm_ht_triple_stream_basic_rates; | 180 | ctx->staging.ofdm_ht_triple_stream_basic_rates; |
180 | rxon_assoc.acquisition_data = ctx->staging.acquisition_data; | 181 | rxon_assoc.acquisition_data = ctx->staging.acquisition_data; |
181 | 182 | ||
182 | ret = priv->trans.ops->send_cmd_pdu(priv, ctx->rxon_assoc_cmd, | 183 | ret = trans_send_cmd_pdu(priv, ctx->rxon_assoc_cmd, |
183 | CMD_ASYNC, sizeof(rxon_assoc), &rxon_assoc); | 184 | CMD_ASYNC, sizeof(rxon_assoc), &rxon_assoc); |
184 | return ret; | 185 | return ret; |
185 | } | 186 | } |
@@ -265,7 +266,7 @@ static int iwlagn_rxon_connect(struct iwl_priv *priv, | |||
265 | * Associated RXON doesn't clear the station table in uCode, | 266 | * Associated RXON doesn't clear the station table in uCode, |
266 | * so we don't need to restore stations etc. after this. | 267 | * so we don't need to restore stations etc. after this. |
267 | */ | 268 | */ |
268 | ret = priv->trans.ops->send_cmd_pdu(priv, ctx->rxon_cmd, CMD_SYNC, | 269 | ret = trans_send_cmd_pdu(priv, ctx->rxon_cmd, CMD_SYNC, |
269 | sizeof(struct iwl_rxon_cmd), &ctx->staging); | 270 | sizeof(struct iwl_rxon_cmd), &ctx->staging); |
270 | if (ret) { | 271 | if (ret) { |
271 | IWL_ERR(priv, "Error setting new RXON (%d)\n", ret); | 272 | IWL_ERR(priv, "Error setting new RXON (%d)\n", ret); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c index b0e54c915c78..001622c06526 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "iwl-core.h" | 33 | #include "iwl-core.h" |
34 | #include "iwl-sta.h" | 34 | #include "iwl-sta.h" |
35 | #include "iwl-agn.h" | 35 | #include "iwl-agn.h" |
36 | #include "iwl-trans.h" | ||
36 | 37 | ||
37 | static struct iwl_link_quality_cmd * | 38 | static struct iwl_link_quality_cmd * |
38 | iwl_sta_alloc_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx, u8 sta_id) | 39 | iwl_sta_alloc_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx, u8 sta_id) |
@@ -180,7 +181,7 @@ static int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, | |||
180 | cmd.len[0] = cmd_size; | 181 | cmd.len[0] = cmd_size; |
181 | 182 | ||
182 | if (not_empty || send_if_empty) | 183 | if (not_empty || send_if_empty) |
183 | return priv->trans.ops->send_cmd(priv, &cmd); | 184 | return trans_send_cmd(priv, &cmd); |
184 | else | 185 | else |
185 | return 0; | 186 | return 0; |
186 | } | 187 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c index d31b82626a40..06304a681ed3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include "iwl-agn-hw.h" | 39 | #include "iwl-agn-hw.h" |
40 | #include "iwl-agn.h" | 40 | #include "iwl-agn.h" |
41 | #include "iwl-agn-calib.h" | 41 | #include "iwl-agn-calib.h" |
42 | #include "iwl-trans.h" | ||
42 | 43 | ||
43 | #define IWL_AC_UNSET -1 | 44 | #define IWL_AC_UNSET -1 |
44 | 45 | ||
@@ -223,7 +224,7 @@ static int iwlagn_send_calib_cfg(struct iwl_priv *priv) | |||
223 | calib_cfg_cmd.ucd_calib_cfg.once.send_res = IWL_CALIB_INIT_CFG_ALL; | 224 | calib_cfg_cmd.ucd_calib_cfg.once.send_res = IWL_CALIB_INIT_CFG_ALL; |
224 | calib_cfg_cmd.ucd_calib_cfg.flags = IWL_CALIB_INIT_CFG_ALL; | 225 | calib_cfg_cmd.ucd_calib_cfg.flags = IWL_CALIB_INIT_CFG_ALL; |
225 | 226 | ||
226 | return priv->trans.ops->send_cmd(priv, &cmd); | 227 | return trans_send_cmd(priv, &cmd); |
227 | } | 228 | } |
228 | 229 | ||
229 | void iwlagn_rx_calib_result(struct iwl_priv *priv, | 230 | void iwlagn_rx_calib_result(struct iwl_priv *priv, |
@@ -321,7 +322,7 @@ static int iwlagn_send_wimax_coex(struct iwl_priv *priv) | |||
321 | /* coexistence is disabled */ | 322 | /* coexistence is disabled */ |
322 | memset(&coex_cmd, 0, sizeof(coex_cmd)); | 323 | memset(&coex_cmd, 0, sizeof(coex_cmd)); |
323 | } | 324 | } |
324 | return priv->trans.ops->send_cmd_pdu(priv, | 325 | return trans_send_cmd_pdu(priv, |
325 | COEX_PRIORITY_TABLE_CMD, CMD_SYNC, | 326 | COEX_PRIORITY_TABLE_CMD, CMD_SYNC, |
326 | sizeof(coex_cmd), &coex_cmd); | 327 | sizeof(coex_cmd), &coex_cmd); |
327 | } | 328 | } |
@@ -354,7 +355,7 @@ void iwlagn_send_prio_tbl(struct iwl_priv *priv) | |||
354 | 355 | ||
355 | memcpy(prio_tbl_cmd.prio_tbl, iwlagn_bt_prio_tbl, | 356 | memcpy(prio_tbl_cmd.prio_tbl, iwlagn_bt_prio_tbl, |
356 | sizeof(iwlagn_bt_prio_tbl)); | 357 | sizeof(iwlagn_bt_prio_tbl)); |
357 | if (priv->trans.ops->send_cmd_pdu(priv, | 358 | if (trans_send_cmd_pdu(priv, |
358 | REPLY_BT_COEX_PRIO_TABLE, CMD_SYNC, | 359 | REPLY_BT_COEX_PRIO_TABLE, CMD_SYNC, |
359 | sizeof(prio_tbl_cmd), &prio_tbl_cmd)) | 360 | sizeof(prio_tbl_cmd), &prio_tbl_cmd)) |
360 | IWL_ERR(priv, "failed to send BT prio tbl command\n"); | 361 | IWL_ERR(priv, "failed to send BT prio tbl command\n"); |
@@ -367,7 +368,7 @@ int iwlagn_send_bt_env(struct iwl_priv *priv, u8 action, u8 type) | |||
367 | 368 | ||
368 | env_cmd.action = action; | 369 | env_cmd.action = action; |
369 | env_cmd.type = type; | 370 | env_cmd.type = type; |
370 | ret = priv->trans.ops->send_cmd_pdu(priv, | 371 | ret = trans_send_cmd_pdu(priv, |
371 | REPLY_BT_COEX_PROT_ENV, CMD_SYNC, | 372 | REPLY_BT_COEX_PROT_ENV, CMD_SYNC, |
372 | sizeof(env_cmd), &env_cmd); | 373 | sizeof(env_cmd), &env_cmd); |
373 | if (ret) | 374 | if (ret) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index d56d17c59de7..3a4fca14fef8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -206,7 +206,7 @@ int iwlagn_send_beacon_cmd(struct iwl_priv *priv) | |||
206 | cmd.data[1] = priv->beacon_skb->data; | 206 | cmd.data[1] = priv->beacon_skb->data; |
207 | cmd.dataflags[1] = IWL_HCMD_DFL_NOCOPY; | 207 | cmd.dataflags[1] = IWL_HCMD_DFL_NOCOPY; |
208 | 208 | ||
209 | return priv->trans.ops->send_cmd(priv, &cmd); | 209 | return trans_send_cmd(priv, &cmd); |
210 | } | 210 | } |
211 | 211 | ||
212 | static void iwl_bg_beacon_update(struct work_struct *work) | 212 | static void iwl_bg_beacon_update(struct work_struct *work) |
@@ -580,7 +580,7 @@ static void iwl_rx_handle(struct iwl_priv *priv) | |||
580 | if (reclaim) { | 580 | if (reclaim) { |
581 | /* Invoke any callbacks, transfer the buffer to caller, | 581 | /* Invoke any callbacks, transfer the buffer to caller, |
582 | * and fire off the (possibly) blocking | 582 | * and fire off the (possibly) blocking |
583 | * priv->trans.ops->send_cmd() | 583 | * trans_send_cmd() |
584 | * as we reclaim the driver command queue */ | 584 | * as we reclaim the driver command queue */ |
585 | if (rxb->page) | 585 | if (rxb->page) |
586 | iwl_tx_cmd_complete(priv, rxb); | 586 | iwl_tx_cmd_complete(priv, rxb); |
@@ -1942,7 +1942,7 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv) | |||
1942 | adv_cmd.critical_temperature_exit = | 1942 | adv_cmd.critical_temperature_exit = |
1943 | cpu_to_le32(priv->hw_params.ct_kill_exit_threshold); | 1943 | cpu_to_le32(priv->hw_params.ct_kill_exit_threshold); |
1944 | 1944 | ||
1945 | ret = priv->trans.ops->send_cmd_pdu(priv, | 1945 | ret = trans_send_cmd_pdu(priv, |
1946 | REPLY_CT_KILL_CONFIG_CMD, | 1946 | REPLY_CT_KILL_CONFIG_CMD, |
1947 | CMD_SYNC, sizeof(adv_cmd), &adv_cmd); | 1947 | CMD_SYNC, sizeof(adv_cmd), &adv_cmd); |
1948 | if (ret) | 1948 | if (ret) |
@@ -1958,7 +1958,7 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv) | |||
1958 | cmd.critical_temperature_R = | 1958 | cmd.critical_temperature_R = |
1959 | cpu_to_le32(priv->hw_params.ct_kill_threshold); | 1959 | cpu_to_le32(priv->hw_params.ct_kill_threshold); |
1960 | 1960 | ||
1961 | ret = priv->trans.ops->send_cmd_pdu(priv, | 1961 | ret = trans_send_cmd_pdu(priv, |
1962 | REPLY_CT_KILL_CONFIG_CMD, | 1962 | REPLY_CT_KILL_CONFIG_CMD, |
1963 | CMD_SYNC, sizeof(cmd), &cmd); | 1963 | CMD_SYNC, sizeof(cmd), &cmd); |
1964 | if (ret) | 1964 | if (ret) |
@@ -1984,7 +1984,7 @@ static int iwlagn_send_calib_cfg_rt(struct iwl_priv *priv, u32 cfg) | |||
1984 | calib_cfg_cmd.ucd_calib_cfg.once.is_enable = IWL_CALIB_INIT_CFG_ALL; | 1984 | calib_cfg_cmd.ucd_calib_cfg.once.is_enable = IWL_CALIB_INIT_CFG_ALL; |
1985 | calib_cfg_cmd.ucd_calib_cfg.once.start = cpu_to_le32(cfg); | 1985 | calib_cfg_cmd.ucd_calib_cfg.once.start = cpu_to_le32(cfg); |
1986 | 1986 | ||
1987 | return priv->trans.ops->send_cmd(priv, &cmd); | 1987 | return trans_send_cmd(priv, &cmd); |
1988 | } | 1988 | } |
1989 | 1989 | ||
1990 | 1990 | ||
@@ -3713,8 +3713,8 @@ void __devexit iwl_remove(struct iwl_priv * priv) | |||
3713 | 3713 | ||
3714 | iwl_dealloc_ucode(priv); | 3714 | iwl_dealloc_ucode(priv); |
3715 | 3715 | ||
3716 | priv->trans.ops->rx_free(priv); | 3716 | trans_rx_free(priv); |
3717 | priv->trans.ops->tx_free(priv); | 3717 | trans_tx_free(priv); |
3718 | 3718 | ||
3719 | iwl_eeprom_free(priv); | 3719 | iwl_eeprom_free(priv); |
3720 | 3720 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 78e031e25481..fa3d5bacbde2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include "iwl-sta.h" | 42 | #include "iwl-sta.h" |
43 | #include "iwl-helpers.h" | 43 | #include "iwl-helpers.h" |
44 | #include "iwl-agn.h" | 44 | #include "iwl-agn.h" |
45 | #include "iwl-trans.h" | ||
45 | 46 | ||
46 | u32 iwl_debug_level; | 47 | u32 iwl_debug_level; |
47 | 48 | ||
@@ -375,7 +376,7 @@ int iwl_send_rxon_timing(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
375 | le32_to_cpu(ctx->timing.beacon_init_val), | 376 | le32_to_cpu(ctx->timing.beacon_init_val), |
376 | le16_to_cpu(ctx->timing.atim_window)); | 377 | le16_to_cpu(ctx->timing.atim_window)); |
377 | 378 | ||
378 | return priv->trans.ops->send_cmd_pdu(priv, ctx->rxon_timing_cmd, | 379 | return trans_send_cmd_pdu(priv, ctx->rxon_timing_cmd, |
379 | CMD_SYNC, sizeof(ctx->timing), &ctx->timing); | 380 | CMD_SYNC, sizeof(ctx->timing), &ctx->timing); |
380 | } | 381 | } |
381 | 382 | ||
@@ -1131,7 +1132,7 @@ void iwl_send_bt_config(struct iwl_priv *priv) | |||
1131 | IWL_DEBUG_INFO(priv, "BT coex %s\n", | 1132 | IWL_DEBUG_INFO(priv, "BT coex %s\n", |
1132 | (bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active"); | 1133 | (bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active"); |
1133 | 1134 | ||
1134 | if (priv->trans.ops->send_cmd_pdu(priv, REPLY_BT_CONFIG, | 1135 | if (trans_send_cmd_pdu(priv, REPLY_BT_CONFIG, |
1135 | CMD_SYNC, sizeof(struct iwl_bt_cmd), &bt_cmd)) | 1136 | CMD_SYNC, sizeof(struct iwl_bt_cmd), &bt_cmd)) |
1136 | IWL_ERR(priv, "failed to send BT Coex Config\n"); | 1137 | IWL_ERR(priv, "failed to send BT Coex Config\n"); |
1137 | } | 1138 | } |
@@ -1144,12 +1145,12 @@ int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags, bool clear) | |||
1144 | }; | 1145 | }; |
1145 | 1146 | ||
1146 | if (flags & CMD_ASYNC) | 1147 | if (flags & CMD_ASYNC) |
1147 | return priv->trans.ops->send_cmd_pdu(priv, REPLY_STATISTICS_CMD, | 1148 | return trans_send_cmd_pdu(priv, REPLY_STATISTICS_CMD, |
1148 | CMD_ASYNC, | 1149 | CMD_ASYNC, |
1149 | sizeof(struct iwl_statistics_cmd), | 1150 | sizeof(struct iwl_statistics_cmd), |
1150 | &statistics_cmd); | 1151 | &statistics_cmd); |
1151 | else | 1152 | else |
1152 | return priv->trans.ops->send_cmd_pdu(priv, REPLY_STATISTICS_CMD, | 1153 | return trans_send_cmd_pdu(priv, REPLY_STATISTICS_CMD, |
1153 | CMD_SYNC, | 1154 | CMD_SYNC, |
1154 | sizeof(struct iwl_statistics_cmd), | 1155 | sizeof(struct iwl_statistics_cmd), |
1155 | &statistics_cmd); | 1156 | &statistics_cmd); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c index d5bc3e09a92f..60e4169f25e1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-led.c +++ b/drivers/net/wireless/iwlwifi/iwl-led.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "iwl-core.h" | 40 | #include "iwl-core.h" |
41 | #include "iwl-agn.h" | 41 | #include "iwl-agn.h" |
42 | #include "iwl-io.h" | 42 | #include "iwl-io.h" |
43 | #include "iwl-trans.h" | ||
43 | 44 | ||
44 | /* Throughput OFF time(ms) ON time (ms) | 45 | /* Throughput OFF time(ms) ON time (ms) |
45 | * >300 25 25 | 46 | * >300 25 25 |
@@ -111,7 +112,7 @@ static int iwl_send_led_cmd(struct iwl_priv *priv, struct iwl_led_cmd *led_cmd) | |||
111 | if (reg != (reg & CSR_LED_BSM_CTRL_MSK)) | 112 | if (reg != (reg & CSR_LED_BSM_CTRL_MSK)) |
112 | iwl_write32(priv, CSR_LED_REG, reg & CSR_LED_BSM_CTRL_MSK); | 113 | iwl_write32(priv, CSR_LED_REG, reg & CSR_LED_BSM_CTRL_MSK); |
113 | 114 | ||
114 | return priv->trans.ops->send_cmd(priv, &cmd); | 115 | return trans_send_cmd(priv, &cmd); |
115 | } | 116 | } |
116 | 117 | ||
117 | /* Set led pattern command */ | 118 | /* Set led pattern command */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index 0c08dfd40dd8..9c10462c20f0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include "iwl-commands.h" | 42 | #include "iwl-commands.h" |
43 | #include "iwl-debug.h" | 43 | #include "iwl-debug.h" |
44 | #include "iwl-power.h" | 44 | #include "iwl-power.h" |
45 | #include "iwl-trans.h" | ||
45 | 46 | ||
46 | /* | 47 | /* |
47 | * Setting power level allows the card to go to sleep when not busy. | 48 | * Setting power level allows the card to go to sleep when not busy. |
@@ -334,7 +335,7 @@ static int iwl_set_power(struct iwl_priv *priv, struct iwl_powertable_cmd *cmd) | |||
334 | le32_to_cpu(cmd->sleep_interval[3]), | 335 | le32_to_cpu(cmd->sleep_interval[3]), |
335 | le32_to_cpu(cmd->sleep_interval[4])); | 336 | le32_to_cpu(cmd->sleep_interval[4])); |
336 | 337 | ||
337 | return priv->trans.ops->send_cmd_pdu(priv, POWER_TABLE_CMD, CMD_SYNC, | 338 | return trans_send_cmd_pdu(priv, POWER_TABLE_CMD, CMD_SYNC, |
338 | sizeof(struct iwl_powertable_cmd), cmd); | 339 | sizeof(struct iwl_powertable_cmd), cmd); |
339 | } | 340 | } |
340 | 341 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 4c809bf9aacc..077d023ab7ea 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include "iwl-io.h" | 37 | #include "iwl-io.h" |
38 | #include "iwl-helpers.h" | 38 | #include "iwl-helpers.h" |
39 | #include "iwl-agn.h" | 39 | #include "iwl-agn.h" |
40 | #include "iwl-trans.h" | ||
40 | 41 | ||
41 | /* For active scan, listen ACTIVE_DWELL_TIME (msec) on each channel after | 42 | /* For active scan, listen ACTIVE_DWELL_TIME (msec) on each channel after |
42 | * sending probe req. This should be set long enough to hear probe responses | 43 | * sending probe req. This should be set long enough to hear probe responses |
@@ -74,7 +75,7 @@ static int iwl_send_scan_abort(struct iwl_priv *priv) | |||
74 | test_bit(STATUS_EXIT_PENDING, &priv->status)) | 75 | test_bit(STATUS_EXIT_PENDING, &priv->status)) |
75 | return -EIO; | 76 | return -EIO; |
76 | 77 | ||
77 | ret = priv->trans.ops->send_cmd(priv, &cmd); | 78 | ret = trans_send_cmd(priv, &cmd); |
78 | if (ret) | 79 | if (ret) |
79 | return ret; | 80 | return ret; |
80 | 81 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 06faa1e2237d..78cf1076c032 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "iwl-dev.h" | 35 | #include "iwl-dev.h" |
36 | #include "iwl-core.h" | 36 | #include "iwl-core.h" |
37 | #include "iwl-sta.h" | 37 | #include "iwl-sta.h" |
38 | #include "iwl-trans.h" | ||
38 | 39 | ||
39 | /* priv->sta_lock must be held */ | 40 | /* priv->sta_lock must be held */ |
40 | static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id) | 41 | static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id) |
@@ -156,7 +157,7 @@ int iwl_send_add_sta(struct iwl_priv *priv, | |||
156 | } | 157 | } |
157 | 158 | ||
158 | cmd.len[0] = priv->cfg->ops->utils->build_addsta_hcmd(sta, data); | 159 | cmd.len[0] = priv->cfg->ops->utils->build_addsta_hcmd(sta, data); |
159 | ret = priv->trans.ops->send_cmd(priv, &cmd); | 160 | ret = trans_send_cmd(priv, &cmd); |
160 | 161 | ||
161 | if (ret || (flags & CMD_ASYNC)) | 162 | if (ret || (flags & CMD_ASYNC)) |
162 | return ret; | 163 | return ret; |
@@ -412,7 +413,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv, | |||
412 | 413 | ||
413 | cmd.flags |= CMD_WANT_SKB; | 414 | cmd.flags |= CMD_WANT_SKB; |
414 | 415 | ||
415 | ret = priv->trans.ops->send_cmd(priv, &cmd); | 416 | ret = trans_send_cmd(priv, &cmd); |
416 | 417 | ||
417 | if (ret) | 418 | if (ret) |
418 | return ret; | 419 | return ret; |
@@ -781,7 +782,7 @@ int iwl_send_lq_cmd(struct iwl_priv *priv, struct iwl_rxon_context *ctx, | |||
781 | return -EINVAL; | 782 | return -EINVAL; |
782 | 783 | ||
783 | if (is_lq_table_valid(priv, ctx, lq)) | 784 | if (is_lq_table_valid(priv, ctx, lq)) |
784 | ret = priv->trans.ops->send_cmd(priv, &cmd); | 785 | ret = trans_send_cmd(priv, &cmd); |
785 | else | 786 | else |
786 | ret = -EINVAL; | 787 | ret = -EINVAL; |
787 | 788 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-sv-open.c b/drivers/net/wireless/iwlwifi/iwl-sv-open.c index 6f92d22d07e3..81108be841c7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sv-open.c +++ b/drivers/net/wireless/iwlwifi/iwl-sv-open.c | |||
@@ -76,7 +76,7 @@ | |||
76 | #include "iwl-io.h" | 76 | #include "iwl-io.h" |
77 | #include "iwl-agn.h" | 77 | #include "iwl-agn.h" |
78 | #include "iwl-testmode.h" | 78 | #include "iwl-testmode.h" |
79 | 79 | #include "iwl-trans.h" | |
80 | 80 | ||
81 | /* The TLVs used in the gnl message policy between the kernel module and | 81 | /* The TLVs used in the gnl message policy between the kernel module and |
82 | * user space application. iwl_testmode_gnl_msg_policy is to be carried | 82 | * user space application. iwl_testmode_gnl_msg_policy is to be carried |
@@ -239,7 +239,7 @@ static int iwl_testmode_ucode(struct ieee80211_hw *hw, struct nlattr **tb) | |||
239 | IWL_INFO(priv, "testmode ucode command ID 0x%x, flags 0x%x," | 239 | IWL_INFO(priv, "testmode ucode command ID 0x%x, flags 0x%x," |
240 | " len %d\n", cmd.id, cmd.flags, cmd.len[0]); | 240 | " len %d\n", cmd.id, cmd.flags, cmd.len[0]); |
241 | /* ok, let's submit the command to ucode */ | 241 | /* ok, let's submit the command to ucode */ |
242 | return priv->trans.ops->send_cmd(priv, &cmd); | 242 | return trans_send_cmd(priv, &cmd); |
243 | } | 243 | } |
244 | 244 | ||
245 | 245 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.c b/drivers/net/wireless/iwlwifi/iwl-trans.c index 0c924569636f..d760857c8636 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans.c | |||
@@ -467,7 +467,7 @@ static int iwl_trans_tx_alloc(struct iwl_priv *priv) | |||
467 | return 0; | 467 | return 0; |
468 | 468 | ||
469 | error: | 469 | error: |
470 | priv->trans.ops->tx_free(priv); | 470 | trans_tx_free(priv); |
471 | 471 | ||
472 | return ret; | 472 | return ret; |
473 | } | 473 | } |
@@ -511,7 +511,7 @@ static int iwl_trans_tx_init(struct iwl_priv *priv) | |||
511 | error: | 511 | error: |
512 | /*Upon error, free only if we allocated something */ | 512 | /*Upon error, free only if we allocated something */ |
513 | if (alloc) | 513 | if (alloc) |
514 | priv->trans.ops->tx_free(priv); | 514 | trans_tx_free(priv); |
515 | return ret; | 515 | return ret; |
516 | } | 516 | } |
517 | 517 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h index bec494c5a979..111acca07d75 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans.h | |||
@@ -60,5 +60,46 @@ | |||
60 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 60 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
61 | * | 61 | * |
62 | *****************************************************************************/ | 62 | *****************************************************************************/ |
63 | static inline int trans_rx_init(struct iwl_priv *priv) | ||
64 | { | ||
65 | return priv->trans.ops->rx_init(priv); | ||
66 | } | ||
67 | |||
68 | static inline int trans_rx_stop(struct iwl_priv *priv) | ||
69 | { | ||
70 | return priv->trans.ops->rx_stop(priv); | ||
71 | } | ||
72 | |||
73 | static inline void trans_rx_free(struct iwl_priv *priv) | ||
74 | { | ||
75 | priv->trans.ops->rx_free(priv); | ||
76 | } | ||
77 | |||
78 | static inline int trans_tx_init(struct iwl_priv *priv) | ||
79 | { | ||
80 | return priv->trans.ops->tx_init(priv); | ||
81 | } | ||
82 | |||
83 | static inline int trans_tx_stop(struct iwl_priv *priv) | ||
84 | { | ||
85 | return priv->trans.ops->tx_stop(priv); | ||
86 | } | ||
87 | |||
88 | static inline void trans_tx_free(struct iwl_priv *priv) | ||
89 | { | ||
90 | priv->trans.ops->tx_free(priv); | ||
91 | } | ||
92 | |||
93 | static inline int trans_send_cmd(struct iwl_priv *priv, | ||
94 | struct iwl_host_cmd *cmd) | ||
95 | { | ||
96 | return priv->trans.ops->send_cmd(priv, cmd); | ||
97 | } | ||
98 | |||
99 | static inline int trans_send_cmd_pdu(struct iwl_priv *priv, u8 id, u32 flags, | ||
100 | u16 len, const void *data) | ||
101 | { | ||
102 | return priv->trans.ops->send_cmd_pdu(priv, id, flags, len, data); | ||
103 | } | ||
63 | 104 | ||
64 | void iwl_trans_register(struct iwl_trans *trans); | 105 | void iwl_trans_register(struct iwl_trans *trans); |