aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-07-11 01:51:04 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-07-21 10:29:48 -0400
commit41c50542669cd7aec45ad708f5120ff8fdaa1194 (patch)
treefb0d02e7a0047e4ea480cb6cea64b09c7838b845 /drivers/net/wireless/iwlwifi/iwl-agn.c
parent0286cee0d2b6357e8e30d817bbce8ff166f358b5 (diff)
iwlagn: transport layer receives struct iwl_trans*
It still holds a pointer to iwl_priv. But hopefully this will disappear at some point. Also add the multiple inclusion protection to iwl-trans.h that was forgotten. Move iwl-trans structures to iwl-trans.h Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 703c106aa8dd..d3163d8cf6d8 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 trans_send_cmd(priv, &cmd); 209 return trans_send_cmd(&priv->trans, &cmd);
210} 210}
211 211
212static void iwl_bg_beacon_update(struct work_struct *work) 212static void iwl_bg_beacon_update(struct work_struct *work)
@@ -1568,7 +1568,7 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv)
1568 adv_cmd.critical_temperature_exit = 1568 adv_cmd.critical_temperature_exit =
1569 cpu_to_le32(priv->hw_params.ct_kill_exit_threshold); 1569 cpu_to_le32(priv->hw_params.ct_kill_exit_threshold);
1570 1570
1571 ret = trans_send_cmd_pdu(priv, 1571 ret = trans_send_cmd_pdu(&priv->trans,
1572 REPLY_CT_KILL_CONFIG_CMD, 1572 REPLY_CT_KILL_CONFIG_CMD,
1573 CMD_SYNC, sizeof(adv_cmd), &adv_cmd); 1573 CMD_SYNC, sizeof(adv_cmd), &adv_cmd);
1574 if (ret) 1574 if (ret)
@@ -1584,7 +1584,7 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv)
1584 cmd.critical_temperature_R = 1584 cmd.critical_temperature_R =
1585 cpu_to_le32(priv->hw_params.ct_kill_threshold); 1585 cpu_to_le32(priv->hw_params.ct_kill_threshold);
1586 1586
1587 ret = trans_send_cmd_pdu(priv, 1587 ret = trans_send_cmd_pdu(&priv->trans,
1588 REPLY_CT_KILL_CONFIG_CMD, 1588 REPLY_CT_KILL_CONFIG_CMD,
1589 CMD_SYNC, sizeof(cmd), &cmd); 1589 CMD_SYNC, sizeof(cmd), &cmd);
1590 if (ret) 1590 if (ret)
@@ -1610,7 +1610,7 @@ static int iwlagn_send_calib_cfg_rt(struct iwl_priv *priv, u32 cfg)
1610 calib_cfg_cmd.ucd_calib_cfg.once.is_enable = IWL_CALIB_INIT_CFG_ALL; 1610 calib_cfg_cmd.ucd_calib_cfg.once.is_enable = IWL_CALIB_INIT_CFG_ALL;
1611 calib_cfg_cmd.ucd_calib_cfg.once.start = cpu_to_le32(cfg); 1611 calib_cfg_cmd.ucd_calib_cfg.once.start = cpu_to_le32(cfg);
1612 1612
1613 return trans_send_cmd(priv, &cmd); 1613 return trans_send_cmd(&priv->trans, &cmd);
1614} 1614}
1615 1615
1616 1616
@@ -1622,7 +1622,7 @@ static int iwlagn_send_tx_ant_config(struct iwl_priv *priv, u8 valid_tx_ant)
1622 1622
1623 if (IWL_UCODE_API(priv->ucode_ver) > 1) { 1623 if (IWL_UCODE_API(priv->ucode_ver) > 1) {
1624 IWL_DEBUG_HC(priv, "select valid tx ant: %u\n", valid_tx_ant); 1624 IWL_DEBUG_HC(priv, "select valid tx ant: %u\n", valid_tx_ant);
1625 return trans_send_cmd_pdu(priv, 1625 return trans_send_cmd_pdu(&priv->trans,
1626 TX_ANT_CONFIGURATION_CMD, 1626 TX_ANT_CONFIGURATION_CMD,
1627 CMD_SYNC, 1627 CMD_SYNC,
1628 sizeof(struct iwl_tx_ant_config_cmd), 1628 sizeof(struct iwl_tx_ant_config_cmd),
@@ -1783,7 +1783,7 @@ static void __iwl_down(struct iwl_priv *priv)
1783 test_bit(STATUS_EXIT_PENDING, &priv->status) << 1783 test_bit(STATUS_EXIT_PENDING, &priv->status) <<
1784 STATUS_EXIT_PENDING; 1784 STATUS_EXIT_PENDING;
1785 1785
1786 trans_stop_device(priv); 1786 trans_stop_device(&priv->trans);
1787 1787
1788 dev_kfree_skb(priv->beacon_skb); 1788 dev_kfree_skb(priv->beacon_skb);
1789 priv->beacon_skb = NULL; 1789 priv->beacon_skb = NULL;
@@ -2412,7 +2412,8 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw,
2412 case IEEE80211_AMPDU_TX_OPERATIONAL: 2412 case IEEE80211_AMPDU_TX_OPERATIONAL:
2413 buf_size = min_t(int, buf_size, LINK_QUAL_AGG_FRAME_LIMIT_DEF); 2413 buf_size = min_t(int, buf_size, LINK_QUAL_AGG_FRAME_LIMIT_DEF);
2414 2414
2415 trans_txq_agg_setup(priv, iwl_sta_id(sta), tid, buf_size); 2415 trans_txq_agg_setup(&priv->trans, iwl_sta_id(sta), tid,
2416 buf_size);
2416 2417
2417 /* 2418 /*
2418 * If the limit is 0, then it wasn't initialised yet, 2419 * If the limit is 0, then it wasn't initialised yet,
@@ -3136,7 +3137,7 @@ int iwl_probe(void *bus_specific, struct iwl_bus_ops *bus_ops,
3136 priv->cfg = cfg; 3137 priv->cfg = cfg;
3137 priv->inta_mask = CSR_INI_SET_MASK; 3138 priv->inta_mask = CSR_INI_SET_MASK;
3138 3139
3139 err = iwl_trans_register(priv); 3140 err = iwl_trans_register(&priv->trans, priv);
3140 if (err) 3141 if (err)
3141 goto out_free_priv; 3142 goto out_free_priv;
3142 3143
@@ -3174,7 +3175,7 @@ int iwl_probe(void *bus_specific, struct iwl_bus_ops *bus_ops,
3174 IWL_INFO(priv, "Detected %s, REV=0x%X\n", 3175 IWL_INFO(priv, "Detected %s, REV=0x%X\n",
3175 priv->cfg->name, hw_rev); 3176 priv->cfg->name, hw_rev);
3176 3177
3177 if (trans_prepare_card_hw(priv)) { 3178 if (trans_prepare_card_hw(&priv->trans)) {
3178 err = -EIO; 3179 err = -EIO;
3179 IWL_WARN(priv, "Failed, HW not ready\n"); 3180 IWL_WARN(priv, "Failed, HW not ready\n");
3180 goto out_free_traffic_mem; 3181 goto out_free_traffic_mem;
@@ -3272,7 +3273,7 @@ out_free_eeprom:
3272 iwl_eeprom_free(priv); 3273 iwl_eeprom_free(priv);
3273out_free_traffic_mem: 3274out_free_traffic_mem:
3274 iwl_free_traffic_mem(priv); 3275 iwl_free_traffic_mem(priv);
3275 trans_free(priv); 3276 trans_free(&priv->trans);
3276out_free_priv: 3277out_free_priv:
3277 ieee80211_free_hw(priv->hw); 3278 ieee80211_free_hw(priv->hw);
3278out: 3279out:
@@ -3317,12 +3318,12 @@ void __devexit iwl_remove(struct iwl_priv * priv)
3317 iwl_disable_interrupts(priv); 3318 iwl_disable_interrupts(priv);
3318 spin_unlock_irqrestore(&priv->lock, flags); 3319 spin_unlock_irqrestore(&priv->lock, flags);
3319 3320
3320 trans_sync_irq(priv); 3321 trans_sync_irq(&priv->trans);
3321 3322
3322 iwl_dealloc_ucode(priv); 3323 iwl_dealloc_ucode(priv);
3323 3324
3324 trans_rx_free(priv); 3325 trans_rx_free(&priv->trans);
3325 trans_tx_free(priv); 3326 trans_tx_free(&priv->trans);
3326 3327
3327 iwl_eeprom_free(priv); 3328 iwl_eeprom_free(priv);
3328 3329
@@ -3336,7 +3337,7 @@ void __devexit iwl_remove(struct iwl_priv * priv)
3336 priv->workqueue = NULL; 3337 priv->workqueue = NULL;
3337 iwl_free_traffic_mem(priv); 3338 iwl_free_traffic_mem(priv);
3338 3339
3339 trans_free(priv); 3340 trans_free(&priv->trans);
3340 3341
3341 priv->bus.ops->set_drv_data(&priv->bus, NULL); 3342 priv->bus.ops->set_drv_data(&priv->bus, NULL);
3342 3343