brcmfmac: move glom alignment setting to SDIO bus layer
txglomming alignment is a SDIO bus specific feature. It is more appropriate to place it in SDIO bus layer instead of common layer. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
bbfd6a66ff
commit
c3d2bc35e5
@@ -800,7 +800,6 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr)
|
|||||||
char iovbuf[BRCMF_EVENTING_MASK_LEN + 12]; /* Room for
|
char iovbuf[BRCMF_EVENTING_MASK_LEN + 12]; /* Room for
|
||||||
"event_msgs" + '\0' + bitvec */
|
"event_msgs" + '\0' + bitvec */
|
||||||
char buf[128], *ptr;
|
char buf[128], *ptr;
|
||||||
u32 dongle_align = drvr->bus_if->align;
|
|
||||||
u32 roaming = 1;
|
u32 roaming = 1;
|
||||||
uint bcn_timeout = 3;
|
uint bcn_timeout = 3;
|
||||||
int scan_assoc_time = 40;
|
int scan_assoc_time = 40;
|
||||||
@@ -828,12 +827,6 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr)
|
|||||||
/* Print fw version info */
|
/* Print fw version info */
|
||||||
brcmf_dbg(ERROR, "Firmware version = %s\n", buf);
|
brcmf_dbg(ERROR, "Firmware version = %s\n", buf);
|
||||||
|
|
||||||
/* Match Host and Dongle rx alignment */
|
|
||||||
brcmf_c_mkiovar("bus:txglomalign", (char *)&dongle_align, 4, iovbuf,
|
|
||||||
sizeof(iovbuf));
|
|
||||||
brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf,
|
|
||||||
sizeof(iovbuf));
|
|
||||||
|
|
||||||
/* Setup timeout if Beacons are lost and roam is off to report
|
/* Setup timeout if Beacons are lost and roam is off to report
|
||||||
link down */
|
link down */
|
||||||
brcmf_c_mkiovar("bcn_timeout", (char *)&bcn_timeout, 4, iovbuf,
|
brcmf_c_mkiovar("bcn_timeout", (char *)&bcn_timeout, 4, iovbuf,
|
||||||
|
@@ -4171,6 +4171,7 @@ void *brcmf_sdbrcm_probe(u32 regsva, struct brcmf_sdio_dev *sdiodev)
|
|||||||
struct brcmf_sdio *bus;
|
struct brcmf_sdio *bus;
|
||||||
struct brcmf_bus_dcmd *dlst;
|
struct brcmf_bus_dcmd *dlst;
|
||||||
u32 dngl_txglom;
|
u32 dngl_txglom;
|
||||||
|
u32 dngl_txglomalign;
|
||||||
u8 idx;
|
u8 idx;
|
||||||
|
|
||||||
brcmf_dbg(TRACE, "Enter\n");
|
brcmf_dbg(TRACE, "Enter\n");
|
||||||
@@ -4260,12 +4261,20 @@ void *brcmf_sdbrcm_probe(u32 regsva, struct brcmf_sdio_dev *sdiodev)
|
|||||||
/* sdio bus core specific dcmd */
|
/* sdio bus core specific dcmd */
|
||||||
idx = brcmf_sdio_chip_getinfidx(bus->ci, BCMA_CORE_SDIO_DEV);
|
idx = brcmf_sdio_chip_getinfidx(bus->ci, BCMA_CORE_SDIO_DEV);
|
||||||
dlst = kzalloc(sizeof(struct brcmf_bus_dcmd), GFP_KERNEL);
|
dlst = kzalloc(sizeof(struct brcmf_bus_dcmd), GFP_KERNEL);
|
||||||
if (bus->ci->c_inf[idx].rev < 12 && dlst) {
|
if (dlst) {
|
||||||
|
if (bus->ci->c_inf[idx].rev < 12) {
|
||||||
/* for sdio core rev < 12, disable txgloming */
|
/* for sdio core rev < 12, disable txgloming */
|
||||||
dngl_txglom = 0;
|
dngl_txglom = 0;
|
||||||
dlst->name = "bus:txglom";
|
dlst->name = "bus:txglom";
|
||||||
dlst->param = (char *)&dngl_txglom;
|
dlst->param = (char *)&dngl_txglom;
|
||||||
dlst->param_len = sizeof(u32);
|
dlst->param_len = sizeof(u32);
|
||||||
|
} else {
|
||||||
|
/* otherwise, set txglomalign */
|
||||||
|
dngl_txglomalign = bus->sdiodev->bus_if->align;
|
||||||
|
dlst->name = "bus:txglomalign";
|
||||||
|
dlst->param = (char *)&dngl_txglomalign;
|
||||||
|
dlst->param_len = sizeof(u32);
|
||||||
|
}
|
||||||
list_add(&dlst->list, &bus->sdiodev->bus_if->dcmd_list);
|
list_add(&dlst->list, &bus->sdiodev->bus_if->dcmd_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user