Skip to content

Commit

Permalink
iwlwifi: remove most of the iwl_priv references from iwl-ucode.c
Browse files Browse the repository at this point in the history
Remove all but the last few references to iwl_priv from the lower
level iwl-ucode.c, with resulting code changes.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
  • Loading branch information
Don Fry authored and Wey-Yi Guy committed Dec 16, 2011
1 parent 09af140 commit 69a679b
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 66 deletions.
3 changes: 2 additions & 1 deletion drivers/net/wireless/iwlwifi/iwl-agn-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <linux/init.h>
#include <linux/sched.h>

#include "iwl-wifi.h"
#include "iwl-dev.h"
#include "iwl-core.h"
#include "iwl-io.h"
Expand Down Expand Up @@ -1195,7 +1196,7 @@ int iwlagn_suspend(struct iwl_priv *priv,

priv->shrd->wowlan = true;

ret = iwlagn_load_ucode_wait_alive(priv, IWL_UCODE_WOWLAN);
ret = iwl_load_ucode_wait_alive(trans(priv), IWL_UCODE_WOWLAN);
if (ret)
goto out;

Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <asm/div64.h>

#include "iwl-eeprom.h"
#include "iwl-wifi.h"
#include "iwl-dev.h"
#include "iwl-core.h"
#include "iwl-io.h"
Expand Down
6 changes: 0 additions & 6 deletions drivers/net/wireless/iwlwifi/iwl-agn.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,6 @@ void iwlagn_config_ht40(struct ieee80211_conf *conf,
int iwlagn_rx_calib_result(struct iwl_priv *priv,
struct iwl_rx_mem_buffer *rxb,
struct iwl_device_cmd *cmd);
int iwl_send_bt_env(struct iwl_trans *trans, u8 action, u8 type);
void iwl_send_prio_tbl(struct iwl_trans *trans);
int iwlagn_run_init_ucode(struct iwl_priv *priv);
int iwlagn_load_ucode_wait_alive(struct iwl_priv *priv,
enum iwl_ucode_type ucode_type);

/* lib */
int iwlagn_send_tx_power(struct iwl_priv *priv);
Expand Down Expand Up @@ -359,7 +354,6 @@ static inline __le32 iwl_hw_set_rate_n_flags(u8 rate, u32 flags)
void iwl_eeprom_enhanced_txpower(struct iwl_priv *priv);
void iwl_eeprom_get_mac(const struct iwl_shared *shrd, u8 *mac);

extern int iwlagn_init_alive_start(struct iwl_priv *priv);
extern int iwl_alive_start(struct iwl_priv *priv);
/* svtool */
#ifdef CONFIG_IWLWIFI_DEVICE_TESTMODE
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/wireless/iwlwifi/iwl-mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include <asm/div64.h>

#include "iwl-eeprom.h"
#include "iwl-wifi.h"
#include "iwl-dev.h"
#include "iwl-core.h"
#include "iwl-io.h"
Expand Down Expand Up @@ -274,13 +275,13 @@ static int __iwl_up(struct iwl_priv *priv)
}
}

ret = iwlagn_run_init_ucode(priv);
ret = iwl_run_init_ucode(trans(priv));
if (ret) {
IWL_ERR(priv, "Failed to run INIT ucode: %d\n", ret);
goto error;
}

ret = iwlagn_load_ucode_wait_alive(priv, IWL_UCODE_REGULAR);
ret = iwl_load_ucode_wait_alive(trans(priv), IWL_UCODE_REGULAR);
if (ret) {
IWL_ERR(priv, "Failed to start RT ucode: %d\n", ret);
goto error;
Expand Down
14 changes: 8 additions & 6 deletions drivers/net/wireless/iwlwifi/iwl-testmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
#include <net/mac80211.h>
#include <net/netlink.h>

#include "iwl-wifi.h"
#include "iwl-dev.h"
#include "iwl-core.h"
#include "iwl-debug.h"
Expand Down Expand Up @@ -380,7 +381,7 @@ static int iwl_testmode_cfg_init_calib(struct iwl_priv *priv)
iwl_init_notification_wait(priv->shrd, &calib_wait,
CALIBRATION_COMPLETE_NOTIFICATION,
NULL, NULL);
ret = iwlagn_init_alive_start(priv);
ret = iwl_init_alive_start(trans(priv));
if (ret) {
IWL_DEBUG_INFO(priv,
"Error configuring init calibration: %d\n", ret);
Expand Down Expand Up @@ -417,6 +418,7 @@ static int iwl_testmode_cfg_init_calib(struct iwl_priv *priv)
static int iwl_testmode_driver(struct ieee80211_hw *hw, struct nlattr **tb)
{
struct iwl_priv *priv = hw->priv;
struct iwl_trans *trans = trans(priv);
struct sk_buff *skb;
unsigned char *rsp_data_ptr = NULL;
int status = 0, rsp_data_len = 0;
Expand Down Expand Up @@ -445,19 +447,19 @@ static int iwl_testmode_driver(struct ieee80211_hw *hw, struct nlattr **tb)
break;

case IWL_TM_CMD_APP2DEV_LOAD_INIT_FW:
status = iwlagn_load_ucode_wait_alive(priv, IWL_UCODE_INIT);
status = iwl_load_ucode_wait_alive(trans, IWL_UCODE_INIT);
if (status)
IWL_DEBUG_INFO(priv,
"Error loading init ucode: %d\n", status);
break;

case IWL_TM_CMD_APP2DEV_CFG_INIT_CALIB:
iwl_testmode_cfg_init_calib(priv);
iwl_trans_stop_device(trans(priv));
iwl_trans_stop_device(trans);
break;

case IWL_TM_CMD_APP2DEV_LOAD_RUNTIME_FW:
status = iwlagn_load_ucode_wait_alive(priv, IWL_UCODE_REGULAR);
status = iwl_load_ucode_wait_alive(trans, IWL_UCODE_REGULAR);
if (status) {
IWL_DEBUG_INFO(priv,
"Error loading runtime ucode: %d\n", status);
Expand All @@ -471,8 +473,8 @@ static int iwl_testmode_driver(struct ieee80211_hw *hw, struct nlattr **tb)

case IWL_TM_CMD_APP2DEV_LOAD_WOWLAN_FW:
iwl_scan_cancel_timeout(priv, 200);
iwl_trans_stop_device(trans(priv));
status = iwlagn_load_ucode_wait_alive(priv, IWL_UCODE_WOWLAN);
iwl_trans_stop_device(trans);
status = iwl_load_ucode_wait_alive(trans, IWL_UCODE_WOWLAN);
if (status) {
IWL_DEBUG_INFO(priv,
"Error loading WOWLAN ucode: %d\n", status);
Expand Down
Loading

0 comments on commit 69a679b

Please sign in to comment.