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>
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 39664c9..cfe945c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -39,6 +39,7 @@
#include "iwl-agn-hw.h"
#include "iwl-agn.h"
#include "iwl-sta.h"
+#include "iwl-trans.h"
static inline u32 iwlagn_get_scd_ssn(struct iwlagn_tx_resp *tx_resp)
{
@@ -540,7 +541,7 @@
else
tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD;
- return priv->trans.ops->send_cmd_pdu(priv, tx_ant_cfg_cmd, CMD_SYNC,
+ return trans_send_cmd_pdu(priv, tx_ant_cfg_cmd, CMD_SYNC,
sizeof(tx_power_cmd), &tx_power_cmd);
}
@@ -714,7 +715,7 @@
priv->cfg->ops->lib->apm_ops.config(priv);
/* Allocate the RX queue, or reset if it is already allocated */
- priv->trans.ops->rx_init(priv);
+ trans_rx_init(priv);
iwlagn_rx_replenish(priv);
@@ -728,7 +729,7 @@
spin_unlock_irqrestore(&priv->lock, flags);
/* Allocate or reset and init all Tx and Command queues */
- if (priv->trans.ops->tx_init(priv))
+ if (trans_tx_init(priv))
return -ENOMEM;
if (priv->cfg->base_params->shadow_reg_enable) {
@@ -1360,7 +1361,7 @@
if (ret)
return ret;
- ret = priv->trans.ops->send_cmd(priv, &cmd);
+ ret = trans_send_cmd(priv, &cmd);
if (ret) {
clear_bit(STATUS_SCAN_HW, &priv->status);
iwlagn_set_pan_params(priv);
@@ -1466,7 +1467,7 @@
flush_cmd.fifo_control);
flush_cmd.flush_control = cpu_to_le16(flush_control);
- return priv->trans.ops->send_cmd(priv, &cmd);
+ return trans_send_cmd(priv, &cmd);
}
void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
@@ -1658,12 +1659,12 @@
if (priv->cfg->bt_params->bt_session_2) {
memcpy(&bt_cmd_2000.basic, &basic,
sizeof(basic));
- ret = priv->trans.ops->send_cmd_pdu(priv, REPLY_BT_CONFIG,
+ ret = trans_send_cmd_pdu(priv, REPLY_BT_CONFIG,
CMD_SYNC, sizeof(bt_cmd_2000), &bt_cmd_2000);
} else {
memcpy(&bt_cmd_6000.basic, &basic,
sizeof(basic));
- ret = priv->trans.ops->send_cmd_pdu(priv, REPLY_BT_CONFIG,
+ ret = trans_send_cmd_pdu(priv, REPLY_BT_CONFIG,
CMD_SYNC, sizeof(bt_cmd_6000), &bt_cmd_6000);
}
if (ret)
@@ -2311,8 +2312,8 @@
* already dead.
*/
if (test_bit(STATUS_DEVICE_ENABLED, &priv->status)) {
- priv->trans.ops->tx_stop(priv);
- priv->trans.ops->rx_stop(priv);
+ trans_tx_stop(priv);
+ trans_rx_stop(priv);
/* Power-down device's busmaster DMA clocks */
iwl_write_prph(priv, APMG_CLK_DIS_REG,