forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/net/wireless/intel/ipw2x00/libipw_tx.c
....@@ -1,22 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /******************************************************************************
23
34 Copyright(c) 2003 - 2005 Intel Corporation. All rights reserved.
45
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.
206
217 Contact Information:
228 Intel Linux Wireless <ilw@linux.intel.com>
....@@ -397,7 +383,7 @@
397383
398384 /* Each fragment may need to have room for encryption
399385 * pre/postfix */
400
- if (host_encrypt)
386
+ if (host_encrypt && crypt && crypt->ops)
401387 bytes_per_frag -= crypt->ops->extra_mpdu_prefix_len +
402388 crypt->ops->extra_mpdu_postfix_len;
403389