iwlagn: provide heplers to access the transport ops
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-agn-lib.c
index 39664c9bbff73290ded29d9d8e4282d2ac62d284..cfe945c58fd12431b08d89a0b4a64de86d7d04e8 100644 (file)
@@ -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 @@ int iwlagn_send_tx_power(struct iwl_priv *priv)
        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 @@ int iwlagn_hw_nic_init(struct iwl_priv *priv)
        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 @@ int iwlagn_hw_nic_init(struct iwl_priv *priv)
        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 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
        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 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
                       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 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv)
        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 @@ void iwlagn_stop_device(struct iwl_priv *priv)
         * 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,
This page took 0.037271 seconds and 5 git commands to generate.