Lines Matching refs:network

2983 	struct libipw_network *network = NULL;  in ipw_remove_current_network()  local
2988 network = list_entry(element, struct libipw_network, list); in ipw_remove_current_network()
2989 if (ether_addr_equal(network->bssid, priv->bssid)) { in ipw_remove_current_network()
2991 list_add_tail(&network->list, in ipw_remove_current_network()
5342 const struct libipw_network *network, in ipw_compatible_rates() argument
5348 num_rates = min(network->rates_len, (u8) IPW_MAX_RATES); in ipw_compatible_rates()
5351 if (!ipw_is_rate_in_mask(priv, network->mode, in ipw_compatible_rates()
5352 network->rates[i])) { in ipw_compatible_rates()
5354 if (network->rates[i] & LIBIPW_BASIC_RATE_MASK) { in ipw_compatible_rates()
5357 network->rates[i]); in ipw_compatible_rates()
5359 network->rates[i]; in ipw_compatible_rates()
5364 network->rates[i], priv->rates_mask); in ipw_compatible_rates()
5368 rates->supported_rates[rates->num_rates++] = network->rates[i]; in ipw_compatible_rates()
5371 num_rates = min(network->rates_ex_len, in ipw_compatible_rates()
5374 if (!ipw_is_rate_in_mask(priv, network->mode, in ipw_compatible_rates()
5375 network->rates_ex[i])) { in ipw_compatible_rates()
5376 if (network->rates_ex[i] & LIBIPW_BASIC_RATE_MASK) { in ipw_compatible_rates()
5379 network->rates_ex[i]); in ipw_compatible_rates()
5381 network->rates[i]; in ipw_compatible_rates()
5386 network->rates_ex[i], priv->rates_mask); in ipw_compatible_rates()
5391 network->rates_ex[i]; in ipw_compatible_rates()
5472 struct libipw_network *network; member
5478 struct libipw_network *network, in ipw_find_adhoc_network() argument
5486 !(network->capability & WLAN_CAPABILITY_IBSS))) { in ipw_find_adhoc_network()
5488 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5489 network->bssid); in ipw_find_adhoc_network()
5496 if ((network->ssid_len != match->network->ssid_len) || in ipw_find_adhoc_network()
5497 memcmp(network->ssid, match->network->ssid, in ipw_find_adhoc_network()
5498 network->ssid_len)) { in ipw_find_adhoc_network()
5500 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5501 network->bssid); in ipw_find_adhoc_network()
5508 ((network->ssid_len != priv->essid_len) || in ipw_find_adhoc_network()
5509 memcmp(network->ssid, priv->essid, in ipw_find_adhoc_network()
5510 min(network->ssid_len, priv->essid_len)))) { in ipw_find_adhoc_network()
5512 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5513 network->bssid, priv->essid_len, in ipw_find_adhoc_network()
5522 if (network->time_stamp[0] < match->network->time_stamp[0]) { in ipw_find_adhoc_network()
5524 match->network->ssid_len, match->network->ssid); in ipw_find_adhoc_network()
5526 } else if (network->time_stamp[1] < match->network->time_stamp[1]) { in ipw_find_adhoc_network()
5528 match->network->ssid_len, match->network->ssid); in ipw_find_adhoc_network()
5534 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) { in ipw_find_adhoc_network()
5536 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5537 network->bssid, in ipw_find_adhoc_network()
5539 network->last_scanned)); in ipw_find_adhoc_network()
5544 (network->channel != priv->channel)) { in ipw_find_adhoc_network()
5546 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5547 network->bssid, in ipw_find_adhoc_network()
5548 network->channel, priv->channel); in ipw_find_adhoc_network()
5554 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { in ipw_find_adhoc_network()
5556 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5557 network->bssid, in ipw_find_adhoc_network()
5560 network-> in ipw_find_adhoc_network()
5566 if (ether_addr_equal(network->bssid, priv->bssid)) { in ipw_find_adhoc_network()
5568 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5569 network->bssid, priv->bssid); in ipw_find_adhoc_network()
5574 if (!libipw_is_valid_mode(priv->ieee, network->mode)) { in ipw_find_adhoc_network()
5576 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5577 network->bssid); in ipw_find_adhoc_network()
5583 if (!ipw_compatible_rates(priv, network, &rates)) { in ipw_find_adhoc_network()
5585 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5586 network->bssid); in ipw_find_adhoc_network()
5592 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5593 network->bssid); in ipw_find_adhoc_network()
5603 match->network = network; in ipw_find_adhoc_network()
5605 network->ssid_len, network->ssid, network->bssid); in ipw_find_adhoc_network()
5614 struct libipw_network *network = NULL; in ipw_merge_adhoc_network() local
5616 .network = priv->assoc_network in ipw_merge_adhoc_network()
5626 list_for_each_entry(network, &priv->ieee->network_list, list) { in ipw_merge_adhoc_network()
5627 if (network != priv->assoc_network) in ipw_merge_adhoc_network()
5628 ipw_find_adhoc_network(priv, &match, network, in ipw_merge_adhoc_network()
5633 if (match.network == priv->assoc_network) { in ipw_merge_adhoc_network()
5647 priv->assoc_network = match.network; in ipw_merge_adhoc_network()
5655 struct libipw_network *network, int roaming) in ipw_best_network() argument
5662 !(network->capability & WLAN_CAPABILITY_ESS)) || in ipw_best_network()
5664 !(network->capability & WLAN_CAPABILITY_IBSS))) { in ipw_best_network()
5666 network->ssid_len, network->ssid, in ipw_best_network()
5667 network->bssid); in ipw_best_network()
5674 if ((network->ssid_len != match->network->ssid_len) || in ipw_best_network()
5675 memcmp(network->ssid, match->network->ssid, in ipw_best_network()
5676 network->ssid_len)) { in ipw_best_network()
5678 network->ssid_len, network->ssid, in ipw_best_network()
5679 network->bssid); in ipw_best_network()
5686 ((network->ssid_len != priv->essid_len) || in ipw_best_network()
5687 memcmp(network->ssid, priv->essid, in ipw_best_network()
5688 min(network->ssid_len, priv->essid_len)))) { in ipw_best_network()
5690 network->ssid_len, network->ssid, in ipw_best_network()
5691 network->bssid, priv->essid_len, in ipw_best_network()
5699 if (match->network && match->network->stats.rssi > network->stats.rssi) { in ipw_best_network()
5701 network->ssid_len, network->ssid, in ipw_best_network()
5702 network->bssid, match->network->ssid_len, in ipw_best_network()
5703 match->network->ssid, match->network->bssid); in ipw_best_network()
5709 if (network->last_associate && in ipw_best_network()
5710 time_after(network->last_associate + (HZ * 3UL), jiffies)) { in ipw_best_network()
5712 network->ssid_len, network->ssid, in ipw_best_network()
5713 network->bssid, in ipw_best_network()
5715 network->last_associate)); in ipw_best_network()
5721 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) { in ipw_best_network()
5723 network->ssid_len, network->ssid, in ipw_best_network()
5724 network->bssid, in ipw_best_network()
5726 network->last_scanned)); in ipw_best_network()
5731 (network->channel != priv->channel)) { in ipw_best_network()
5733 network->ssid_len, network->ssid, in ipw_best_network()
5734 network->bssid, in ipw_best_network()
5735 network->channel, priv->channel); in ipw_best_network()
5741 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { in ipw_best_network()
5743 network->ssid_len, network->ssid, in ipw_best_network()
5744 network->bssid, in ipw_best_network()
5747 network->capability & in ipw_best_network()
5753 !ether_addr_equal(network->bssid, priv->bssid)) { in ipw_best_network()
5755 network->ssid_len, network->ssid, in ipw_best_network()
5756 network->bssid, priv->bssid); in ipw_best_network()
5761 if (!libipw_is_valid_mode(priv->ieee, network->mode)) { in ipw_best_network()
5763 network->ssid_len, network->ssid, in ipw_best_network()
5764 network->bssid); in ipw_best_network()
5769 if (!libipw_is_valid_channel(priv->ieee, network->channel)) { in ipw_best_network()
5771 network->ssid_len, network->ssid, in ipw_best_network()
5772 network->bssid); in ipw_best_network()
5778 if (!ipw_compatible_rates(priv, network, &rates)) { in ipw_best_network()
5780 network->ssid_len, network->ssid, in ipw_best_network()
5781 network->bssid); in ipw_best_network()
5787 network->ssid_len, network->ssid, in ipw_best_network()
5788 network->bssid); in ipw_best_network()
5798 match->network = network; in ipw_best_network()
5801 network->ssid_len, network->ssid, network->bssid); in ipw_best_network()
5807 struct libipw_network *network) in ipw_adhoc_create() argument
5826 network->mode = IEEE_A; in ipw_adhoc_create()
5837 network->mode = IEEE_G; in ipw_adhoc_create()
5839 network->mode = IEEE_B; in ipw_adhoc_create()
5851 network->mode = IEEE_A; in ipw_adhoc_create()
5854 network->mode = IEEE_G; in ipw_adhoc_create()
5857 network->mode = IEEE_B; in ipw_adhoc_create()
5863 network->channel = priv->channel; in ipw_adhoc_create()
5865 ipw_create_bssid(priv, network->bssid); in ipw_adhoc_create()
5866 network->ssid_len = priv->essid_len; in ipw_adhoc_create()
5867 memcpy(network->ssid, priv->essid, priv->essid_len); in ipw_adhoc_create()
5868 memset(&network->stats, 0, sizeof(network->stats)); in ipw_adhoc_create()
5869 network->capability = WLAN_CAPABILITY_IBSS; in ipw_adhoc_create()
5871 network->capability |= WLAN_CAPABILITY_SHORT_PREAMBLE; in ipw_adhoc_create()
5873 network->capability |= WLAN_CAPABILITY_PRIVACY; in ipw_adhoc_create()
5874 network->rates_len = min(priv->rates.num_rates, MAX_RATES_LENGTH); in ipw_adhoc_create()
5875 memcpy(network->rates, priv->rates.supported_rates, network->rates_len); in ipw_adhoc_create()
5876 network->rates_ex_len = priv->rates.num_rates - network->rates_len; in ipw_adhoc_create()
5877 memcpy(network->rates_ex, in ipw_adhoc_create()
5878 &priv->rates.supported_rates[network->rates_len], in ipw_adhoc_create()
5879 network->rates_ex_len); in ipw_adhoc_create()
5880 network->last_scanned = 0; in ipw_adhoc_create()
5881 network->flags = 0; in ipw_adhoc_create()
5882 network->last_associate = 0; in ipw_adhoc_create()
5883 network->time_stamp[0] = 0; in ipw_adhoc_create()
5884 network->time_stamp[1] = 0; in ipw_adhoc_create()
5885 network->beacon_interval = 100; /* Default */ in ipw_adhoc_create()
5886 network->listen_interval = 10; /* Default */ in ipw_adhoc_create()
5887 network->atim_window = 0; /* Default */ in ipw_adhoc_create()
5888 network->wpa_ie_len = 0; in ipw_adhoc_create()
5889 network->rsn_ie_len = 0; in ipw_adhoc_create()
6835 struct libipw_network *network) in ipw_qos_handle_probe_response() argument
6839 if (network->capability & WLAN_CAPABILITY_IBSS) in ipw_qos_handle_probe_response()
6840 network->qos_data.active = network->qos_data.supported; in ipw_qos_handle_probe_response()
6842 if (network->flags & NETWORK_HAS_QOS_MASK) { in ipw_qos_handle_probe_response()
6844 (network->flags & NETWORK_HAS_QOS_PARAMETERS)) in ipw_qos_handle_probe_response()
6845 network->qos_data.active = network->qos_data.supported; in ipw_qos_handle_probe_response()
6847 if ((network->qos_data.active == 1) && (active_network == 1) && in ipw_qos_handle_probe_response()
6848 (network->flags & NETWORK_HAS_QOS_PARAMETERS) && in ipw_qos_handle_probe_response()
6849 (network->qos_data.old_param_count != in ipw_qos_handle_probe_response()
6850 network->qos_data.param_count)) { in ipw_qos_handle_probe_response()
6851 network->qos_data.old_param_count = in ipw_qos_handle_probe_response()
6852 network->qos_data.param_count; in ipw_qos_handle_probe_response()
6858 if ((priv->ieee->mode == IEEE_B) || (network->mode == IEEE_B)) in ipw_qos_handle_probe_response()
6859 memcpy(&network->qos_data.parameters, in ipw_qos_handle_probe_response()
6862 memcpy(&network->qos_data.parameters, in ipw_qos_handle_probe_response()
6865 if ((network->qos_data.active == 1) && (active_network == 1)) { in ipw_qos_handle_probe_response()
6870 network->qos_data.active = 0; in ipw_qos_handle_probe_response()
6871 network->qos_data.supported = 0; in ipw_qos_handle_probe_response()
6875 if (!ether_addr_equal(network->bssid, priv->bssid)) in ipw_qos_handle_probe_response()
6876 if (network->capability & WLAN_CAPABILITY_IBSS) in ipw_qos_handle_probe_response()
6877 if ((network->ssid_len == in ipw_qos_handle_probe_response()
6879 !memcmp(network->ssid, in ipw_qos_handle_probe_response()
6881 network->ssid_len)) { in ipw_qos_handle_probe_response()
6998 struct libipw_network *network) in ipw_qos_association() argument
7009 BUG_ON(!(network->capability & WLAN_CAPABILITY_IBSS)); in ipw_qos_association()
7015 qos_data = &network->qos_data; in ipw_qos_association()
7044 struct libipw_network *network) in ipw_qos_association_resp() argument
7050 if ((priv == NULL) || (network == NULL) || in ipw_qos_association_resp()
7061 if (network->flags & NETWORK_HAS_QOS_PARAMETERS) { in ipw_qos_association_resp()
7062 memcpy(&priv->assoc_network->qos_data, &network->qos_data, in ipw_qos_association_resp()
7065 if ((network->qos_data.old_param_count != in ipw_qos_association_resp()
7066 network->qos_data.param_count)) { in ipw_qos_association_resp()
7068 network->qos_data.old_param_count = in ipw_qos_association_resp()
7069 network->qos_data.param_count; in ipw_qos_association_resp()
7073 if ((network->mode == IEEE_B) || (priv->ieee->mode == IEEE_B)) in ipw_qos_association_resp()
7215 struct libipw_network *network) in ipw_handle_probe_response() argument
7219 (network == priv->assoc_network)); in ipw_handle_probe_response()
7221 ipw_qos_handle_probe_response(priv, active_network, network); in ipw_handle_probe_response()
7228 struct libipw_network *network) in ipw_handle_beacon() argument
7232 (network == priv->assoc_network)); in ipw_handle_beacon()
7234 ipw_qos_handle_probe_response(priv, active_network, network); in ipw_handle_beacon()
7241 struct libipw_network *network) in ipw_handle_assoc_response() argument
7244 ipw_qos_association_resp(priv, network); in ipw_handle_assoc_response()
7265 struct libipw_network *network, in ipw_associate_network() argument
7271 ipw_set_fixed_rate(priv, network->mode); in ipw_associate_network()
7274 priv->essid_len = min(network->ssid_len, in ipw_associate_network()
7276 memcpy(priv->essid, network->ssid, priv->essid_len); in ipw_associate_network()
7279 network->last_associate = jiffies; in ipw_associate_network()
7282 priv->assoc_request.channel = network->channel; in ipw_associate_network()
7310 if (network->mode & priv->ieee->mode & IEEE_A) in ipw_associate_network()
7312 else if (network->mode & priv->ieee->mode & IEEE_G) in ipw_associate_network()
7314 else if (network->mode & priv->ieee->mode & IEEE_B) in ipw_associate_network()
7317 priv->assoc_request.capability = cpu_to_le16(network->capability); in ipw_associate_network()
7318 if ((network->capability & WLAN_CAPABILITY_SHORT_PREAMBLE) in ipw_associate_network()
7337 network->channel, in ipw_associate_network()
7342 network->capability & in ipw_associate_network()
7353 priv->assoc_request.beacon_interval = cpu_to_le16(network->beacon_interval); in ipw_associate_network()
7355 (network->time_stamp[0] == 0) && (network->time_stamp[1] == 0)) { in ipw_associate_network()
7364 priv->assoc_request.assoc_tsf_msw = cpu_to_le32(network->time_stamp[1]); in ipw_associate_network()
7365 priv->assoc_request.assoc_tsf_lsw = cpu_to_le32(network->time_stamp[0]); in ipw_associate_network()
7368 memcpy(priv->assoc_request.bssid, network->bssid, ETH_ALEN); in ipw_associate_network()
7372 priv->assoc_request.atim_window = cpu_to_le16(network->atim_window); in ipw_associate_network()
7374 memcpy(priv->assoc_request.dest, network->bssid, ETH_ALEN); in ipw_associate_network()
7378 priv->assoc_request.listen_interval = cpu_to_le16(network->listen_interval); in ipw_associate_network()
7406 IPW_DEBUG_ASSOC("Association sensitivity: %d\n", network->stats.rssi); in ipw_associate_network()
7407 err = ipw_set_sensitivity(priv, network->stats.rssi + IPW_RSSI_TO_DBM); in ipw_associate_network()
7418 priv->channel = network->channel; in ipw_associate_network()
7419 memcpy(priv->bssid, network->bssid, ETH_ALEN); in ipw_associate_network()
7423 priv->assoc_network = network; in ipw_associate_network()
7426 ipw_qos_association(priv, network); in ipw_associate_network()
7444 struct libipw_network *network = NULL; in ipw_roam() local
7446 .network = priv->assoc_network in ipw_roam()
7479 list_for_each_entry(network, &priv->ieee->network_list, list) { in ipw_roam()
7480 if (network != priv->assoc_network) in ipw_roam()
7481 ipw_best_network(priv, &match, network, 1); in ipw_roam()
7486 if (match.network == priv->assoc_network) { in ipw_roam()
7495 priv->assoc_network = match.network; in ipw_roam()
7519 struct libipw_network *network = NULL; in ipw_associate() local
7521 .network = NULL in ipw_associate()
7558 list_for_each_entry(network, &priv->ieee->network_list, list) in ipw_associate()
7559 ipw_best_network(priv, &match, network, 0); in ipw_associate()
7561 network = match.network; in ipw_associate()
7564 if (network == NULL && in ipw_associate()
7591 network = list_entry(element, struct libipw_network, list); in ipw_associate()
7592 ipw_adhoc_create(priv, network); in ipw_associate()
7595 list_add_tail(&network->list, &priv->ieee->network_list); in ipw_associate()
7601 if (!network) { in ipw_associate()
7615 ipw_associate_network(priv, network, rates, 0); in ipw_associate()