Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111421
b: refs/heads/master
c: cb43dc2
h: refs/heads/master
i:
  111419: 8244477
v: v3
  • Loading branch information
Tomas Winkler authored and John W. Linville committed Sep 8, 2008
1 parent e6ce06c commit 68f313f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 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: cd56d3313dedaf68ec393974339edaacab74f82f
refs/heads/master: cb43dc251ab14fc047eb91944e8376d1611b95b2
35 changes: 16 additions & 19 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -3179,9 +3179,9 @@ static void iwl4965_bss_info_changed(struct ieee80211_hw *hw,

}

static int iwl4965_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)
static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t ssid_len)
{
int rc = 0;
int ret;
unsigned long flags;
struct iwl_priv *priv = hw->priv;

Expand All @@ -3191,49 +3191,46 @@ static int iwl4965_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)
spin_lock_irqsave(&priv->lock, flags);

if (!iwl_is_ready_rf(priv)) {
rc = -EIO;
ret = -EIO;
IWL_DEBUG_MAC80211("leave - not ready or exit pending\n");
goto out_unlock;
}

if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { /* APs don't scan */
rc = -EIO;
ret = -EIO;
IWL_ERROR("ERROR: APs don't scan\n");
goto out_unlock;
}

/* we don't schedule scan within next_scan_jiffies period */
if (priv->next_scan_jiffies &&
time_after(priv->next_scan_jiffies, jiffies)) {
rc = -EAGAIN;
time_after(priv->next_scan_jiffies, jiffies)) {
ret = -EAGAIN;
goto out_unlock;
}
/* if we just finished scan ask for delay */
if (priv->last_scan_jiffies && time_after(priv->last_scan_jiffies +
IWL_DELAY_NEXT_SCAN, jiffies)) {
rc = -EAGAIN;
if (priv->last_scan_jiffies &&
time_after(priv->last_scan_jiffies + IWL_DELAY_NEXT_SCAN, jiffies)) {
ret = -EAGAIN;
goto out_unlock;
}
if (len) {
IWL_DEBUG_SCAN("direct scan for %s [%d]\n ",
iwl_escape_essid(ssid, len), (int)len);

if (ssid_len) {
priv->one_direct_scan = 1;
priv->direct_ssid_len = (u8)
min((u8) len, (u8) IW_ESSID_MAX_SIZE);
priv->direct_ssid_len = min_t(u8, ssid_len, IW_ESSID_MAX_SIZE);
memcpy(priv->direct_ssid, ssid, priv->direct_ssid_len);
} else
} else {
priv->one_direct_scan = 0;
}

rc = iwl_scan_initiate(priv);
ret = iwl_scan_initiate(priv);

IWL_DEBUG_MAC80211("leave\n");

out_unlock:
spin_unlock_irqrestore(&priv->lock, flags);
mutex_unlock(&priv->mutex);

return rc;
return ret;
}

static void iwl4965_mac_update_tkip_key(struct ieee80211_hw *hw,
Expand Down Expand Up @@ -4140,7 +4137,7 @@ static struct ieee80211_ops iwl4965_hw_ops = {
.reset_tsf = iwl4965_mac_reset_tsf,
.bss_info_changed = iwl4965_bss_info_changed,
.ampdu_action = iwl4965_mac_ampdu_action,
.hw_scan = iwl4965_mac_hw_scan
.hw_scan = iwl_mac_hw_scan
};

static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
Expand Down

0 comments on commit 68f313f

Please sign in to comment.