diff options
-rw-r--r-- | drivers/net/wireless/orinoco.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index 6e4d0e7d43a9..b79aebf83e47 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -1615,17 +1615,15 @@ static int __orinoco_program_rids(struct net_device *dev) | |||
1615 | return err; | 1615 | return err; |
1616 | } | 1616 | } |
1617 | /* Set the channel/frequency */ | 1617 | /* Set the channel/frequency */ |
1618 | if (priv->channel == 0) { | 1618 | if (priv->channel != 0 && priv->iw_mode != IW_MODE_INFRA) { |
1619 | printk(KERN_DEBUG "%s: Channel is 0 in __orinoco_program_rids()\n", dev->name); | 1619 | err = hermes_write_wordrec(hw, USER_BAP, |
1620 | if (priv->createibss) | 1620 | HERMES_RID_CNFOWNCHANNEL, |
1621 | priv->channel = 10; | 1621 | priv->channel); |
1622 | } | 1622 | if (err) { |
1623 | err = hermes_write_wordrec(hw, USER_BAP, HERMES_RID_CNFOWNCHANNEL, | 1623 | printk(KERN_ERR "%s: Error %d setting channel %d\n", |
1624 | priv->channel); | 1624 | dev->name, err, priv->channel); |
1625 | if (err) { | 1625 | return err; |
1626 | printk(KERN_ERR "%s: Error %d setting channel\n", | 1626 | } |
1627 | dev->name, err); | ||
1628 | return err; | ||
1629 | } | 1627 | } |
1630 | 1628 | ||
1631 | if (priv->has_ibss) { | 1629 | if (priv->has_ibss) { |
@@ -2405,7 +2403,7 @@ static int orinoco_init(struct net_device *dev) | |||
2405 | /* By default use IEEE/IBSS ad-hoc mode if we have it */ | 2403 | /* By default use IEEE/IBSS ad-hoc mode if we have it */ |
2406 | priv->prefer_port3 = priv->has_port3 && (! priv->has_ibss); | 2404 | priv->prefer_port3 = priv->has_port3 && (! priv->has_ibss); |
2407 | set_port_type(priv); | 2405 | set_port_type(priv); |
2408 | priv->channel = 10; /* default channel, more-or-less arbitrary */ | 2406 | priv->channel = 0; /* use firmware default */ |
2409 | 2407 | ||
2410 | priv->promiscuous = 0; | 2408 | priv->promiscuous = 0; |
2411 | priv->wep_on = 0; | 2409 | priv->wep_on = 0; |