| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /****************************************************************************** |
|---|
| 2 | 3 | |
|---|
| 3 | 4 | Copyright(c) 2003 - 2005 Intel Corporation. All rights reserved. |
|---|
| 4 | 5 | |
|---|
| 5 | | - This program is free software; you can redistribute it and/or modify it |
|---|
| 6 | | - under the terms of version 2 of the GNU General Public License as |
|---|
| 7 | | - published by the Free Software Foundation. |
|---|
| 8 | | - |
|---|
| 9 | | - This program is distributed in the hope that it will be useful, but WITHOUT |
|---|
| 10 | | - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 11 | | - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 12 | | - more details. |
|---|
| 13 | | - |
|---|
| 14 | | - You should have received a copy of the GNU General Public License along with |
|---|
| 15 | | - this program; if not, write to the Free Software Foundation, Inc., 59 |
|---|
| 16 | | - Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|---|
| 17 | | - |
|---|
| 18 | | - The full GNU General Public License is included in this distribution in the |
|---|
| 19 | | - file called LICENSE. |
|---|
| 20 | 6 | |
|---|
| 21 | 7 | Contact Information: |
|---|
| 22 | 8 | Intel Linux Wireless <ilw@linux.intel.com> |
|---|
| .. | .. |
|---|
| 397 | 383 | |
|---|
| 398 | 384 | /* Each fragment may need to have room for encryption |
|---|
| 399 | 385 | * pre/postfix */ |
|---|
| 400 | | - if (host_encrypt) |
|---|
| 386 | + if (host_encrypt && crypt && crypt->ops) |
|---|
| 401 | 387 | bytes_per_frag -= crypt->ops->extra_mpdu_prefix_len + |
|---|
| 402 | 388 | crypt->ops->extra_mpdu_postfix_len; |
|---|
| 403 | 389 | |
|---|