hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c
....@@ -1,21 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * PS3 gelic network driver.
34 *
45 * Copyright (C) 2007 Sony Computer Entertainment Inc.
56 * Copyright 2007 Sony Corporation
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2
9
- * as published by the Free Software Foundation.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, write to the Free Software
18
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
197 */
208 #undef DEBUG
219
....@@ -889,7 +877,7 @@
889877 case IW_AUTH_KEY_MGMT:
890878 if (param->value & IW_AUTH_KEY_MGMT_PSK)
891879 break;
892
- /* intentionally fall through */
880
+ fallthrough;
893881 default:
894882 ret = -EOPNOTSUPP;
895883 break;
....@@ -1094,7 +1082,7 @@
10941082 struct gelic_wl_info *wl = port_wl(netdev_priv(netdev));
10951083 struct iw_point *enc = &data->encoding;
10961084 unsigned long irqflag;
1097
- unsigned int key_index, index_specified;
1085
+ unsigned int key_index;
10981086 int ret = 0;
10991087
11001088 pr_debug("%s: <-\n", __func__);
....@@ -1105,13 +1093,10 @@
11051093 return -EINVAL;
11061094
11071095 spin_lock_irqsave(&wl->lock, irqflag);
1108
- if (key_index) {
1109
- index_specified = 1;
1096
+ if (key_index)
11101097 key_index--;
1111
- } else {
1112
- index_specified = 0;
1098
+ else
11131099 key_index = wl->current_key;
1114
- }
11151100
11161101 if (wl->group_cipher_method == GELIC_WL_CIPHER_WEP) {
11171102 switch (wl->auth_method) {