Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27270
b: refs/heads/master
c: 37a6c61
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Roskin authored and John W. Linville committed Apr 24, 2006
1 parent aebbc59 commit 7b84259
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2c1bd26035491cd0ba7e49be6ed610fc4912fef9
refs/heads/master: 37a6c6117db3f10e1923c14dffa089b10600c4b8
28 changes: 22 additions & 6 deletions trunk/drivers/net/wireless/orinoco.c
Original file line number Diff line number Diff line change
Expand Up @@ -1345,16 +1345,12 @@ int __orinoco_down(struct net_device *dev)
return 0;
}

int orinoco_reinit_firmware(struct net_device *dev)
static int orinoco_allocate_fid(struct net_device *dev)
{
struct orinoco_private *priv = netdev_priv(dev);
struct hermes *hw = &priv->hw;
int err;

err = hermes_init(hw);
if (err)
return err;

err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid);
if (err == -EIO && priv->nicbuf_size > TX_NICBUF_SIZE_BUG) {
/* Try workaround for old Symbol firmware bug */
Expand All @@ -1373,6 +1369,19 @@ int orinoco_reinit_firmware(struct net_device *dev)
return err;
}

int orinoco_reinit_firmware(struct net_device *dev)
{
struct orinoco_private *priv = netdev_priv(dev);
struct hermes *hw = &priv->hw;
int err;

err = hermes_init(hw);
if (!err)
err = orinoco_allocate_fid(dev);

return err;
}

static int __orinoco_hw_set_bitrate(struct orinoco_private *priv)
{
hermes_t *hw = &priv->hw;
Expand Down Expand Up @@ -2224,7 +2233,7 @@ static int orinoco_init(struct net_device *dev)
priv->nicbuf_size = IEEE80211_FRAME_LEN + ETH_HLEN;

/* Initialize the firmware */
err = orinoco_reinit_firmware(dev);
err = hermes_init(hw);
if (err != 0) {
printk(KERN_ERR "%s: failed to initialize firmware (err = %d)\n",
dev->name, err);
Expand Down Expand Up @@ -2282,6 +2291,13 @@ static int orinoco_init(struct net_device *dev)

printk(KERN_DEBUG "%s: Station name \"%s\"\n", dev->name, priv->nick);

err = orinoco_allocate_fid(dev);
if (err) {
printk(KERN_ERR "%s: failed to allocate NIC buffer!\n",
dev->name);
goto out;
}

/* Get allowed channels */
err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CHANNELLIST,
&priv->channel_mask);
Expand Down

0 comments on commit 7b84259

Please sign in to comment.