Lines Matching refs:network

2986 	struct libipw_network *network = NULL;  in ipw_remove_current_network()  local
2991 network = list_entry(element, struct libipw_network, list); in ipw_remove_current_network()
2992 if (ether_addr_equal(network->bssid, priv->bssid)) { in ipw_remove_current_network()
2994 list_add_tail(&network->list, in ipw_remove_current_network()
5345 const struct libipw_network *network, in ipw_compatible_rates() argument
5351 num_rates = min(network->rates_len, (u8) IPW_MAX_RATES); in ipw_compatible_rates()
5354 if (!ipw_is_rate_in_mask(priv, network->mode, in ipw_compatible_rates()
5355 network->rates[i])) { in ipw_compatible_rates()
5357 if (network->rates[i] & LIBIPW_BASIC_RATE_MASK) { in ipw_compatible_rates()
5360 network->rates[i]); in ipw_compatible_rates()
5362 network->rates[i]; in ipw_compatible_rates()
5367 network->rates[i], priv->rates_mask); in ipw_compatible_rates()
5371 rates->supported_rates[rates->num_rates++] = network->rates[i]; in ipw_compatible_rates()
5374 num_rates = min(network->rates_ex_len, in ipw_compatible_rates()
5377 if (!ipw_is_rate_in_mask(priv, network->mode, in ipw_compatible_rates()
5378 network->rates_ex[i])) { in ipw_compatible_rates()
5379 if (network->rates_ex[i] & LIBIPW_BASIC_RATE_MASK) { in ipw_compatible_rates()
5382 network->rates_ex[i]); in ipw_compatible_rates()
5384 network->rates[i]; in ipw_compatible_rates()
5389 network->rates_ex[i], priv->rates_mask); in ipw_compatible_rates()
5394 network->rates_ex[i]; in ipw_compatible_rates()
5475 struct libipw_network *network; member
5481 struct libipw_network *network, in ipw_find_adhoc_network() argument
5489 !(network->capability & WLAN_CAPABILITY_IBSS))) { in ipw_find_adhoc_network()
5491 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5492 network->bssid); in ipw_find_adhoc_network()
5499 if ((network->ssid_len != match->network->ssid_len) || in ipw_find_adhoc_network()
5500 memcmp(network->ssid, match->network->ssid, in ipw_find_adhoc_network()
5501 network->ssid_len)) { in ipw_find_adhoc_network()
5503 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5504 network->bssid); in ipw_find_adhoc_network()
5511 ((network->ssid_len != priv->essid_len) || in ipw_find_adhoc_network()
5512 memcmp(network->ssid, priv->essid, in ipw_find_adhoc_network()
5513 min(network->ssid_len, priv->essid_len)))) { in ipw_find_adhoc_network()
5515 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5516 network->bssid, priv->essid_len, in ipw_find_adhoc_network()
5525 if (network->time_stamp[0] < match->network->time_stamp[0]) { in ipw_find_adhoc_network()
5527 match->network->ssid_len, match->network->ssid); in ipw_find_adhoc_network()
5529 } else if (network->time_stamp[1] < match->network->time_stamp[1]) { in ipw_find_adhoc_network()
5531 match->network->ssid_len, match->network->ssid); in ipw_find_adhoc_network()
5537 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) { in ipw_find_adhoc_network()
5539 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5540 network->bssid, in ipw_find_adhoc_network()
5542 network->last_scanned)); in ipw_find_adhoc_network()
5547 (network->channel != priv->channel)) { in ipw_find_adhoc_network()
5549 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5550 network->bssid, in ipw_find_adhoc_network()
5551 network->channel, priv->channel); in ipw_find_adhoc_network()
5557 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { in ipw_find_adhoc_network()
5559 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5560 network->bssid, in ipw_find_adhoc_network()
5563 network-> in ipw_find_adhoc_network()
5569 if (ether_addr_equal(network->bssid, priv->bssid)) { in ipw_find_adhoc_network()
5571 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5572 network->bssid, priv->bssid); in ipw_find_adhoc_network()
5577 if (!libipw_is_valid_mode(priv->ieee, network->mode)) { in ipw_find_adhoc_network()
5579 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5580 network->bssid); in ipw_find_adhoc_network()
5586 if (!ipw_compatible_rates(priv, network, &rates)) { in ipw_find_adhoc_network()
5588 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5589 network->bssid); in ipw_find_adhoc_network()
5595 network->ssid_len, network->ssid, in ipw_find_adhoc_network()
5596 network->bssid); in ipw_find_adhoc_network()
5606 match->network = network; in ipw_find_adhoc_network()
5608 network->ssid_len, network->ssid, network->bssid); in ipw_find_adhoc_network()
5617 struct libipw_network *network = NULL; in ipw_merge_adhoc_network() local
5619 .network = priv->assoc_network in ipw_merge_adhoc_network()
5629 list_for_each_entry(network, &priv->ieee->network_list, list) { in ipw_merge_adhoc_network()
5630 if (network != priv->assoc_network) in ipw_merge_adhoc_network()
5631 ipw_find_adhoc_network(priv, &match, network, in ipw_merge_adhoc_network()
5636 if (match.network == priv->assoc_network) { in ipw_merge_adhoc_network()
5650 priv->assoc_network = match.network; in ipw_merge_adhoc_network()
5658 struct libipw_network *network, int roaming) in ipw_best_network() argument
5665 !(network->capability & WLAN_CAPABILITY_ESS)) || in ipw_best_network()
5667 !(network->capability & WLAN_CAPABILITY_IBSS))) { in ipw_best_network()
5669 network->ssid_len, network->ssid, in ipw_best_network()
5670 network->bssid); in ipw_best_network()
5677 if ((network->ssid_len != match->network->ssid_len) || in ipw_best_network()
5678 memcmp(network->ssid, match->network->ssid, in ipw_best_network()
5679 network->ssid_len)) { in ipw_best_network()
5681 network->ssid_len, network->ssid, in ipw_best_network()
5682 network->bssid); in ipw_best_network()
5689 ((network->ssid_len != priv->essid_len) || in ipw_best_network()
5690 memcmp(network->ssid, priv->essid, in ipw_best_network()
5691 min(network->ssid_len, priv->essid_len)))) { in ipw_best_network()
5693 network->ssid_len, network->ssid, in ipw_best_network()
5694 network->bssid, priv->essid_len, in ipw_best_network()
5702 if (match->network && match->network->stats.rssi > network->stats.rssi) { in ipw_best_network()
5704 network->ssid_len, network->ssid, in ipw_best_network()
5705 network->bssid, match->network->ssid_len, in ipw_best_network()
5706 match->network->ssid, match->network->bssid); in ipw_best_network()
5712 if (network->last_associate && in ipw_best_network()
5713 time_after(network->last_associate + (HZ * 3UL), jiffies)) { in ipw_best_network()
5715 network->ssid_len, network->ssid, in ipw_best_network()
5716 network->bssid, in ipw_best_network()
5718 network->last_associate)); in ipw_best_network()
5724 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) { in ipw_best_network()
5726 network->ssid_len, network->ssid, in ipw_best_network()
5727 network->bssid, in ipw_best_network()
5729 network->last_scanned)); in ipw_best_network()
5734 (network->channel != priv->channel)) { in ipw_best_network()
5736 network->ssid_len, network->ssid, in ipw_best_network()
5737 network->bssid, in ipw_best_network()
5738 network->channel, priv->channel); in ipw_best_network()
5744 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { in ipw_best_network()
5746 network->ssid_len, network->ssid, in ipw_best_network()
5747 network->bssid, in ipw_best_network()
5750 network->capability & in ipw_best_network()
5756 !ether_addr_equal(network->bssid, priv->bssid)) { in ipw_best_network()
5758 network->ssid_len, network->ssid, in ipw_best_network()
5759 network->bssid, priv->bssid); in ipw_best_network()
5764 if (!libipw_is_valid_mode(priv->ieee, network->mode)) { in ipw_best_network()
5766 network->ssid_len, network->ssid, in ipw_best_network()
5767 network->bssid); in ipw_best_network()
5772 if (!libipw_is_valid_channel(priv->ieee, network->channel)) { in ipw_best_network()
5774 network->ssid_len, network->ssid, in ipw_best_network()
5775 network->bssid); in ipw_best_network()
5781 if (!ipw_compatible_rates(priv, network, &rates)) { in ipw_best_network()
5783 network->ssid_len, network->ssid, in ipw_best_network()
5784 network->bssid); in ipw_best_network()
5790 network->ssid_len, network->ssid, in ipw_best_network()
5791 network->bssid); in ipw_best_network()
5801 match->network = network; in ipw_best_network()
5804 network->ssid_len, network->ssid, network->bssid); in ipw_best_network()
5810 struct libipw_network *network) in ipw_adhoc_create() argument
5829 network->mode = IEEE_A; in ipw_adhoc_create()
5840 network->mode = IEEE_G; in ipw_adhoc_create()
5842 network->mode = IEEE_B; in ipw_adhoc_create()
5854 network->mode = IEEE_A; in ipw_adhoc_create()
5857 network->mode = IEEE_G; in ipw_adhoc_create()
5860 network->mode = IEEE_B; in ipw_adhoc_create()
5866 network->channel = priv->channel; in ipw_adhoc_create()
5868 ipw_create_bssid(priv, network->bssid); in ipw_adhoc_create()
5869 network->ssid_len = priv->essid_len; in ipw_adhoc_create()
5870 memcpy(network->ssid, priv->essid, priv->essid_len); in ipw_adhoc_create()
5871 memset(&network->stats, 0, sizeof(network->stats)); in ipw_adhoc_create()
5872 network->capability = WLAN_CAPABILITY_IBSS; in ipw_adhoc_create()
5874 network->capability |= WLAN_CAPABILITY_SHORT_PREAMBLE; in ipw_adhoc_create()
5876 network->capability |= WLAN_CAPABILITY_PRIVACY; in ipw_adhoc_create()
5877 network->rates_len = min(priv->rates.num_rates, MAX_RATES_LENGTH); in ipw_adhoc_create()
5878 memcpy(network->rates, priv->rates.supported_rates, network->rates_len); in ipw_adhoc_create()
5879 network->rates_ex_len = priv->rates.num_rates - network->rates_len; in ipw_adhoc_create()
5880 memcpy(network->rates_ex, in ipw_adhoc_create()
5881 &priv->rates.supported_rates[network->rates_len], in ipw_adhoc_create()
5882 network->rates_ex_len); in ipw_adhoc_create()
5883 network->last_scanned = 0; in ipw_adhoc_create()
5884 network->flags = 0; in ipw_adhoc_create()
5885 network->last_associate = 0; in ipw_adhoc_create()
5886 network->time_stamp[0] = 0; in ipw_adhoc_create()
5887 network->time_stamp[1] = 0; in ipw_adhoc_create()
5888 network->beacon_interval = 100; /* Default */ in ipw_adhoc_create()
5889 network->listen_interval = 10; /* Default */ in ipw_adhoc_create()
5890 network->atim_window = 0; /* Default */ in ipw_adhoc_create()
5891 network->wpa_ie_len = 0; in ipw_adhoc_create()
5892 network->rsn_ie_len = 0; in ipw_adhoc_create()
6838 struct libipw_network *network) in ipw_qos_handle_probe_response() argument
6842 if (network->capability & WLAN_CAPABILITY_IBSS) in ipw_qos_handle_probe_response()
6843 network->qos_data.active = network->qos_data.supported; in ipw_qos_handle_probe_response()
6845 if (network->flags & NETWORK_HAS_QOS_MASK) { in ipw_qos_handle_probe_response()
6847 (network->flags & NETWORK_HAS_QOS_PARAMETERS)) in ipw_qos_handle_probe_response()
6848 network->qos_data.active = network->qos_data.supported; in ipw_qos_handle_probe_response()
6850 if ((network->qos_data.active == 1) && (active_network == 1) && in ipw_qos_handle_probe_response()
6851 (network->flags & NETWORK_HAS_QOS_PARAMETERS) && in ipw_qos_handle_probe_response()
6852 (network->qos_data.old_param_count != in ipw_qos_handle_probe_response()
6853 network->qos_data.param_count)) { in ipw_qos_handle_probe_response()
6854 network->qos_data.old_param_count = in ipw_qos_handle_probe_response()
6855 network->qos_data.param_count; in ipw_qos_handle_probe_response()
6861 if ((priv->ieee->mode == IEEE_B) || (network->mode == IEEE_B)) in ipw_qos_handle_probe_response()
6862 memcpy(&network->qos_data.parameters, in ipw_qos_handle_probe_response()
6865 memcpy(&network->qos_data.parameters, in ipw_qos_handle_probe_response()
6868 if ((network->qos_data.active == 1) && (active_network == 1)) { in ipw_qos_handle_probe_response()
6873 network->qos_data.active = 0; in ipw_qos_handle_probe_response()
6874 network->qos_data.supported = 0; in ipw_qos_handle_probe_response()
6878 if (!ether_addr_equal(network->bssid, priv->bssid)) in ipw_qos_handle_probe_response()
6879 if (network->capability & WLAN_CAPABILITY_IBSS) in ipw_qos_handle_probe_response()
6880 if ((network->ssid_len == in ipw_qos_handle_probe_response()
6882 !memcmp(network->ssid, in ipw_qos_handle_probe_response()
6884 network->ssid_len)) { in ipw_qos_handle_probe_response()
7001 struct libipw_network *network) in ipw_qos_association() argument
7012 BUG_ON(!(network->capability & WLAN_CAPABILITY_IBSS)); in ipw_qos_association()
7018 qos_data = &network->qos_data; in ipw_qos_association()
7047 struct libipw_network *network) in ipw_qos_association_resp() argument
7053 if ((priv == NULL) || (network == NULL) || in ipw_qos_association_resp()
7064 if (network->flags & NETWORK_HAS_QOS_PARAMETERS) { in ipw_qos_association_resp()
7065 memcpy(&priv->assoc_network->qos_data, &network->qos_data, in ipw_qos_association_resp()
7068 if ((network->qos_data.old_param_count != in ipw_qos_association_resp()
7069 network->qos_data.param_count)) { in ipw_qos_association_resp()
7071 network->qos_data.old_param_count = in ipw_qos_association_resp()
7072 network->qos_data.param_count; in ipw_qos_association_resp()
7076 if ((network->mode == IEEE_B) || (priv->ieee->mode == IEEE_B)) in ipw_qos_association_resp()
7218 struct libipw_network *network) in ipw_handle_probe_response() argument
7222 (network == priv->assoc_network)); in ipw_handle_probe_response()
7224 ipw_qos_handle_probe_response(priv, active_network, network); in ipw_handle_probe_response()
7231 struct libipw_network *network) in ipw_handle_beacon() argument
7235 (network == priv->assoc_network)); in ipw_handle_beacon()
7237 ipw_qos_handle_probe_response(priv, active_network, network); in ipw_handle_beacon()
7244 struct libipw_network *network) in ipw_handle_assoc_response() argument
7247 ipw_qos_association_resp(priv, network); in ipw_handle_assoc_response()
7268 struct libipw_network *network, in ipw_associate_network() argument
7274 ipw_set_fixed_rate(priv, network->mode); in ipw_associate_network()
7277 priv->essid_len = min(network->ssid_len, in ipw_associate_network()
7279 memcpy(priv->essid, network->ssid, priv->essid_len); in ipw_associate_network()
7282 network->last_associate = jiffies; in ipw_associate_network()
7285 priv->assoc_request.channel = network->channel; in ipw_associate_network()
7313 if (network->mode & priv->ieee->mode & IEEE_A) in ipw_associate_network()
7315 else if (network->mode & priv->ieee->mode & IEEE_G) in ipw_associate_network()
7317 else if (network->mode & priv->ieee->mode & IEEE_B) in ipw_associate_network()
7320 priv->assoc_request.capability = cpu_to_le16(network->capability); in ipw_associate_network()
7321 if ((network->capability & WLAN_CAPABILITY_SHORT_PREAMBLE) in ipw_associate_network()
7340 network->channel, in ipw_associate_network()
7345 network->capability & in ipw_associate_network()
7356 priv->assoc_request.beacon_interval = cpu_to_le16(network->beacon_interval); in ipw_associate_network()
7358 (network->time_stamp[0] == 0) && (network->time_stamp[1] == 0)) { in ipw_associate_network()
7367 priv->assoc_request.assoc_tsf_msw = cpu_to_le32(network->time_stamp[1]); in ipw_associate_network()
7368 priv->assoc_request.assoc_tsf_lsw = cpu_to_le32(network->time_stamp[0]); in ipw_associate_network()
7371 memcpy(priv->assoc_request.bssid, network->bssid, ETH_ALEN); in ipw_associate_network()
7375 priv->assoc_request.atim_window = cpu_to_le16(network->atim_window); in ipw_associate_network()
7377 memcpy(priv->assoc_request.dest, network->bssid, ETH_ALEN); in ipw_associate_network()
7381 priv->assoc_request.listen_interval = cpu_to_le16(network->listen_interval); in ipw_associate_network()
7409 IPW_DEBUG_ASSOC("Association sensitivity: %d\n", network->stats.rssi); in ipw_associate_network()
7410 err = ipw_set_sensitivity(priv, network->stats.rssi + IPW_RSSI_TO_DBM); in ipw_associate_network()
7421 priv->channel = network->channel; in ipw_associate_network()
7422 memcpy(priv->bssid, network->bssid, ETH_ALEN); in ipw_associate_network()
7426 priv->assoc_network = network; in ipw_associate_network()
7429 ipw_qos_association(priv, network); in ipw_associate_network()
7447 struct libipw_network *network = NULL; in ipw_roam() local
7449 .network = priv->assoc_network in ipw_roam()
7482 list_for_each_entry(network, &priv->ieee->network_list, list) { in ipw_roam()
7483 if (network != priv->assoc_network) in ipw_roam()
7484 ipw_best_network(priv, &match, network, 1); in ipw_roam()
7489 if (match.network == priv->assoc_network) { in ipw_roam()
7498 priv->assoc_network = match.network; in ipw_roam()
7522 struct libipw_network *network = NULL; in ipw_associate() local
7524 .network = NULL in ipw_associate()
7561 list_for_each_entry(network, &priv->ieee->network_list, list) in ipw_associate()
7562 ipw_best_network(priv, &match, network, 0); in ipw_associate()
7564 network = match.network; in ipw_associate()
7567 if (network == NULL && in ipw_associate()
7594 network = list_entry(element, struct libipw_network, list); in ipw_associate()
7595 ipw_adhoc_create(priv, network); in ipw_associate()
7598 list_add_tail(&network->list, &priv->ieee->network_list); in ipw_associate()
7604 if (!network) { in ipw_associate()
7618 ipw_associate_network(priv, network, rates, 0); in ipw_associate()