Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97679
b: refs/heads/master
c: a6d4eae
h: refs/heads/master
i:
  97677: 9865999
  97675: f121d39
  97671: f695020
  97663: 1c219dd
v: v3
  • Loading branch information
Dan Williams authored and John W. Linville committed Jun 4, 2008
1 parent fef7be3 commit c70200d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 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: b212f3378a9cfca4da52d7c7e6f79ead8ec287fc
refs/heads/master: a6d4eae80157830af9c9d80de2daf6611696a34e
27 changes: 25 additions & 2 deletions trunk/drivers/net/wireless/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -7558,8 +7558,31 @@ static int ipw_associate(void *data)
priv->ieee->iw_mode == IW_MODE_ADHOC &&
priv->config & CFG_ADHOC_CREATE &&
priv->config & CFG_STATIC_ESSID &&
priv->config & CFG_STATIC_CHANNEL &&
!list_empty(&priv->ieee->network_free_list)) {
priv->config & CFG_STATIC_CHANNEL) {
/* Use oldest network if the free list is empty */
if (list_empty(&priv->ieee->network_free_list)) {
struct ieee80211_network *oldest = NULL;
struct ieee80211_network *target;
DECLARE_MAC_BUF(mac);

list_for_each_entry(target, &priv->ieee->network_list, list) {
if ((oldest == NULL) ||
(target->last_scanned < oldest->last_scanned))
oldest = target;
}

/* If there are no more slots, expire the oldest */
list_del(&oldest->list);
target = oldest;
IPW_DEBUG_ASSOC("Expired '%s' (%s) from "
"network list.\n",
escape_essid(target->ssid,
target->ssid_len),
print_mac(mac, target->bssid));
list_add_tail(&target->list,
&priv->ieee->network_free_list);
}

element = priv->ieee->network_free_list.next;
network = list_entry(element, struct ieee80211_network, list);
ipw_adhoc_create(priv, network);
Expand Down

0 comments on commit c70200d

Please sign in to comment.