orinoco.c patch for Intel PRO/Wireless 2011
Jeffrey Phillips
jeffrey.phillips at staffeon.com
Mon May 20 12:37:12 EST 2002
Hello,
Here is a patch for anyone trying to use Intel PRO/Wireless 2011
pcmcia card with the orinoco drivers, who are experiencing kernel
panics or freezes. This used to be in the driver base, but
disappeared around 0.08. Run with `patch -p0 < orinoco.c.intel_patch`
I hope that someone finds this useful.
-Jeffrey
--- orinoco.c Sat May 18 09:40:28 2002
+++ orinoco.c_new Sat May 18 09:39:36 2002
@@ -451,6 +451,7 @@
/* Hardware control routines */
+static int __orinoco_hw_reset(struct orinoco_private *priv);
static int __orinoco_hw_set_bitrate(struct orinoco_private *priv);
static int __orinoco_hw_setup_wep(struct orinoco_private *priv);
static int orinoco_hw_get_bssid(struct orinoco_private *priv, char
buf[ETH_ALEN]);
@@ -585,6 +586,23 @@
* Hardware control routines
*/
+static int
+__orinoco_hw_reset(struct orinoco_private *priv)
+{
+ hermes_t *hw = &priv->hw;
+ int err;
+
+ if (! priv->broken_cor_reset)
+ return hermes_reset(hw);
+ else {
+ hw->inten = 0;
+ hermes_write_regn(hw, INTEN, 0);
+ err = hermes_disable_port(hw, 0);
+ hermes_write_regn(hw, EVACK, 0xffff);
+ return err;
+ }
+}
+
void
orinoco_shutdown(struct orinoco_private *priv)
{
@@ -595,7 +613,7 @@
orinoco_lock(priv);
__orinoco_stop_irqs(priv);
- err = hermes_reset(&priv->hw);
+ err = __orinoco_hw_reset(priv);
if (err && err != -ENODEV) /* If the card is gone, we don't care about
shutting it down */
printk(KERN_ERR "%s: Error %d shutting down Hermes chipset\n",
priv->ndev->name, err);
@@ -619,11 +637,18 @@
__orinoco_stop_irqs(priv);
/* Check if we need a card reset */
- if (priv->hard_reset)
- priv->hard_reset(priv);
+ if (!priv->broken_cor_reset)
+ {
+ if (priv->hard_reset)
+ priv->hard_reset(priv);
+
+ /* Do standard firmware reset if we can */
+ err = hermes_reset(hw);
+ } else {
+ /* Do standard firmware reset if we can */
+ err = __orinoco_hw_reset(priv);
+ }
- /* Do standard firmware reset if we can */
- err = hermes_reset(hw);
if (err)
goto out;
@@ -1612,6 +1637,9 @@
"version [%s] (parsing to %X)\n", dev->name,
tmp, firmver);
+ priv->firmware_type = FIRMWARE_TYPE_SYMBOL;
+ priv->broken_cor_reset = 1;
+ priv->has_port3 = 1;
priv->has_ibss = (firmver >= 0x20000);
priv->has_wep = (firmver >= 0x15012);
priv->has_big_wep = (firmver >= 0x20000);
More information about the wireless
mailing list