Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90822
b: refs/heads/master
c: 508e32e
h: refs/heads/master
v: v3
  • Loading branch information
Reinette Chatre authored and John W. Linville committed Apr 16, 2008
1 parent 8fa7f20 commit e7fb7dc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 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: eadd3c4b9a90e31d5b6034a8813bfabecbe48681
refs/heads/master: 508e32e177f54d1f6ebcfa181b9d6f2583c3b1c0
31 changes: 22 additions & 9 deletions trunk/drivers/net/wireless/iwlwifi/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ static void iwl4965_set_flags_for_phymode(struct iwl_priv *priv,
| RXON_FLG_CCK_MSK);
priv->staging_rxon.flags |= RXON_FLG_SHORT_SLOT_MSK;
} else {
/* Copied from iwl4965_bg_post_associate() */
/* Copied from iwl4965_post_associate() */
if (priv->assoc_capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)
priv->staging_rxon.flags |= RXON_FLG_SHORT_SLOT_MSK;
else
Expand Down Expand Up @@ -6004,10 +6004,8 @@ static void iwl4965_bg_rx_replenish(struct work_struct *data)

#define IWL_DELAY_NEXT_SCAN (HZ*2)

static void iwl4965_bg_post_associate(struct work_struct *data)
static void iwl4965_post_associate(struct iwl_priv *priv)
{
struct iwl_priv *priv = container_of(data, struct iwl_priv,
post_associate.work);
struct ieee80211_conf *conf = NULL;
int ret = 0;
DECLARE_MAC_BUF(mac);
Expand All @@ -6025,12 +6023,10 @@ static void iwl4965_bg_post_associate(struct work_struct *data)
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return;

mutex_lock(&priv->mutex);

if (!priv->vif || !priv->is_open) {
mutex_unlock(&priv->mutex);
if (!priv->vif || !priv->is_open)
return;
}

iwl4965_scan_cancel_timeout(priv, 200);

conf = ieee80211_get_hw_conf(priv->hw);
Expand Down Expand Up @@ -6114,7 +6110,18 @@ static void iwl4965_bg_post_associate(struct work_struct *data)

/* we have just associated, don't start scan too early */
priv->next_scan_jiffies = jiffies + IWL_DELAY_NEXT_SCAN;
}


static void iwl4965_bg_post_associate(struct work_struct *data)
{
struct iwl_priv *priv = container_of(data, struct iwl_priv,
post_associate.work);

mutex_lock(&priv->mutex);
iwl4965_post_associate(priv);
mutex_unlock(&priv->mutex);

}

static void iwl4965_bg_abort_scan(struct work_struct *work)
Expand Down Expand Up @@ -6736,14 +6743,20 @@ static void iwl4965_bss_info_changed(struct ieee80211_hw *hw,

if (changes & BSS_CHANGED_ASSOC) {
IWL_DEBUG_MAC80211("ASSOC %d\n", bss_conf->assoc);
/* This should never happen as this function should
* never be called from interrupt context. */
if (WARN_ON_ONCE(in_interrupt()))
return;
if (bss_conf->assoc) {
priv->assoc_id = bss_conf->aid;
priv->beacon_int = bss_conf->beacon_int;
priv->timestamp = bss_conf->timestamp;
priv->assoc_capability = bss_conf->assoc_capability;
priv->next_scan_jiffies = jiffies +
IWL_DELAY_NEXT_SCAN_AFTER_ASSOC;
queue_work(priv->workqueue, &priv->post_associate.work);
mutex_lock(&priv->mutex);
iwl4965_post_associate(priv);
mutex_unlock(&priv->mutex);
} else {
priv->assoc_id = 0;
IWL_DEBUG_MAC80211("DISASSOC %d\n", bss_conf->assoc);
Expand Down

0 comments on commit e7fb7dc

Please sign in to comment.