forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/net/wireless/intel/ipw2x00/libipw_wx.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /******************************************************************************
23
34 Copyright(c) 2004-2005 Intel Corporation. All rights reserved.
....@@ -8,21 +9,6 @@
89 <j@w1.fi>
910 Copyright (c) 2002-2003, Jouni Malinen <j@w1.fi>
1011
11
- This program is free software; you can redistribute it and/or modify it
12
- under the terms of version 2 of the GNU General Public License as
13
- published by the Free Software Foundation.
14
-
15
- This program is distributed in the hope that it will be useful, but WITHOUT
16
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18
- more details.
19
-
20
- You should have received a copy of the GNU General Public License along with
21
- this program; if not, write to the Free Software Foundation, Inc., 59
22
- Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
-
24
- The full GNU General Public License is included in this distribution in the
25
- file called LICENSE.
2612
2713 Contact Information:
2814 Intel Linux Wireless <ilw@linux.intel.com>
....@@ -227,7 +213,7 @@
227213 * for given network. */
228214 iwe.cmd = IWEVCUSTOM;
229215 p = custom;
230
- p += snprintf(p, MAX_CUSTOM_LEN - (p - custom),
216
+ p += scnprintf(p, MAX_CUSTOM_LEN - (p - custom),
231217 " Last beacon: %ums ago",
232218 elapsed_jiffies_msecs(network->last_scanned));
233219 iwe.u.data.length = p - custom;
....@@ -237,18 +223,18 @@
237223 /* Add spectrum management information */
238224 iwe.cmd = -1;
239225 p = custom;
240
- p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), " Channel flags: ");
226
+ p += scnprintf(p, MAX_CUSTOM_LEN - (p - custom), " Channel flags: ");
241227
242228 if (libipw_get_channel_flags(ieee, network->channel) &
243229 LIBIPW_CH_INVALID) {
244230 iwe.cmd = IWEVCUSTOM;
245
- p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), "INVALID ");
231
+ p += scnprintf(p, MAX_CUSTOM_LEN - (p - custom), "INVALID ");
246232 }
247233
248234 if (libipw_get_channel_flags(ieee, network->channel) &
249235 LIBIPW_CH_RADAR_DETECT) {
250236 iwe.cmd = IWEVCUSTOM;
251
- p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), "DFS ");
237
+ p += scnprintf(p, MAX_CUSTOM_LEN - (p - custom), "DFS ");
252238 }
253239
254240 if (iwe.cmd == IWEVCUSTOM) {