Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79259
b: refs/heads/master
c: a064647
h: refs/heads/master
i:
  79257: 5f44d65
  79255: bf2b593
v: v3
  • Loading branch information
Zhu Yi authored and David S. Miller committed Jan 28, 2008
1 parent 2a2d8b2 commit b6403ab
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 52 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 12342c475f5de17071eaf24ea2938ba8dfe285f2
refs/heads/master: a0646470e8a965df59054a5c82e53e5572bf04a0
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-3945.h
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ struct iwl3945_rx_queue {
#define STATUS_SCAN_HW 14
#define STATUS_POWER_PMI 15
#define STATUS_FW_ERROR 16
#define STATUS_CONF_PENDING 17

#define MAX_TID_COUNT 9

Expand Down Expand Up @@ -694,7 +695,6 @@ struct iwl3945_priv {
struct ieee80211_hw *hw;
struct ieee80211_channel *ieee_channels;
struct ieee80211_rate *ieee_rates;
struct ieee80211_conf *cache_conf;

/* temporary frame storage list */
struct list_head free_frames;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-4965.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ struct iwl4965_rx_queue {
#define STATUS_SCAN_HW 14
#define STATUS_POWER_PMI 15
#define STATUS_FW_ERROR 16
#define STATUS_CONF_PENDING 17

#define MAX_TID_COUNT 9

Expand Down Expand Up @@ -1023,7 +1024,6 @@ struct iwl4965_priv {
struct ieee80211_hw *hw;
struct ieee80211_channel *ieee_channels;
struct ieee80211_rate *ieee_rates;
struct ieee80211_conf *cache_conf;

/* temporary frame storage list */
struct list_head free_frames;
Expand Down
30 changes: 6 additions & 24 deletions trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -6888,8 +6888,8 @@ static void iwl3945_bg_scan_completed(struct work_struct *work)
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return;

if (priv->cache_conf)
iwl3945_mac_config(priv->hw, priv->cache_conf);
if (test_bit(STATUS_CONF_PENDING, &priv->status))
iwl3945_mac_config(priv->hw, ieee80211_get_hw_conf(priv->hw));

ieee80211_scan_completed(priv->hw);

Expand Down Expand Up @@ -7033,27 +7033,12 @@ static int iwl3945_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co
goto out;
}

/* TODO: Figure out how to get ieee80211_local->sta_scanning w/ only
* what is exposed through include/ declarations */
if (unlikely(!iwl3945_param_disable_hw_scan &&
test_bit(STATUS_SCANNING, &priv->status))) {

if (priv->cache_conf)
IWL_DEBUG_MAC80211("leave - still scanning\n");
else {
/* Cache the configuration now so that we can
* replay it after the hardware scan is finished. */
priv->cache_conf = kmalloc(sizeof(*conf), GFP_KERNEL);
if (priv->cache_conf) {
memcpy(priv->cache_conf, conf, sizeof(*conf));
IWL_DEBUG_MAC80211("leave - scanning\n");
} else {
IWL_DEBUG_MAC80211("leave - no memory\n");
ret = -ENOMEM;
}
}
IWL_DEBUG_MAC80211("leave - scanning\n");
set_bit(STATUS_CONF_PENDING, &priv->status);
mutex_unlock(&priv->mutex);
return ret;
return 0;
}

spin_lock_irqsave(&priv->lock, flags);
Expand Down Expand Up @@ -7110,10 +7095,7 @@ static int iwl3945_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co
IWL_DEBUG_MAC80211("leave\n");

out:
if (priv->cache_conf) {
kfree(priv->cache_conf);
priv->cache_conf = NULL;
}
clear_bit(STATUS_CONF_PENDING, &priv->status);
mutex_unlock(&priv->mutex);
return ret;
}
Expand Down
32 changes: 7 additions & 25 deletions trunk/drivers/net/wireless/iwlwifi/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -7332,8 +7332,8 @@ static void iwl4965_bg_scan_completed(struct work_struct *work)
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return;

if (priv->cache_conf)
iwl4965_mac_config(priv->hw, priv->cache_conf);
if (test_bit(STATUS_CONF_PENDING, &priv->status))
iwl4965_mac_config(priv->hw, ieee80211_get_hw_conf(priv->hw));

ieee80211_scan_completed(priv->hw);

Expand Down Expand Up @@ -7476,27 +7476,12 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co
goto out;
}

/* TODO: Figure out how to get ieee80211_local->sta_scanning w/ only
* what is exposed through include/ declarations */
if (unlikely(!iwl4965_param_disable_hw_scan &&
test_bit(STATUS_SCANNING, &priv->status))) {

if (unlikely(priv->cache_conf))
IWL_DEBUG_MAC80211("leave - still scanning\n");
else {
/* Cache the configuration now so that we can
* replay it after the hardware scan is finished. */
priv->cache_conf = kmalloc(sizeof(*conf), GFP_KERNEL);
if (priv->cache_conf) {
memcpy(priv->cache_conf, conf, sizeof(*conf));
IWL_DEBUG_MAC80211("leave - scanning\n");
} else {
IWL_DEBUG_MAC80211("leave - no memory\n");
ret = -ENOMEM;
}
}
IWL_DEBUG_MAC80211("leave - scanning\n");
set_bit(STATUS_CONF_PENDING, &priv->status);
mutex_unlock(&priv->mutex);
return ret;
return 0;
}

spin_lock_irqsave(&priv->lock, flags);
Expand Down Expand Up @@ -7564,12 +7549,9 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co

IWL_DEBUG_MAC80211("leave\n");

out:
if (priv->cache_conf) {
kfree(priv->cache_conf);
priv->cache_conf = NULL;
}
mutex_unlock(&priv->mutex);
out:
clear_bit(STATUS_CONF_PENDING, &priv->status);
return ret;
}

Expand Down

0 comments on commit b6403ab

Please sign in to comment.