aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2200.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-10-27 18:59:26 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-27 20:06:18 -0400
commite174961ca1a0b28f7abf0be47973ad57cb74e5f0 (patch)
treee8f74ecd420a0e380a71670e5aec5c2a0c15640a /drivers/net/wireless/ipw2200.c
parent0c68ae2605dbcf67414d8d1f19af93be44b355fb (diff)
net: convert print_mac to %pM
This converts pretty much everything to print_mac. There were a few things that had conflicts which I have just dropped for now, no harm done. I've built an allyesconfig with this and looked at the files that weren't built very carefully, but it's a huge patch. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/ipw2200.c')
-rw-r--r--drivers/net/wireless/ipw2200.c217
1 files changed, 95 insertions, 122 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index dcce3542d5a7..d0bfd8621119 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -2265,8 +2265,8 @@ static int ipw_send_adapter_address(struct ipw_priv *priv, u8 * mac)
2265 return -1; 2265 return -1;
2266 } 2266 }
2267 2267
2268 IPW_DEBUG_INFO("%s: Setting MAC to %s\n", 2268 IPW_DEBUG_INFO("%s: Setting MAC to %pM\n",
2269 priv->net_dev->name, print_mac(mac, mac)); 2269 priv->net_dev->name, mac);
2270 2270
2271 return ipw_send_cmd_pdu(priv, IPW_CMD_ADAPTER_ADDRESS, ETH_ALEN, mac); 2271 return ipw_send_cmd_pdu(priv, IPW_CMD_ADAPTER_ADDRESS, ETH_ALEN, mac);
2272} 2272}
@@ -3812,7 +3812,6 @@ static u8 ipw_add_station(struct ipw_priv *priv, u8 * bssid)
3812{ 3812{
3813 struct ipw_station_entry entry; 3813 struct ipw_station_entry entry;
3814 int i; 3814 int i;
3815 DECLARE_MAC_BUF(mac);
3816 3815
3817 for (i = 0; i < priv->num_stations; i++) { 3816 for (i = 0; i < priv->num_stations; i++) {
3818 if (!memcmp(priv->stations[i], bssid, ETH_ALEN)) { 3817 if (!memcmp(priv->stations[i], bssid, ETH_ALEN)) {
@@ -3829,7 +3828,7 @@ static u8 ipw_add_station(struct ipw_priv *priv, u8 * bssid)
3829 if (i == MAX_STATIONS) 3828 if (i == MAX_STATIONS)
3830 return IPW_INVALID_STATION; 3829 return IPW_INVALID_STATION;
3831 3830
3832 IPW_DEBUG_SCAN("Adding AdHoc station: %s\n", print_mac(mac, bssid)); 3831 IPW_DEBUG_SCAN("Adding AdHoc station: %pM\n", bssid);
3833 3832
3834 entry.reserved = 0; 3833 entry.reserved = 0;
3835 entry.support_mode = 0; 3834 entry.support_mode = 0;
@@ -3856,7 +3855,6 @@ static u8 ipw_find_station(struct ipw_priv *priv, u8 * bssid)
3856static void ipw_send_disassociate(struct ipw_priv *priv, int quiet) 3855static void ipw_send_disassociate(struct ipw_priv *priv, int quiet)
3857{ 3856{
3858 int err; 3857 int err;
3859 DECLARE_MAC_BUF(mac);
3860 3858
3861 if (priv->status & STATUS_ASSOCIATING) { 3859 if (priv->status & STATUS_ASSOCIATING) {
3862 IPW_DEBUG_ASSOC("Disassociating while associating.\n"); 3860 IPW_DEBUG_ASSOC("Disassociating while associating.\n");
@@ -3869,9 +3867,9 @@ static void ipw_send_disassociate(struct ipw_priv *priv, int quiet)
3869 return; 3867 return;
3870 } 3868 }
3871 3869
3872 IPW_DEBUG_ASSOC("Disassocation attempt from %s " 3870 IPW_DEBUG_ASSOC("Disassocation attempt from %pM "
3873 "on channel %d.\n", 3871 "on channel %d.\n",
3874 print_mac(mac, priv->assoc_request.bssid), 3872 priv->assoc_request.bssid,
3875 priv->assoc_request.channel); 3873 priv->assoc_request.channel);
3876 3874
3877 priv->status &= ~(STATUS_ASSOCIATING | STATUS_ASSOCIATED); 3875 priv->status &= ~(STATUS_ASSOCIATING | STATUS_ASSOCIATED);
@@ -4397,7 +4395,6 @@ static void handle_scan_event(struct ipw_priv *priv)
4397static void ipw_rx_notification(struct ipw_priv *priv, 4395static void ipw_rx_notification(struct ipw_priv *priv,
4398 struct ipw_rx_notification *notif) 4396 struct ipw_rx_notification *notif)
4399{ 4397{
4400 DECLARE_MAC_BUF(mac);
4401 u16 size = le16_to_cpu(notif->size); 4398 u16 size = le16_to_cpu(notif->size);
4402 notif->size = le16_to_cpu(notif->size); 4399 notif->size = le16_to_cpu(notif->size);
4403 4400
@@ -4411,11 +4408,10 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4411 case CMAS_ASSOCIATED:{ 4408 case CMAS_ASSOCIATED:{
4412 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | 4409 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
4413 IPW_DL_ASSOC, 4410 IPW_DL_ASSOC,
4414 "associated: '%s' %s" 4411 "associated: '%s' %pM \n",
4415 " \n",
4416 escape_essid(priv->essid, 4412 escape_essid(priv->essid,
4417 priv->essid_len), 4413 priv->essid_len),
4418 print_mac(mac, priv->bssid)); 4414 priv->bssid);
4419 4415
4420 switch (priv->ieee->iw_mode) { 4416 switch (priv->ieee->iw_mode) {
4421 case IW_MODE_INFRA: 4417 case IW_MODE_INFRA:
@@ -4492,13 +4488,13 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4492 IPW_DL_STATE | 4488 IPW_DL_STATE |
4493 IPW_DL_ASSOC, 4489 IPW_DL_ASSOC,
4494 "deauthenticated: '%s' " 4490 "deauthenticated: '%s' "
4495 "%s" 4491 "%pM"
4496 ": (0x%04X) - %s \n", 4492 ": (0x%04X) - %s \n",
4497 escape_essid(priv-> 4493 escape_essid(priv->
4498 essid, 4494 essid,
4499 priv-> 4495 priv->
4500 essid_len), 4496 essid_len),
4501 print_mac(mac, priv->bssid), 4497 priv->bssid,
4502 le16_to_cpu(auth->status), 4498 le16_to_cpu(auth->status),
4503 ipw_get_status_code 4499 ipw_get_status_code
4504 (le16_to_cpu 4500 (le16_to_cpu
@@ -4515,11 +4511,10 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4515 4511
4516 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | 4512 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
4517 IPW_DL_ASSOC, 4513 IPW_DL_ASSOC,
4518 "authenticated: '%s' %s" 4514 "authenticated: '%s' %pM\n",
4519 "\n",
4520 escape_essid(priv->essid, 4515 escape_essid(priv->essid,
4521 priv->essid_len), 4516 priv->essid_len),
4522 print_mac(mac, priv->bssid)); 4517 priv->bssid);
4523 break; 4518 break;
4524 } 4519 }
4525 4520
@@ -4544,11 +4539,10 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4544 4539
4545 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | 4540 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
4546 IPW_DL_ASSOC, 4541 IPW_DL_ASSOC,
4547 "disassociated: '%s' %s" 4542 "disassociated: '%s' %pM \n",
4548 " \n",
4549 escape_essid(priv->essid, 4543 escape_essid(priv->essid,
4550 priv->essid_len), 4544 priv->essid_len),
4551 print_mac(mac, priv->bssid)); 4545 priv->bssid);
4552 4546
4553 priv->status &= 4547 priv->status &=
4554 ~(STATUS_DISASSOCIATING | 4548 ~(STATUS_DISASSOCIATING |
@@ -4583,10 +4577,10 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4583 switch (auth->state) { 4577 switch (auth->state) {
4584 case CMAS_AUTHENTICATED: 4578 case CMAS_AUTHENTICATED:
4585 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE, 4579 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE,
4586 "authenticated: '%s' %s \n", 4580 "authenticated: '%s' %pM \n",
4587 escape_essid(priv->essid, 4581 escape_essid(priv->essid,
4588 priv->essid_len), 4582 priv->essid_len),
4589 print_mac(mac, priv->bssid)); 4583 priv->bssid);
4590 priv->status |= STATUS_AUTH; 4584 priv->status |= STATUS_AUTH;
4591 break; 4585 break;
4592 4586
@@ -4602,10 +4596,10 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4602 } 4596 }
4603 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | 4597 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
4604 IPW_DL_ASSOC, 4598 IPW_DL_ASSOC,
4605 "deauthenticated: '%s' %s\n", 4599 "deauthenticated: '%s' %pM\n",
4606 escape_essid(priv->essid, 4600 escape_essid(priv->essid,
4607 priv->essid_len), 4601 priv->essid_len),
4608 print_mac(mac, priv->bssid)); 4602 priv->bssid);
4609 4603
4610 priv->status &= ~(STATUS_ASSOCIATING | 4604 priv->status &= ~(STATUS_ASSOCIATING |
4611 STATUS_AUTH | 4605 STATUS_AUTH |
@@ -5429,27 +5423,25 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5429 int roaming) 5423 int roaming)
5430{ 5424{
5431 struct ipw_supported_rates rates; 5425 struct ipw_supported_rates rates;
5432 DECLARE_MAC_BUF(mac);
5433 DECLARE_MAC_BUF(mac2);
5434 5426
5435 /* Verify that this network's capability is compatible with the 5427 /* Verify that this network's capability is compatible with the
5436 * current mode (AdHoc or Infrastructure) */ 5428 * current mode (AdHoc or Infrastructure) */
5437 if ((priv->ieee->iw_mode == IW_MODE_ADHOC && 5429 if ((priv->ieee->iw_mode == IW_MODE_ADHOC &&
5438 !(network->capability & WLAN_CAPABILITY_IBSS))) { 5430 !(network->capability & WLAN_CAPABILITY_IBSS))) {
5439 IPW_DEBUG_MERGE("Network '%s (%s)' excluded due to " 5431 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded due to "
5440 "capability mismatch.\n", 5432 "capability mismatch.\n",
5441 escape_essid(network->ssid, network->ssid_len), 5433 escape_essid(network->ssid, network->ssid_len),
5442 print_mac(mac, network->bssid)); 5434 network->bssid);
5443 return 0; 5435 return 0;
5444 } 5436 }
5445 5437
5446 /* If we do not have an ESSID for this AP, we can not associate with 5438 /* If we do not have an ESSID for this AP, we can not associate with
5447 * it */ 5439 * it */
5448 if (network->flags & NETWORK_EMPTY_ESSID) { 5440 if (network->flags & NETWORK_EMPTY_ESSID) {
5449 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5441 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5450 "because of hidden ESSID.\n", 5442 "because of hidden ESSID.\n",
5451 escape_essid(network->ssid, network->ssid_len), 5443 escape_essid(network->ssid, network->ssid_len),
5452 print_mac(mac, network->bssid)); 5444 network->bssid);
5453 return 0; 5445 return 0;
5454 } 5446 }
5455 5447
@@ -5459,11 +5451,11 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5459 if ((network->ssid_len != match->network->ssid_len) || 5451 if ((network->ssid_len != match->network->ssid_len) ||
5460 memcmp(network->ssid, match->network->ssid, 5452 memcmp(network->ssid, match->network->ssid,
5461 network->ssid_len)) { 5453 network->ssid_len)) {
5462 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5454 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5463 "because of non-network ESSID.\n", 5455 "because of non-network ESSID.\n",
5464 escape_essid(network->ssid, 5456 escape_essid(network->ssid,
5465 network->ssid_len), 5457 network->ssid_len),
5466 print_mac(mac, network->bssid)); 5458 network->bssid);
5467 return 0; 5459 return 0;
5468 } 5460 }
5469 } else { 5461 } else {
@@ -5478,9 +5470,9 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5478 strncpy(escaped, 5470 strncpy(escaped,
5479 escape_essid(network->ssid, network->ssid_len), 5471 escape_essid(network->ssid, network->ssid_len),
5480 sizeof(escaped)); 5472 sizeof(escaped));
5481 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5473 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5482 "because of ESSID mismatch: '%s'.\n", 5474 "because of ESSID mismatch: '%s'.\n",
5483 escaped, print_mac(mac, network->bssid), 5475 escaped, network->bssid,
5484 escape_essid(priv->essid, 5476 escape_essid(priv->essid,
5485 priv->essid_len)); 5477 priv->essid_len));
5486 return 0; 5478 return 0;
@@ -5507,10 +5499,10 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5507 /* Now go through and see if the requested network is valid... */ 5499 /* Now go through and see if the requested network is valid... */
5508 if (priv->ieee->scan_age != 0 && 5500 if (priv->ieee->scan_age != 0 &&
5509 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) { 5501 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) {
5510 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5502 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5511 "because of age: %ums.\n", 5503 "because of age: %ums.\n",
5512 escape_essid(network->ssid, network->ssid_len), 5504 escape_essid(network->ssid, network->ssid_len),
5513 print_mac(mac, network->bssid), 5505 network->bssid,
5514 jiffies_to_msecs(jiffies - 5506 jiffies_to_msecs(jiffies -
5515 network->last_scanned)); 5507 network->last_scanned));
5516 return 0; 5508 return 0;
@@ -5518,10 +5510,10 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5518 5510
5519 if ((priv->config & CFG_STATIC_CHANNEL) && 5511 if ((priv->config & CFG_STATIC_CHANNEL) &&
5520 (network->channel != priv->channel)) { 5512 (network->channel != priv->channel)) {
5521 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5513 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5522 "because of channel mismatch: %d != %d.\n", 5514 "because of channel mismatch: %d != %d.\n",
5523 escape_essid(network->ssid, network->ssid_len), 5515 escape_essid(network->ssid, network->ssid_len),
5524 print_mac(mac, network->bssid), 5516 network->bssid,
5525 network->channel, priv->channel); 5517 network->channel, priv->channel);
5526 return 0; 5518 return 0;
5527 } 5519 }
@@ -5529,10 +5521,10 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5529 /* Verify privacy compatability */ 5521 /* Verify privacy compatability */
5530 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != 5522 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
5531 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { 5523 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
5532 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5524 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5533 "because of privacy mismatch: %s != %s.\n", 5525 "because of privacy mismatch: %s != %s.\n",
5534 escape_essid(network->ssid, network->ssid_len), 5526 escape_essid(network->ssid, network->ssid_len),
5535 print_mac(mac, network->bssid), 5527 network->bssid,
5536 priv-> 5528 priv->
5537 capability & CAP_PRIVACY_ON ? "on" : "off", 5529 capability & CAP_PRIVACY_ON ? "on" : "off",
5538 network-> 5530 network->
@@ -5542,41 +5534,41 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5542 } 5534 }
5543 5535
5544 if (!memcmp(network->bssid, priv->bssid, ETH_ALEN)) { 5536 if (!memcmp(network->bssid, priv->bssid, ETH_ALEN)) {
5545 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5537 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5546 "because of the same BSSID match: %s" 5538 "because of the same BSSID match: %pM"
5547 ".\n", escape_essid(network->ssid, 5539 ".\n", escape_essid(network->ssid,
5548 network->ssid_len), 5540 network->ssid_len),
5549 print_mac(mac, network->bssid), 5541 network->bssid,
5550 print_mac(mac2, priv->bssid)); 5542 priv->bssid);
5551 return 0; 5543 return 0;
5552 } 5544 }
5553 5545
5554 /* Filter out any incompatible freq / mode combinations */ 5546 /* Filter out any incompatible freq / mode combinations */
5555 if (!ieee80211_is_valid_mode(priv->ieee, network->mode)) { 5547 if (!ieee80211_is_valid_mode(priv->ieee, network->mode)) {
5556 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5548 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5557 "because of invalid frequency/mode " 5549 "because of invalid frequency/mode "
5558 "combination.\n", 5550 "combination.\n",
5559 escape_essid(network->ssid, network->ssid_len), 5551 escape_essid(network->ssid, network->ssid_len),
5560 print_mac(mac, network->bssid)); 5552 network->bssid);
5561 return 0; 5553 return 0;
5562 } 5554 }
5563 5555
5564 /* Ensure that the rates supported by the driver are compatible with 5556 /* Ensure that the rates supported by the driver are compatible with
5565 * this AP, including verification of basic rates (mandatory) */ 5557 * this AP, including verification of basic rates (mandatory) */
5566 if (!ipw_compatible_rates(priv, network, &rates)) { 5558 if (!ipw_compatible_rates(priv, network, &rates)) {
5567 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5559 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5568 "because configured rate mask excludes " 5560 "because configured rate mask excludes "
5569 "AP mandatory rate.\n", 5561 "AP mandatory rate.\n",
5570 escape_essid(network->ssid, network->ssid_len), 5562 escape_essid(network->ssid, network->ssid_len),
5571 print_mac(mac, network->bssid)); 5563 network->bssid);
5572 return 0; 5564 return 0;
5573 } 5565 }
5574 5566
5575 if (rates.num_rates == 0) { 5567 if (rates.num_rates == 0) {
5576 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5568 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5577 "because of no compatible rates.\n", 5569 "because of no compatible rates.\n",
5578 escape_essid(network->ssid, network->ssid_len), 5570 escape_essid(network->ssid, network->ssid_len),
5579 print_mac(mac, network->bssid)); 5571 network->bssid);
5580 return 0; 5572 return 0;
5581 } 5573 }
5582 5574
@@ -5587,9 +5579,9 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5587 /* Set up 'new' AP to this network */ 5579 /* Set up 'new' AP to this network */
5588 ipw_copy_rates(&match->rates, &rates); 5580 ipw_copy_rates(&match->rates, &rates);
5589 match->network = network; 5581 match->network = network;
5590 IPW_DEBUG_MERGE("Network '%s (%s)' is a viable match.\n", 5582 IPW_DEBUG_MERGE("Network '%s (%pM)' is a viable match.\n",
5591 escape_essid(network->ssid, network->ssid_len), 5583 escape_essid(network->ssid, network->ssid_len),
5592 print_mac(mac, network->bssid)); 5584 network->bssid);
5593 5585
5594 return 1; 5586 return 1;
5595} 5587}
@@ -5643,7 +5635,6 @@ static int ipw_best_network(struct ipw_priv *priv,
5643 struct ieee80211_network *network, int roaming) 5635 struct ieee80211_network *network, int roaming)
5644{ 5636{
5645 struct ipw_supported_rates rates; 5637 struct ipw_supported_rates rates;
5646 DECLARE_MAC_BUF(mac);
5647 5638
5648 /* Verify that this network's capability is compatible with the 5639 /* Verify that this network's capability is compatible with the
5649 * current mode (AdHoc or Infrastructure) */ 5640 * current mode (AdHoc or Infrastructure) */
@@ -5651,20 +5642,20 @@ static int ipw_best_network(struct ipw_priv *priv,
5651 !(network->capability & WLAN_CAPABILITY_ESS)) || 5642 !(network->capability & WLAN_CAPABILITY_ESS)) ||
5652 (priv->ieee->iw_mode == IW_MODE_ADHOC && 5643 (priv->ieee->iw_mode == IW_MODE_ADHOC &&
5653 !(network->capability & WLAN_CAPABILITY_IBSS))) { 5644 !(network->capability & WLAN_CAPABILITY_IBSS))) {
5654 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded due to " 5645 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded due to "
5655 "capability mismatch.\n", 5646 "capability mismatch.\n",
5656 escape_essid(network->ssid, network->ssid_len), 5647 escape_essid(network->ssid, network->ssid_len),
5657 print_mac(mac, network->bssid)); 5648 network->bssid);
5658 return 0; 5649 return 0;
5659 } 5650 }
5660 5651
5661 /* If we do not have an ESSID for this AP, we can not associate with 5652 /* If we do not have an ESSID for this AP, we can not associate with
5662 * it */ 5653 * it */
5663 if (network->flags & NETWORK_EMPTY_ESSID) { 5654 if (network->flags & NETWORK_EMPTY_ESSID) {
5664 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5655 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5665 "because of hidden ESSID.\n", 5656 "because of hidden ESSID.\n",
5666 escape_essid(network->ssid, network->ssid_len), 5657 escape_essid(network->ssid, network->ssid_len),
5667 print_mac(mac, network->bssid)); 5658 network->bssid);
5668 return 0; 5659 return 0;
5669 } 5660 }
5670 5661
@@ -5674,11 +5665,11 @@ static int ipw_best_network(struct ipw_priv *priv,
5674 if ((network->ssid_len != match->network->ssid_len) || 5665 if ((network->ssid_len != match->network->ssid_len) ||
5675 memcmp(network->ssid, match->network->ssid, 5666 memcmp(network->ssid, match->network->ssid,
5676 network->ssid_len)) { 5667 network->ssid_len)) {
5677 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5668 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5678 "because of non-network ESSID.\n", 5669 "because of non-network ESSID.\n",
5679 escape_essid(network->ssid, 5670 escape_essid(network->ssid,
5680 network->ssid_len), 5671 network->ssid_len),
5681 print_mac(mac, network->bssid)); 5672 network->bssid);
5682 return 0; 5673 return 0;
5683 } 5674 }
5684 } else { 5675 } else {
@@ -5692,9 +5683,9 @@ static int ipw_best_network(struct ipw_priv *priv,
5692 strncpy(escaped, 5683 strncpy(escaped,
5693 escape_essid(network->ssid, network->ssid_len), 5684 escape_essid(network->ssid, network->ssid_len),
5694 sizeof(escaped)); 5685 sizeof(escaped));
5695 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5686 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5696 "because of ESSID mismatch: '%s'.\n", 5687 "because of ESSID mismatch: '%s'.\n",
5697 escaped, print_mac(mac, network->bssid), 5688 escaped, network->bssid,
5698 escape_essid(priv->essid, 5689 escape_essid(priv->essid,
5699 priv->essid_len)); 5690 priv->essid_len));
5700 return 0; 5691 return 0;
@@ -5708,12 +5699,12 @@ static int ipw_best_network(struct ipw_priv *priv,
5708 strncpy(escaped, 5699 strncpy(escaped,
5709 escape_essid(network->ssid, network->ssid_len), 5700 escape_essid(network->ssid, network->ssid_len),
5710 sizeof(escaped)); 5701 sizeof(escaped));
5711 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded because " 5702 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded because "
5712 "'%s (%s)' has a stronger signal.\n", 5703 "'%s (%pM)' has a stronger signal.\n",
5713 escaped, print_mac(mac, network->bssid), 5704 escaped, network->bssid,
5714 escape_essid(match->network->ssid, 5705 escape_essid(match->network->ssid,
5715 match->network->ssid_len), 5706 match->network->ssid_len),
5716 print_mac(mac, match->network->bssid)); 5707 match->network->bssid);
5717 return 0; 5708 return 0;
5718 } 5709 }
5719 5710
@@ -5721,11 +5712,11 @@ static int ipw_best_network(struct ipw_priv *priv,
5721 * last 3 seconds, do not try and associate again... */ 5712 * last 3 seconds, do not try and associate again... */
5722 if (network->last_associate && 5713 if (network->last_associate &&
5723 time_after(network->last_associate + (HZ * 3UL), jiffies)) { 5714 time_after(network->last_associate + (HZ * 3UL), jiffies)) {
5724 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5715 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5725 "because of storming (%ums since last " 5716 "because of storming (%ums since last "
5726 "assoc attempt).\n", 5717 "assoc attempt).\n",
5727 escape_essid(network->ssid, network->ssid_len), 5718 escape_essid(network->ssid, network->ssid_len),
5728 print_mac(mac, network->bssid), 5719 network->bssid,
5729 jiffies_to_msecs(jiffies - 5720 jiffies_to_msecs(jiffies -
5730 network->last_associate)); 5721 network->last_associate));
5731 return 0; 5722 return 0;
@@ -5734,10 +5725,10 @@ static int ipw_best_network(struct ipw_priv *priv,
5734 /* Now go through and see if the requested network is valid... */ 5725 /* Now go through and see if the requested network is valid... */
5735 if (priv->ieee->scan_age != 0 && 5726 if (priv->ieee->scan_age != 0 &&
5736 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) { 5727 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) {
5737 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5728 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5738 "because of age: %ums.\n", 5729 "because of age: %ums.\n",
5739 escape_essid(network->ssid, network->ssid_len), 5730 escape_essid(network->ssid, network->ssid_len),
5740 print_mac(mac, network->bssid), 5731 network->bssid,
5741 jiffies_to_msecs(jiffies - 5732 jiffies_to_msecs(jiffies -
5742 network->last_scanned)); 5733 network->last_scanned));
5743 return 0; 5734 return 0;
@@ -5745,10 +5736,10 @@ static int ipw_best_network(struct ipw_priv *priv,
5745 5736
5746 if ((priv->config & CFG_STATIC_CHANNEL) && 5737 if ((priv->config & CFG_STATIC_CHANNEL) &&
5747 (network->channel != priv->channel)) { 5738 (network->channel != priv->channel)) {
5748 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5739 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5749 "because of channel mismatch: %d != %d.\n", 5740 "because of channel mismatch: %d != %d.\n",
5750 escape_essid(network->ssid, network->ssid_len), 5741 escape_essid(network->ssid, network->ssid_len),
5751 print_mac(mac, network->bssid), 5742 network->bssid,
5752 network->channel, priv->channel); 5743 network->channel, priv->channel);
5753 return 0; 5744 return 0;
5754 } 5745 }
@@ -5756,10 +5747,10 @@ static int ipw_best_network(struct ipw_priv *priv,
5756 /* Verify privacy compatability */ 5747 /* Verify privacy compatability */
5757 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != 5748 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
5758 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { 5749 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
5759 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5750 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5760 "because of privacy mismatch: %s != %s.\n", 5751 "because of privacy mismatch: %s != %s.\n",
5761 escape_essid(network->ssid, network->ssid_len), 5752 escape_essid(network->ssid, network->ssid_len),
5762 print_mac(mac, network->bssid), 5753 network->bssid,
5763 priv->capability & CAP_PRIVACY_ON ? "on" : 5754 priv->capability & CAP_PRIVACY_ON ? "on" :
5764 "off", 5755 "off",
5765 network->capability & 5756 network->capability &
@@ -5769,48 +5760,48 @@ static int ipw_best_network(struct ipw_priv *priv,
5769 5760
5770 if ((priv->config & CFG_STATIC_BSSID) && 5761 if ((priv->config & CFG_STATIC_BSSID) &&
5771 memcmp(network->bssid, priv->bssid, ETH_ALEN)) { 5762 memcmp(network->bssid, priv->bssid, ETH_ALEN)) {
5772 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5763 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5773 "because of BSSID mismatch: %s.\n", 5764 "because of BSSID mismatch: %pM.\n",
5774 escape_essid(network->ssid, network->ssid_len), 5765 escape_essid(network->ssid, network->ssid_len),
5775 print_mac(mac, network->bssid), print_mac(mac, priv->bssid)); 5766 network->bssid, priv->bssid);
5776 return 0; 5767 return 0;
5777 } 5768 }
5778 5769
5779 /* Filter out any incompatible freq / mode combinations */ 5770 /* Filter out any incompatible freq / mode combinations */
5780 if (!ieee80211_is_valid_mode(priv->ieee, network->mode)) { 5771 if (!ieee80211_is_valid_mode(priv->ieee, network->mode)) {
5781 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5772 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5782 "because of invalid frequency/mode " 5773 "because of invalid frequency/mode "
5783 "combination.\n", 5774 "combination.\n",
5784 escape_essid(network->ssid, network->ssid_len), 5775 escape_essid(network->ssid, network->ssid_len),
5785 print_mac(mac, network->bssid)); 5776 network->bssid);
5786 return 0; 5777 return 0;
5787 } 5778 }
5788 5779
5789 /* Filter out invalid channel in current GEO */ 5780 /* Filter out invalid channel in current GEO */
5790 if (!ieee80211_is_valid_channel(priv->ieee, network->channel)) { 5781 if (!ieee80211_is_valid_channel(priv->ieee, network->channel)) {
5791 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5782 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5792 "because of invalid channel in current GEO\n", 5783 "because of invalid channel in current GEO\n",
5793 escape_essid(network->ssid, network->ssid_len), 5784 escape_essid(network->ssid, network->ssid_len),
5794 print_mac(mac, network->bssid)); 5785 network->bssid);
5795 return 0; 5786 return 0;
5796 } 5787 }
5797 5788
5798 /* Ensure that the rates supported by the driver are compatible with 5789 /* Ensure that the rates supported by the driver are compatible with
5799 * this AP, including verification of basic rates (mandatory) */ 5790 * this AP, including verification of basic rates (mandatory) */
5800 if (!ipw_compatible_rates(priv, network, &rates)) { 5791 if (!ipw_compatible_rates(priv, network, &rates)) {
5801 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5792 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5802 "because configured rate mask excludes " 5793 "because configured rate mask excludes "
5803 "AP mandatory rate.\n", 5794 "AP mandatory rate.\n",
5804 escape_essid(network->ssid, network->ssid_len), 5795 escape_essid(network->ssid, network->ssid_len),
5805 print_mac(mac, network->bssid)); 5796 network->bssid);
5806 return 0; 5797 return 0;
5807 } 5798 }
5808 5799
5809 if (rates.num_rates == 0) { 5800 if (rates.num_rates == 0) {
5810 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5801 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5811 "because of no compatible rates.\n", 5802 "because of no compatible rates.\n",
5812 escape_essid(network->ssid, network->ssid_len), 5803 escape_essid(network->ssid, network->ssid_len),
5813 print_mac(mac, network->bssid)); 5804 network->bssid);
5814 return 0; 5805 return 0;
5815 } 5806 }
5816 5807
@@ -5822,9 +5813,9 @@ static int ipw_best_network(struct ipw_priv *priv,
5822 ipw_copy_rates(&match->rates, &rates); 5813 ipw_copy_rates(&match->rates, &rates);
5823 match->network = network; 5814 match->network = network;
5824 5815
5825 IPW_DEBUG_ASSOC("Network '%s (%s)' is a viable match.\n", 5816 IPW_DEBUG_ASSOC("Network '%s (%pM)' is a viable match.\n",
5826 escape_essid(network->ssid, network->ssid_len), 5817 escape_essid(network->ssid, network->ssid_len),
5827 print_mac(mac, network->bssid)); 5818 network->bssid);
5828 5819
5829 return 1; 5820 return 1;
5830} 5821}
@@ -6066,7 +6057,6 @@ static void ipw_bg_adhoc_check(struct work_struct *work)
6066 6057
6067static void ipw_debug_config(struct ipw_priv *priv) 6058static void ipw_debug_config(struct ipw_priv *priv)
6068{ 6059{
6069 DECLARE_MAC_BUF(mac);
6070 IPW_DEBUG_INFO("Scan completed, no valid APs matched " 6060 IPW_DEBUG_INFO("Scan completed, no valid APs matched "
6071 "[CFG 0x%08X]\n", priv->config); 6061 "[CFG 0x%08X]\n", priv->config);
6072 if (priv->config & CFG_STATIC_CHANNEL) 6062 if (priv->config & CFG_STATIC_CHANNEL)
@@ -6079,8 +6069,7 @@ static void ipw_debug_config(struct ipw_priv *priv)
6079 else 6069 else
6080 IPW_DEBUG_INFO("ESSID unlocked.\n"); 6070 IPW_DEBUG_INFO("ESSID unlocked.\n");
6081 if (priv->config & CFG_STATIC_BSSID) 6071 if (priv->config & CFG_STATIC_BSSID)
6082 IPW_DEBUG_INFO("BSSID locked to %s\n", 6072 IPW_DEBUG_INFO("BSSID locked to %pM\n", priv->bssid);
6083 print_mac(mac, priv->bssid));
6084 else 6073 else
6085 IPW_DEBUG_INFO("BSSID unlocked.\n"); 6074 IPW_DEBUG_INFO("BSSID unlocked.\n");
6086 if (priv->capability & CAP_PRIVACY_ON) 6075 if (priv->capability & CAP_PRIVACY_ON)
@@ -7295,7 +7284,6 @@ static int ipw_associate_network(struct ipw_priv *priv,
7295 struct ipw_supported_rates *rates, int roaming) 7284 struct ipw_supported_rates *rates, int roaming)
7296{ 7285{
7297 int err; 7286 int err;
7298 DECLARE_MAC_BUF(mac);
7299 7287
7300 if (priv->config & CFG_FIXED_RATE) 7288 if (priv->config & CFG_FIXED_RATE)
7301 ipw_set_fixed_rate(priv, network->mode); 7289 ipw_set_fixed_rate(priv, network->mode);
@@ -7463,9 +7451,9 @@ static int ipw_associate_network(struct ipw_priv *priv,
7463 return err; 7451 return err;
7464 } 7452 }
7465 7453
7466 IPW_DEBUG(IPW_DL_STATE, "associating: '%s' %s \n", 7454 IPW_DEBUG(IPW_DL_STATE, "associating: '%s' %pM \n",
7467 escape_essid(priv->essid, priv->essid_len), 7455 escape_essid(priv->essid, priv->essid_len),
7468 print_mac(mac, priv->bssid)); 7456 priv->bssid);
7469 7457
7470 return 0; 7458 return 0;
7471} 7459}
@@ -7604,7 +7592,6 @@ static int ipw_associate(void *data)
7604 if (list_empty(&priv->ieee->network_free_list)) { 7592 if (list_empty(&priv->ieee->network_free_list)) {
7605 struct ieee80211_network *oldest = NULL; 7593 struct ieee80211_network *oldest = NULL;
7606 struct ieee80211_network *target; 7594 struct ieee80211_network *target;
7607 DECLARE_MAC_BUF(mac);
7608 7595
7609 list_for_each_entry(target, &priv->ieee->network_list, list) { 7596 list_for_each_entry(target, &priv->ieee->network_list, list) {
7610 if ((oldest == NULL) || 7597 if ((oldest == NULL) ||
@@ -7615,11 +7602,11 @@ static int ipw_associate(void *data)
7615 /* If there are no more slots, expire the oldest */ 7602 /* If there are no more slots, expire the oldest */
7616 list_del(&oldest->list); 7603 list_del(&oldest->list);
7617 target = oldest; 7604 target = oldest;
7618 IPW_DEBUG_ASSOC("Expired '%s' (%s) from " 7605 IPW_DEBUG_ASSOC("Expired '%s' (%pM) from "
7619 "network list.\n", 7606 "network list.\n",
7620 escape_essid(target->ssid, 7607 escape_essid(target->ssid,
7621 target->ssid_len), 7608 target->ssid_len),
7622 print_mac(mac, target->bssid)); 7609 target->bssid);
7623 list_add_tail(&target->list, 7610 list_add_tail(&target->list,
7624 &priv->ieee->network_free_list); 7611 &priv->ieee->network_free_list);
7625 } 7612 }
@@ -8301,9 +8288,6 @@ static void ipw_rx(struct ipw_priv *priv)
8301 u32 r, w, i; 8288 u32 r, w, i;
8302 u8 network_packet; 8289 u8 network_packet;
8303 u8 fill_rx = 0; 8290 u8 fill_rx = 0;
8304 DECLARE_MAC_BUF(mac);
8305 DECLARE_MAC_BUF(mac2);
8306 DECLARE_MAC_BUF(mac3);
8307 8291
8308 r = ipw_read32(priv, IPW_RX_READ_INDEX); 8292 r = ipw_read32(priv, IPW_RX_READ_INDEX);
8309 w = ipw_read32(priv, IPW_RX_WRITE_INDEX); 8293 w = ipw_read32(priv, IPW_RX_WRITE_INDEX);
@@ -8433,18 +8417,12 @@ static void ipw_rx(struct ipw_priv *priv)
8433 header))) 8417 header)))
8434 { 8418 {
8435 IPW_DEBUG_DROP("Dropping: " 8419 IPW_DEBUG_DROP("Dropping: "
8436 "%s, " 8420 "%pM, "
8437 "%s, " 8421 "%pM, "
8438 "%s\n", 8422 "%pM\n",
8439 print_mac(mac, 8423 header->addr1,
8440 header-> 8424 header->addr2,
8441 addr1), 8425 header->addr3);
8442 print_mac(mac2,
8443 header->
8444 addr2),
8445 print_mac(mac3,
8446 header->
8447 addr3));
8448 break; 8426 break;
8449 } 8427 }
8450 8428
@@ -8983,7 +8961,6 @@ static int ipw_wx_set_wap(struct net_device *dev,
8983 union iwreq_data *wrqu, char *extra) 8961 union iwreq_data *wrqu, char *extra)
8984{ 8962{
8985 struct ipw_priv *priv = ieee80211_priv(dev); 8963 struct ipw_priv *priv = ieee80211_priv(dev);
8986 DECLARE_MAC_BUF(mac);
8987 8964
8988 static const unsigned char any[] = { 8965 static const unsigned char any[] = {
8989 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 8966 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
@@ -9014,8 +8991,8 @@ static int ipw_wx_set_wap(struct net_device *dev,
9014 return 0; 8991 return 0;
9015 } 8992 }
9016 8993
9017 IPW_DEBUG_WX("Setting mandatory BSSID to %s\n", 8994 IPW_DEBUG_WX("Setting mandatory BSSID to %pM\n",
9018 print_mac(mac, wrqu->ap_addr.sa_data)); 8995 wrqu->ap_addr.sa_data);
9019 8996
9020 memcpy(priv->bssid, wrqu->ap_addr.sa_data, ETH_ALEN); 8997 memcpy(priv->bssid, wrqu->ap_addr.sa_data, ETH_ALEN);
9021 8998
@@ -9033,7 +9010,6 @@ static int ipw_wx_get_wap(struct net_device *dev,
9033 union iwreq_data *wrqu, char *extra) 9010 union iwreq_data *wrqu, char *extra)
9034{ 9011{
9035 struct ipw_priv *priv = ieee80211_priv(dev); 9012 struct ipw_priv *priv = ieee80211_priv(dev);
9036 DECLARE_MAC_BUF(mac);
9037 9013
9038 /* If we are associated, trying to associate, or have a statically 9014 /* If we are associated, trying to associate, or have a statically
9039 * configured BSSID then return that; otherwise return ANY */ 9015 * configured BSSID then return that; otherwise return ANY */
@@ -9045,8 +9021,8 @@ static int ipw_wx_get_wap(struct net_device *dev,
9045 } else 9021 } else
9046 memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN); 9022 memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
9047 9023
9048 IPW_DEBUG_WX("Getting WAP BSSID: %s\n", 9024 IPW_DEBUG_WX("Getting WAP BSSID: %pM\n",
9049 print_mac(mac, wrqu->ap_addr.sa_data)); 9025 wrqu->ap_addr.sa_data);
9050 mutex_unlock(&priv->mutex); 9026 mutex_unlock(&priv->mutex);
9051 return 0; 9027 return 0;
9052} 9028}
@@ -10199,10 +10175,8 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
10199 id = ipw_add_station(priv, hdr->addr1); 10175 id = ipw_add_station(priv, hdr->addr1);
10200 if (id == IPW_INVALID_STATION) { 10176 if (id == IPW_INVALID_STATION) {
10201 IPW_WARNING("Attempt to send data to " 10177 IPW_WARNING("Attempt to send data to "
10202 "invalid cell: " MAC_FMT "\n", 10178 "invalid cell: %pM\n",
10203 hdr->addr1[0], hdr->addr1[1], 10179 hdr->addr1);
10204 hdr->addr1[2], hdr->addr1[3],
10205 hdr->addr1[4], hdr->addr1[5]);
10206 goto drop; 10180 goto drop;
10207 } 10181 }
10208 } 10182 }
@@ -10505,15 +10479,14 @@ static int ipw_net_set_mac_address(struct net_device *dev, void *p)
10505{ 10479{
10506 struct ipw_priv *priv = ieee80211_priv(dev); 10480 struct ipw_priv *priv = ieee80211_priv(dev);
10507 struct sockaddr *addr = p; 10481 struct sockaddr *addr = p;
10508 DECLARE_MAC_BUF(mac);
10509 10482
10510 if (!is_valid_ether_addr(addr->sa_data)) 10483 if (!is_valid_ether_addr(addr->sa_data))
10511 return -EADDRNOTAVAIL; 10484 return -EADDRNOTAVAIL;
10512 mutex_lock(&priv->mutex); 10485 mutex_lock(&priv->mutex);
10513 priv->config |= CFG_CUSTOM_MAC; 10486 priv->config |= CFG_CUSTOM_MAC;
10514 memcpy(priv->mac_addr, addr->sa_data, ETH_ALEN); 10487 memcpy(priv->mac_addr, addr->sa_data, ETH_ALEN);
10515 printk(KERN_INFO "%s: Setting MAC to %s\n", 10488 printk(KERN_INFO "%s: Setting MAC to %pM\n",
10516 priv->net_dev->name, print_mac(mac, priv->mac_addr)); 10489 priv->net_dev->name, priv->mac_addr);
10517 queue_work(priv->workqueue, &priv->adapter_restart); 10490 queue_work(priv->workqueue, &priv->adapter_restart);
10518 mutex_unlock(&priv->mutex); 10491 mutex_unlock(&priv->mutex);
10519 return 0; 10492 return 0;