···7558 priv->ieee->iw_mode == IW_MODE_ADHOC &&7559 priv->config & CFG_ADHOC_CREATE &&7560 priv->config & CFG_STATIC_ESSID &&7561+ priv->config & CFG_STATIC_CHANNEL) {7562+ /* Use oldest network if the free list is empty */7563+ if (list_empty(&priv->ieee->network_free_list)) {7564+ struct ieee80211_network *oldest = NULL;7565+ struct ieee80211_network *target;7566+ DECLARE_MAC_BUF(mac);7567+7568+ list_for_each_entry(target, &priv->ieee->network_list, list) {7569+ if ((oldest == NULL) ||7570+ (target->last_scanned < oldest->last_scanned))7571+ oldest = target;7572+ }7573+7574+ /* If there are no more slots, expire the oldest */7575+ list_del(&oldest->list);7576+ target = oldest;7577+ IPW_DEBUG_ASSOC("Expired '%s' (%s) from "7578+ "network list.\n",7579+ escape_essid(target->ssid,7580+ target->ssid_len),7581+ print_mac(mac, target->bssid));7582+ list_add_tail(&target->list,7583+ &priv->ieee->network_free_list);7584+ }7585+7586 element = priv->ieee->network_free_list.next;7587 network = list_entry(element, struct ieee80211_network, list);7588 ipw_adhoc_create(priv, network);
+2-2
drivers/net/wireless/libertas/debugfs.c
···312 if (tlv_type != TLV_TYPE_BCNMISS)313 tlv->freq = freq;314315- /* The command header, the event mask, and the one TLV */316- events->hdr.size = cpu_to_le16(sizeof(events->hdr) + 2 + sizeof(*tlv));317318 ret = lbs_cmd_with_response(priv, CMD_802_11_SUBSCRIBE_EVENT, events);319
···312 if (tlv_type != TLV_TYPE_BCNMISS)313 tlv->freq = freq;314315+ /* The command header, the action, the event mask, and one TLV */316+ events->hdr.size = cpu_to_le16(sizeof(events->hdr) + 4 + sizeof(*tlv));317318 ret = lbs_cmd_with_response(priv, CMD_802_11_SUBSCRIBE_EVENT, events);319
+1
drivers/net/wireless/p54/p54usb.c
···49 {USB_DEVICE(0x5041, 0x2235)}, /* Linksys WUSB54G Portable */5051 /* Version 2 devices (3887) */052 {USB_DEVICE(0x050d, 0x7050)}, /* Belkin F5D7050 ver 1000 */53 {USB_DEVICE(0x0572, 0x2000)}, /* Cohiba Proto board */54 {USB_DEVICE(0x0572, 0x2002)}, /* Cohiba Proto board */
···537 int err = 0;538 u32 tmp;539540- might_sleep();541-542 if (!pdev)543 goto out;544 bus = pdev->bus;00545546 /* Enable interrupts for this device. */547 if (bus->host_pci &&
···537 int err = 0;538 u32 tmp;53900540 if (!pdev)541 goto out;542 bus = pdev->bus;543+544+ might_sleep_if(pdev->id.coreid != SSB_DEV_PCI);545546 /* Enable interrupts for this device. */547 if (bus->host_pci &&