Commit f2c7e521 authored by Abhijeet Kolekar's avatar Abhijeet Kolekar Committed by John W. Linville

iwl3945: rename iwl3945_priv variables

The patch renames iwl3945 specific variables in iwl3945_priv
structure. iwl3945_priv structure differs with iwl_priv structure
with these variables. Goal of this patch is to make transition from
iwl3945_priv to iwl_priv smoothly.
Signed-off-by: default avatarAbhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3832ec9d
......@@ -313,66 +313,66 @@ int iwl3945_led_register(struct iwl3945_priv *priv)
priv->allow_blinking = 0;
trigger = ieee80211_get_radio_led_name(priv->hw);
snprintf(priv->led[IWL_LED_TRG_RADIO].name,
sizeof(priv->led[IWL_LED_TRG_RADIO].name), "iwl-%s:radio",
snprintf(priv->led39[IWL_LED_TRG_RADIO].name,
sizeof(priv->led39[IWL_LED_TRG_RADIO].name), "iwl-%s:radio",
wiphy_name(priv->hw->wiphy));
priv->led[IWL_LED_TRG_RADIO].led_on = iwl3945_led_on;
priv->led[IWL_LED_TRG_RADIO].led_off = iwl3945_led_off;
priv->led[IWL_LED_TRG_RADIO].led_pattern = NULL;
priv->led39[IWL_LED_TRG_RADIO].led_on = iwl3945_led_on;
priv->led39[IWL_LED_TRG_RADIO].led_off = iwl3945_led_off;
priv->led39[IWL_LED_TRG_RADIO].led_pattern = NULL;
ret = iwl3945_led_register_led(priv,
&priv->led[IWL_LED_TRG_RADIO],
&priv->led39[IWL_LED_TRG_RADIO],
IWL_LED_TRG_RADIO, 1, trigger);
if (ret)
goto exit_fail;
trigger = ieee80211_get_assoc_led_name(priv->hw);
snprintf(priv->led[IWL_LED_TRG_ASSOC].name,
sizeof(priv->led[IWL_LED_TRG_ASSOC].name), "iwl-%s:assoc",
snprintf(priv->led39[IWL_LED_TRG_ASSOC].name,
sizeof(priv->led39[IWL_LED_TRG_ASSOC].name), "iwl-%s:assoc",
wiphy_name(priv->hw->wiphy));
ret = iwl3945_led_register_led(priv,
&priv->led[IWL_LED_TRG_ASSOC],
&priv->led39[IWL_LED_TRG_ASSOC],
IWL_LED_TRG_ASSOC, 0, trigger);
/* for assoc always turn led on */
priv->led[IWL_LED_TRG_ASSOC].led_on = iwl3945_led_on;
priv->led[IWL_LED_TRG_ASSOC].led_off = iwl3945_led_on;
priv->led[IWL_LED_TRG_ASSOC].led_pattern = NULL;
priv->led39[IWL_LED_TRG_ASSOC].led_on = iwl3945_led_on;
priv->led39[IWL_LED_TRG_ASSOC].led_off = iwl3945_led_on;
priv->led39[IWL_LED_TRG_ASSOC].led_pattern = NULL;
if (ret)
goto exit_fail;
trigger = ieee80211_get_rx_led_name(priv->hw);
snprintf(priv->led[IWL_LED_TRG_RX].name,
sizeof(priv->led[IWL_LED_TRG_RX].name), "iwl-%s:RX",
snprintf(priv->led39[IWL_LED_TRG_RX].name,
sizeof(priv->led39[IWL_LED_TRG_RX].name), "iwl-%s:RX",
wiphy_name(priv->hw->wiphy));
ret = iwl3945_led_register_led(priv,
&priv->led[IWL_LED_TRG_RX],
&priv->led39[IWL_LED_TRG_RX],
IWL_LED_TRG_RX, 0, trigger);
priv->led[IWL_LED_TRG_RX].led_on = iwl3945_led_associated;
priv->led[IWL_LED_TRG_RX].led_off = iwl3945_led_associated;
priv->led[IWL_LED_TRG_RX].led_pattern = iwl3945_led_pattern;
priv->led39[IWL_LED_TRG_RX].led_on = iwl3945_led_associated;
priv->led39[IWL_LED_TRG_RX].led_off = iwl3945_led_associated;
priv->led39[IWL_LED_TRG_RX].led_pattern = iwl3945_led_pattern;
if (ret)
goto exit_fail;
trigger = ieee80211_get_tx_led_name(priv->hw);
snprintf(priv->led[IWL_LED_TRG_TX].name,
sizeof(priv->led[IWL_LED_TRG_TX].name), "iwl-%s:TX",
snprintf(priv->led39[IWL_LED_TRG_TX].name,
sizeof(priv->led39[IWL_LED_TRG_TX].name), "iwl-%s:TX",
wiphy_name(priv->hw->wiphy));
ret = iwl3945_led_register_led(priv,
&priv->led[IWL_LED_TRG_TX],
&priv->led39[IWL_LED_TRG_TX],
IWL_LED_TRG_TX, 0, trigger);
priv->led[IWL_LED_TRG_TX].led_on = iwl3945_led_associated;
priv->led[IWL_LED_TRG_TX].led_off = iwl3945_led_associated;
priv->led[IWL_LED_TRG_TX].led_pattern = iwl3945_led_pattern;
priv->led39[IWL_LED_TRG_TX].led_on = iwl3945_led_associated;
priv->led39[IWL_LED_TRG_TX].led_off = iwl3945_led_associated;
priv->led39[IWL_LED_TRG_TX].led_pattern = iwl3945_led_pattern;
if (ret)
goto exit_fail;
......@@ -401,9 +401,9 @@ static void iwl3945_led_unregister_led(struct iwl3945_led *led, u8 set_led)
/* Unregister all led handlers */
void iwl3945_led_unregister(struct iwl3945_priv *priv)
{
iwl3945_led_unregister_led(&priv->led[IWL_LED_TRG_ASSOC], 0);
iwl3945_led_unregister_led(&priv->led[IWL_LED_TRG_RX], 0);
iwl3945_led_unregister_led(&priv->led[IWL_LED_TRG_TX], 0);
iwl3945_led_unregister_led(&priv->led[IWL_LED_TRG_RADIO], 1);
iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_ASSOC], 0);
iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_RX], 0);
iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_TX], 0);
iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_RADIO], 1);
}
......@@ -901,7 +901,7 @@ void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
rcu_read_lock();
sta = ieee80211_find_sta(hw, priv->stations[sta_id].sta.sta.addr);
sta = ieee80211_find_sta(hw, priv->stations_39[sta_id].sta.sta.addr);
if (!sta) {
rcu_read_unlock();
return;
......@@ -916,7 +916,7 @@ void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
switch (priv->band) {
case IEEE80211_BAND_2GHZ:
/* TODO: this always does G, not a regression */
if (priv->active_rxon.flags & RXON_FLG_TGG_PROTECT_MSK) {
if (priv->active39_rxon.flags & RXON_FLG_TGG_PROTECT_MSK) {
rs_sta->tgg = 1;
rs_sta->expected_tpt = iwl3945_expected_tpt_g_prot;
} else
......
This diff is collapsed.
......@@ -422,7 +422,7 @@ struct iwl3945_priv {
/* each calibration channel group in the EEPROM has a derived
* clip setting for each rate. */
const struct iwl3945_clip_group clip_groups[5];
const struct iwl3945_clip_group clip39_groups[5];
/* thermal calibration */
s32 temperature; /* degrees Kelvin */
......@@ -438,7 +438,7 @@ struct iwl3945_priv {
int one_direct_scan;
u8 direct_ssid_len;
u8 direct_ssid[IW_ESSID_MAX_SIZE];
struct iwl3945_scan_cmd *scan;
struct iwl3945_scan_cmd *scan39;
/* spinlock */
spinlock_t lock; /* protect general shared data */
......@@ -468,11 +468,11 @@ struct iwl3945_priv {
* changed via explicit cast within the
* routines that actually update the physical
* hardware */
const struct iwl3945_rxon_cmd active_rxon;
struct iwl3945_rxon_cmd staging_rxon;
const struct iwl3945_rxon_cmd active39_rxon;
struct iwl3945_rxon_cmd staging39_rxon;
int error_recovering;
struct iwl3945_rxon_cmd recovery_rxon;
struct iwl3945_rxon_cmd recovery39_rxon;
/* 1st responses from initialize and runtime uCode images.
* 4965's initialize alive response contains some calibration data. */
......@@ -485,7 +485,7 @@ struct iwl3945_priv {
#endif
#ifdef CONFIG_IWL3945_LEDS
struct iwl3945_led led[IWL_LED_TRG_MAX];
struct iwl3945_led led39[IWL_LED_TRG_MAX];
unsigned long last_blink_time;
u8 last_blink_rate;
u8 allow_blinking;
......@@ -510,16 +510,16 @@ struct iwl3945_priv {
/* Rx and Tx DMA processing queues */
struct iwl_rx_queue rxq;
struct iwl3945_tx_queue txq[IWL39_MAX_NUM_QUEUES];
struct iwl3945_tx_queue txq39[IWL39_MAX_NUM_QUEUES];
unsigned long status;
int last_rx_rssi; /* From Rx packet statisitics */
int last_rx_noise; /* From beacon statistics */
struct iwl3945_power_mgr power_data;
struct iwl3945_power_mgr power_data_39;
struct iwl3945_notif_statistics statistics;
struct iwl3945_notif_statistics statistics_39;
unsigned long last_statistics_time;
/* context information */
......@@ -534,7 +534,7 @@ struct iwl3945_priv {
/*station table variables */
spinlock_t sta_lock;
int num_stations;
struct iwl3945_station_entry stations[IWL_STATION_COUNT];
struct iwl3945_station_entry stations_39[IWL_STATION_COUNT];
/* Indication if ieee80211_ops->open has been called */
u8 is_open;
......@@ -546,7 +546,7 @@ struct iwl3945_priv {
u64 last_tsf;
/* eeprom */
struct iwl3945_eeprom eeprom;
struct iwl3945_eeprom eeprom39;
enum nl80211_iftype iw_mode;
......@@ -607,7 +607,7 @@ struct iwl3945_priv {
static inline int iwl3945_is_associated(struct iwl3945_priv *priv)
{
return (priv->active_rxon.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0;
return (priv->active39_rxon.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0;
}
extern const struct iwl_channel_info *iwl3945_get_channel_info(
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment