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

  1. diff -urp ipw2100-0.54/ipw2100.c ipw2100-0.54-new/ipw2100_main.c
  2. --- ipw2100-0.54/ipw2100.c 2004-09-01 04:23:09.000000000 +0800
  3. +++ ipw2100-0.54-new/ipw2100_main.c 2004-09-14 13:26:20.742098168 +0800
  4. @@ -1373,6 +1373,13 @@ static int ipw2100_up(struct ipw2100_pri
  5. u32 lock;
  6. u32 ord_len = sizeof(lock);
  7. + /* Quite if manually disabled. */
  8. + if (priv->manual_disable) {
  9. + printk(KERN_INFO "%s: Radio is disabled by Manual Disable "
  10. + "switch\n", priv->ndev->name);
  11. + return 0;
  12. + }
  13. +
  14. /* If the interrupt is enabled, turn it off... */
  15. spin_lock_irqsave(&priv->low_lock, flags);
  16. ipw2100_hw_disable_interrupt(priv);
  17. @@ -1419,26 +1426,17 @@ static int ipw2100_up(struct ipw2100_pri
  18. }
  19. priv->in_scan = 0;
  20. + priv->rf_kill = ipw2100_get_rf_switch(priv);
  21. - if (priv->hw_features & HW_FEATURE_RFKILL)
  22. - priv->rf_kill = ipw2100_get_rf_switch(priv);
  23. - else
  24. - priv->rf_kill = 0;
  25. -
  26. - if (priv->rf_kill || priv->manual_disable) {
  27. - if (priv->rf_kill)
  28. - printk(KERN_INFO "%s: Radio is disabled by RF switch\n",
  29. - priv->ndev->name);
  30. - if (priv->manual_disable)
  31. - printk(KERN_INFO "%s: Radio is disabled by Manual Disable switch\n",
  32. - priv->ndev->name);
  33. + if (priv->rf_kill) {
  34. + printk(KERN_INFO "%s: Radio is disabled by RF switch\n",
  35. + priv->ndev->name);
  36. if (priv->stop_rf_check) {
  37. priv->stop_rf_check = 0;
  38. priv->rf_switch_timer.expires = jiffies + HZ;
  39. add_timer(&priv->rf_switch_timer);
  40. }
  41. -
  42. /* Since the RF switch is off, we will defer
  43. * the sending of the HOST_COMPLETE */
  44. deferred = 1;
  45. @@ -5869,7 +5867,7 @@ static void shim__set_security(struct ie
  46. priv->sec.flags & BIT(0) ? '1' : '0');
  47. if (!priv->connected)
  48. - ipw2100_configure_security(priv, 0);
  49. + ipw2100_configure_security(priv, priv->manual_disable);
  50. }
  51. static struct ieee80211_helper_functions ipw2100_ieee_callbacks = {
  52. @@ -6219,7 +6217,10 @@ static void ipw2100_rf_switch_check(unsi
  53. if (!priv->rf_kill) {
  54. /* Kill timer; we don't need to poll for RF going
  55. * off since the firmware will tell us */
  56. - priv->stop_rf_check = 1;
  57. + if (!priv->stop_rf_check) {
  58. + priv->stop_rf_check = 1;
  59. + del_timer_sync(&priv->rf_switch_timer);
  60. + }
  61. /* Restart the NIC */
  62. schedule_reset(priv);