Lines Matching refs:network
1393 IPW_ERROR("Failed to register promiscuous network "
2954 struct libipw_network *network = NULL;
2959 network = list_entry(element, struct libipw_network, list);
2960 if (ether_addr_equal(network->bssid, priv->bssid)) {
2962 list_add_tail(&network->list,
3855 /* Another node is active in network */
5055 * + A received packet is processed and handed to the kernel network stack,
5299 const struct libipw_network *network,
5305 num_rates = min(network->rates_len, (u8) IPW_MAX_RATES);
5308 if (!ipw_is_rate_in_mask(priv, network->mode,
5309 network->rates[i])) {
5311 if (network->rates[i] & LIBIPW_BASIC_RATE_MASK) {
5314 network->rates[i]);
5316 network->rates[i];
5321 network->rates[i], priv->rates_mask);
5325 rates->supported_rates[rates->num_rates++] = network->rates[i];
5328 num_rates = min(network->rates_ex_len,
5331 if (!ipw_is_rate_in_mask(priv, network->mode,
5332 network->rates_ex[i])) {
5333 if (network->rates_ex[i] & LIBIPW_BASIC_RATE_MASK) {
5336 network->rates_ex[i]);
5338 network->rates[i];
5343 network->rates_ex[i], priv->rates_mask);
5348 network->rates_ex[i];
5429 struct libipw_network *network;
5435 struct libipw_network *network,
5440 /* Verify that this network's capability is compatible with the
5443 !(network->capability & WLAN_CAPABILITY_IBSS))) {
5445 network->ssid_len, network->ssid,
5446 network->bssid);
5452 * network to try and roam to */
5453 if ((network->ssid_len != match->network->ssid_len) ||
5454 memcmp(network->ssid, match->network->ssid,
5455 network->ssid_len)) {
5456 IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of non-network ESSID.\n",
5457 network->ssid_len, network->ssid,
5458 network->bssid);
5465 ((network->ssid_len != priv->essid_len) ||
5466 memcmp(network->ssid, priv->essid,
5467 min(network->ssid_len, priv->essid_len)))) {
5469 network->ssid_len, network->ssid,
5470 network->bssid, priv->essid_len,
5476 /* If the old network rate is better than this one, don't bother
5479 if (network->time_stamp[0] < match->network->time_stamp[0]) {
5480 IPW_DEBUG_MERGE("Network '%*pE excluded because newer than current network.\n",
5481 match->network->ssid_len, match->network->ssid);
5483 } else if (network->time_stamp[1] < match->network->time_stamp[1]) {
5484 IPW_DEBUG_MERGE("Network '%*pE excluded because newer than current network.\n",
5485 match->network->ssid_len, match->network->ssid);
5489 /* Now go through and see if the requested network is valid... */
5491 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) {
5493 network->ssid_len, network->ssid,
5494 network->bssid,
5496 network->last_scanned));
5501 (network->channel != priv->channel)) {
5503 network->ssid_len, network->ssid,
5504 network->bssid,
5505 network->channel, priv->channel);
5511 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
5513 network->ssid_len, network->ssid,
5514 network->bssid,
5517 network->
5523 if (ether_addr_equal(network->bssid, priv->bssid)) {
5525 network->ssid_len, network->ssid,
5526 network->bssid, priv->bssid);
5531 if (!libipw_is_valid_mode(priv->ieee, network->mode)) {
5533 network->ssid_len, network->ssid,
5534 network->bssid);
5540 if (!ipw_compatible_rates(priv, network, &rates)) {
5542 network->ssid_len, network->ssid,
5543 network->bssid);
5549 network->ssid_len, network->ssid,
5550 network->bssid);
5558 /* Set up 'new' AP to this network */
5560 match->network = network;
5562 network->ssid_len, network->ssid, network->bssid);
5571 struct libipw_network *network = NULL;
5573 .network = priv->assoc_network
5579 * network */
5583 list_for_each_entry(network, &priv->ieee->network_list, list) {
5584 if (network != priv->assoc_network)
5585 ipw_find_adhoc_network(priv, &match, network,
5590 if (match.network == priv->assoc_network) {
5591 IPW_DEBUG_MERGE("No better ADHOC in this network to "
5598 IPW_DEBUG_MERGE("remove network %*pE\n",
5604 priv->assoc_network = match.network;
5612 struct libipw_network *network, int roaming)
5616 /* Verify that this network's capability is compatible with the
5619 !(network->capability & WLAN_CAPABILITY_ESS)) ||
5621 !(network->capability & WLAN_CAPABILITY_IBSS))) {
5623 network->ssid_len, network->ssid,
5624 network->bssid);
5630 * network to try and roam to */
5631 if ((network->ssid_len != match->network->ssid_len) ||
5632 memcmp(network->ssid, match->network->ssid,
5633 network->ssid_len)) {
5634 IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of non-network ESSID.\n",
5635 network->ssid_len, network->ssid,
5636 network->bssid);
5643 ((network->ssid_len != priv->essid_len) ||
5644 memcmp(network->ssid, priv->essid,
5645 min(network->ssid_len, priv->essid_len)))) {
5647 network->ssid_len, network->ssid,
5648 network->bssid, priv->essid_len,
5654 /* If the old network rate is better than this one, don't bother
5656 if (match->network && match->network->stats.rssi > network->stats.rssi) {
5658 network->ssid_len, network->ssid,
5659 network->bssid, match->network->ssid_len,
5660 match->network->ssid, match->network->bssid);
5664 /* If this network has already had an association attempt within the
5666 if (network->last_associate &&
5667 time_after(network->last_associate + (HZ * 3UL), jiffies)) {
5669 network->ssid_len, network->ssid,
5670 network->bssid,
5672 network->last_associate));
5676 /* Now go through and see if the requested network is valid... */
5678 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) {
5680 network->ssid_len, network->ssid,
5681 network->bssid,
5683 network->last_scanned));
5688 (network->channel != priv->channel)) {
5690 network->ssid_len, network->ssid,
5691 network->bssid,
5692 network->channel, priv->channel);
5698 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
5700 network->ssid_len, network->ssid,
5701 network->bssid,
5704 network->capability &
5710 !ether_addr_equal(network->bssid, priv->bssid)) {
5712 network->ssid_len, network->ssid,
5713 network->bssid, priv->bssid);
5718 if (!libipw_is_valid_mode(priv->ieee, network->mode)) {
5720 network->ssid_len, network->ssid,
5721 network->bssid);
5726 if (!libipw_is_valid_channel(priv->ieee, network->channel)) {
5728 network->ssid_len, network->ssid,
5729 network->bssid);
5735 if (!ipw_compatible_rates(priv, network, &rates)) {
5737 network->ssid_len, network->ssid,
5738 network->bssid);
5744 network->ssid_len, network->ssid,
5745 network->bssid);
5753 /* Set up 'new' AP to this network */
5755 match->network = network;
5758 network->ssid_len, network->ssid, network->bssid);
5764 struct libipw_network *network)
5772 * comes to creating a new ad-hoc network, we have tell the FW
5776 * chossen band. Attempting to create a new ad-hoc network
5783 network->mode = IEEE_A;
5794 network->mode = IEEE_G;
5796 network->mode = IEEE_B;
5808 network->mode = IEEE_A;
5811 network->mode = IEEE_G;
5814 network->mode = IEEE_B;
5820 network->channel = priv->channel;
5822 ipw_create_bssid(priv, network->bssid);
5823 network->ssid_len = priv->essid_len;
5824 memcpy(network->ssid, priv->essid, priv->essid_len);
5825 memset(&network->stats, 0, sizeof(network->stats));
5826 network->capability = WLAN_CAPABILITY_IBSS;
5828 network->capability |= WLAN_CAPABILITY_SHORT_PREAMBLE;
5830 network->capability |= WLAN_CAPABILITY_PRIVACY;
5831 network->rates_len = min(priv->rates.num_rates, MAX_RATES_LENGTH);
5832 memcpy(network->rates, priv->rates.supported_rates, network->rates_len);
5833 network->rates_ex_len = priv->rates.num_rates - network->rates_len;
5834 memcpy(network->rates_ex,
5835 &priv->rates.supported_rates[network->rates_len],
5836 network->rates_ex_len);
5837 network->last_scanned = 0;
5838 network->flags = 0;
5839 network->last_associate = 0;
5840 network->time_stamp[0] = 0;
5841 network->time_stamp[1] = 0;
5842 network->beacon_interval = 100; /* Default */
5843 network->listen_interval = 10; /* Default */
5844 network->atim_window = 0; /* Default */
5845 network->wpa_ie_len = 0;
5846 network->rsn_ie_len = 0;
6328 * this a direct scan for the current network. Finally,
6767 * get the modulation type of the current network or
6783 IPW_DEBUG_QOS("QoS network/card mode %d\n", mode);
6792 struct libipw_network *network)
6796 if (network->capability & WLAN_CAPABILITY_IBSS)
6797 network->qos_data.active = network->qos_data.supported;
6799 if (network->flags & NETWORK_HAS_QOS_MASK) {
6801 (network->flags & NETWORK_HAS_QOS_PARAMETERS))
6802 network->qos_data.active = network->qos_data.supported;
6804 if ((network->qos_data.active == 1) && (active_network == 1) &&
6805 (network->flags & NETWORK_HAS_QOS_PARAMETERS) &&
6806 (network->qos_data.old_param_count !=
6807 network->qos_data.param_count)) {
6808 network->qos_data.old_param_count =
6809 network->qos_data.param_count;
6815 if ((priv->ieee->mode == IEEE_B) || (network->mode == IEEE_B))
6816 memcpy(&network->qos_data.parameters,
6819 memcpy(&network->qos_data.parameters,
6822 if ((network->qos_data.active == 1) && (active_network == 1)) {
6827 network->qos_data.active = 0;
6828 network->qos_data.supported = 0;
6832 if (!ether_addr_equal(network->bssid, priv->bssid))
6833 if (network->capability & WLAN_CAPABILITY_IBSS)
6834 if ((network->ssid_len ==
6836 !memcmp(network->ssid,
6838 network->ssid_len)) {
6870 IPW_DEBUG_QOS("QoS activate network mode %d\n", type);
6882 IPW_DEBUG_QOS("QoS activate IBSS network mode %d\n",
6955 struct libipw_network *network)
6966 BUG_ON(!(network->capability & WLAN_CAPABILITY_IBSS));
6972 qos_data = &network->qos_data;
6997 * off the network from the associated setting, adjust the QoS
7001 struct libipw_network *network)
7007 if ((priv == NULL) || (network == NULL) ||
7018 if (network->flags & NETWORK_HAS_QOS_PARAMETERS) {
7019 memcpy(&priv->assoc_network->qos_data, &network->qos_data,
7022 if ((network->qos_data.old_param_count !=
7023 network->qos_data.param_count)) {
7025 network->qos_data.old_param_count =
7026 network->qos_data.param_count;
7030 if ((network->mode == IEEE_B) || (priv->ieee->mode == IEEE_B))
7125 IPW_DEBUG_QOS("QoS %d network is QoS active %d supported %d "
7172 struct libipw_network *network)
7176 (network == priv->assoc_network));
7178 ipw_qos_handle_probe_response(priv, active_network, network);
7185 struct libipw_network *network)
7189 (network == priv->assoc_network));
7191 ipw_qos_handle_probe_response(priv, active_network, network);
7198 struct libipw_network *network)
7201 ipw_qos_association_resp(priv, network);
7222 struct libipw_network *network,
7228 ipw_set_fixed_rate(priv, network->mode);
7231 priv->essid_len = min(network->ssid_len,
7233 memcpy(priv->essid, network->ssid, priv->essid_len);
7236 network->last_associate = jiffies;
7239 priv->assoc_request.channel = network->channel;
7264 * when it comes to associating to a given network we have to choose
7267 if (network->mode & priv->ieee->mode & IEEE_A)
7269 else if (network->mode & priv->ieee->mode & IEEE_G)
7271 else if (network->mode & priv->ieee->mode & IEEE_B)
7274 priv->assoc_request.capability = cpu_to_le16(network->capability);
7275 if ((network->capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
7294 network->channel,
7299 network->capability &
7310 priv->assoc_request.beacon_interval = cpu_to_le16(network->beacon_interval);
7312 (network->time_stamp[0] == 0) && (network->time_stamp[1] == 0)) {
7321 priv->assoc_request.assoc_tsf_msw = cpu_to_le32(network->time_stamp[1]);
7322 priv->assoc_request.assoc_tsf_lsw = cpu_to_le32(network->time_stamp[0]);
7325 memcpy(priv->assoc_request.bssid, network->bssid, ETH_ALEN);
7329 priv->assoc_request.atim_window = cpu_to_le16(network->atim_window);
7331 memcpy(priv->assoc_request.dest, network->bssid, ETH_ALEN);
7335 priv->assoc_request.listen_interval = cpu_to_le16(network->listen_interval);
7363 IPW_DEBUG_ASSOC("Association sensitivity: %d\n", network->stats.rssi);
7364 err = ipw_set_sensitivity(priv, network->stats.rssi + IPW_RSSI_TO_DBM);
7375 priv->channel = network->channel;
7376 memcpy(priv->bssid, network->bssid, ETH_ALEN);
7380 priv->assoc_network = network;
7383 ipw_qos_association(priv, network);
7401 struct libipw_network *network = NULL;
7403 .network = priv->assoc_network
7412 * is a better network than the currently associated. If none
7414 * 4. If a better network is found, a disassociation request is
7418 * associated, and the newly selected network is sent an
7431 * network */
7436 list_for_each_entry(network, &priv->ieee->network_list, list) {
7437 if (network != priv->assoc_network)
7438 ipw_best_network(priv, &match, network, 1);
7443 if (match.network == priv->assoc_network) {
7444 IPW_DEBUG_ASSOC("No better APs in this network to "
7452 priv->assoc_network = match.network;
7476 struct libipw_network *network = NULL;
7478 .network = NULL
7515 list_for_each_entry(network, &priv->ieee->network_list, list)
7516 ipw_best_network(priv, &match, network, 0);
7518 network = match.network;
7521 if (network == NULL &&
7526 /* Use oldest network if the free list is empty */
7540 IPW_DEBUG_ASSOC("Expired '%*pE' (%pM) from network list.\n",
7548 network = list_entry(element, struct libipw_network, list);
7549 ipw_adhoc_create(priv, network);
7552 list_add_tail(&network->list, &priv->ieee->network_list);
7558 if (!network) {
7572 ipw_associate_network(priv, network, rates, 0);
8040 * this network, discarding packets coming from ourselves */
11675 IPW_ERROR("failed to register network device\n");
11683 IPW_ERROR("Failed to register promiscuous network "
11907 MODULE_PARM_DESC(auto_create, "auto create adhoc network (default on)");
11942 MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS,2=Monitor)");
11945 MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS)");