mirror of
https://github.com/opnsense/src.git
synced 2026-06-14 19:20:18 -04:00
Update sec(4) for separate output buffers changes in r361481.
This does not add support for separate output buffers but updates the driver to cope with the changes. Pointy hat to: jhb
This commit is contained in:
parent
72d874fa90
commit
b02676a2cb
1 changed files with 3 additions and 3 deletions
|
|
@ -842,14 +842,14 @@ sec_desc_map_dma(struct sec_softc *sc, struct sec_dma_mem *dma_mem,
|
|||
if (dma_mem->dma_vaddr != NULL)
|
||||
return (EBUSY);
|
||||
|
||||
switch (crp->crp_buf_type) {
|
||||
switch (crp->crp_buf.cb_type) {
|
||||
case CRYPTO_BUF_CONTIG:
|
||||
break;
|
||||
case CRYPTO_BUF_UIO:
|
||||
size = SEC_FREE_LT_CNT(sc) * SEC_MAX_DMA_BLOCK_SIZE;
|
||||
break;
|
||||
case CRYPTO_BUF_MBUF:
|
||||
size = m_length(crp->crp_mbuf, NULL);
|
||||
size = m_length(crp->crp_buf.cb_mbuf, NULL);
|
||||
break;
|
||||
default:
|
||||
return (EINVAL);
|
||||
|
|
@ -1245,7 +1245,7 @@ sec_process(device_t dev, struct cryptop *crp, int hint)
|
|||
csp = crypto_get_params(crp->crp_session);
|
||||
|
||||
/* Check for input length */
|
||||
if (crp->crp_ilen > SEC_MAX_DMA_BLOCK_SIZE) {
|
||||
if (crypto_buffer_len(&crp->crp_buf) > SEC_MAX_DMA_BLOCK_SIZE) {
|
||||
crp->crp_etype = E2BIG;
|
||||
crypto_done(crp);
|
||||
return (0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue