mirror of https://gitee.com/openkylin/linux.git
brcmfmac: Increase max buffer size for receiving control message from dongle
The max buffer size for receiving control message from dongle needs to be increased considering possible block padding. Otherwise some big control message can't be received due to buffer overrun check. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Daniel Kim <dekim@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
6833965c46
commit
7dd3abc14f
|
@ -4086,8 +4086,13 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
|||
goto fail;
|
||||
}
|
||||
|
||||
/* Query the F2 block size, set roundup accordingly */
|
||||
bus->blocksize = bus->sdiodev->func[2]->cur_blksize;
|
||||
bus->roundup = min(max_roundup, bus->blocksize);
|
||||
|
||||
/* Allocate buffers */
|
||||
if (bus->sdiodev->bus_if->maxctl) {
|
||||
bus->sdiodev->bus_if->maxctl += bus->roundup;
|
||||
bus->rxblen =
|
||||
roundup((bus->sdiodev->bus_if->maxctl + SDPCM_HDRLEN),
|
||||
ALIGNMENT) + bus->head_align;
|
||||
|
@ -4115,10 +4120,6 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
|||
bus->idletime = BRCMF_IDLE_INTERVAL;
|
||||
bus->idleclock = BRCMF_IDLE_ACTIVE;
|
||||
|
||||
/* Query the F2 block size, set roundup accordingly */
|
||||
bus->blocksize = bus->sdiodev->func[2]->cur_blksize;
|
||||
bus->roundup = min(max_roundup, bus->blocksize);
|
||||
|
||||
/* SR state */
|
||||
bus->sleeping = false;
|
||||
bus->sr_enabled = false;
|
||||
|
|
Loading…
Reference in New Issue