mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

69 lines
2.2 KiB

diff -urp ipw2100-0.54/ipw2100.c ipw2100-0.54-new/ipw2100_main.c
--- ipw2100-0.54/ipw2100.c 2004-09-01 04:23:09.000000000 +0800
+++ ipw2100-0.54-new/ipw2100_main.c 2004-09-14 13:26:20.742098168 +0800
@@ -1373,6 +1373,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);
@@ -1419,26 +1426,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;
@@ -5869,7 +5867,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 = {
@@ -6219,7 +6217,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);