|
@@ -4496,7 +4496,6 @@ static void handle_scan_event(struct ipw_priv *priv)
|
|
static void ipw_rx_notification(struct ipw_priv *priv,
|
|
static void ipw_rx_notification(struct ipw_priv *priv,
|
|
struct ipw_rx_notification *notif)
|
|
struct ipw_rx_notification *notif)
|
|
{
|
|
{
|
|
- DECLARE_SSID_BUF(ssid);
|
|
|
|
u16 size = le16_to_cpu(notif->size);
|
|
u16 size = le16_to_cpu(notif->size);
|
|
|
|
|
|
IPW_DEBUG_NOTIF("type = %i (%d bytes)\n", notif->subtype, size);
|
|
IPW_DEBUG_NOTIF("type = %i (%d bytes)\n", notif->subtype, size);
|
|
@@ -4509,9 +4508,8 @@ static void ipw_rx_notification(struct ipw_priv *priv,
|
|
case CMAS_ASSOCIATED:{
|
|
case CMAS_ASSOCIATED:{
|
|
IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
|
|
IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
|
|
IPW_DL_ASSOC,
|
|
IPW_DL_ASSOC,
|
|
- "associated: '%s' %pM\n",
|
|
|
|
- print_ssid(ssid, priv->essid,
|
|
|
|
- priv->essid_len),
|
|
|
|
|
|
+ "associated: '%*pE' %pM\n",
|
|
|
|
+ priv->essid_len, priv->essid,
|
|
priv->bssid);
|
|
priv->bssid);
|
|
|
|
|
|
switch (priv->ieee->iw_mode) {
|
|
switch (priv->ieee->iw_mode) {
|
|
@@ -4585,14 +4583,9 @@ static void ipw_rx_notification(struct ipw_priv *priv,
|
|
IPW_DEBUG(IPW_DL_NOTIF |
|
|
IPW_DEBUG(IPW_DL_NOTIF |
|
|
IPW_DL_STATE |
|
|
IPW_DL_STATE |
|
|
IPW_DL_ASSOC,
|
|
IPW_DL_ASSOC,
|
|
- "deauthenticated: '%s' "
|
|
|
|
- "%pM"
|
|
|
|
- ": (0x%04X) - %s\n",
|
|
|
|
- print_ssid(ssid,
|
|
|
|
- priv->
|
|
|
|
- essid,
|
|
|
|
- priv->
|
|
|
|
- essid_len),
|
|
|
|
|
|
+ "deauthenticated: '%*pE' %pM: (0x%04X) - %s\n",
|
|
|
|
+ priv->essid_len,
|
|
|
|
+ priv->essid,
|
|
priv->bssid,
|
|
priv->bssid,
|
|
le16_to_cpu(auth->status),
|
|
le16_to_cpu(auth->status),
|
|
ipw_get_status_code
|
|
ipw_get_status_code
|
|
@@ -4610,9 +4603,8 @@ static void ipw_rx_notification(struct ipw_priv *priv,
|
|
|
|
|
|
IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
|
|
IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
|
|
IPW_DL_ASSOC,
|
|
IPW_DL_ASSOC,
|
|
- "authenticated: '%s' %pM\n",
|
|
|
|
- print_ssid(ssid, priv->essid,
|
|
|
|
- priv->essid_len),
|
|
|
|
|
|
+ "authenticated: '%*pE' %pM\n",
|
|
|
|
+ priv->essid_len, priv->essid,
|
|
priv->bssid);
|
|
priv->bssid);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -4638,9 +4630,8 @@ static void ipw_rx_notification(struct ipw_priv *priv,
|
|
|
|
|
|
IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
|
|
IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
|
|
IPW_DL_ASSOC,
|
|
IPW_DL_ASSOC,
|
|
- "disassociated: '%s' %pM\n",
|
|
|
|
- print_ssid(ssid, priv->essid,
|
|
|
|
- priv->essid_len),
|
|
|
|
|
|
+ "disassociated: '%*pE' %pM\n",
|
|
|
|
+ priv->essid_len, priv->essid,
|
|
priv->bssid);
|
|
priv->bssid);
|
|
|
|
|
|
priv->status &=
|
|
priv->status &=
|
|
@@ -4676,9 +4667,8 @@ static void ipw_rx_notification(struct ipw_priv *priv,
|
|
switch (auth->state) {
|
|
switch (auth->state) {
|
|
case CMAS_AUTHENTICATED:
|
|
case CMAS_AUTHENTICATED:
|
|
IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE,
|
|
IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE,
|
|
- "authenticated: '%s' %pM\n",
|
|
|
|
- print_ssid(ssid, priv->essid,
|
|
|
|
- priv->essid_len),
|
|
|
|
|
|
+ "authenticated: '%*pE' %pM\n",
|
|
|
|
+ priv->essid_len, priv->essid,
|
|
priv->bssid);
|
|
priv->bssid);
|
|
priv->status |= STATUS_AUTH;
|
|
priv->status |= STATUS_AUTH;
|
|
break;
|
|
break;
|
|
@@ -4695,9 +4685,8 @@ static void ipw_rx_notification(struct ipw_priv *priv,
|
|
}
|
|
}
|
|
IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
|
|
IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
|
|
IPW_DL_ASSOC,
|
|
IPW_DL_ASSOC,
|
|
- "deauthenticated: '%s' %pM\n",
|
|
|
|
- print_ssid(ssid, priv->essid,
|
|
|
|
- priv->essid_len),
|
|
|
|
|
|
+ "deauthenticated: '%*pE' %pM\n",
|
|
|
|
+ priv->essid_len, priv->essid,
|
|
priv->bssid);
|
|
priv->bssid);
|
|
|
|
|
|
priv->status &= ~(STATUS_ASSOCIATING |
|
|
priv->status &= ~(STATUS_ASSOCIATING |
|
|
@@ -5516,16 +5505,13 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
|
|
int roaming)
|
|
int roaming)
|
|
{
|
|
{
|
|
struct ipw_supported_rates rates;
|
|
struct ipw_supported_rates rates;
|
|
- DECLARE_SSID_BUF(ssid);
|
|
|
|
|
|
|
|
/* Verify that this network's capability is compatible with the
|
|
/* Verify that this network's capability is compatible with the
|
|
* current mode (AdHoc or Infrastructure) */
|
|
* current mode (AdHoc or Infrastructure) */
|
|
if ((priv->ieee->iw_mode == IW_MODE_ADHOC &&
|
|
if ((priv->ieee->iw_mode == IW_MODE_ADHOC &&
|
|
!(network->capability & WLAN_CAPABILITY_IBSS))) {
|
|
!(network->capability & WLAN_CAPABILITY_IBSS))) {
|
|
- IPW_DEBUG_MERGE("Network '%s (%pM)' excluded due to "
|
|
|
|
- "capability mismatch.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded due to capability mismatch.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid);
|
|
network->bssid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -5536,10 +5522,8 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
|
|
if ((network->ssid_len != match->network->ssid_len) ||
|
|
if ((network->ssid_len != match->network->ssid_len) ||
|
|
memcmp(network->ssid, match->network->ssid,
|
|
memcmp(network->ssid, match->network->ssid,
|
|
network->ssid_len)) {
|
|
network->ssid_len)) {
|
|
- IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
|
|
|
|
- "because of non-network ESSID.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of non-network ESSID.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid);
|
|
network->bssid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -5550,17 +5534,10 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
|
|
((network->ssid_len != priv->essid_len) ||
|
|
((network->ssid_len != priv->essid_len) ||
|
|
memcmp(network->ssid, priv->essid,
|
|
memcmp(network->ssid, priv->essid,
|
|
min(network->ssid_len, priv->essid_len)))) {
|
|
min(network->ssid_len, priv->essid_len)))) {
|
|
- char escaped[IW_ESSID_MAX_SIZE * 2 + 1];
|
|
|
|
-
|
|
|
|
- strlcpy(escaped,
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
- sizeof(escaped));
|
|
|
|
- IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
|
|
|
|
- "because of ESSID mismatch: '%s'.\n",
|
|
|
|
- escaped, network->bssid,
|
|
|
|
- print_ssid(ssid, priv->essid,
|
|
|
|
- priv->essid_len));
|
|
|
|
|
|
+ IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of ESSID mismatch: '%*pE'.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
|
|
+ network->bssid, priv->essid_len,
|
|
|
|
+ priv->essid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -5569,26 +5546,20 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
|
|
* testing everything else. */
|
|
* testing everything else. */
|
|
|
|
|
|
if (network->time_stamp[0] < match->network->time_stamp[0]) {
|
|
if (network->time_stamp[0] < match->network->time_stamp[0]) {
|
|
- IPW_DEBUG_MERGE("Network '%s excluded because newer than "
|
|
|
|
- "current network.\n",
|
|
|
|
- print_ssid(ssid, match->network->ssid,
|
|
|
|
- match->network->ssid_len));
|
|
|
|
|
|
+ IPW_DEBUG_MERGE("Network '%*pE excluded because newer than current network.\n",
|
|
|
|
+ match->network->ssid_len, match->network->ssid);
|
|
return 0;
|
|
return 0;
|
|
} else if (network->time_stamp[1] < match->network->time_stamp[1]) {
|
|
} else if (network->time_stamp[1] < match->network->time_stamp[1]) {
|
|
- IPW_DEBUG_MERGE("Network '%s excluded because newer than "
|
|
|
|
- "current network.\n",
|
|
|
|
- print_ssid(ssid, match->network->ssid,
|
|
|
|
- match->network->ssid_len));
|
|
|
|
|
|
+ IPW_DEBUG_MERGE("Network '%*pE excluded because newer than current network.\n",
|
|
|
|
+ match->network->ssid_len, match->network->ssid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
/* Now go through and see if the requested network is valid... */
|
|
/* Now go through and see if the requested network is valid... */
|
|
if (priv->ieee->scan_age != 0 &&
|
|
if (priv->ieee->scan_age != 0 &&
|
|
time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) {
|
|
time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) {
|
|
- IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
|
|
|
|
- "because of age: %ums.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of age: %ums.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid,
|
|
network->bssid,
|
|
jiffies_to_msecs(jiffies -
|
|
jiffies_to_msecs(jiffies -
|
|
network->last_scanned));
|
|
network->last_scanned));
|
|
@@ -5597,10 +5568,8 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
|
|
|
|
|
|
if ((priv->config & CFG_STATIC_CHANNEL) &&
|
|
if ((priv->config & CFG_STATIC_CHANNEL) &&
|
|
(network->channel != priv->channel)) {
|
|
(network->channel != priv->channel)) {
|
|
- IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
|
|
|
|
- "because of channel mismatch: %d != %d.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of channel mismatch: %d != %d.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid,
|
|
network->bssid,
|
|
network->channel, priv->channel);
|
|
network->channel, priv->channel);
|
|
return 0;
|
|
return 0;
|
|
@@ -5609,10 +5578,8 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
|
|
/* Verify privacy compatibility */
|
|
/* Verify privacy compatibility */
|
|
if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
|
|
if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
|
|
((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
|
|
((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
|
|
- IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
|
|
|
|
- "because of privacy mismatch: %s != %s.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of privacy mismatch: %s != %s.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid,
|
|
network->bssid,
|
|
priv->
|
|
priv->
|
|
capability & CAP_PRIVACY_ON ? "on" : "off",
|
|
capability & CAP_PRIVACY_ON ? "on" : "off",
|
|
@@ -5623,22 +5590,16 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
|
|
}
|
|
}
|
|
|
|
|
|
if (ether_addr_equal(network->bssid, priv->bssid)) {
|
|
if (ether_addr_equal(network->bssid, priv->bssid)) {
|
|
- IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
|
|
|
|
- "because of the same BSSID match: %pM"
|
|
|
|
- ".\n", print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
- network->bssid,
|
|
|
|
- priv->bssid);
|
|
|
|
|
|
+ IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of the same BSSID match: %pM.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
|
|
+ network->bssid, priv->bssid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
/* Filter out any incompatible freq / mode combinations */
|
|
/* Filter out any incompatible freq / mode combinations */
|
|
if (!libipw_is_valid_mode(priv->ieee, network->mode)) {
|
|
if (!libipw_is_valid_mode(priv->ieee, network->mode)) {
|
|
- IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
|
|
|
|
- "because of invalid frequency/mode "
|
|
|
|
- "combination.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of invalid frequency/mode combination.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid);
|
|
network->bssid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -5646,20 +5607,15 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
|
|
/* Ensure that the rates supported by the driver are compatible with
|
|
/* Ensure that the rates supported by the driver are compatible with
|
|
* this AP, including verification of basic rates (mandatory) */
|
|
* this AP, including verification of basic rates (mandatory) */
|
|
if (!ipw_compatible_rates(priv, network, &rates)) {
|
|
if (!ipw_compatible_rates(priv, network, &rates)) {
|
|
- IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
|
|
|
|
- "because configured rate mask excludes "
|
|
|
|
- "AP mandatory rate.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because configured rate mask excludes AP mandatory rate.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid);
|
|
network->bssid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
if (rates.num_rates == 0) {
|
|
if (rates.num_rates == 0) {
|
|
- IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
|
|
|
|
- "because of no compatible rates.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of no compatible rates.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid);
|
|
network->bssid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -5671,16 +5627,14 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
|
|
/* Set up 'new' AP to this network */
|
|
/* Set up 'new' AP to this network */
|
|
ipw_copy_rates(&match->rates, &rates);
|
|
ipw_copy_rates(&match->rates, &rates);
|
|
match->network = network;
|
|
match->network = network;
|
|
- IPW_DEBUG_MERGE("Network '%s (%pM)' is a viable match.\n",
|
|
|
|
- print_ssid(ssid, network->ssid, network->ssid_len),
|
|
|
|
- network->bssid);
|
|
|
|
|
|
+ IPW_DEBUG_MERGE("Network '%*pE (%pM)' is a viable match.\n",
|
|
|
|
+ network->ssid_len, network->ssid, network->bssid);
|
|
|
|
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
|
|
static void ipw_merge_adhoc_network(struct work_struct *work)
|
|
static void ipw_merge_adhoc_network(struct work_struct *work)
|
|
{
|
|
{
|
|
- DECLARE_SSID_BUF(ssid);
|
|
|
|
struct ipw_priv *priv =
|
|
struct ipw_priv *priv =
|
|
container_of(work, struct ipw_priv, merge_networks);
|
|
container_of(work, struct ipw_priv, merge_networks);
|
|
struct libipw_network *network = NULL;
|
|
struct libipw_network *network = NULL;
|
|
@@ -5710,9 +5664,8 @@ static void ipw_merge_adhoc_network(struct work_struct *work)
|
|
|
|
|
|
mutex_lock(&priv->mutex);
|
|
mutex_lock(&priv->mutex);
|
|
if ((priv->ieee->iw_mode == IW_MODE_ADHOC)) {
|
|
if ((priv->ieee->iw_mode == IW_MODE_ADHOC)) {
|
|
- IPW_DEBUG_MERGE("remove network %s\n",
|
|
|
|
- print_ssid(ssid, priv->essid,
|
|
|
|
- priv->essid_len));
|
|
|
|
|
|
+ IPW_DEBUG_MERGE("remove network %*pE\n",
|
|
|
|
+ priv->essid_len, priv->essid);
|
|
ipw_remove_current_network(priv);
|
|
ipw_remove_current_network(priv);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -5728,7 +5681,6 @@ static int ipw_best_network(struct ipw_priv *priv,
|
|
struct libipw_network *network, int roaming)
|
|
struct libipw_network *network, int roaming)
|
|
{
|
|
{
|
|
struct ipw_supported_rates rates;
|
|
struct ipw_supported_rates rates;
|
|
- DECLARE_SSID_BUF(ssid);
|
|
|
|
|
|
|
|
/* Verify that this network's capability is compatible with the
|
|
/* Verify that this network's capability is compatible with the
|
|
* current mode (AdHoc or Infrastructure) */
|
|
* current mode (AdHoc or Infrastructure) */
|
|
@@ -5736,10 +5688,8 @@ static int ipw_best_network(struct ipw_priv *priv,
|
|
!(network->capability & WLAN_CAPABILITY_ESS)) ||
|
|
!(network->capability & WLAN_CAPABILITY_ESS)) ||
|
|
(priv->ieee->iw_mode == IW_MODE_ADHOC &&
|
|
(priv->ieee->iw_mode == IW_MODE_ADHOC &&
|
|
!(network->capability & WLAN_CAPABILITY_IBSS))) {
|
|
!(network->capability & WLAN_CAPABILITY_IBSS))) {
|
|
- IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded due to "
|
|
|
|
- "capability mismatch.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded due to capability mismatch.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid);
|
|
network->bssid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -5750,10 +5700,8 @@ static int ipw_best_network(struct ipw_priv *priv,
|
|
if ((network->ssid_len != match->network->ssid_len) ||
|
|
if ((network->ssid_len != match->network->ssid_len) ||
|
|
memcmp(network->ssid, match->network->ssid,
|
|
memcmp(network->ssid, match->network->ssid,
|
|
network->ssid_len)) {
|
|
network->ssid_len)) {
|
|
- IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
|
|
|
|
- "because of non-network ESSID.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of non-network ESSID.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid);
|
|
network->bssid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -5764,16 +5712,10 @@ static int ipw_best_network(struct ipw_priv *priv,
|
|
((network->ssid_len != priv->essid_len) ||
|
|
((network->ssid_len != priv->essid_len) ||
|
|
memcmp(network->ssid, priv->essid,
|
|
memcmp(network->ssid, priv->essid,
|
|
min(network->ssid_len, priv->essid_len)))) {
|
|
min(network->ssid_len, priv->essid_len)))) {
|
|
- char escaped[IW_ESSID_MAX_SIZE * 2 + 1];
|
|
|
|
- strlcpy(escaped,
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
- sizeof(escaped));
|
|
|
|
- IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
|
|
|
|
- "because of ESSID mismatch: '%s'.\n",
|
|
|
|
- escaped, network->bssid,
|
|
|
|
- print_ssid(ssid, priv->essid,
|
|
|
|
- priv->essid_len));
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of ESSID mismatch: '%*pE'.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
|
|
+ network->bssid, priv->essid_len,
|
|
|
|
+ priv->essid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -5781,16 +5723,10 @@ static int ipw_best_network(struct ipw_priv *priv,
|
|
/* If the old network rate is better than this one, don't bother
|
|
/* If the old network rate is better than this one, don't bother
|
|
* testing everything else. */
|
|
* testing everything else. */
|
|
if (match->network && match->network->stats.rssi > network->stats.rssi) {
|
|
if (match->network && match->network->stats.rssi > network->stats.rssi) {
|
|
- char escaped[IW_ESSID_MAX_SIZE * 2 + 1];
|
|
|
|
- strlcpy(escaped,
|
|
|
|
- print_ssid(ssid, network->ssid, network->ssid_len),
|
|
|
|
- sizeof(escaped));
|
|
|
|
- IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded because "
|
|
|
|
- "'%s (%pM)' has a stronger signal.\n",
|
|
|
|
- escaped, network->bssid,
|
|
|
|
- print_ssid(ssid, match->network->ssid,
|
|
|
|
- match->network->ssid_len),
|
|
|
|
- match->network->bssid);
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because '%*pE (%pM)' has a stronger signal.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
|
|
+ network->bssid, match->network->ssid_len,
|
|
|
|
+ match->network->ssid, match->network->bssid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -5798,11 +5734,8 @@ static int ipw_best_network(struct ipw_priv *priv,
|
|
* last 3 seconds, do not try and associate again... */
|
|
* last 3 seconds, do not try and associate again... */
|
|
if (network->last_associate &&
|
|
if (network->last_associate &&
|
|
time_after(network->last_associate + (HZ * 3UL), jiffies)) {
|
|
time_after(network->last_associate + (HZ * 3UL), jiffies)) {
|
|
- IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
|
|
|
|
- "because of storming (%ums since last "
|
|
|
|
- "assoc attempt).\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of storming (%ums since last assoc attempt).\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid,
|
|
network->bssid,
|
|
jiffies_to_msecs(jiffies -
|
|
jiffies_to_msecs(jiffies -
|
|
network->last_associate));
|
|
network->last_associate));
|
|
@@ -5812,10 +5745,8 @@ static int ipw_best_network(struct ipw_priv *priv,
|
|
/* Now go through and see if the requested network is valid... */
|
|
/* Now go through and see if the requested network is valid... */
|
|
if (priv->ieee->scan_age != 0 &&
|
|
if (priv->ieee->scan_age != 0 &&
|
|
time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) {
|
|
time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) {
|
|
- IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
|
|
|
|
- "because of age: %ums.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of age: %ums.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid,
|
|
network->bssid,
|
|
jiffies_to_msecs(jiffies -
|
|
jiffies_to_msecs(jiffies -
|
|
network->last_scanned));
|
|
network->last_scanned));
|
|
@@ -5824,10 +5755,8 @@ static int ipw_best_network(struct ipw_priv *priv,
|
|
|
|
|
|
if ((priv->config & CFG_STATIC_CHANNEL) &&
|
|
if ((priv->config & CFG_STATIC_CHANNEL) &&
|
|
(network->channel != priv->channel)) {
|
|
(network->channel != priv->channel)) {
|
|
- IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
|
|
|
|
- "because of channel mismatch: %d != %d.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of channel mismatch: %d != %d.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid,
|
|
network->bssid,
|
|
network->channel, priv->channel);
|
|
network->channel, priv->channel);
|
|
return 0;
|
|
return 0;
|
|
@@ -5836,10 +5765,8 @@ static int ipw_best_network(struct ipw_priv *priv,
|
|
/* Verify privacy compatibility */
|
|
/* Verify privacy compatibility */
|
|
if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
|
|
if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
|
|
((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
|
|
((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
|
|
- IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
|
|
|
|
- "because of privacy mismatch: %s != %s.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of privacy mismatch: %s != %s.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid,
|
|
network->bssid,
|
|
priv->capability & CAP_PRIVACY_ON ? "on" :
|
|
priv->capability & CAP_PRIVACY_ON ? "on" :
|
|
"off",
|
|
"off",
|
|
@@ -5850,31 +5777,24 @@ static int ipw_best_network(struct ipw_priv *priv,
|
|
|
|
|
|
if ((priv->config & CFG_STATIC_BSSID) &&
|
|
if ((priv->config & CFG_STATIC_BSSID) &&
|
|
!ether_addr_equal(network->bssid, priv->bssid)) {
|
|
!ether_addr_equal(network->bssid, priv->bssid)) {
|
|
- IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
|
|
|
|
- "because of BSSID mismatch: %pM.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of BSSID mismatch: %pM.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid, priv->bssid);
|
|
network->bssid, priv->bssid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
/* Filter out any incompatible freq / mode combinations */
|
|
/* Filter out any incompatible freq / mode combinations */
|
|
if (!libipw_is_valid_mode(priv->ieee, network->mode)) {
|
|
if (!libipw_is_valid_mode(priv->ieee, network->mode)) {
|
|
- IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
|
|
|
|
- "because of invalid frequency/mode "
|
|
|
|
- "combination.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of invalid frequency/mode combination.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid);
|
|
network->bssid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
/* Filter out invalid channel in current GEO */
|
|
/* Filter out invalid channel in current GEO */
|
|
if (!libipw_is_valid_channel(priv->ieee, network->channel)) {
|
|
if (!libipw_is_valid_channel(priv->ieee, network->channel)) {
|
|
- IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
|
|
|
|
- "because of invalid channel in current GEO\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of invalid channel in current GEO\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid);
|
|
network->bssid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -5882,20 +5802,15 @@ static int ipw_best_network(struct ipw_priv *priv,
|
|
/* Ensure that the rates supported by the driver are compatible with
|
|
/* Ensure that the rates supported by the driver are compatible with
|
|
* this AP, including verification of basic rates (mandatory) */
|
|
* this AP, including verification of basic rates (mandatory) */
|
|
if (!ipw_compatible_rates(priv, network, &rates)) {
|
|
if (!ipw_compatible_rates(priv, network, &rates)) {
|
|
- IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
|
|
|
|
- "because configured rate mask excludes "
|
|
|
|
- "AP mandatory rate.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because configured rate mask excludes AP mandatory rate.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid);
|
|
network->bssid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
if (rates.num_rates == 0) {
|
|
if (rates.num_rates == 0) {
|
|
- IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
|
|
|
|
- "because of no compatible rates.\n",
|
|
|
|
- print_ssid(ssid, network->ssid,
|
|
|
|
- network->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of no compatible rates.\n",
|
|
|
|
+ network->ssid_len, network->ssid,
|
|
network->bssid);
|
|
network->bssid);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -5908,9 +5823,8 @@ static int ipw_best_network(struct ipw_priv *priv,
|
|
ipw_copy_rates(&match->rates, &rates);
|
|
ipw_copy_rates(&match->rates, &rates);
|
|
match->network = network;
|
|
match->network = network;
|
|
|
|
|
|
- IPW_DEBUG_ASSOC("Network '%s (%pM)' is a viable match.\n",
|
|
|
|
- print_ssid(ssid, network->ssid, network->ssid_len),
|
|
|
|
- network->bssid);
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("Network '%*pE (%pM)' is a viable match.\n",
|
|
|
|
+ network->ssid_len, network->ssid, network->bssid);
|
|
|
|
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
@@ -6152,7 +6066,6 @@ static void ipw_bg_adhoc_check(struct work_struct *work)
|
|
|
|
|
|
static void ipw_debug_config(struct ipw_priv *priv)
|
|
static void ipw_debug_config(struct ipw_priv *priv)
|
|
{
|
|
{
|
|
- DECLARE_SSID_BUF(ssid);
|
|
|
|
IPW_DEBUG_INFO("Scan completed, no valid APs matched "
|
|
IPW_DEBUG_INFO("Scan completed, no valid APs matched "
|
|
"[CFG 0x%08X]\n", priv->config);
|
|
"[CFG 0x%08X]\n", priv->config);
|
|
if (priv->config & CFG_STATIC_CHANNEL)
|
|
if (priv->config & CFG_STATIC_CHANNEL)
|
|
@@ -6160,8 +6073,8 @@ static void ipw_debug_config(struct ipw_priv *priv)
|
|
else
|
|
else
|
|
IPW_DEBUG_INFO("Channel unlocked.\n");
|
|
IPW_DEBUG_INFO("Channel unlocked.\n");
|
|
if (priv->config & CFG_STATIC_ESSID)
|
|
if (priv->config & CFG_STATIC_ESSID)
|
|
- IPW_DEBUG_INFO("ESSID locked to '%s'\n",
|
|
|
|
- print_ssid(ssid, priv->essid, priv->essid_len));
|
|
|
|
|
|
+ IPW_DEBUG_INFO("ESSID locked to '%*pE'\n",
|
|
|
|
+ priv->essid_len, priv->essid);
|
|
else
|
|
else
|
|
IPW_DEBUG_INFO("ESSID unlocked.\n");
|
|
IPW_DEBUG_INFO("ESSID unlocked.\n");
|
|
if (priv->config & CFG_STATIC_BSSID)
|
|
if (priv->config & CFG_STATIC_BSSID)
|
|
@@ -7385,7 +7298,6 @@ static int ipw_associate_network(struct ipw_priv *priv,
|
|
struct ipw_supported_rates *rates, int roaming)
|
|
struct ipw_supported_rates *rates, int roaming)
|
|
{
|
|
{
|
|
int err;
|
|
int err;
|
|
- DECLARE_SSID_BUF(ssid);
|
|
|
|
|
|
|
|
if (priv->config & CFG_FIXED_RATE)
|
|
if (priv->config & CFG_FIXED_RATE)
|
|
ipw_set_fixed_rate(priv, network->mode);
|
|
ipw_set_fixed_rate(priv, network->mode);
|
|
@@ -7451,10 +7363,9 @@ static int ipw_associate_network(struct ipw_priv *priv,
|
|
priv->assoc_request.capability &=
|
|
priv->assoc_request.capability &=
|
|
~cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME);
|
|
~cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME);
|
|
|
|
|
|
- IPW_DEBUG_ASSOC("%ssociation attempt: '%s', channel %d, "
|
|
|
|
- "802.11%c [%d], %s[:%s], enc=%s%s%s%c%c\n",
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("%ssociation attempt: '%*pE', channel %d, 802.11%c [%d], %s[:%s], enc=%s%s%s%c%c\n",
|
|
roaming ? "Rea" : "A",
|
|
roaming ? "Rea" : "A",
|
|
- print_ssid(ssid, priv->essid, priv->essid_len),
|
|
|
|
|
|
+ priv->essid_len, priv->essid,
|
|
network->channel,
|
|
network->channel,
|
|
ipw_modes[priv->assoc_request.ieee_mode],
|
|
ipw_modes[priv->assoc_request.ieee_mode],
|
|
rates->num_rates,
|
|
rates->num_rates,
|
|
@@ -7553,9 +7464,8 @@ static int ipw_associate_network(struct ipw_priv *priv,
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
- IPW_DEBUG(IPW_DL_STATE, "associating: '%s' %pM\n",
|
|
|
|
- print_ssid(ssid, priv->essid, priv->essid_len),
|
|
|
|
- priv->bssid);
|
|
|
|
|
|
+ IPW_DEBUG(IPW_DL_STATE, "associating: '%*pE' %pM\n",
|
|
|
|
+ priv->essid_len, priv->essid, priv->bssid);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -7645,7 +7555,6 @@ static int ipw_associate(void *data)
|
|
struct ipw_supported_rates *rates;
|
|
struct ipw_supported_rates *rates;
|
|
struct list_head *element;
|
|
struct list_head *element;
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
- DECLARE_SSID_BUF(ssid);
|
|
|
|
|
|
|
|
if (priv->ieee->iw_mode == IW_MODE_MONITOR) {
|
|
if (priv->ieee->iw_mode == IW_MODE_MONITOR) {
|
|
IPW_DEBUG_ASSOC("Not attempting association (monitor mode)\n");
|
|
IPW_DEBUG_ASSOC("Not attempting association (monitor mode)\n");
|
|
@@ -7704,10 +7613,8 @@ static int ipw_associate(void *data)
|
|
/* If there are no more slots, expire the oldest */
|
|
/* If there are no more slots, expire the oldest */
|
|
list_del(&oldest->list);
|
|
list_del(&oldest->list);
|
|
target = oldest;
|
|
target = oldest;
|
|
- IPW_DEBUG_ASSOC("Expired '%s' (%pM) from "
|
|
|
|
- "network list.\n",
|
|
|
|
- print_ssid(ssid, target->ssid,
|
|
|
|
- target->ssid_len),
|
|
|
|
|
|
+ IPW_DEBUG_ASSOC("Expired '%*pE' (%pM) from network list.\n",
|
|
|
|
+ target->ssid_len, target->ssid,
|
|
target->bssid);
|
|
target->bssid);
|
|
list_add_tail(&target->list,
|
|
list_add_tail(&target->list,
|
|
&priv->ieee->network_free_list);
|
|
&priv->ieee->network_free_list);
|
|
@@ -9093,7 +9000,6 @@ static int ipw_wx_set_essid(struct net_device *dev,
|
|
{
|
|
{
|
|
struct ipw_priv *priv = libipw_priv(dev);
|
|
struct ipw_priv *priv = libipw_priv(dev);
|
|
int length;
|
|
int length;
|
|
- DECLARE_SSID_BUF(ssid);
|
|
|
|
|
|
|
|
mutex_lock(&priv->mutex);
|
|
mutex_lock(&priv->mutex);
|
|
|
|
|
|
@@ -9118,8 +9024,7 @@ static int ipw_wx_set_essid(struct net_device *dev,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
- IPW_DEBUG_WX("Setting ESSID: '%s' (%d)\n",
|
|
|
|
- print_ssid(ssid, extra, length), length);
|
|
|
|
|
|
+ IPW_DEBUG_WX("Setting ESSID: '%*pE' (%d)\n", length, extra, length);
|
|
|
|
|
|
priv->essid_len = length;
|
|
priv->essid_len = length;
|
|
memcpy(priv->essid, extra, priv->essid_len);
|
|
memcpy(priv->essid, extra, priv->essid_len);
|
|
@@ -9138,15 +9043,14 @@ static int ipw_wx_get_essid(struct net_device *dev,
|
|
union iwreq_data *wrqu, char *extra)
|
|
union iwreq_data *wrqu, char *extra)
|
|
{
|
|
{
|
|
struct ipw_priv *priv = libipw_priv(dev);
|
|
struct ipw_priv *priv = libipw_priv(dev);
|
|
- DECLARE_SSID_BUF(ssid);
|
|
|
|
|
|
|
|
/* If we are associated, trying to associate, or have a statically
|
|
/* If we are associated, trying to associate, or have a statically
|
|
* configured ESSID then return that; otherwise return ANY */
|
|
* configured ESSID then return that; otherwise return ANY */
|
|
mutex_lock(&priv->mutex);
|
|
mutex_lock(&priv->mutex);
|
|
if (priv->config & CFG_STATIC_ESSID ||
|
|
if (priv->config & CFG_STATIC_ESSID ||
|
|
priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING)) {
|
|
priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING)) {
|
|
- IPW_DEBUG_WX("Getting essid: '%s'\n",
|
|
|
|
- print_ssid(ssid, priv->essid, priv->essid_len));
|
|
|
|
|
|
+ IPW_DEBUG_WX("Getting essid: '%*pE'\n",
|
|
|
|
+ priv->essid_len, priv->essid);
|
|
memcpy(extra, priv->essid, priv->essid_len);
|
|
memcpy(extra, priv->essid, priv->essid_len);
|
|
wrqu->essid.length = priv->essid_len;
|
|
wrqu->essid.length = priv->essid_len;
|
|
wrqu->essid.flags = 1; /* active */
|
|
wrqu->essid.flags = 1; /* active */
|