1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
diff -u -p -r1.117 CHANGES
--- CHANGES 27 Sep 2004 15:42:18 -0000 1.117
+++ CHANGES 28 Sep 2004 02:51:49 -0000
@@ -1,3 +1,10 @@
+Changes in ...
+
+* Fixed manual disable parameter (thanks to Yi Zhu)
+* Fixed resume maintaining manual disable state (thanks to Ralf
+ Hemmenstaedt)
+
+
Changes in 0.55
NOTE: 0.55 requires firmware v1.3. You can obtain the latest firmware
diff -u -p -r1.1044 ipw2100.c
--- ipw2100.c 27 Sep 2004 14:51:19 -0000 1.1044
+++ ipw2100.c 28 Sep 2004 02:51:49 -0000
@@ -1395,6 +1395,13 @@ static int ipw2100_up(struct ipw2100_pri
u32 lock;
u32 ord_len = sizeof(lock);
+ /* Quite if manually disabled. */
+ if (priv->manual_disable) {
+ printk(KERN_INFO "%s: Radio is disabled by Manual Disable "
+ "switch\n", priv->ndev->name);
+ return 0;
+ }
+
/* If the interrupt is enabled, turn it off... */
spin_lock_irqsave(&priv->low_lock, flags);
ipw2100_hw_disable_interrupt(priv);
@@ -1441,26 +1448,17 @@ static int ipw2100_up(struct ipw2100_pri
}
priv->in_scan = 0;
+ priv->rf_kill = ipw2100_get_rf_switch(priv);
- if (priv->hw_features & HW_FEATURE_RFKILL)
- priv->rf_kill = ipw2100_get_rf_switch(priv);
- else
- priv->rf_kill = 0;
-
- if (priv->rf_kill || priv->manual_disable) {
- if (priv->rf_kill)
- printk(KERN_INFO "%s: Radio is disabled by RF switch\n",
- priv->ndev->name);
- if (priv->manual_disable)
- printk(KERN_INFO "%s: Radio is disabled by Manual Disable switch\n",
- priv->ndev->name);
+ if (priv->rf_kill) {
+ printk(KERN_INFO "%s: Radio is disabled by RF switch\n",
+ priv->ndev->name);
if (priv->stop_rf_check) {
priv->stop_rf_check = 0;
priv->rf_switch_timer.expires = jiffies + HZ;
add_timer(&priv->rf_switch_timer);
}
-
/* Since the RF switch is off, we will defer
* the sending of the HOST_COMPLETE */
deferred = 1;
@@ -5520,7 +5518,7 @@ static void shim__set_security(struct ie
priv->sec.flags & BIT(0) ? '1' : '0');
if (!priv->connected)
- ipw2100_configure_security(priv, 0);
+ ipw2100_configure_security(priv, priv->manual_disable);
}
static struct ieee80211_helper_functions ipw2100_ieee_callbacks = {
@@ -6312,7 +6310,10 @@ static void ipw2100_rf_switch_check(unsi
if (!priv->rf_kill) {
/* Kill timer; we don't need to poll for RF going
* off since the firmware will tell us */
- priv->stop_rf_check = 1;
+ if (!priv->stop_rf_check) {
+ priv->stop_rf_check = 1;
+ del_timer_sync(&priv->rf_switch_timer);
+ }
/* Restart the NIC */
schedule_reset(priv);
@@ -6813,9 +6814,10 @@ static int ipw2100_resume(struct pci_dev
* the queue of needed */
netif_device_attach(dev);
- /* Bring the device back up */
- ipw2100_up(priv, 0);
-
+ /* Bring the device back up */
+ if (!priv->manual_disable)
+ ipw2100_up(priv, 0);
+
return 0;
}
#endif
|