Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268727
b: refs/heads/master
c: f461a29
h: refs/heads/master
i:
  268725: 8f6039e
  268723: 0857561
  268719: b722b17
v: v3
  • Loading branch information
Franky Lin authored and Greg Kroah-Hartman committed Oct 5, 2011
1 parent e2ac921 commit 0369800
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 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: 5d3e78eeebb4143a0b5bd53547eb16968f43b5bc
refs/heads/master: f461a2941233a5524ff5327862879f91f2fa5997
14 changes: 5 additions & 9 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ struct brcmf_if {
struct net_device_stats stats;
int idx; /* iface idx in dongle */
int state; /* interface state */
uint subunit; /* subunit */
u8 mac_addr[ETH_ALEN]; /* assigned MAC address */
bool attached; /* Delayed attachment when unset */
bool txflowcontrol; /* Per interface flow control indicator */
char name[IFNAMSIZ]; /* linux interface name */
};

/* Local private structure (extension of pub) */
Expand Down Expand Up @@ -100,14 +96,16 @@ static int brcmf_net2idx(struct brcmf_info *drvr_priv, struct net_device *ndev)
int brcmf_ifname2idx(struct brcmf_info *drvr_priv, char *name)
{
int i = BRCMF_MAX_IFS;
struct brcmf_if *ifp;

if (name == NULL || *name == '\0')
return 0;

while (--i > 0)
if (drvr_priv->iflist[i]
&& !strncmp(drvr_priv->iflist[i]->name, name, IFNAMSIZ))
while (--i > 0) {
ifp = drvr_priv->iflist[i];
if (ifp && !strncmp(ifp->ndev->name, name, IFNAMSIZ))
break;
}

brcmf_dbg(TRACE, "return idx %d for \"%s\"\n", i, name);

Expand Down Expand Up @@ -315,7 +313,6 @@ static void brcmf_op_if(struct brcmf_if *ifp)
ret = -ENOMEM;
}
if (ret == 0) {
strcpy(ifp->ndev->name, ifp->name);
memcpy(netdev_priv(ifp->ndev), &drvr_priv,
sizeof(drvr_priv));
err = brcmf_net_attach(&drvr_priv->pub, ifp->idx);
Expand Down Expand Up @@ -980,7 +977,6 @@ brcmf_add_if(struct brcmf_info *drvr_priv, int ifidx, struct net_device *ndev,
memset(ifp, 0, sizeof(struct brcmf_if));
ifp->info = drvr_priv;
drvr_priv->iflist[ifidx] = ifp;
strlcpy(ifp->name, name, IFNAMSIZ);
if (mac_addr != NULL)
memcpy(&ifp->mac_addr, mac_addr, ETH_ALEN);

Expand Down

0 comments on commit 0369800

Please sign in to comment.