Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314911
b: refs/heads/master
c: 135e4c6
h: refs/heads/master
i:
  314909: 5fcfd8f
  314907: c6d9449
  314903: 39565c9
  314895: 80354a9
  314879: c7b75a6
v: v3
  • Loading branch information
Franky Lin authored and John W. Linville committed Jun 27, 2012
1 parent c28c703 commit 00893ec
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d2bb2b9e9161d221badafae063d0c62b41bf3078
refs/heads/master: 135e4c6184d29f0834078bf150009a77b9dae717
8 changes: 8 additions & 0 deletions trunk/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ struct dngl_stats {
unsigned long multicast; /* multicast packets received */
};

struct brcmf_bus_dcmd {
char *name;
char *param;
int param_len;
struct list_head list;
};

/* interface structure between common and bus layer */
struct brcmf_bus {
u8 type; /* bus type */
Expand All @@ -50,6 +57,7 @@ struct brcmf_bus {
unsigned long tx_realloc; /* Tx packets realloced for headroom */
struct dngl_stats dstats; /* Stats for dongle-based data */
u8 align; /* bus alignment requirement */
struct list_head dcmd_list;

/* interface functions pointers */
/* Stop bus module: clear pending frames, disable data flow */
Expand Down
16 changes: 16 additions & 0 deletions trunk/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,8 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr)
int scan_assoc_time = 40;
int scan_unassoc_time = 40;
int i;
struct brcmf_bus_dcmd *cmdlst;
struct list_head *cur, *q;

mutex_lock(&drvr->proto_block);

Expand Down Expand Up @@ -874,6 +876,20 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr)
0, true);
}

/* set bus specific command if there is any */
list_for_each_safe(cur, q, &drvr->bus_if->dcmd_list) {
cmdlst = list_entry(cur, struct brcmf_bus_dcmd, list);
if (cmdlst->name && cmdlst->param && cmdlst->param_len) {
brcmf_c_mkiovar(cmdlst->name, cmdlst->param,
cmdlst->param_len, iovbuf,
sizeof(iovbuf));
brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR,
iovbuf, sizeof(iovbuf));
}
list_del(cur);
kfree(cmdlst);
}

mutex_unlock(&drvr->proto_block);

return 0;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,8 @@ int brcmf_attach(uint bus_hdrlen, struct device *dev)
INIT_WORK(&drvr->setmacaddr_work, _brcmf_set_mac_address);
INIT_WORK(&drvr->multicast_work, _brcmf_set_multicast_list);

INIT_LIST_HEAD(&drvr->bus_if->dcmd_list);

return ret;

fail:
Expand Down

0 comments on commit 00893ec

Please sign in to comment.