aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-08-25 20:31:13 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-08-25 20:31:13 -0400
commitb4bf343093e81e33d75bede45896eda52cd5f2b4 (patch)
tree7fd5ce5f428995e6d612014e3ca7ad3f917fcf65 /drivers
parent343b0597297c3190647854881c087c01faf40a6f (diff)
parent099c5bb169e9816a7761336f668b63010762807b (diff)
/spare/repo/netdev-2.6 branch 'ieee80211'
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/Kconfig2
-rw-r--r--drivers/net/wireless/atmel.c8
-rw-r--r--drivers/net/wireless/ipw2100.c256
-rw-r--r--drivers/net/wireless/ipw2100.h28
-rw-r--r--drivers/net/wireless/ipw2200.c10
-rw-r--r--drivers/net/wireless/ipw2200.h30
6 files changed, 154 insertions, 180 deletions
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 5d814dfc8bc0..dd7dbf7b14d4 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -164,7 +164,7 @@ config IPW2100
164 say M here and read <file:Documentation/modules.txt>. The module 164 say M here and read <file:Documentation/modules.txt>. The module
165 will be called ipw2100.ko. 165 will be called ipw2100.ko.
166 166
167config IPW2100_PROMISC 167config IPW2100_MONITOR
168 bool "Enable promiscuous mode" 168 bool "Enable promiscuous mode"
169 depends on IPW2100 169 depends on IPW2100
170 ---help--- 170 ---help---
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index bed160a25cab..f48a6e729224 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -867,7 +867,7 @@ static int start_tx (struct sk_buff *skb, struct net_device *dev)
867 header.duration_id = 0; 867 header.duration_id = 0;
868 header.seq_ctl = 0; 868 header.seq_ctl = 0;
869 if (priv->wep_is_on) 869 if (priv->wep_is_on)
870 frame_ctl |= IEEE80211_FCTL_WEP; 870 frame_ctl |= IEEE80211_FCTL_PROTECTED;
871 if (priv->operating_mode == IW_MODE_ADHOC) { 871 if (priv->operating_mode == IW_MODE_ADHOC) {
872 memcpy(&header.addr1, skb->data, 6); 872 memcpy(&header.addr1, skb->data, 6);
873 memcpy(&header.addr2, dev->dev_addr, 6); 873 memcpy(&header.addr2, dev->dev_addr, 6);
@@ -1117,7 +1117,7 @@ static void rx_done_irq(struct atmel_private *priv)
1117 /* probe for CRC use here if needed once five packets have arrived with 1117 /* probe for CRC use here if needed once five packets have arrived with
1118 the same crc status, we assume we know what's happening and stop probing */ 1118 the same crc status, we assume we know what's happening and stop probing */
1119 if (priv->probe_crc) { 1119 if (priv->probe_crc) {
1120 if (!priv->wep_is_on || !(frame_ctl & IEEE80211_FCTL_WEP)) { 1120 if (!priv->wep_is_on || !(frame_ctl & IEEE80211_FCTL_PROTECTED)) {
1121 priv->do_rx_crc = probe_crc(priv, rx_packet_loc, msdu_size); 1121 priv->do_rx_crc = probe_crc(priv, rx_packet_loc, msdu_size);
1122 } else { 1122 } else {
1123 priv->do_rx_crc = probe_crc(priv, rx_packet_loc + 24, msdu_size - 24); 1123 priv->do_rx_crc = probe_crc(priv, rx_packet_loc + 24, msdu_size - 24);
@@ -1132,7 +1132,7 @@ static void rx_done_irq(struct atmel_private *priv)
1132 } 1132 }
1133 1133
1134 /* don't CRC header when WEP in use */ 1134 /* don't CRC header when WEP in use */
1135 if (priv->do_rx_crc && (!priv->wep_is_on || !(frame_ctl & IEEE80211_FCTL_WEP))) { 1135 if (priv->do_rx_crc && (!priv->wep_is_on || !(frame_ctl & IEEE80211_FCTL_PROTECTED))) {
1136 crc = crc32_le(0xffffffff, (unsigned char *)&header, 24); 1136 crc = crc32_le(0xffffffff, (unsigned char *)&header, 24);
1137 } 1137 }
1138 msdu_size -= 24; /* header */ 1138 msdu_size -= 24; /* header */
@@ -2677,7 +2677,7 @@ static void send_authentication_request(struct atmel_private *priv, u8 *challeng
2677 auth.alg = cpu_to_le16(C80211_MGMT_AAN_SHAREDKEY); 2677 auth.alg = cpu_to_le16(C80211_MGMT_AAN_SHAREDKEY);
2678 /* no WEP for authentication frames with TrSeqNo 1 */ 2678 /* no WEP for authentication frames with TrSeqNo 1 */
2679 if (priv->CurrentAuthentTransactionSeqNum != 1) 2679 if (priv->CurrentAuthentTransactionSeqNum != 1)
2680 header.frame_ctl |= cpu_to_le16(IEEE80211_FCTL_WEP); 2680 header.frame_ctl |= cpu_to_le16(IEEE80211_FCTL_PROTECTED);
2681 } else { 2681 } else {
2682 auth.alg = cpu_to_le16(C80211_MGMT_AAN_OPENSYSTEM); 2682 auth.alg = cpu_to_le16(C80211_MGMT_AAN_OPENSYSTEM);
2683 } 2683 }
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index 189ad7b2cec9..a47fce4beadf 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -106,7 +106,7 @@ that protects the following:
106 106
107 tx_pend_list : Holds used Tx buffers waiting to go into the TBD ring 107 tx_pend_list : Holds used Tx buffers waiting to go into the TBD ring
108 TAIL modified ipw2100_tx() 108 TAIL modified ipw2100_tx()
109 HEAD modified by X__ipw2100_tx_send_data() 109 HEAD modified by ipw2100_tx_send_data()
110 110
111 msg_free_list : Holds pre-allocated Msg (Command) buffers 111 msg_free_list : Holds pre-allocated Msg (Command) buffers
112 TAIL modified in __ipw2100_tx_process() 112 TAIL modified in __ipw2100_tx_process()
@@ -114,7 +114,7 @@ that protects the following:
114 114
115 msg_pend_list : Holds used Msg buffers waiting to go into the TBD ring 115 msg_pend_list : Holds used Msg buffers waiting to go into the TBD ring
116 TAIL modified in ipw2100_hw_send_command() 116 TAIL modified in ipw2100_hw_send_command()
117 HEAD modified in X__ipw2100_tx_send_commands() 117 HEAD modified in ipw2100_tx_send_commands()
118 118
119 The flow of data on the TX side is as follows: 119 The flow of data on the TX side is as follows:
120 120
@@ -207,7 +207,20 @@ MODULE_PARM_DESC(channel, "channel");
207MODULE_PARM_DESC(associate, "auto associate when scanning (default on)"); 207MODULE_PARM_DESC(associate, "auto associate when scanning (default on)");
208MODULE_PARM_DESC(disable, "manually disable the radio (default 0 [radio on])"); 208MODULE_PARM_DESC(disable, "manually disable the radio (default 0 [radio on])");
209 209
210u32 ipw2100_debug_level = IPW_DL_NONE; 210static u32 ipw2100_debug_level = IPW_DL_NONE;
211
212#ifdef CONFIG_IPW_DEBUG
213#define IPW_DEBUG(level, message...) \
214do { \
215 if (ipw2100_debug_level & (level)) { \
216 printk(KERN_DEBUG "ipw2100: %c %s ", \
217 in_interrupt() ? 'I' : 'U', __FUNCTION__); \
218 printk(message); \
219 } \
220} while (0)
221#else
222#define IPW_DEBUG(level, message...) do {} while (0)
223#endif /* CONFIG_IPW_DEBUG */
211 224
212#ifdef CONFIG_IPW_DEBUG 225#ifdef CONFIG_IPW_DEBUG
213static const char *command_types[] = { 226static const char *command_types[] = {
@@ -287,14 +300,30 @@ static const char *command_types[] = {
287 300
288 301
289/* Pre-decl until we get the code solid and then we can clean it up */ 302/* Pre-decl until we get the code solid and then we can clean it up */
290static void X__ipw2100_tx_send_commands(struct ipw2100_priv *priv); 303static void ipw2100_tx_send_commands(struct ipw2100_priv *priv);
291static void X__ipw2100_tx_send_data(struct ipw2100_priv *priv); 304static void ipw2100_tx_send_data(struct ipw2100_priv *priv);
292static int ipw2100_adapter_setup(struct ipw2100_priv *priv); 305static int ipw2100_adapter_setup(struct ipw2100_priv *priv);
293 306
294static void ipw2100_queues_initialize(struct ipw2100_priv *priv); 307static void ipw2100_queues_initialize(struct ipw2100_priv *priv);
295static void ipw2100_queues_free(struct ipw2100_priv *priv); 308static void ipw2100_queues_free(struct ipw2100_priv *priv);
296static int ipw2100_queues_allocate(struct ipw2100_priv *priv); 309static int ipw2100_queues_allocate(struct ipw2100_priv *priv);
297 310
311static int ipw2100_fw_download(struct ipw2100_priv *priv,
312 struct ipw2100_fw *fw);
313static int ipw2100_get_firmware(struct ipw2100_priv *priv,
314 struct ipw2100_fw *fw);
315static int ipw2100_get_fwversion(struct ipw2100_priv *priv, char *buf,
316 size_t max);
317static int ipw2100_get_ucodeversion(struct ipw2100_priv *priv, char *buf,
318 size_t max);
319static void ipw2100_release_firmware(struct ipw2100_priv *priv,
320 struct ipw2100_fw *fw);
321static int ipw2100_ucode_download(struct ipw2100_priv *priv,
322 struct ipw2100_fw *fw);
323static void ipw2100_wx_event_work(struct ipw2100_priv *priv);
324static struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device * dev);
325static struct iw_handler_def ipw2100_wx_handler_def;
326
298 327
299static inline void read_register(struct net_device *dev, u32 reg, u32 *val) 328static inline void read_register(struct net_device *dev, u32 reg, u32 *val)
300{ 329{
@@ -473,8 +502,8 @@ static inline int ipw2100_hw_is_adapter_in_system(struct net_device *dev)
473 == IPW_DATA_DOA_DEBUG_VALUE)); 502 == IPW_DATA_DOA_DEBUG_VALUE));
474} 503}
475 504
476int ipw2100_get_ordinal(struct ipw2100_priv *priv, u32 ord, 505static int ipw2100_get_ordinal(struct ipw2100_priv *priv, u32 ord,
477 void *val, u32 *len) 506 void *val, u32 *len)
478{ 507{
479 struct ipw2100_ordinals *ordinals = &priv->ordinals; 508 struct ipw2100_ordinals *ordinals = &priv->ordinals;
480 u32 addr; 509 u32 addr;
@@ -484,7 +513,7 @@ int ipw2100_get_ordinal(struct ipw2100_priv *priv, u32 ord,
484 u32 total_length; 513 u32 total_length;
485 514
486 if (ordinals->table1_addr == 0) { 515 if (ordinals->table1_addr == 0) {
487 IPW_DEBUG_WARNING(DRV_NAME ": attempt to use fw ordinals " 516 printk(KERN_WARNING DRV_NAME ": attempt to use fw ordinals "
488 "before they have been loaded.\n"); 517 "before they have been loaded.\n");
489 return -EINVAL; 518 return -EINVAL;
490 } 519 }
@@ -493,7 +522,7 @@ int ipw2100_get_ordinal(struct ipw2100_priv *priv, u32 ord,
493 if (*len < IPW_ORD_TAB_1_ENTRY_SIZE) { 522 if (*len < IPW_ORD_TAB_1_ENTRY_SIZE) {
494 *len = IPW_ORD_TAB_1_ENTRY_SIZE; 523 *len = IPW_ORD_TAB_1_ENTRY_SIZE;
495 524
496 IPW_DEBUG_WARNING(DRV_NAME 525 printk(KERN_WARNING DRV_NAME
497 ": ordinal buffer length too small, need %zd\n", 526 ": ordinal buffer length too small, need %zd\n",
498 IPW_ORD_TAB_1_ENTRY_SIZE); 527 IPW_ORD_TAB_1_ENTRY_SIZE);
499 528
@@ -546,7 +575,7 @@ int ipw2100_get_ordinal(struct ipw2100_priv *priv, u32 ord,
546 return 0; 575 return 0;
547 } 576 }
548 577
549 IPW_DEBUG_WARNING(DRV_NAME ": ordinal %d neither in table 1 nor " 578 printk(KERN_WARNING DRV_NAME ": ordinal %d neither in table 1 nor "
550 "in table 2\n", ord); 579 "in table 2\n", ord);
551 580
552 return -EINVAL; 581 return -EINVAL;
@@ -736,8 +765,8 @@ static int ipw2100_hw_send_command(struct ipw2100_priv *priv,
736 list_add_tail(element, &priv->msg_pend_list); 765 list_add_tail(element, &priv->msg_pend_list);
737 INC_STAT(&priv->msg_pend_stat); 766 INC_STAT(&priv->msg_pend_stat);
738 767
739 X__ipw2100_tx_send_commands(priv); 768 ipw2100_tx_send_commands(priv);
740 X__ipw2100_tx_send_data(priv); 769 ipw2100_tx_send_data(priv);
741 770
742 spin_unlock_irqrestore(&priv->low_lock, flags); 771 spin_unlock_irqrestore(&priv->low_lock, flags);
743 772
@@ -761,7 +790,7 @@ static int ipw2100_hw_send_command(struct ipw2100_priv *priv,
761 } 790 }
762 791
763 if (priv->fatal_error) { 792 if (priv->fatal_error) {
764 IPW_DEBUG_WARNING("%s: firmware fatal error\n", 793 printk(KERN_WARNING DRV_NAME ": %s: firmware fatal error\n",
765 priv->net_dev->name); 794 priv->net_dev->name);
766 return -EIO; 795 return -EIO;
767 } 796 }
@@ -999,7 +1028,7 @@ static int ipw2100_download_firmware(struct ipw2100_priv *priv)
999 /* load microcode */ 1028 /* load microcode */
1000 err = ipw2100_ucode_download(priv, &ipw2100_firmware); 1029 err = ipw2100_ucode_download(priv, &ipw2100_firmware);
1001 if (err) { 1030 if (err) {
1002 IPW_DEBUG_ERROR("%s: Error loading microcode: %d\n", 1031 printk(KERN_ERR DRV_NAME ": %s: Error loading microcode: %d\n",
1003 priv->net_dev->name, err); 1032 priv->net_dev->name, err);
1004 goto fail; 1033 goto fail;
1005 } 1034 }
@@ -1012,7 +1041,7 @@ static int ipw2100_download_firmware(struct ipw2100_priv *priv)
1012 /* s/w reset and clock stabilization (again!!!) */ 1041 /* s/w reset and clock stabilization (again!!!) */
1013 err = sw_reset_and_clock(priv); 1042 err = sw_reset_and_clock(priv);
1014 if (err) { 1043 if (err) {
1015 IPW_DEBUG_ERROR("%s: sw_reset_and_clock failed: %d\n", 1044 printk(KERN_ERR DRV_NAME ": %s: sw_reset_and_clock failed: %d\n",
1016 priv->net_dev->name, err); 1045 priv->net_dev->name, err);
1017 goto fail; 1046 goto fail;
1018 } 1047 }
@@ -1206,7 +1235,7 @@ static int ipw2100_start_adapter(struct ipw2100_priv *priv)
1206 * fw & dino ucode 1235 * fw & dino ucode
1207 */ 1236 */
1208 if (ipw2100_download_firmware(priv)) { 1237 if (ipw2100_download_firmware(priv)) {
1209 IPW_DEBUG_ERROR("%s: Failed to power on the adapter.\n", 1238 printk(KERN_ERR DRV_NAME ": %s: Failed to power on the adapter.\n",
1210 priv->net_dev->name); 1239 priv->net_dev->name);
1211 return -EIO; 1240 return -EIO;
1212 } 1241 }
@@ -1266,7 +1295,7 @@ static int ipw2100_start_adapter(struct ipw2100_priv *priv)
1266 i ? "SUCCESS" : "FAILED"); 1295 i ? "SUCCESS" : "FAILED");
1267 1296
1268 if (!i) { 1297 if (!i) {
1269 IPW_DEBUG_WARNING("%s: Firmware did not initialize.\n", 1298 printk(KERN_WARNING DRV_NAME ": %s: Firmware did not initialize.\n",
1270 priv->net_dev->name); 1299 priv->net_dev->name);
1271 return -EIO; 1300 return -EIO;
1272 } 1301 }
@@ -1462,7 +1491,7 @@ static int ipw2100_hw_stop_adapter(struct ipw2100_priv *priv)
1462 1491
1463 err = ipw2100_hw_phy_off(priv); 1492 err = ipw2100_hw_phy_off(priv);
1464 if (err) 1493 if (err)
1465 IPW_DEBUG_WARNING("Error disabling radio %d\n", err); 1494 printk(KERN_WARNING DRV_NAME ": Error disabling radio %d\n", err);
1466 1495
1467 /* 1496 /*
1468 * If in D0-standby mode going directly to D3 may cause a 1497 * If in D0-standby mode going directly to D3 may cause a
@@ -1488,7 +1517,7 @@ static int ipw2100_hw_stop_adapter(struct ipw2100_priv *priv)
1488 1517
1489 err = ipw2100_hw_send_command(priv, &cmd); 1518 err = ipw2100_hw_send_command(priv, &cmd);
1490 if (err) 1519 if (err)
1491 IPW_DEBUG_WARNING( 1520 printk(KERN_WARNING DRV_NAME ": "
1492 "%s: Power down command failed: Error %d\n", 1521 "%s: Power down command failed: Error %d\n",
1493 priv->net_dev->name, err); 1522 priv->net_dev->name, err);
1494 else { 1523 else {
@@ -1529,7 +1558,7 @@ static int ipw2100_hw_stop_adapter(struct ipw2100_priv *priv)
1529 } 1558 }
1530 1559
1531 if (i == 0) 1560 if (i == 0)
1532 IPW_DEBUG_WARNING(DRV_NAME 1561 printk(KERN_WARNING DRV_NAME
1533 ": %s: Could now power down adapter.\n", 1562 ": %s: Could now power down adapter.\n",
1534 priv->net_dev->name); 1563 priv->net_dev->name);
1535 1564
@@ -1569,13 +1598,13 @@ static int ipw2100_disable_adapter(struct ipw2100_priv *priv)
1569 1598
1570 err = ipw2100_hw_send_command(priv, &cmd); 1599 err = ipw2100_hw_send_command(priv, &cmd);
1571 if (err) { 1600 if (err) {
1572 IPW_DEBUG_WARNING("exit - failed to send CARD_DISABLE command\n"); 1601 printk(KERN_WARNING DRV_NAME ": exit - failed to send CARD_DISABLE command\n");
1573 goto fail_up; 1602 goto fail_up;
1574 } 1603 }
1575 1604
1576 err = ipw2100_wait_for_card_state(priv, IPW_HW_STATE_DISABLED); 1605 err = ipw2100_wait_for_card_state(priv, IPW_HW_STATE_DISABLED);
1577 if (err) { 1606 if (err) {
1578 IPW_DEBUG_WARNING("exit - card failed to change to DISABLED\n"); 1607 printk(KERN_WARNING DRV_NAME ": exit - card failed to change to DISABLED\n");
1579 goto fail_up; 1608 goto fail_up;
1580 } 1609 }
1581 1610
@@ -1586,7 +1615,7 @@ fail_up:
1586 return err; 1615 return err;
1587} 1616}
1588 1617
1589int ipw2100_set_scan_options(struct ipw2100_priv *priv) 1618static int ipw2100_set_scan_options(struct ipw2100_priv *priv)
1590{ 1619{
1591 struct host_command cmd = { 1620 struct host_command cmd = {
1592 .host_command = SET_SCAN_OPTIONS, 1621 .host_command = SET_SCAN_OPTIONS,
@@ -1618,7 +1647,7 @@ int ipw2100_set_scan_options(struct ipw2100_priv *priv)
1618 return err; 1647 return err;
1619} 1648}
1620 1649
1621int ipw2100_start_scan(struct ipw2100_priv *priv) 1650static int ipw2100_start_scan(struct ipw2100_priv *priv)
1622{ 1651{
1623 struct host_command cmd = { 1652 struct host_command cmd = {
1624 .host_command = BROADCAST_SCAN, 1653 .host_command = BROADCAST_SCAN,
@@ -1685,7 +1714,7 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
1685 (priv->status & STATUS_RESET_PENDING)) { 1714 (priv->status & STATUS_RESET_PENDING)) {
1686 /* Power cycle the card ... */ 1715 /* Power cycle the card ... */
1687 if (ipw2100_power_cycle_adapter(priv)) { 1716 if (ipw2100_power_cycle_adapter(priv)) {
1688 IPW_DEBUG_WARNING("%s: Could not cycle adapter.\n", 1717 printk(KERN_WARNING DRV_NAME ": %s: Could not cycle adapter.\n",
1689 priv->net_dev->name); 1718 priv->net_dev->name);
1690 rc = 1; 1719 rc = 1;
1691 goto exit; 1720 goto exit;
@@ -1695,7 +1724,7 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
1695 1724
1696 /* Load the firmware, start the clocks, etc. */ 1725 /* Load the firmware, start the clocks, etc. */
1697 if (ipw2100_start_adapter(priv)) { 1726 if (ipw2100_start_adapter(priv)) {
1698 IPW_DEBUG_ERROR("%s: Failed to start the firmware.\n", 1727 printk(KERN_ERR DRV_NAME ": %s: Failed to start the firmware.\n",
1699 priv->net_dev->name); 1728 priv->net_dev->name);
1700 rc = 1; 1729 rc = 1;
1701 goto exit; 1730 goto exit;
@@ -1705,7 +1734,7 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
1705 1734
1706 /* Determine capabilities of this particular HW configuration */ 1735 /* Determine capabilities of this particular HW configuration */
1707 if (ipw2100_get_hw_features(priv)) { 1736 if (ipw2100_get_hw_features(priv)) {
1708 IPW_DEBUG_ERROR("%s: Failed to determine HW features.\n", 1737 printk(KERN_ERR DRV_NAME ": %s: Failed to determine HW features.\n",
1709 priv->net_dev->name); 1738 priv->net_dev->name);
1710 rc = 1; 1739 rc = 1;
1711 goto exit; 1740 goto exit;
@@ -1713,7 +1742,7 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
1713 1742
1714 lock = LOCK_NONE; 1743 lock = LOCK_NONE;
1715 if (ipw2100_set_ordinal(priv, IPW_ORD_PERS_DB_LOCK, &lock, &ord_len)) { 1744 if (ipw2100_set_ordinal(priv, IPW_ORD_PERS_DB_LOCK, &lock, &ord_len)) {
1716 IPW_DEBUG_ERROR("%s: Failed to clear ordinal lock.\n", 1745 printk(KERN_ERR DRV_NAME ": %s: Failed to clear ordinal lock.\n",
1717 priv->net_dev->name); 1746 priv->net_dev->name);
1718 rc = 1; 1747 rc = 1;
1719 goto exit; 1748 goto exit;
@@ -1739,7 +1768,7 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
1739 /* Send all of the commands that must be sent prior to 1768 /* Send all of the commands that must be sent prior to
1740 * HOST_COMPLETE */ 1769 * HOST_COMPLETE */
1741 if (ipw2100_adapter_setup(priv)) { 1770 if (ipw2100_adapter_setup(priv)) {
1742 IPW_DEBUG_ERROR("%s: Failed to start the card.\n", 1771 printk(KERN_ERR DRV_NAME ": %s: Failed to start the card.\n",
1743 priv->net_dev->name); 1772 priv->net_dev->name);
1744 rc = 1; 1773 rc = 1;
1745 goto exit; 1774 goto exit;
@@ -1748,7 +1777,7 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
1748 if (!deferred) { 1777 if (!deferred) {
1749 /* Enable the adapter - sends HOST_COMPLETE */ 1778 /* Enable the adapter - sends HOST_COMPLETE */
1750 if (ipw2100_enable_adapter(priv)) { 1779 if (ipw2100_enable_adapter(priv)) {
1751 IPW_DEBUG_ERROR( 1780 printk(KERN_ERR DRV_NAME ": "
1752 "%s: failed in call to enable adapter.\n", 1781 "%s: failed in call to enable adapter.\n",
1753 priv->net_dev->name); 1782 priv->net_dev->name);
1754 ipw2100_hw_stop_adapter(priv); 1783 ipw2100_hw_stop_adapter(priv);
@@ -1806,7 +1835,7 @@ static void ipw2100_down(struct ipw2100_priv *priv)
1806 spin_unlock_irqrestore(&priv->low_lock, flags); 1835 spin_unlock_irqrestore(&priv->low_lock, flags);
1807 1836
1808 if (ipw2100_hw_stop_adapter(priv)) 1837 if (ipw2100_hw_stop_adapter(priv))
1809 IPW_DEBUG_ERROR("%s: Error stopping adapter.\n", 1838 printk(KERN_ERR DRV_NAME ": %s: Error stopping adapter.\n",
1810 priv->net_dev->name); 1839 priv->net_dev->name);
1811 1840
1812 /* Do not disable the interrupt until _after_ we disable 1841 /* Do not disable the interrupt until _after_ we disable
@@ -1833,7 +1862,7 @@ static void ipw2100_down(struct ipw2100_priv *priv)
1833 netif_stop_queue(priv->net_dev); 1862 netif_stop_queue(priv->net_dev);
1834} 1863}
1835 1864
1836void ipw2100_reset_adapter(struct ipw2100_priv *priv) 1865static void ipw2100_reset_adapter(struct ipw2100_priv *priv)
1837{ 1866{
1838 unsigned long flags; 1867 unsigned long flags;
1839 union iwreq_data wrqu = { 1868 union iwreq_data wrqu = {
@@ -1963,8 +1992,8 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 status)
1963} 1992}
1964 1993
1965 1994
1966int ipw2100_set_essid(struct ipw2100_priv *priv, char *essid, 1995static int ipw2100_set_essid(struct ipw2100_priv *priv, char *essid,
1967 int length, int batch_mode) 1996 int length, int batch_mode)
1968{ 1997{
1969 int ssid_len = min(length, IW_ESSID_MAX_SIZE); 1998 int ssid_len = min(length, IW_ESSID_MAX_SIZE);
1970 struct host_command cmd = { 1999 struct host_command cmd = {
@@ -2095,7 +2124,7 @@ static void isr_indicate_scanning(struct ipw2100_priv *priv, u32 status)
2095 priv->status |= STATUS_SCANNING; 2124 priv->status |= STATUS_SCANNING;
2096} 2125}
2097 2126
2098const struct ipw2100_status_indicator status_handlers[] = { 2127static const struct ipw2100_status_indicator status_handlers[] = {
2099 IPW2100_HANDLER(IPW_STATE_INITIALIZED, 0), 2128 IPW2100_HANDLER(IPW_STATE_INITIALIZED, 0),
2100 IPW2100_HANDLER(IPW_STATE_COUNTRY_FOUND, 0), 2129 IPW2100_HANDLER(IPW_STATE_COUNTRY_FOUND, 0),
2101 IPW2100_HANDLER(IPW_STATE_ASSOCIATED, isr_indicate_associated), 2130 IPW2100_HANDLER(IPW_STATE_ASSOCIATED, isr_indicate_associated),
@@ -2163,7 +2192,7 @@ static void isr_rx_complete_command(
2163} 2192}
2164 2193
2165#ifdef CONFIG_IPW_DEBUG 2194#ifdef CONFIG_IPW_DEBUG
2166const char *frame_types[] = { 2195static const char *frame_types[] = {
2167 "COMMAND_STATUS_VAL", 2196 "COMMAND_STATUS_VAL",
2168 "STATUS_CHANGE_VAL", 2197 "STATUS_CHANGE_VAL",
2169 "P80211_DATA_VAL", 2198 "P80211_DATA_VAL",
@@ -2283,7 +2312,7 @@ static inline u32 ipw2100_match_buf(struct ipw2100_priv *priv, u8 *in_buf,
2283 * 2312 *
2284 */ 2313 */
2285#ifdef CONFIG_IPW2100_RX_DEBUG 2314#ifdef CONFIG_IPW2100_RX_DEBUG
2286u8 packet_data[IPW_RX_NIC_BUFFER_LENGTH]; 2315static u8 packet_data[IPW_RX_NIC_BUFFER_LENGTH];
2287#endif 2316#endif
2288 2317
2289static inline void ipw2100_corruption_detected(struct ipw2100_priv *priv, 2318static inline void ipw2100_corruption_detected(struct ipw2100_priv *priv,
@@ -2413,7 +2442,7 @@ static inline void isr_rx(struct ipw2100_priv *priv, int i,
2413 2442
2414 /* We need to allocate a new SKB and attach it to the RDB. */ 2443 /* We need to allocate a new SKB and attach it to the RDB. */
2415 if (unlikely(ipw2100_alloc_skb(priv, packet))) { 2444 if (unlikely(ipw2100_alloc_skb(priv, packet))) {
2416 IPW_DEBUG_WARNING( 2445 printk(KERN_WARNING DRV_NAME ": "
2417 "%s: Unable to allocate SKB onto RBD ring - disabling " 2446 "%s: Unable to allocate SKB onto RBD ring - disabling "
2418 "adapter.\n", priv->net_dev->name); 2447 "adapter.\n", priv->net_dev->name);
2419 /* TODO: schedule adapter shutdown */ 2448 /* TODO: schedule adapter shutdown */
@@ -2675,7 +2704,7 @@ static inline int __ipw2100_tx_process(struct ipw2100_priv *priv)
2675 break; 2704 break;
2676 2705
2677 default: 2706 default:
2678 IPW_DEBUG_WARNING("%s: Bad fw_pend_list entry!\n", 2707 printk(KERN_WARNING DRV_NAME ": %s: Bad fw_pend_list entry!\n",
2679 priv->net_dev->name); 2708 priv->net_dev->name);
2680 return 0; 2709 return 0;
2681 } 2710 }
@@ -2689,7 +2718,7 @@ static inline int __ipw2100_tx_process(struct ipw2100_priv *priv)
2689 read_register(priv->net_dev, IPW_MEM_HOST_SHARED_TX_QUEUE_WRITE_INDEX, 2718 read_register(priv->net_dev, IPW_MEM_HOST_SHARED_TX_QUEUE_WRITE_INDEX,
2690 &w); 2719 &w);
2691 if (w != txq->next) 2720 if (w != txq->next)
2692 IPW_DEBUG_WARNING("%s: write index mismatch\n", 2721 printk(KERN_WARNING DRV_NAME ": %s: write index mismatch\n",
2693 priv->net_dev->name); 2722 priv->net_dev->name);
2694 2723
2695 /* 2724 /*
@@ -2750,7 +2779,7 @@ static inline int __ipw2100_tx_process(struct ipw2100_priv *priv)
2750 switch (packet->type) { 2779 switch (packet->type) {
2751 case DATA: 2780 case DATA:
2752 if (txq->drv[txq->oldest].status.info.fields.txType != 0) 2781 if (txq->drv[txq->oldest].status.info.fields.txType != 0)
2753 IPW_DEBUG_WARNING("%s: Queue mismatch. " 2782 printk(KERN_WARNING DRV_NAME ": %s: Queue mismatch. "
2754 "Expecting DATA TBD but pulled " 2783 "Expecting DATA TBD but pulled "
2755 "something else: ids %d=%d.\n", 2784 "something else: ids %d=%d.\n",
2756 priv->net_dev->name, txq->oldest, packet->index); 2785 priv->net_dev->name, txq->oldest, packet->index);
@@ -2797,7 +2826,7 @@ static inline int __ipw2100_tx_process(struct ipw2100_priv *priv)
2797 2826
2798 case COMMAND: 2827 case COMMAND:
2799 if (txq->drv[txq->oldest].status.info.fields.txType != 1) 2828 if (txq->drv[txq->oldest].status.info.fields.txType != 1)
2800 IPW_DEBUG_WARNING("%s: Queue mismatch. " 2829 printk(KERN_WARNING DRV_NAME ": %s: Queue mismatch. "
2801 "Expecting COMMAND TBD but pulled " 2830 "Expecting COMMAND TBD but pulled "
2802 "something else: ids %d=%d.\n", 2831 "something else: ids %d=%d.\n",
2803 priv->net_dev->name, txq->oldest, packet->index); 2832 priv->net_dev->name, txq->oldest, packet->index);
@@ -2837,14 +2866,14 @@ static inline void __ipw2100_tx_complete(struct ipw2100_priv *priv)
2837 while (__ipw2100_tx_process(priv) && i < 200) i++; 2866 while (__ipw2100_tx_process(priv) && i < 200) i++;
2838 2867
2839 if (i == 200) { 2868 if (i == 200) {
2840 IPW_DEBUG_WARNING( 2869 printk(KERN_WARNING DRV_NAME ": "
2841 "%s: Driver is running slow (%d iters).\n", 2870 "%s: Driver is running slow (%d iters).\n",
2842 priv->net_dev->name, i); 2871 priv->net_dev->name, i);
2843 } 2872 }
2844} 2873}
2845 2874
2846 2875
2847static void X__ipw2100_tx_send_commands(struct ipw2100_priv *priv) 2876static void ipw2100_tx_send_commands(struct ipw2100_priv *priv)
2848{ 2877{
2849 struct list_head *element; 2878 struct list_head *element;
2850 struct ipw2100_tx_packet *packet; 2879 struct ipw2100_tx_packet *packet;
@@ -2912,10 +2941,10 @@ static void X__ipw2100_tx_send_commands(struct ipw2100_priv *priv)
2912 2941
2913 2942
2914/* 2943/*
2915 * X__ipw2100_tx_send_data 2944 * ipw2100_tx_send_data
2916 * 2945 *
2917 */ 2946 */
2918static void X__ipw2100_tx_send_data(struct ipw2100_priv *priv) 2947static void ipw2100_tx_send_data(struct ipw2100_priv *priv)
2919{ 2948{
2920 struct list_head *element; 2949 struct list_head *element;
2921 struct ipw2100_tx_packet *packet; 2950 struct ipw2100_tx_packet *packet;
@@ -3081,7 +3110,7 @@ static void ipw2100_irq_tasklet(struct ipw2100_priv *priv)
3081 (unsigned long)inta & IPW_INTERRUPT_MASK); 3110 (unsigned long)inta & IPW_INTERRUPT_MASK);
3082 3111
3083 if (inta & IPW2100_INTA_FATAL_ERROR) { 3112 if (inta & IPW2100_INTA_FATAL_ERROR) {
3084 IPW_DEBUG_WARNING(DRV_NAME 3113 printk(KERN_WARNING DRV_NAME
3085 ": Fatal interrupt. Scheduling firmware restart.\n"); 3114 ": Fatal interrupt. Scheduling firmware restart.\n");
3086 priv->inta_other++; 3115 priv->inta_other++;
3087 write_register( 3116 write_register(
@@ -3101,7 +3130,7 @@ static void ipw2100_irq_tasklet(struct ipw2100_priv *priv)
3101 } 3130 }
3102 3131
3103 if (inta & IPW2100_INTA_PARITY_ERROR) { 3132 if (inta & IPW2100_INTA_PARITY_ERROR) {
3104 IPW_DEBUG_ERROR("***** PARITY ERROR INTERRUPT !!!! \n"); 3133 printk(KERN_ERR DRV_NAME ": ***** PARITY ERROR INTERRUPT !!!! \n");
3105 priv->inta_other++; 3134 priv->inta_other++;
3106 write_register( 3135 write_register(
3107 dev, IPW_REG_INTA, 3136 dev, IPW_REG_INTA,
@@ -3130,8 +3159,8 @@ static void ipw2100_irq_tasklet(struct ipw2100_priv *priv)
3130 IPW2100_INTA_TX_TRANSFER); 3159 IPW2100_INTA_TX_TRANSFER);
3131 3160
3132 __ipw2100_tx_complete(priv); 3161 __ipw2100_tx_complete(priv);
3133 X__ipw2100_tx_send_commands(priv); 3162 ipw2100_tx_send_commands(priv);
3134 X__ipw2100_tx_send_data(priv); 3163 ipw2100_tx_send_data(priv);
3135 } 3164 }
3136 3165
3137 if (inta & IPW2100_INTA_TX_COMPLETE) { 3166 if (inta & IPW2100_INTA_TX_COMPLETE) {
@@ -3219,7 +3248,7 @@ static irqreturn_t ipw2100_interrupt(int irq, void *data,
3219 3248
3220 if (inta == 0xFFFFFFFF) { 3249 if (inta == 0xFFFFFFFF) {
3221 /* Hardware disappeared */ 3250 /* Hardware disappeared */
3222 IPW_DEBUG_WARNING("IRQ INTA == 0xFFFFFFFF\n"); 3251 printk(KERN_WARNING DRV_NAME ": IRQ INTA == 0xFFFFFFFF\n");
3223 goto none; 3252 goto none;
3224 } 3253 }
3225 3254
@@ -3282,7 +3311,7 @@ static int ipw2100_tx(struct ieee80211_txb *txb, struct net_device *dev)
3282 list_add_tail(element, &priv->tx_pend_list); 3311 list_add_tail(element, &priv->tx_pend_list);
3283 INC_STAT(&priv->tx_pend_stat); 3312 INC_STAT(&priv->tx_pend_stat);
3284 3313
3285 X__ipw2100_tx_send_data(priv); 3314 ipw2100_tx_send_data(priv);
3286 3315
3287 spin_unlock_irqrestore(&priv->low_lock, flags); 3316 spin_unlock_irqrestore(&priv->low_lock, flags);
3288 return 0; 3317 return 0;
@@ -3304,7 +3333,7 @@ static int ipw2100_msg_allocate(struct ipw2100_priv *priv)
3304 IPW_COMMAND_POOL_SIZE * sizeof(struct ipw2100_tx_packet), 3333 IPW_COMMAND_POOL_SIZE * sizeof(struct ipw2100_tx_packet),
3305 GFP_KERNEL); 3334 GFP_KERNEL);
3306 if (!priv->msg_buffers) { 3335 if (!priv->msg_buffers) {
3307 IPW_DEBUG_ERROR("%s: PCI alloc failed for msg " 3336 printk(KERN_ERR DRV_NAME ": %s: PCI alloc failed for msg "
3308 "buffers.\n", priv->net_dev->name); 3337 "buffers.\n", priv->net_dev->name);
3309 return -ENOMEM; 3338 return -ENOMEM;
3310 } 3339 }
@@ -3315,7 +3344,7 @@ static int ipw2100_msg_allocate(struct ipw2100_priv *priv)
3315 sizeof(struct ipw2100_cmd_header), 3344 sizeof(struct ipw2100_cmd_header),
3316 &p); 3345 &p);
3317 if (!v) { 3346 if (!v) {
3318 IPW_DEBUG_ERROR( 3347 printk(KERN_ERR DRV_NAME ": "
3319 "%s: PCI alloc failed for msg " 3348 "%s: PCI alloc failed for msg "
3320 "buffers.\n", 3349 "buffers.\n",
3321 priv->net_dev->name); 3350 priv->net_dev->name);
@@ -3427,7 +3456,7 @@ static DEVICE_ATTR(capability, S_IRUGO, show_capability, NULL);
3427 3456
3428 3457
3429#define IPW2100_REG(x) { IPW_ ##x, #x } 3458#define IPW2100_REG(x) { IPW_ ##x, #x }
3430const struct { 3459static const struct {
3431 u32 addr; 3460 u32 addr;
3432 const char *name; 3461 const char *name;
3433} hw_data[] = { 3462} hw_data[] = {
@@ -3438,7 +3467,7 @@ const struct {
3438 IPW2100_REG(REG_RESET_REG), 3467 IPW2100_REG(REG_RESET_REG),
3439}; 3468};
3440#define IPW2100_NIC(x, s) { x, #x, s } 3469#define IPW2100_NIC(x, s) { x, #x, s }
3441const struct { 3470static const struct {
3442 u32 addr; 3471 u32 addr;
3443 const char *name; 3472 const char *name;
3444 size_t size; 3473 size_t size;
@@ -3448,7 +3477,7 @@ const struct {
3448 IPW2100_NIC(0x210000, 1), 3477 IPW2100_NIC(0x210000, 1),
3449}; 3478};
3450#define IPW2100_ORD(x, d) { IPW_ORD_ ##x, #x, d } 3479#define IPW2100_ORD(x, d) { IPW_ORD_ ##x, #x, d }
3451const struct { 3480static const struct {
3452 u8 index; 3481 u8 index;
3453 const char *name; 3482 const char *name;
3454 const char *desc; 3483 const char *desc;
@@ -3813,7 +3842,7 @@ static ssize_t show_stats(struct device *d, struct device_attribute *attr,
3813static DEVICE_ATTR(stats, S_IRUGO, show_stats, NULL); 3842static DEVICE_ATTR(stats, S_IRUGO, show_stats, NULL);
3814 3843
3815 3844
3816int ipw2100_switch_mode(struct ipw2100_priv *priv, u32 mode) 3845static int ipw2100_switch_mode(struct ipw2100_priv *priv, u32 mode)
3817{ 3846{
3818 int err; 3847 int err;
3819 3848
@@ -3822,7 +3851,7 @@ int ipw2100_switch_mode(struct ipw2100_priv *priv, u32 mode)
3822 3851
3823 err = ipw2100_disable_adapter(priv); 3852 err = ipw2100_disable_adapter(priv);
3824 if (err) { 3853 if (err) {
3825 IPW_DEBUG_ERROR("%s: Could not disable adapter %d\n", 3854 printk(KERN_ERR DRV_NAME ": %s: Could not disable adapter %d\n",
3826 priv->net_dev->name, err); 3855 priv->net_dev->name, err);
3827 return err; 3856 return err;
3828 } 3857 }
@@ -4268,7 +4297,7 @@ static int ipw2100_tx_allocate(struct ipw2100_priv *priv)
4268 TX_PENDED_QUEUE_LENGTH * sizeof(struct ipw2100_tx_packet), 4297 TX_PENDED_QUEUE_LENGTH * sizeof(struct ipw2100_tx_packet),
4269 GFP_ATOMIC); 4298 GFP_ATOMIC);
4270 if (!priv->tx_buffers) { 4299 if (!priv->tx_buffers) {
4271 IPW_DEBUG_ERROR("%s: alloc failed form tx buffers.\n", 4300 printk(KERN_ERR DRV_NAME ": %s: alloc failed form tx buffers.\n",
4272 priv->net_dev->name); 4301 priv->net_dev->name);
4273 bd_queue_free(priv, &priv->tx_queue); 4302 bd_queue_free(priv, &priv->tx_queue);
4274 return -ENOMEM; 4303 return -ENOMEM;
@@ -4278,7 +4307,7 @@ static int ipw2100_tx_allocate(struct ipw2100_priv *priv)
4278 v = pci_alloc_consistent( 4307 v = pci_alloc_consistent(
4279 priv->pci_dev, sizeof(struct ipw2100_data_header), &p); 4308 priv->pci_dev, sizeof(struct ipw2100_data_header), &p);
4280 if (!v) { 4309 if (!v) {
4281 IPW_DEBUG_ERROR("%s: PCI alloc failed for tx " 4310 printk(KERN_ERR DRV_NAME ": %s: PCI alloc failed for tx "
4282 "buffers.\n", priv->net_dev->name); 4311 "buffers.\n", priv->net_dev->name);
4283 err = -ENOMEM; 4312 err = -ENOMEM;
4284 break; 4313 break;
@@ -4537,7 +4566,7 @@ static int ipw2100_read_mac_address(struct ipw2100_priv *priv)
4537 * 4566 *
4538 ********************************************************************/ 4567 ********************************************************************/
4539 4568
4540int ipw2100_set_mac_address(struct ipw2100_priv *priv, int batch_mode) 4569static int ipw2100_set_mac_address(struct ipw2100_priv *priv, int batch_mode)
4541{ 4570{
4542 struct host_command cmd = { 4571 struct host_command cmd = {
4543 .host_command = ADAPTER_ADDRESS, 4572 .host_command = ADAPTER_ADDRESS,
@@ -4564,7 +4593,7 @@ int ipw2100_set_mac_address(struct ipw2100_priv *priv, int batch_mode)
4564 return err; 4593 return err;
4565} 4594}
4566 4595
4567int ipw2100_set_port_type(struct ipw2100_priv *priv, u32 port_type, 4596static int ipw2100_set_port_type(struct ipw2100_priv *priv, u32 port_type,
4568 int batch_mode) 4597 int batch_mode)
4569{ 4598{
4570 struct host_command cmd = { 4599 struct host_command cmd = {
@@ -4589,7 +4618,7 @@ int ipw2100_set_port_type(struct ipw2100_priv *priv, u32 port_type,
4589 if (!batch_mode) { 4618 if (!batch_mode) {
4590 err = ipw2100_disable_adapter(priv); 4619 err = ipw2100_disable_adapter(priv);
4591 if (err) { 4620 if (err) {
4592 IPW_DEBUG_ERROR("%s: Could not disable adapter %d\n", 4621 printk(KERN_ERR DRV_NAME ": %s: Could not disable adapter %d\n",
4593 priv->net_dev->name, err); 4622 priv->net_dev->name, err);
4594 return err; 4623 return err;
4595 } 4624 }
@@ -4605,7 +4634,8 @@ int ipw2100_set_port_type(struct ipw2100_priv *priv, u32 port_type,
4605} 4634}
4606 4635
4607 4636
4608int ipw2100_set_channel(struct ipw2100_priv *priv, u32 channel, int batch_mode) 4637static int ipw2100_set_channel(struct ipw2100_priv *priv, u32 channel,
4638 int batch_mode)
4609{ 4639{
4610 struct host_command cmd = { 4640 struct host_command cmd = {
4611 .host_command = CHANNEL, 4641 .host_command = CHANNEL,
@@ -4655,7 +4685,7 @@ int ipw2100_set_channel(struct ipw2100_priv *priv, u32 channel, int batch_mode)
4655 return 0; 4685 return 0;
4656} 4686}
4657 4687
4658int ipw2100_system_config(struct ipw2100_priv *priv, int batch_mode) 4688static int ipw2100_system_config(struct ipw2100_priv *priv, int batch_mode)
4659{ 4689{
4660 struct host_command cmd = { 4690 struct host_command cmd = {
4661 .host_command = SYSTEM_CONFIG, 4691 .host_command = SYSTEM_CONFIG,
@@ -4717,7 +4747,8 @@ int ipw2100_system_config(struct ipw2100_priv *priv, int batch_mode)
4717 return 0; 4747 return 0;
4718} 4748}
4719 4749
4720int ipw2100_set_tx_rates(struct ipw2100_priv *priv, u32 rate, int batch_mode) 4750static int ipw2100_set_tx_rates(struct ipw2100_priv *priv, u32 rate,
4751 int batch_mode)
4721{ 4752{
4722 struct host_command cmd = { 4753 struct host_command cmd = {
4723 .host_command = BASIC_TX_RATES, 4754 .host_command = BASIC_TX_RATES,
@@ -4756,8 +4787,8 @@ int ipw2100_set_tx_rates(struct ipw2100_priv *priv, u32 rate, int batch_mode)
4756 return 0; 4787 return 0;
4757} 4788}
4758 4789
4759int ipw2100_set_power_mode(struct ipw2100_priv *priv, 4790static int ipw2100_set_power_mode(struct ipw2100_priv *priv,
4760 int power_level) 4791 int power_level)
4761{ 4792{
4762 struct host_command cmd = { 4793 struct host_command cmd = {
4763 .host_command = POWER_MODE, 4794 .host_command = POWER_MODE,
@@ -4794,7 +4825,7 @@ int ipw2100_set_power_mode(struct ipw2100_priv *priv,
4794} 4825}
4795 4826
4796 4827
4797int ipw2100_set_rts_threshold(struct ipw2100_priv *priv, u32 threshold) 4828static int ipw2100_set_rts_threshold(struct ipw2100_priv *priv, u32 threshold)
4798{ 4829{
4799 struct host_command cmd = { 4830 struct host_command cmd = {
4800 .host_command = RTS_THRESHOLD, 4831 .host_command = RTS_THRESHOLD,
@@ -4858,7 +4889,7 @@ int ipw2100_set_fragmentation_threshold(struct ipw2100_priv *priv,
4858} 4889}
4859#endif 4890#endif
4860 4891
4861int ipw2100_set_short_retry(struct ipw2100_priv *priv, u32 retry) 4892static int ipw2100_set_short_retry(struct ipw2100_priv *priv, u32 retry)
4862{ 4893{
4863 struct host_command cmd = { 4894 struct host_command cmd = {
4864 .host_command = SHORT_RETRY_LIMIT, 4895 .host_command = SHORT_RETRY_LIMIT,
@@ -4878,7 +4909,7 @@ int ipw2100_set_short_retry(struct ipw2100_priv *priv, u32 retry)
4878 return 0; 4909 return 0;
4879} 4910}
4880 4911
4881int ipw2100_set_long_retry(struct ipw2100_priv *priv, u32 retry) 4912static int ipw2100_set_long_retry(struct ipw2100_priv *priv, u32 retry)
4882{ 4913{
4883 struct host_command cmd = { 4914 struct host_command cmd = {
4884 .host_command = LONG_RETRY_LIMIT, 4915 .host_command = LONG_RETRY_LIMIT,
@@ -4899,8 +4930,8 @@ int ipw2100_set_long_retry(struct ipw2100_priv *priv, u32 retry)
4899} 4930}
4900 4931
4901 4932
4902int ipw2100_set_mandatory_bssid(struct ipw2100_priv *priv, u8 *bssid, 4933static int ipw2100_set_mandatory_bssid(struct ipw2100_priv *priv, u8 *bssid,
4903 int batch_mode) 4934 int batch_mode)
4904{ 4935{
4905 struct host_command cmd = { 4936 struct host_command cmd = {
4906 .host_command = MANDATORY_BSSID, 4937 .host_command = MANDATORY_BSSID,
@@ -5037,11 +5068,11 @@ struct security_info_params {
5037 u8 unicast_using_group; 5068 u8 unicast_using_group;
5038} __attribute__ ((packed)); 5069} __attribute__ ((packed));
5039 5070
5040int ipw2100_set_security_information(struct ipw2100_priv *priv, 5071static int ipw2100_set_security_information(struct ipw2100_priv *priv,
5041 int auth_mode, 5072 int auth_mode,
5042 int security_level, 5073 int security_level,
5043 int unicast_using_group, 5074 int unicast_using_group,
5044 int batch_mode) 5075 int batch_mode)
5045{ 5076{
5046 struct host_command cmd = { 5077 struct host_command cmd = {
5047 .host_command = SET_SECURITY_INFORMATION, 5078 .host_command = SET_SECURITY_INFORMATION,
@@ -5103,8 +5134,8 @@ int ipw2100_set_security_information(struct ipw2100_priv *priv,
5103 return err; 5134 return err;
5104} 5135}
5105 5136
5106int ipw2100_set_tx_power(struct ipw2100_priv *priv, 5137static int ipw2100_set_tx_power(struct ipw2100_priv *priv,
5107 u32 tx_power) 5138 u32 tx_power)
5108{ 5139{
5109 struct host_command cmd = { 5140 struct host_command cmd = {
5110 .host_command = TX_POWER_INDEX, 5141 .host_command = TX_POWER_INDEX,
@@ -5123,8 +5154,8 @@ int ipw2100_set_tx_power(struct ipw2100_priv *priv,
5123 return 0; 5154 return 0;
5124} 5155}
5125 5156
5126int ipw2100_set_ibss_beacon_interval(struct ipw2100_priv *priv, 5157static int ipw2100_set_ibss_beacon_interval(struct ipw2100_priv *priv,
5127 u32 interval, int batch_mode) 5158 u32 interval, int batch_mode)
5128{ 5159{
5129 struct host_command cmd = { 5160 struct host_command cmd = {
5130 .host_command = BEACON_INTERVAL, 5161 .host_command = BEACON_INTERVAL,
@@ -5208,7 +5239,7 @@ static int ipw2100_set_wep_flags(struct ipw2100_priv *priv, u32 flags,
5208 if (!batch_mode) { 5239 if (!batch_mode) {
5209 err = ipw2100_disable_adapter(priv); 5240 err = ipw2100_disable_adapter(priv);
5210 if (err) { 5241 if (err) {
5211 IPW_DEBUG_ERROR("%s: Could not disable adapter %d\n", 5242 printk(KERN_ERR DRV_NAME ": %s: Could not disable adapter %d\n",
5212 priv->net_dev->name, err); 5243 priv->net_dev->name, err);
5213 return err; 5244 return err;
5214 } 5245 }
@@ -5296,7 +5327,7 @@ static int ipw2100_set_key(struct ipw2100_priv *priv,
5296 err = ipw2100_disable_adapter(priv); 5327 err = ipw2100_disable_adapter(priv);
5297 /* FIXME: IPG: shouldn't this prink be in _disable_adapter()? */ 5328 /* FIXME: IPG: shouldn't this prink be in _disable_adapter()? */
5298 if (err) { 5329 if (err) {
5299 IPW_DEBUG_ERROR("%s: Could not disable adapter %d\n", 5330 printk(KERN_ERR DRV_NAME ": %s: Could not disable adapter %d\n",
5300 priv->net_dev->name, err); 5331 priv->net_dev->name, err);
5301 return err; 5332 return err;
5302 } 5333 }
@@ -5332,7 +5363,7 @@ static int ipw2100_set_key_index(struct ipw2100_priv *priv,
5332 if (!batch_mode) { 5363 if (!batch_mode) {
5333 err = ipw2100_disable_adapter(priv); 5364 err = ipw2100_disable_adapter(priv);
5334 if (err) { 5365 if (err) {
5335 IPW_DEBUG_ERROR("%s: Could not disable adapter %d\n", 5366 printk(KERN_ERR DRV_NAME ": %s: Could not disable adapter %d\n",
5336 priv->net_dev->name, err); 5367 priv->net_dev->name, err);
5337 return err; 5368 return err;
5338 } 5369 }
@@ -5654,8 +5685,10 @@ static int ipw2100_open(struct net_device *dev)
5654 IPW_DEBUG_INFO("dev->open\n"); 5685 IPW_DEBUG_INFO("dev->open\n");
5655 5686
5656 spin_lock_irqsave(&priv->low_lock, flags); 5687 spin_lock_irqsave(&priv->low_lock, flags);
5657 if (priv->status & STATUS_ASSOCIATED) 5688 if (priv->status & STATUS_ASSOCIATED) {
5689 netif_carrier_on(dev);
5658 netif_start_queue(dev); 5690 netif_start_queue(dev);
5691 }
5659 spin_unlock_irqrestore(&priv->low_lock, flags); 5692 spin_unlock_irqrestore(&priv->low_lock, flags);
5660 5693
5661 return 0; 5694 return 0;
@@ -5880,7 +5913,7 @@ static int ipw2100_wpa_set_param(struct net_device *dev, u8 name, u32 value){
5880 break; 5913 break;
5881 5914
5882 default: 5915 default:
5883 IPW_DEBUG_ERROR("%s: Unknown WPA param: %d\n", 5916 printk(KERN_ERR DRV_NAME ": %s: Unknown WPA param: %d\n",
5884 dev->name, name); 5917 dev->name, name);
5885 ret = -EOPNOTSUPP; 5918 ret = -EOPNOTSUPP;
5886 } 5919 }
@@ -5903,7 +5936,7 @@ static int ipw2100_wpa_mlme(struct net_device *dev, int command, int reason){
5903 break; 5936 break;
5904 5937
5905 default: 5938 default:
5906 IPW_DEBUG_ERROR("%s: Unknown MLME request: %d\n", 5939 printk(KERN_ERR DRV_NAME ": %s: Unknown MLME request: %d\n",
5907 dev->name, command); 5940 dev->name, command);
5908 ret = -EOPNOTSUPP; 5941 ret = -EOPNOTSUPP;
5909 } 5942 }
@@ -6153,7 +6186,7 @@ static int ipw2100_wpa_supplicant(struct net_device *dev, struct iw_point *p){
6153 break; 6186 break;
6154 6187
6155 default: 6188 default:
6156 IPW_DEBUG_ERROR("%s: Unknown WPA supplicant request: %d\n", 6189 printk(KERN_ERR DRV_NAME ": %s: Unknown WPA supplicant request: %d\n",
6157 dev->name, param->cmd); 6190 dev->name, param->cmd);
6158 ret = -EOPNOTSUPP; 6191 ret = -EOPNOTSUPP;
6159 6192
@@ -6883,7 +6916,7 @@ module_exit(ipw2100_exit);
6883 6916
6884#define WEXT_USECHANNELS 1 6917#define WEXT_USECHANNELS 1
6885 6918
6886const long ipw2100_frequencies[] = { 6919static const long ipw2100_frequencies[] = {
6887 2412, 2417, 2422, 2427, 6920 2412, 2417, 2422, 2427,
6888 2432, 2437, 2442, 2447, 6921 2432, 2437, 2442, 2447,
6889 2452, 2457, 2462, 2467, 6922 2452, 2457, 2462, 2467,
@@ -6893,7 +6926,7 @@ const long ipw2100_frequencies[] = {
6893#define FREQ_COUNT (sizeof(ipw2100_frequencies) / \ 6926#define FREQ_COUNT (sizeof(ipw2100_frequencies) / \
6894 sizeof(ipw2100_frequencies[0])) 6927 sizeof(ipw2100_frequencies[0]))
6895 6928
6896const long ipw2100_rates_11b[] = { 6929static const long ipw2100_rates_11b[] = {
6897 1000000, 6930 1000000,
6898 2000000, 6931 2000000,
6899 5500000, 6932 5500000,
@@ -7052,7 +7085,7 @@ static int ipw2100_wx_get_mode(struct net_device *dev,
7052#define POWER_MODES 5 7085#define POWER_MODES 5
7053 7086
7054/* Values are in microsecond */ 7087/* Values are in microsecond */
7055const s32 timeout_duration[POWER_MODES] = { 7088static const s32 timeout_duration[POWER_MODES] = {
7056 350000, 7089 350000,
7057 250000, 7090 250000,
7058 75000, 7091 75000,
@@ -7060,7 +7093,7 @@ const s32 timeout_duration[POWER_MODES] = {
7060 25000, 7093 25000,
7061}; 7094};
7062 7095
7063const s32 period_duration[POWER_MODES] = { 7096static const s32 period_duration[POWER_MODES] = {
7064 400000, 7097 400000,
7065 700000, 7098 700000,
7066 1000000, 7099 1000000,
@@ -8125,7 +8158,7 @@ static iw_handler ipw2100_private_handler[] = {
8125 ipw2100_wx_get_preamble, 8158 ipw2100_wx_get_preamble,
8126}; 8159};
8127 8160
8128struct iw_handler_def ipw2100_wx_handler_def = 8161static struct iw_handler_def ipw2100_wx_handler_def =
8129{ 8162{
8130 .standard = ipw2100_wx_handlers, 8163 .standard = ipw2100_wx_handlers,
8131 .num_standard = sizeof(ipw2100_wx_handlers) / sizeof(iw_handler), 8164 .num_standard = sizeof(ipw2100_wx_handlers) / sizeof(iw_handler),
@@ -8141,7 +8174,7 @@ struct iw_handler_def ipw2100_wx_handler_def =
8141 * Called by /proc/net/wireless 8174 * Called by /proc/net/wireless
8142 * Also called by SIOCGIWSTATS 8175 * Also called by SIOCGIWSTATS
8143 */ 8176 */
8144struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device * dev) 8177static struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device * dev)
8145{ 8178{
8146 enum { 8179 enum {
8147 POOR = 30, 8180 POOR = 30,
@@ -8277,7 +8310,7 @@ struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device * dev)
8277 return (struct iw_statistics *) NULL; 8310 return (struct iw_statistics *) NULL;
8278} 8311}
8279 8312
8280void ipw2100_wx_event_work(struct ipw2100_priv *priv) 8313static void ipw2100_wx_event_work(struct ipw2100_priv *priv)
8281{ 8314{
8282 union iwreq_data wrqu; 8315 union iwreq_data wrqu;
8283 int len = ETH_ALEN; 8316 int len = ETH_ALEN;
@@ -8375,7 +8408,7 @@ static int ipw2100_mod_firmware_load(struct ipw2100_fw *fw)
8375 (struct ipw2100_fw_header *)fw->fw_entry->data; 8408 (struct ipw2100_fw_header *)fw->fw_entry->data;
8376 8409
8377 if (IPW2100_FW_MAJOR(h->version) != IPW2100_FW_MAJOR_VERSION) { 8410 if (IPW2100_FW_MAJOR(h->version) != IPW2100_FW_MAJOR_VERSION) {
8378 IPW_DEBUG_WARNING("Firmware image not compatible " 8411 printk(KERN_WARNING DRV_NAME ": Firmware image not compatible "
8379 "(detected version id of %u). " 8412 "(detected version id of %u). "
8380 "See Documentation/networking/README.ipw2100\n", 8413 "See Documentation/networking/README.ipw2100\n",
8381 h->version); 8414 h->version);
@@ -8392,7 +8425,8 @@ static int ipw2100_mod_firmware_load(struct ipw2100_fw *fw)
8392} 8425}
8393 8426
8394 8427
8395int ipw2100_get_firmware(struct ipw2100_priv *priv, struct ipw2100_fw *fw) 8428static int ipw2100_get_firmware(struct ipw2100_priv *priv,
8429 struct ipw2100_fw *fw)
8396{ 8430{
8397 char *fw_name; 8431 char *fw_name;
8398 int rc; 8432 int rc;
@@ -8418,7 +8452,7 @@ int ipw2100_get_firmware(struct ipw2100_priv *priv, struct ipw2100_fw *fw)
8418 rc = request_firmware(&fw->fw_entry, fw_name, &priv->pci_dev->dev); 8452 rc = request_firmware(&fw->fw_entry, fw_name, &priv->pci_dev->dev);
8419 8453
8420 if (rc < 0) { 8454 if (rc < 0) {
8421 IPW_DEBUG_ERROR( 8455 printk(KERN_ERR DRV_NAME ": "
8422 "%s: Firmware '%s' not available or load failed.\n", 8456 "%s: Firmware '%s' not available or load failed.\n",
8423 priv->net_dev->name, fw_name); 8457 priv->net_dev->name, fw_name);
8424 return rc; 8458 return rc;
@@ -8431,8 +8465,8 @@ int ipw2100_get_firmware(struct ipw2100_priv *priv, struct ipw2100_fw *fw)
8431 return 0; 8465 return 0;
8432} 8466}
8433 8467
8434void ipw2100_release_firmware(struct ipw2100_priv *priv, 8468static void ipw2100_release_firmware(struct ipw2100_priv *priv,
8435 struct ipw2100_fw *fw) 8469 struct ipw2100_fw *fw)
8436{ 8470{
8437 fw->version = 0; 8471 fw->version = 0;
8438 if (fw->fw_entry) 8472 if (fw->fw_entry)
@@ -8441,7 +8475,8 @@ void ipw2100_release_firmware(struct ipw2100_priv *priv,
8441} 8475}
8442 8476
8443 8477
8444int ipw2100_get_fwversion(struct ipw2100_priv *priv, char *buf, size_t max) 8478static int ipw2100_get_fwversion(struct ipw2100_priv *priv, char *buf,
8479 size_t max)
8445{ 8480{
8446 char ver[MAX_FW_VERSION_LEN]; 8481 char ver[MAX_FW_VERSION_LEN];
8447 u32 len = MAX_FW_VERSION_LEN; 8482 u32 len = MAX_FW_VERSION_LEN;
@@ -8460,7 +8495,8 @@ int ipw2100_get_fwversion(struct ipw2100_priv *priv, char *buf, size_t max)
8460 return tmp; 8495 return tmp;
8461} 8496}
8462 8497
8463int ipw2100_get_ucodeversion(struct ipw2100_priv *priv, char *buf, size_t max) 8498static int ipw2100_get_ucodeversion(struct ipw2100_priv *priv, char *buf,
8499 size_t max)
8464{ 8500{
8465 u32 ver; 8501 u32 ver;
8466 u32 len = sizeof(ver); 8502 u32 len = sizeof(ver);
@@ -8474,7 +8510,8 @@ int ipw2100_get_ucodeversion(struct ipw2100_priv *priv, char *buf, size_t max)
8474/* 8510/*
8475 * On exit, the firmware will have been freed from the fw list 8511 * On exit, the firmware will have been freed from the fw list
8476 */ 8512 */
8477int ipw2100_fw_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw) 8513static int ipw2100_fw_download(struct ipw2100_priv *priv,
8514 struct ipw2100_fw *fw)
8478{ 8515{
8479 /* firmware is constructed of N contiguous entries, each entry is 8516 /* firmware is constructed of N contiguous entries, each entry is
8480 * structured as: 8517 * structured as:
@@ -8500,7 +8537,7 @@ int ipw2100_fw_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw)
8500 firmware_data_left -= 2; 8537 firmware_data_left -= 2;
8501 8538
8502 if (len > 32) { 8539 if (len > 32) {
8503 IPW_DEBUG_ERROR( 8540 printk(KERN_ERR DRV_NAME ": "
8504 "Invalid firmware run-length of %d bytes\n", 8541 "Invalid firmware run-length of %d bytes\n",
8505 len); 8542 len);
8506 return -EINVAL; 8543 return -EINVAL;
@@ -8531,7 +8568,8 @@ struct symbol_alive_response {
8531 u8 ucode_valid; 8568 u8 ucode_valid;
8532}; 8569};
8533 8570
8534int ipw2100_ucode_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw) 8571static int ipw2100_ucode_download(struct ipw2100_priv *priv,
8572 struct ipw2100_fw *fw)
8535{ 8573{
8536 struct net_device *dev = priv->net_dev; 8574 struct net_device *dev = priv->net_dev;
8537 const unsigned char *microcode_data = fw->uc.data; 8575 const unsigned char *microcode_data = fw->uc.data;
@@ -8610,7 +8648,7 @@ int ipw2100_ucode_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw)
8610 } 8648 }
8611 8649
8612 if (i == 10) { 8650 if (i == 10) {
8613 IPW_DEBUG_ERROR("%s: Error initializing Symbol\n", 8651 printk(KERN_ERR DRV_NAME ": %s: Error initializing Symbol\n",
8614 dev->name); 8652 dev->name);
8615 return -EIO; 8653 return -EIO;
8616 } 8654 }
@@ -8631,7 +8669,7 @@ int ipw2100_ucode_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw)
8631 } 8669 }
8632 8670
8633 if (i == 30) { 8671 if (i == 30) {
8634 IPW_DEBUG_ERROR("%s: No response from Symbol - hw not alive\n", 8672 printk(KERN_ERR DRV_NAME ": %s: No response from Symbol - hw not alive\n",
8635 dev->name); 8673 dev->name);
8636 printk_buf(IPW_DL_ERROR, (u8*)&response, sizeof(response)); 8674 printk_buf(IPW_DL_ERROR, (u8*)&response, sizeof(response));
8637 return -EIO; 8675 return -EIO;
diff --git a/drivers/net/wireless/ipw2100.h b/drivers/net/wireless/ipw2100.h
index 95a05b554c1a..2a3cdbd50168 100644
--- a/drivers/net/wireless/ipw2100.h
+++ b/drivers/net/wireless/ipw2100.h
@@ -48,22 +48,6 @@ struct ipw2100_priv;
48struct ipw2100_tx_packet; 48struct ipw2100_tx_packet;
49struct ipw2100_rx_packet; 49struct ipw2100_rx_packet;
50 50
51#ifdef CONFIG_IPW_DEBUG
52enum { IPW_DEBUG_ENABLED = 1 };
53extern u32 ipw2100_debug_level;
54#define IPW_DEBUG(level, message...) \
55do { \
56 if (ipw2100_debug_level & (level)) { \
57 printk(KERN_DEBUG "ipw2100: %c %s ", \
58 in_interrupt() ? 'I' : 'U', __FUNCTION__); \
59 printk(message); \
60 } \
61} while (0)
62#else
63enum { IPW_DEBUG_ENABLED = 0 };
64#define IPW_DEBUG(level, message...) do {} while (0)
65#endif /* CONFIG_IPW_DEBUG */
66
67#define IPW_DL_UNINIT 0x80000000 51#define IPW_DL_UNINIT 0x80000000
68#define IPW_DL_NONE 0x00000000 52#define IPW_DL_NONE 0x00000000
69#define IPW_DL_ALL 0x7FFFFFFF 53#define IPW_DL_ALL 0x7FFFFFFF
@@ -1144,10 +1128,6 @@ typedef enum _ORDINAL_TABLE_2 { // NS - means Not Supported by FW
1144#define WIRELESS_SPY // enable iwspy support 1128#define WIRELESS_SPY // enable iwspy support
1145#endif 1129#endif
1146 1130
1147extern struct iw_handler_def ipw2100_wx_handler_def;
1148extern struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device * dev);
1149extern void ipw2100_wx_event_work(struct ipw2100_priv *priv);
1150
1151#define IPW_HOST_FW_SHARED_AREA0 0x0002f200 1131#define IPW_HOST_FW_SHARED_AREA0 0x0002f200
1152#define IPW_HOST_FW_SHARED_AREA0_END 0x0002f510 // 0x310 bytes 1132#define IPW_HOST_FW_SHARED_AREA0_END 0x0002f510 // 0x310 bytes
1153 1133
@@ -1182,14 +1162,6 @@ struct ipw2100_fw {
1182 const struct firmware *fw_entry; 1162 const struct firmware *fw_entry;
1183}; 1163};
1184 1164
1185int ipw2100_get_firmware(struct ipw2100_priv *priv, struct ipw2100_fw *fw);
1186void ipw2100_release_firmware(struct ipw2100_priv *priv, struct ipw2100_fw *fw);
1187int ipw2100_fw_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw);
1188int ipw2100_ucode_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw);
1189
1190#define MAX_FW_VERSION_LEN 14 1165#define MAX_FW_VERSION_LEN 14
1191 1166
1192int ipw2100_get_fwversion(struct ipw2100_priv *priv, char *buf, size_t max);
1193int ipw2100_get_ucodeversion(struct ipw2100_priv *priv, char *buf, size_t max);
1194
1195#endif /* _IPW2100_H */ 1167#endif /* _IPW2100_H */
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 6211438058de..6d0b6b1df4ca 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -4485,7 +4485,7 @@ static void ipw_debug_config(struct ipw_priv *priv)
4485 IPW_DEBUG_INFO("RATE MASK: 0x%08X\n", priv->rates_mask); 4485 IPW_DEBUG_INFO("RATE MASK: 0x%08X\n", priv->rates_mask);
4486} 4486}
4487#else 4487#else
4488#define ipw_debug_config(x) do {} while (0); 4488#define ipw_debug_config(x) do {} while (0)
4489#endif 4489#endif
4490 4490
4491static inline void ipw_set_fixed_rate(struct ipw_priv *priv, 4491static inline void ipw_set_fixed_rate(struct ipw_priv *priv,
@@ -6617,11 +6617,7 @@ static int ipw_setup_deferred_work(struct ipw_priv *priv)
6617{ 6617{
6618 int ret = 0; 6618 int ret = 0;
6619 6619
6620#ifdef CONFIG_SOFTWARE_SUSPEND2
6621 priv->workqueue = create_workqueue(DRV_NAME, 0);
6622#else
6623 priv->workqueue = create_workqueue(DRV_NAME); 6620 priv->workqueue = create_workqueue(DRV_NAME);
6624#endif
6625 init_waitqueue_head(&priv->wait_command_queue); 6621 init_waitqueue_head(&priv->wait_command_queue);
6626 6622
6627 INIT_WORK(&priv->adhoc_check, ipw_adhoc_check, priv); 6623 INIT_WORK(&priv->adhoc_check, ipw_adhoc_check, priv);
@@ -7242,11 +7238,7 @@ static int ipw_pci_suspend(struct pci_dev *pdev, u32 state)
7242 /* Remove the PRESENT state of the device */ 7238 /* Remove the PRESENT state of the device */
7243 netif_device_detach(dev); 7239 netif_device_detach(dev);
7244 7240
7245#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
7246 pci_save_state(pdev, priv->pm_state);
7247#else
7248 pci_save_state(pdev); 7241 pci_save_state(pdev);
7249#endif
7250 pci_disable_device(pdev); 7242 pci_disable_device(pdev);
7251 pci_set_power_state(pdev, state); 7243 pci_set_power_state(pdev, state);
7252 7244
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h
index 78b5f444271d..3bff09d93154 100644
--- a/drivers/net/wireless/ipw2200.h
+++ b/drivers/net/wireless/ipw2200.h
@@ -53,26 +53,6 @@
53 53
54#include <linux/workqueue.h> 54#include <linux/workqueue.h>
55 55
56#ifndef IRQ_NONE
57typedef void irqreturn_t;
58#define IRQ_NONE
59#define IRQ_HANDLED
60#define IRQ_RETVAL(x)
61#endif
62
63#if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) )
64#define __iomem
65#endif
66
67#if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5) )
68#define pci_dma_sync_single_for_cpu pci_dma_sync_single
69#define pci_dma_sync_single_for_device pci_dma_sync_single
70#endif
71
72#ifndef HAVE_FREE_NETDEV
73#define free_netdev(x) kfree(x)
74#endif
75
76/* Authentication and Association States */ 56/* Authentication and Association States */
77enum connection_manager_assoc_states 57enum connection_manager_assoc_states
78{ 58{
@@ -93,8 +73,6 @@ enum connection_manager_assoc_states
93}; 73};
94 74
95 75
96#define IPW_NORMAL 0
97#define IPW_NOWAIT 0
98#define IPW_WAIT (1<<0) 76#define IPW_WAIT (1<<0)
99#define IPW_QUIET (1<<1) 77#define IPW_QUIET (1<<1)
100#define IPW_ROAMING (1<<2) 78#define IPW_ROAMING (1<<2)
@@ -200,7 +178,7 @@ enum connection_manager_assoc_states
200 178
201/* even if MAC WEP set (allows pre-encrypt) */ 179/* even if MAC WEP set (allows pre-encrypt) */
202#define DCT_FLAG_NO_WEP 0x20 180#define DCT_FLAG_NO_WEP 0x20
203#define IPW_ 181
204/* overwrite TSF field */ 182/* overwrite TSF field */
205#define DCT_FLAG_TSF_REQD 0x40 183#define DCT_FLAG_TSF_REQD 0x40
206 184
@@ -533,12 +511,6 @@ struct notif_authenticate {
533 u16 status; 511 u16 status;
534} __attribute__ ((packed)); 512} __attribute__ ((packed));
535 513
536struct temperature
537{
538 s32 measured;
539 s32 active;
540} __attribute__ ((packed));
541
542struct notif_calibration { 514struct notif_calibration {
543 u8 data[104]; 515 u8 data[104];
544} __attribute__ ((packed)); 516} __attribute__ ((packed));