summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/aead_api.c5
-rw-r--r--net/mac80211/aead_api.h6
-rw-r--r--net/mac80211/aes_ccm.h5
-rw-r--r--net/mac80211/aes_cmac.c5
-rw-r--r--net/mac80211/aes_cmac.h5
-rw-r--r--net/mac80211/aes_gcm.h5
-rw-r--r--net/mac80211/aes_gmac.c5
-rw-r--r--net/mac80211/aes_gmac.h5
-rw-r--r--net/mac80211/agg-rx.c5
-rw-r--r--net/mac80211/agg-tx.c5
-rw-r--r--net/mac80211/debugfs.c4
-rw-r--r--net/mac80211/debugfs_key.c5
-rw-r--r--net/mac80211/debugfs_netdev.c5
-rw-r--r--net/mac80211/debugfs_sta.c5
-rw-r--r--net/mac80211/driver-ops.c5
-rw-r--r--net/mac80211/fils_aead.c5
-rw-r--r--net/mac80211/fils_aead.h5
-rw-r--r--net/mac80211/he.c5
-rw-r--r--net/mac80211/ht.c5
-rw-r--r--net/mac80211/ibss.c5
-rw-r--r--net/mac80211/ieee80211_i.h17
-rw-r--r--net/mac80211/iface.c5
-rw-r--r--net/mac80211/key.c7
-rw-r--r--net/mac80211/key.h5
-rw-r--r--net/mac80211/led.c5
-rw-r--r--net/mac80211/led.h5
-rw-r--r--net/mac80211/main.c5
-rw-r--r--net/mac80211/mesh.c11
-rw-r--r--net/mac80211/mesh.h5
-rw-r--r--net/mac80211/mesh_hwmp.c5
-rw-r--r--net/mac80211/mesh_pathtbl.c5
-rw-r--r--net/mac80211/mesh_plink.c5
-rw-r--r--net/mac80211/mesh_ps.c5
-rw-r--r--net/mac80211/mesh_sync.c5
-rw-r--r--net/mac80211/michael.c5
-rw-r--r--net/mac80211/michael.h5
-rw-r--r--net/mac80211/mlme.c17
-rw-r--r--net/mac80211/ocb.c5
-rw-r--r--net/mac80211/offchannel.c5
-rw-r--r--net/mac80211/rate.c5
-rw-r--r--net/mac80211/rate.h5
-rw-r--r--net/mac80211/rc80211_minstrel.h5
-rw-r--r--net/mac80211/rc80211_minstrel_ht.c7
-rw-r--r--net/mac80211/rc80211_minstrel_ht.h5
-rw-r--r--net/mac80211/rc80211_minstrel_ht_debugfs.c5
-rw-r--r--net/mac80211/rx.c7
-rw-r--r--net/mac80211/scan.c5
-rw-r--r--net/mac80211/spectmgmt.c5
-rw-r--r--net/mac80211/sta_info.c5
-rw-r--r--net/mac80211/sta_info.h5
-rw-r--r--net/mac80211/status.c5
-rw-r--r--net/mac80211/tdls.c23
-rw-r--r--net/mac80211/tkip.c5
-rw-r--r--net/mac80211/tkip.h5
-rw-r--r--net/mac80211/tx.c6
-rw-r--r--net/mac80211/util.c13
-rw-r--r--net/mac80211/vht.c5
-rw-r--r--net/mac80211/wep.c5
-rw-r--r--net/mac80211/wep.h5
-rw-r--r--net/mac80211/wme.c5
-rw-r--r--net/mac80211/wme.h5
-rw-r--r--net/mac80211/wpa.c12
-rw-r--r--net/mac80211/wpa.h5
63 files changed, 127 insertions, 258 deletions
diff --git a/net/mac80211/aead_api.c b/net/mac80211/aead_api.c
index 160f9df30402..c5fe95e49c68 100644
--- a/net/mac80211/aead_api.c
+++ b/net/mac80211/aead_api.c
@@ -1,13 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2003-2004, Instant802 Networks, Inc. 3 * Copyright 2003-2004, Instant802 Networks, Inc.
3 * Copyright 2005-2006, Devicescape Software, Inc. 4 * Copyright 2005-2006, Devicescape Software, Inc.
4 * Copyright 2014-2015, Qualcomm Atheros, Inc. 5 * Copyright 2014-2015, Qualcomm Atheros, Inc.
5 * 6 *
6 * Rewrite: Copyright (C) 2013 Linaro Ltd <ard.biesheuvel@linaro.org> 7 * Rewrite: Copyright (C) 2013 Linaro Ltd <ard.biesheuvel@linaro.org>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */ 8 */
12 9
13#include <linux/kernel.h> 10#include <linux/kernel.h>
diff --git a/net/mac80211/aead_api.h b/net/mac80211/aead_api.h
index 5e39ea843bbf..7d463b80926a 100644
--- a/net/mac80211/aead_api.h
+++ b/net/mac80211/aead_api.h
@@ -1,8 +1,4 @@
1/* 1/* SPDX-License-Identifier: GPL-2.0-only */
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License version 2 as
4 * published by the Free Software Foundation.
5 */
6 2
7#ifndef _AEAD_API_H 3#ifndef _AEAD_API_H
8#define _AEAD_API_H 4#define _AEAD_API_H
diff --git a/net/mac80211/aes_ccm.h b/net/mac80211/aes_ccm.h
index e9b7ca0bde5b..96256193cf49 100644
--- a/net/mac80211/aes_ccm.h
+++ b/net/mac80211/aes_ccm.h
@@ -1,10 +1,7 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Copyright 2003-2004, Instant802 Networks, Inc. 3 * Copyright 2003-2004, Instant802 Networks, Inc.
3 * Copyright 2006, Devicescape Software, Inc. 4 * Copyright 2006, Devicescape Software, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */ 5 */
9 6
10#ifndef AES_CCM_H 7#ifndef AES_CCM_H
diff --git a/net/mac80211/aes_cmac.c b/net/mac80211/aes_cmac.c
index 2fb65588490c..57748cab0e28 100644
--- a/net/mac80211/aes_cmac.c
+++ b/net/mac80211/aes_cmac.c
@@ -1,10 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * AES-128-CMAC with TLen 16 for IEEE 802.11w BIP 3 * AES-128-CMAC with TLen 16 for IEEE 802.11w BIP
3 * Copyright 2008, Jouni Malinen <j@w1.fi> 4 * Copyright 2008, Jouni Malinen <j@w1.fi>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */ 5 */
9 6
10#include <linux/kernel.h> 7#include <linux/kernel.h>
diff --git a/net/mac80211/aes_cmac.h b/net/mac80211/aes_cmac.h
index fef531f42003..76817446fb83 100644
--- a/net/mac80211/aes_cmac.h
+++ b/net/mac80211/aes_cmac.h
@@ -1,9 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Copyright 2008, Jouni Malinen <j@w1.fi> 3 * Copyright 2008, Jouni Malinen <j@w1.fi>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */ 4 */
8 5
9#ifndef AES_CMAC_H 6#ifndef AES_CMAC_H
diff --git a/net/mac80211/aes_gcm.h b/net/mac80211/aes_gcm.h
index d2b096033009..b14093b2f7a9 100644
--- a/net/mac80211/aes_gcm.h
+++ b/net/mac80211/aes_gcm.h
@@ -1,9 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Copyright 2014-2015, Qualcomm Atheros, Inc. 3 * Copyright 2014-2015, Qualcomm Atheros, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */ 4 */
8 5
9#ifndef AES_GCM_H 6#ifndef AES_GCM_H
diff --git a/net/mac80211/aes_gmac.c b/net/mac80211/aes_gmac.c
index bd72a862ddb7..363ad1c1dc0c 100644
--- a/net/mac80211/aes_gmac.c
+++ b/net/mac80211/aes_gmac.c
@@ -1,10 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * AES-GMAC for IEEE 802.11 BIP-GMAC-128 and BIP-GMAC-256 3 * AES-GMAC for IEEE 802.11 BIP-GMAC-128 and BIP-GMAC-256
3 * Copyright 2015, Qualcomm Atheros, Inc. 4 * Copyright 2015, Qualcomm Atheros, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */ 5 */
9 6
10#include <linux/kernel.h> 7#include <linux/kernel.h>
diff --git a/net/mac80211/aes_gmac.h b/net/mac80211/aes_gmac.h
index 32e6442c95be..c739356bae2a 100644
--- a/net/mac80211/aes_gmac.h
+++ b/net/mac80211/aes_gmac.h
@@ -1,9 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Copyright 2015, Qualcomm Atheros, Inc. 3 * Copyright 2015, Qualcomm Atheros, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */ 4 */
8 5
9#ifndef AES_GMAC_H 6#ifndef AES_GMAC_H
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index 6a4f154c99f6..01b0dad24500 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * HT handling 3 * HT handling
3 * 4 *
@@ -9,10 +10,6 @@
9 * Copyright 2007-2010, Intel Corporation 10 * Copyright 2007-2010, Intel Corporation
10 * Copyright(c) 2015-2017 Intel Deutschland GmbH 11 * Copyright(c) 2015-2017 Intel Deutschland GmbH
11 * Copyright (C) 2018 Intel Corporation 12 * Copyright (C) 2018 Intel Corporation
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
16 */ 13 */
17 14
18/** 15/**
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 2c4cd4183bf9..b11883d26875 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * HT handling 3 * HT handling
3 * 4 *
@@ -9,10 +10,6 @@
9 * Copyright 2007-2010, Intel Corporation 10 * Copyright 2007-2010, Intel Corporation
10 * Copyright(c) 2015-2017 Intel Deutschland GmbH 11 * Copyright(c) 2015-2017 Intel Deutschland GmbH
11 * Copyright (C) 2018 - 2019 Intel Corporation 12 * Copyright (C) 2018 - 2019 Intel Corporation
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
16 */ 13 */
17 14
18#include <linux/ieee80211.h> 15#include <linux/ieee80211.h>
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 0d462206eef6..271bc2b676a4 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -1,12 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * mac80211 debugfs for wireless PHYs 3 * mac80211 debugfs for wireless PHYs
3 * 4 *
4 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> 5 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
5 * Copyright 2013-2014 Intel Mobile Communications GmbH 6 * Copyright 2013-2014 Intel Mobile Communications GmbH
6 * Copyright (C) 2018 - 2019 Intel Corporation 7 * Copyright (C) 2018 - 2019 Intel Corporation
7 *
8 * GPLv2
9 *
10 */ 8 */
11 9
12#include <linux/debugfs.h> 10#include <linux/debugfs.h>
diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c
index a2ef95f16f11..3509ce0daea3 100644
--- a/net/mac80211/debugfs_key.c
+++ b/net/mac80211/debugfs_key.c
@@ -1,12 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2003-2005 Devicescape Software, Inc. 3 * Copyright 2003-2005 Devicescape Software, Inc.
3 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz> 4 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz>
4 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> 5 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
5 * Copyright (C) 2015 Intel Deutschland GmbH 6 * Copyright (C) 2015 Intel Deutschland GmbH
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 as
9 * published by the Free Software Foundation.
10 */ 7 */
11 8
12#include <linux/kobject.h> 9#include <linux/kobject.h>
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index deb3faf08337..f1f2e1c7ac0c 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -1,10 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz> 3 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz>
3 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> 4 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */ 5 */
9 6
10#include <linux/kernel.h> 7#include <linux/kernel.h>
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 8e921281e0d5..3fd79ccb293b 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2003-2005 Devicescape Software, Inc. 3 * Copyright 2003-2005 Devicescape Software, Inc.
3 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz> 4 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz>
@@ -5,10 +6,6 @@
5 * Copyright 2013-2014 Intel Mobile Communications GmbH 6 * Copyright 2013-2014 Intel Mobile Communications GmbH
6 * Copyright(c) 2016 Intel Deutschland GmbH 7 * Copyright(c) 2016 Intel Deutschland GmbH
7 * Copyright (C) 2018 - 2019 Intel Corporation 8 * Copyright (C) 2018 - 2019 Intel Corporation
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */ 9 */
13 10
14#include <linux/debugfs.h> 11#include <linux/debugfs.h>
diff --git a/net/mac80211/driver-ops.c b/net/mac80211/driver-ops.c
index 839c0022a29c..acd4afb4944b 100644
--- a/net/mac80211/driver-ops.c
+++ b/net/mac80211/driver-ops.c
@@ -1,9 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2015 Intel Deutschland GmbH 3 * Copyright 2015 Intel Deutschland GmbH
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */ 4 */
8#include <net/mac80211.h> 5#include <net/mac80211.h>
9#include "ieee80211_i.h" 6#include "ieee80211_i.h"
diff --git a/net/mac80211/fils_aead.c b/net/mac80211/fils_aead.c
index 3cfb1e2ab7ac..a13ae148937e 100644
--- a/net/mac80211/fils_aead.c
+++ b/net/mac80211/fils_aead.c
@@ -1,10 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * FILS AEAD for (Re)Association Request/Response frames 3 * FILS AEAD for (Re)Association Request/Response frames
3 * Copyright 2016, Qualcomm Atheros, Inc. 4 * Copyright 2016, Qualcomm Atheros, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */ 5 */
9 6
10#include <crypto/aes.h> 7#include <crypto/aes.h>
diff --git a/net/mac80211/fils_aead.h b/net/mac80211/fils_aead.h
index fbc65232f0b3..c868153f8720 100644
--- a/net/mac80211/fils_aead.h
+++ b/net/mac80211/fils_aead.h
@@ -1,10 +1,7 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * FILS AEAD for (Re)Association Request/Response frames 3 * FILS AEAD for (Re)Association Request/Response frames
3 * Copyright 2016, Qualcomm Atheros, Inc. 4 * Copyright 2016, Qualcomm Atheros, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */ 5 */
9 6
10#ifndef FILS_AEAD_H 7#ifndef FILS_AEAD_H
diff --git a/net/mac80211/he.c b/net/mac80211/he.c
index 769078ed5a12..219650591c79 100644
--- a/net/mac80211/he.c
+++ b/net/mac80211/he.c
@@ -1,11 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * HE handling 3 * HE handling
3 * 4 *
4 * Copyright(c) 2017 Intel Deutschland GmbH 5 * Copyright(c) 2017 Intel Deutschland GmbH
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */ 6 */
10 7
11#include "ieee80211_i.h" 8#include "ieee80211_i.h"
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index c62101857b9b..d5a500b2a448 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * HT handling 3 * HT handling
3 * 4 *
@@ -8,10 +9,6 @@
8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net> 9 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
9 * Copyright 2007-2010, Intel Corporation 10 * Copyright 2007-2010, Intel Corporation
10 * Copyright 2017 Intel Deutschland GmbH 11 * Copyright 2017 Intel Deutschland GmbH
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */ 12 */
16 13
17#include <linux/ieee80211.h> 14#include <linux/ieee80211.h>
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 4e4507115cf3..f00dca056295 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * IBSS mode implementation 3 * IBSS mode implementation
3 * Copyright 2003-2008, Jouni Malinen <j@w1.fi> 4 * Copyright 2003-2008, Jouni Malinen <j@w1.fi>
@@ -9,10 +10,6 @@
9 * Copyright 2013-2014 Intel Mobile Communications GmbH 10 * Copyright 2013-2014 Intel Mobile Communications GmbH
10 * Copyright(c) 2016 Intel Deutschland GmbH 11 * Copyright(c) 2016 Intel Deutschland GmbH
11 * Copyright(c) 2018-2019 Intel Corporation 12 * Copyright(c) 2018-2019 Intel Corporation
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
16 */ 13 */
17 14
18#include <linux/delay.h> 15#include <linux/delay.h>
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 073a8235ae1b..6396d46a9a71 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2002-2005, Instant802 Networks, Inc.
3 * Copyright 2005, Devicescape Software, Inc. 4 * Copyright 2005, Devicescape Software, Inc.
@@ -5,10 +6,6 @@
5 * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net> 6 * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net>
6 * Copyright 2013-2015 Intel Mobile Communications GmbH 7 * Copyright 2013-2015 Intel Mobile Communications GmbH
7 * Copyright (C) 2018-2019 Intel Corporation 8 * Copyright (C) 2018-2019 Intel Corporation
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */ 9 */
13 10
14#ifndef IEEE80211_I_H 11#ifndef IEEE80211_I_H
@@ -1435,7 +1432,7 @@ ieee80211_get_sband(struct ieee80211_sub_if_data *sdata)
1435 rcu_read_lock(); 1432 rcu_read_lock();
1436 chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); 1433 chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
1437 1434
1438 if (WARN_ON(!chanctx_conf)) { 1435 if (WARN_ON_ONCE(!chanctx_conf)) {
1439 rcu_read_unlock(); 1436 rcu_read_unlock();
1440 return NULL; 1437 return NULL;
1441 } 1438 }
@@ -2038,6 +2035,13 @@ void __ieee80211_flush_queues(struct ieee80211_local *local,
2038static inline bool ieee80211_can_run_worker(struct ieee80211_local *local) 2035static inline bool ieee80211_can_run_worker(struct ieee80211_local *local)
2039{ 2036{
2040 /* 2037 /*
2038 * It's unsafe to try to do any work during reconfigure flow.
2039 * When the flow ends the work will be requeued.
2040 */
2041 if (local->in_reconfig)
2042 return false;
2043
2044 /*
2041 * If quiescing is set, we are racing with __ieee80211_suspend. 2045 * If quiescing is set, we are racing with __ieee80211_suspend.
2042 * __ieee80211_suspend flushes the workers after setting quiescing, 2046 * __ieee80211_suspend flushes the workers after setting quiescing,
2043 * and we check quiescing / suspended before enqueing new workers. 2047 * and we check quiescing / suspended before enqueing new workers.
@@ -2225,6 +2229,9 @@ void ieee80211_tdls_cancel_channel_switch(struct wiphy *wiphy,
2225 const u8 *addr); 2229 const u8 *addr);
2226void ieee80211_teardown_tdls_peers(struct ieee80211_sub_if_data *sdata); 2230void ieee80211_teardown_tdls_peers(struct ieee80211_sub_if_data *sdata);
2227void ieee80211_tdls_chsw_work(struct work_struct *wk); 2231void ieee80211_tdls_chsw_work(struct work_struct *wk);
2232void ieee80211_tdls_handle_disconnect(struct ieee80211_sub_if_data *sdata,
2233 const u8 *peer, u16 reason);
2234const char *ieee80211_get_reason_code_string(u16 reason_code);
2228 2235
2229extern const struct ethtool_ops ieee80211_ethtool_ops; 2236extern const struct ethtool_ops ieee80211_ethtool_ops;
2230 2237
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 410685d38c46..06aac0aaae64 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Interface handling 3 * Interface handling
3 * 4 *
@@ -8,10 +9,6 @@
8 * Copyright 2013-2014 Intel Mobile Communications GmbH 9 * Copyright 2013-2014 Intel Mobile Communications GmbH
9 * Copyright (c) 2016 Intel Deutschland GmbH 10 * Copyright (c) 2016 Intel Deutschland GmbH
10 * Copyright (C) 2018 Intel Corporation 11 * Copyright (C) 2018 Intel Corporation
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */ 12 */
16#include <linux/slab.h> 13#include <linux/slab.h>
17#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 20bf9db7a388..157ff5f890d2 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2002-2005, Instant802 Networks, Inc.
3 * Copyright 2005-2006, Devicescape Software, Inc. 4 * Copyright 2005-2006, Devicescape Software, Inc.
@@ -5,10 +6,6 @@
5 * Copyright 2007-2008 Johannes Berg <johannes@sipsolutions.net> 6 * Copyright 2007-2008 Johannes Berg <johannes@sipsolutions.net>
6 * Copyright 2013-2014 Intel Mobile Communications GmbH 7 * Copyright 2013-2014 Intel Mobile Communications GmbH
7 * Copyright 2015-2017 Intel Deutschland GmbH 8 * Copyright 2015-2017 Intel Deutschland GmbH
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */ 9 */
13 10
14#include <linux/if_ether.h> 11#include <linux/if_ether.h>
@@ -268,11 +265,9 @@ int ieee80211_set_tx_key(struct ieee80211_key *key)
268{ 265{
269 struct sta_info *sta = key->sta; 266 struct sta_info *sta = key->sta;
270 struct ieee80211_local *local = key->local; 267 struct ieee80211_local *local = key->local;
271 struct ieee80211_key *old;
272 268
273 assert_key_lock(local); 269 assert_key_lock(local);
274 270
275 old = key_mtx_dereference(local, sta->ptk[sta->ptk_idx]);
276 sta->ptk_idx = key->conf.keyidx; 271 sta->ptk_idx = key->conf.keyidx;
277 ieee80211_check_fast_xmit(sta); 272 ieee80211_check_fast_xmit(sta);
278 273
diff --git a/net/mac80211/key.h b/net/mac80211/key.h
index f06fbd03d235..be118c39433f 100644
--- a/net/mac80211/key.h
+++ b/net/mac80211/key.h
@@ -1,10 +1,7 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Copyright 2002-2004, Instant802 Networks, Inc. 3 * Copyright 2002-2004, Instant802 Networks, Inc.
3 * Copyright 2005, Devicescape Software, Inc. 4 * Copyright 2005, Devicescape Software, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */ 5 */
9 6
10#ifndef IEEE80211_KEY_H 7#ifndef IEEE80211_KEY_H
diff --git a/net/mac80211/led.c b/net/mac80211/led.c
index d6c66fc19716..b275c8853074 100644
--- a/net/mac80211/led.c
+++ b/net/mac80211/led.c
@@ -1,9 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2006, Johannes Berg <johannes@sipsolutions.net> 3 * Copyright 2006, Johannes Berg <johannes@sipsolutions.net>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */ 4 */
8 5
9/* just for IFNAMSIZ */ 6/* just for IFNAMSIZ */
diff --git a/net/mac80211/led.h b/net/mac80211/led.h
index a7893a1ac98b..fb3aaa3c5606 100644
--- a/net/mac80211/led.h
+++ b/net/mac80211/led.h
@@ -1,9 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Copyright 2006, Johannes Berg <johannes@sipsolutions.net> 3 * Copyright 2006, Johannes Berg <johannes@sipsolutions.net>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */ 4 */
8 5
9#include <linux/list.h> 6#include <linux/list.h>
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 2b608044ae23..55583b71ffaf 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2002-2005, Instant802 Networks, Inc.
3 * Copyright 2005-2006, Devicescape Software, Inc. 4 * Copyright 2005-2006, Devicescape Software, Inc.
@@ -5,10 +6,6 @@
5 * Copyright 2013-2014 Intel Mobile Communications GmbH 6 * Copyright 2013-2014 Intel Mobile Communications GmbH
6 * Copyright (C) 2017 Intel Deutschland GmbH 7 * Copyright (C) 2017 Intel Deutschland GmbH
7 * Copyright (C) 2018 - 2019 Intel Corporation 8 * Copyright (C) 2018 - 2019 Intel Corporation
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */ 9 */
13 10
14#include <net/mac80211.h> 11#include <net/mac80211.h>
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 766e5e5bab8a..2e7fa743c892 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -1,12 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright (c) 2008, 2009 open80211s Ltd. 3 * Copyright (c) 2008, 2009 open80211s Ltd.
3 * Copyright (C) 2018 - 2019 Intel Corporation 4 * Copyright (C) 2018 - 2019 Intel Corporation
4 * Authors: Luis Carlos Cobo <luisca@cozybit.com> 5 * Authors: Luis Carlos Cobo <luisca@cozybit.com>
5 * Javier Cardona <javier@cozybit.com> 6 * Javier Cardona <javier@cozybit.com>
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 as
9 * published by the Free Software Foundation.
10 */ 7 */
11 8
12#include <linux/slab.h> 9#include <linux/slab.h>
@@ -929,6 +926,7 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
929 926
930 /* flush STAs and mpaths on this iface */ 927 /* flush STAs and mpaths on this iface */
931 sta_info_flush(sdata); 928 sta_info_flush(sdata);
929 ieee80211_free_keys(sdata, true);
932 mesh_path_flush_by_iface(sdata); 930 mesh_path_flush_by_iface(sdata);
933 931
934 /* stop the beacon */ 932 /* stop the beacon */
@@ -1220,7 +1218,8 @@ int ieee80211_mesh_finish_csa(struct ieee80211_sub_if_data *sdata)
1220 ifmsh->chsw_ttl = 0; 1218 ifmsh->chsw_ttl = 0;
1221 1219
1222 /* Remove the CSA and MCSP elements from the beacon */ 1220 /* Remove the CSA and MCSP elements from the beacon */
1223 tmp_csa_settings = rcu_dereference(ifmsh->csa); 1221 tmp_csa_settings = rcu_dereference_protected(ifmsh->csa,
1222 lockdep_is_held(&sdata->wdev.mtx));
1224 RCU_INIT_POINTER(ifmsh->csa, NULL); 1223 RCU_INIT_POINTER(ifmsh->csa, NULL);
1225 if (tmp_csa_settings) 1224 if (tmp_csa_settings)
1226 kfree_rcu(tmp_csa_settings, rcu_head); 1225 kfree_rcu(tmp_csa_settings, rcu_head);
@@ -1242,6 +1241,8 @@ int ieee80211_mesh_csa_beacon(struct ieee80211_sub_if_data *sdata,
1242 struct mesh_csa_settings *tmp_csa_settings; 1241 struct mesh_csa_settings *tmp_csa_settings;
1243 int ret = 0; 1242 int ret = 0;
1244 1243
1244 lockdep_assert_held(&sdata->wdev.mtx);
1245
1245 tmp_csa_settings = kmalloc(sizeof(*tmp_csa_settings), 1246 tmp_csa_settings = kmalloc(sizeof(*tmp_csa_settings),
1246 GFP_ATOMIC); 1247 GFP_ATOMIC);
1247 if (!tmp_csa_settings) 1248 if (!tmp_csa_settings)
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index 88535a2e62bc..94d57cce70da 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -1,11 +1,8 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Copyright (c) 2008, 2009 open80211s Ltd. 3 * Copyright (c) 2008, 2009 open80211s Ltd.
3 * Authors: Luis Carlos Cobo <luisca@cozybit.com> 4 * Authors: Luis Carlos Cobo <luisca@cozybit.com>
4 * Javier Cardona <javier@cozybit.com> 5 * Javier Cardona <javier@cozybit.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */ 6 */
10 7
11#ifndef IEEE80211S_H 8#ifndef IEEE80211S_H
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index bf8e13cd5fd1..68af62306385 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -1,11 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright (c) 2008, 2009 open80211s Ltd. 3 * Copyright (c) 2008, 2009 open80211s Ltd.
3 * Copyright (C) 2019 Intel Corporation 4 * Copyright (C) 2019 Intel Corporation
4 * Author: Luis Carlos Cobo <luisca@cozybit.com> 5 * Author: Luis Carlos Cobo <luisca@cozybit.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */ 6 */
10 7
11#include <linux/slab.h> 8#include <linux/slab.h>
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 796b069ad251..117519bf33d6 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -1,10 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright (c) 2008, 2009 open80211s Ltd. 3 * Copyright (c) 2008, 2009 open80211s Ltd.
3 * Author: Luis Carlos Cobo <luisca@cozybit.com> 4 * Author: Luis Carlos Cobo <luisca@cozybit.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */ 5 */
9 6
10#include <linux/etherdevice.h> 7#include <linux/etherdevice.h>
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 8afd0ece94c9..dd3aefd052a9 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -1,11 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright (c) 2008, 2009 open80211s Ltd. 3 * Copyright (c) 2008, 2009 open80211s Ltd.
3 * Copyright (C) 2019 Intel Corporation 4 * Copyright (C) 2019 Intel Corporation
4 * Author: Luis Carlos Cobo <luisca@cozybit.com> 5 * Author: Luis Carlos Cobo <luisca@cozybit.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */ 6 */
10#include <linux/gfp.h> 7#include <linux/gfp.h>
11#include <linux/kernel.h> 8#include <linux/kernel.h>
diff --git a/net/mac80211/mesh_ps.c b/net/mac80211/mesh_ps.c
index d8cd91424175..031e905f684a 100644
--- a/net/mac80211/mesh_ps.c
+++ b/net/mac80211/mesh_ps.c
@@ -1,10 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2012-2013, Marco Porsch <marco.porsch@s2005.tu-chemnitz.de> 3 * Copyright 2012-2013, Marco Porsch <marco.porsch@s2005.tu-chemnitz.de>
3 * Copyright 2012-2013, cozybit Inc. 4 * Copyright 2012-2013, cozybit Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */ 5 */
9 6
10#include "mesh.h" 7#include "mesh.h"
diff --git a/net/mac80211/mesh_sync.c b/net/mac80211/mesh_sync.c
index a435f094a82e..fde93de2b80a 100644
--- a/net/mac80211/mesh_sync.c
+++ b/net/mac80211/mesh_sync.c
@@ -1,11 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2011-2012, Pavel Zubarev <pavel.zubarev@gmail.com> 3 * Copyright 2011-2012, Pavel Zubarev <pavel.zubarev@gmail.com>
3 * Copyright 2011-2012, Marco Porsch <marco.porsch@s2005.tu-chemnitz.de> 4 * Copyright 2011-2012, Marco Porsch <marco.porsch@s2005.tu-chemnitz.de>
4 * Copyright 2011-2012, cozybit Inc. 5 * Copyright 2011-2012, cozybit Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */ 6 */
10 7
11#include "ieee80211_i.h" 8#include "ieee80211_i.h"
diff --git a/net/mac80211/michael.c b/net/mac80211/michael.c
index 37e172701a63..a57502d9ffec 100644
--- a/net/mac80211/michael.c
+++ b/net/mac80211/michael.c
@@ -1,10 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Michael MIC implementation - optimized for TKIP MIC operations 3 * Michael MIC implementation - optimized for TKIP MIC operations
3 * Copyright 2002-2003, Instant802 Networks, Inc. 4 * Copyright 2002-2003, Instant802 Networks, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */ 5 */
9#include <linux/types.h> 6#include <linux/types.h>
10#include <linux/bitops.h> 7#include <linux/bitops.h>
diff --git a/net/mac80211/michael.h b/net/mac80211/michael.h
index 0e4886f881f1..a7fdb8e84615 100644
--- a/net/mac80211/michael.h
+++ b/net/mac80211/michael.h
@@ -1,10 +1,7 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Michael MIC implementation - optimized for TKIP MIC operations 3 * Michael MIC implementation - optimized for TKIP MIC operations
3 * Copyright 2002-2003, Instant802 Networks, Inc. 4 * Copyright 2002-2003, Instant802 Networks, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */ 5 */
9 6
10#ifndef MICHAEL_H 7#ifndef MICHAEL_H
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index b7a9fe3d5fcb..379d2ab6d327 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * BSS client mode implementation 3 * BSS client mode implementation
3 * Copyright 2003-2008, Jouni Malinen <j@w1.fi> 4 * Copyright 2003-2008, Jouni Malinen <j@w1.fi>
@@ -8,10 +9,6 @@
8 * Copyright 2013-2014 Intel Mobile Communications GmbH 9 * Copyright 2013-2014 Intel Mobile Communications GmbH
9 * Copyright (C) 2015 - 2017 Intel Deutschland GmbH 10 * Copyright (C) 2015 - 2017 Intel Deutschland GmbH
10 * Copyright (C) 2018 - 2019 Intel Corporation 11 * Copyright (C) 2018 - 2019 Intel Corporation
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */ 12 */
16 13
17#include <linux/delay.h> 14#include <linux/delay.h>
@@ -2963,7 +2960,7 @@ static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
2963#define case_WLAN(type) \ 2960#define case_WLAN(type) \
2964 case WLAN_REASON_##type: return #type 2961 case WLAN_REASON_##type: return #type
2965 2962
2966static const char *ieee80211_get_reason_code_string(u16 reason_code) 2963const char *ieee80211_get_reason_code_string(u16 reason_code)
2967{ 2964{
2968 switch (reason_code) { 2965 switch (reason_code) {
2969 case_WLAN(UNSPECIFIED); 2966 case_WLAN(UNSPECIFIED);
@@ -3028,6 +3025,11 @@ static void ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata,
3028 if (len < 24 + 2) 3025 if (len < 24 + 2)
3029 return; 3026 return;
3030 3027
3028 if (!ether_addr_equal(mgmt->bssid, mgmt->sa)) {
3029 ieee80211_tdls_handle_disconnect(sdata, mgmt->sa, reason_code);
3030 return;
3031 }
3032
3031 if (ifmgd->associated && 3033 if (ifmgd->associated &&
3032 ether_addr_equal(mgmt->bssid, ifmgd->associated->bssid)) { 3034 ether_addr_equal(mgmt->bssid, ifmgd->associated->bssid)) {
3033 const u8 *bssid = ifmgd->associated->bssid; 3035 const u8 *bssid = ifmgd->associated->bssid;
@@ -3077,6 +3079,11 @@ static void ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
3077 3079
3078 reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code); 3080 reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code);
3079 3081
3082 if (!ether_addr_equal(mgmt->bssid, mgmt->sa)) {
3083 ieee80211_tdls_handle_disconnect(sdata, mgmt->sa, reason_code);
3084 return;
3085 }
3086
3080 sdata_info(sdata, "disassociated from %pM (Reason: %u=%s)\n", 3087 sdata_info(sdata, "disassociated from %pM (Reason: %u=%s)\n",
3081 mgmt->sa, reason_code, 3088 mgmt->sa, reason_code,
3082 ieee80211_get_reason_code_string(reason_code)); 3089 ieee80211_get_reason_code_string(reason_code));
diff --git a/net/mac80211/ocb.c b/net/mac80211/ocb.c
index d351dc1162be..7c1a735b9eee 100644
--- a/net/mac80211/ocb.c
+++ b/net/mac80211/ocb.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * OCB mode implementation 3 * OCB mode implementation
3 * 4 *
@@ -5,10 +6,6 @@
5 * (c) 2014 Volkswagen Group Research 6 * (c) 2014 Volkswagen Group Research
6 * Author: Rostislav Lisovy <rostislav.lisovy@fel.cvut.cz> 7 * Author: Rostislav Lisovy <rostislav.lisovy@fel.cvut.cz>
7 * Funded by: Volkswagen Group Research 8 * Funded by: Volkswagen Group Research
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */ 9 */
13 10
14#include <linux/delay.h> 11#include <linux/delay.h>
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index 8ef4153cd299..6e5961d7f639 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Off-channel operation helpers 3 * Off-channel operation helpers
3 * 4 *
@@ -7,10 +8,6 @@
7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 8 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net> 9 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
9 * Copyright 2009 Johannes Berg <johannes@sipsolutions.net> 10 * Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */ 11 */
15#include <linux/export.h> 12#include <linux/export.h>
16#include <net/mac80211.h> 13#include <net/mac80211.h>
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 76f303fda3ed..47ee36677c2b 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -1,12 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2002-2005, Instant802 Networks, Inc.
3 * Copyright 2005-2006, Devicescape Software, Inc. 4 * Copyright 2005-2006, Devicescape Software, Inc.
4 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz> 5 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz>
5 * Copyright 2017 Intel Deutschland GmbH 6 * Copyright 2017 Intel Deutschland GmbH
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 as
9 * published by the Free Software Foundation.
10 */ 7 */
11 8
12#include <linux/kernel.h> 9#include <linux/kernel.h>
diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h
index d59198191a79..5d5348bc41ec 100644
--- a/net/mac80211/rate.h
+++ b/net/mac80211/rate.h
@@ -1,11 +1,8 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2002-2005, Instant802 Networks, Inc.
3 * Copyright 2005, Devicescape Software, Inc. 4 * Copyright 2005, Devicescape Software, Inc.
4 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz> 5 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */ 6 */
10 7
11#ifndef IEEE80211_RATE_H 8#ifndef IEEE80211_RATE_H
diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h
index 23ec953e3a24..3c96a853adbd 100644
--- a/net/mac80211/rc80211_minstrel.h
+++ b/net/mac80211/rc80211_minstrel.h
@@ -1,9 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org> 3 * Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */ 4 */
8 5
9#ifndef __RC_MINSTREL_H 6#ifndef __RC_MINSTREL_H
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 8b168724c5e7..298a1acb3ce5 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -1,9 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright (C) 2010-2013 Felix Fietkau <nbd@openwrt.org> 3 * Copyright (C) 2010-2013 Felix Fietkau <nbd@openwrt.org>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */ 4 */
8#include <linux/netdevice.h> 5#include <linux/netdevice.h>
9#include <linux/types.h> 6#include <linux/types.h>
@@ -998,8 +995,6 @@ minstrel_ht_update_rates(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
998 } 995 }
999 996
1000 if (mp->hw->max_rates >= 2) { 997 if (mp->hw->max_rates >= 2) {
1001 /*
1002 * At least 2 tx rates supported, use max_prob_rate next */
1003 minstrel_ht_set_rate(mp, mi, rates, i++, mi->max_prob_rate); 998 minstrel_ht_set_rate(mp, mi, rates, i++, mi->max_prob_rate);
1004 } 999 }
1005 1000
diff --git a/net/mac80211/rc80211_minstrel_ht.h b/net/mac80211/rc80211_minstrel_ht.h
index f762e5ba7c2e..80296268c778 100644
--- a/net/mac80211/rc80211_minstrel_ht.h
+++ b/net/mac80211/rc80211_minstrel_ht.h
@@ -1,9 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Copyright (C) 2010 Felix Fietkau <nbd@openwrt.org> 3 * Copyright (C) 2010 Felix Fietkau <nbd@openwrt.org>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */ 4 */
8 5
9#ifndef __RC_MINSTREL_HT_H 6#ifndef __RC_MINSTREL_HT_H
diff --git a/net/mac80211/rc80211_minstrel_ht_debugfs.c b/net/mac80211/rc80211_minstrel_ht_debugfs.c
index 31641d0b0f5c..5a6e9f3edc04 100644
--- a/net/mac80211/rc80211_minstrel_ht_debugfs.c
+++ b/net/mac80211/rc80211_minstrel_ht_debugfs.c
@@ -1,9 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright (C) 2010 Felix Fietkau <nbd@openwrt.org> 3 * Copyright (C) 2010 Felix Fietkau <nbd@openwrt.org>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */ 4 */
8#include <linux/netdevice.h> 5#include <linux/netdevice.h>
9#include <linux/types.h> 6#include <linux/types.h>
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 25577ede2986..3c1ab870fefe 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2002-2005, Instant802 Networks, Inc.
3 * Copyright 2005-2006, Devicescape Software, Inc. 4 * Copyright 2005-2006, Devicescape Software, Inc.
@@ -6,10 +7,6 @@
6 * Copyright 2013-2014 Intel Mobile Communications GmbH 7 * Copyright 2013-2014 Intel Mobile Communications GmbH
7 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH 8 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
8 * Copyright (C) 2018-2019 Intel Corporation 9 * Copyright (C) 2018-2019 Intel Corporation
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */ 10 */
14 11
15#include <linux/jiffies.h> 12#include <linux/jiffies.h>
@@ -3831,6 +3828,8 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
3831 case NL80211_IFTYPE_STATION: 3828 case NL80211_IFTYPE_STATION:
3832 if (!bssid && !sdata->u.mgd.use_4addr) 3829 if (!bssid && !sdata->u.mgd.use_4addr)
3833 return false; 3830 return false;
3831 if (ieee80211_is_robust_mgmt_frame(skb) && !rx->sta)
3832 return false;
3834 if (multicast) 3833 if (multicast)
3835 return true; 3834 return true;
3836 return ether_addr_equal(sdata->vif.addr, hdr->addr1); 3835 return ether_addr_equal(sdata->vif.addr, hdr->addr1);
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 0cf066700623..adf94ba1ed77 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Scanning implementation 3 * Scanning implementation
3 * 4 *
@@ -9,10 +10,6 @@
9 * Copyright 2013-2015 Intel Mobile Communications GmbH 10 * Copyright 2013-2015 Intel Mobile Communications GmbH
10 * Copyright 2016-2017 Intel Deutschland GmbH 11 * Copyright 2016-2017 Intel Deutschland GmbH
11 * Copyright (C) 2018-2019 Intel Corporation 12 * Copyright (C) 2018-2019 Intel Corporation
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
16 */ 13 */
17 14
18#include <linux/if_arp.h> 15#include <linux/if_arp.h>
diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c
index 3c644f14dd59..5fe2b645912f 100644
--- a/net/mac80211/spectmgmt.c
+++ b/net/mac80211/spectmgmt.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * spectrum management 3 * spectrum management
3 * 4 *
@@ -9,10 +10,6 @@
9 * Copyright 2007-2008, Intel Corporation 10 * Copyright 2007-2008, Intel Corporation
10 * Copyright 2008, Johannes Berg <johannes@sipsolutions.net> 11 * Copyright 2008, Johannes Berg <johannes@sipsolutions.net>
11 * Copyright (C) 2018 Intel Corporation 12 * Copyright (C) 2018 Intel Corporation
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
16 */ 13 */
17 14
18#include <linux/ieee80211.h> 15#include <linux/ieee80211.h>
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index a4932ee3595c..187f62a48b2b 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -1,13 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2002-2005, Instant802 Networks, Inc.
3 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 4 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
4 * Copyright 2013-2014 Intel Mobile Communications GmbH 5 * Copyright 2013-2014 Intel Mobile Communications GmbH
5 * Copyright (C) 2015 - 2017 Intel Deutschland GmbH 6 * Copyright (C) 2015 - 2017 Intel Deutschland GmbH
6 * Copyright (C) 2018 Intel Corporation 7 * Copyright (C) 2018 Intel Corporation
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */ 8 */
12 9
13#include <linux/module.h> 10#include <linux/module.h>
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 71f7e4973329..3260d4234920 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -1,11 +1,8 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Copyright 2002-2005, Devicescape Software, Inc. 3 * Copyright 2002-2005, Devicescape Software, Inc.
3 * Copyright 2013-2014 Intel Mobile Communications GmbH 4 * Copyright 2013-2014 Intel Mobile Communications GmbH
4 * Copyright(c) 2015-2017 Intel Deutschland GmbH 5 * Copyright(c) 2015-2017 Intel Deutschland GmbH
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */ 6 */
10 7
11#ifndef STA_INFO_H 8#ifndef STA_INFO_H
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 5b9952b1caf3..a88e3bf17e9d 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -1,13 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2002-2005, Instant802 Networks, Inc.
3 * Copyright 2005-2006, Devicescape Software, Inc. 4 * Copyright 2005-2006, Devicescape Software, Inc.
4 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 5 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
5 * Copyright 2008-2010 Johannes Berg <johannes@sipsolutions.net> 6 * Copyright 2008-2010 Johannes Berg <johannes@sipsolutions.net>
6 * Copyright 2013-2014 Intel Mobile Communications GmbH 7 * Copyright 2013-2014 Intel Mobile Communications GmbH
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */ 8 */
12 9
13#include <linux/export.h> 10#include <linux/export.h>
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index ca97e1598c28..fca1f5477396 100644
--- a/net/mac80211/tdls.c
+++ b/net/mac80211/tdls.c
@@ -1993,3 +1993,26 @@ void ieee80211_tdls_chsw_work(struct work_struct *wk)
1993 } 1993 }
1994 rtnl_unlock(); 1994 rtnl_unlock();
1995} 1995}
1996
1997void ieee80211_tdls_handle_disconnect(struct ieee80211_sub_if_data *sdata,
1998 const u8 *peer, u16 reason)
1999{
2000 struct ieee80211_sta *sta;
2001
2002 rcu_read_lock();
2003 sta = ieee80211_find_sta(&sdata->vif, peer);
2004 if (!sta || !sta->tdls) {
2005 rcu_read_unlock();
2006 return;
2007 }
2008 rcu_read_unlock();
2009
2010 tdls_dbg(sdata, "disconnected from TDLS peer %pM (Reason: %u=%s)\n",
2011 peer, reason,
2012 ieee80211_get_reason_code_string(reason));
2013
2014 ieee80211_tdls_oper_request(&sdata->vif, peer,
2015 NL80211_TDLS_TEARDOWN,
2016 WLAN_REASON_TDLS_TEARDOWN_UNREACHABLE,
2017 GFP_ATOMIC);
2018}
diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c
index b3622823bad2..7914b8e3ce8c 100644
--- a/net/mac80211/tkip.c
+++ b/net/mac80211/tkip.c
@@ -1,11 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2002-2004, Instant802 Networks, Inc. 3 * Copyright 2002-2004, Instant802 Networks, Inc.
3 * Copyright 2005, Devicescape Software, Inc. 4 * Copyright 2005, Devicescape Software, Inc.
4 * Copyright (C) 2016 Intel Deutschland GmbH 5 * Copyright (C) 2016 Intel Deutschland GmbH
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */ 6 */
10#include <linux/kernel.h> 7#include <linux/kernel.h>
11#include <linux/bitops.h> 8#include <linux/bitops.h>
diff --git a/net/mac80211/tkip.h b/net/mac80211/tkip.h
index a1bcbfbefe7c..676a7babdf5d 100644
--- a/net/mac80211/tkip.h
+++ b/net/mac80211/tkip.h
@@ -1,9 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Copyright 2002-2004, Instant802 Networks, Inc. 3 * Copyright 2002-2004, Instant802 Networks, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */ 4 */
8 5
9#ifndef TKIP_H 6#ifndef TKIP_H
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index dd220b977025..f13eb2f61ccf 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2002-2005, Instant802 Networks, Inc.
3 * Copyright 2005-2006, Devicescape Software, Inc. 4 * Copyright 2005-2006, Devicescape Software, Inc.
@@ -6,11 +7,6 @@
6 * Copyright 2013-2014 Intel Mobile Communications GmbH 7 * Copyright 2013-2014 Intel Mobile Communications GmbH
7 * Copyright (C) 2018 Intel Corporation 8 * Copyright (C) 2018 Intel Corporation
8 * 9 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 *
14 * Transmit and frame generation functions. 10 * Transmit and frame generation functions.
15 */ 11 */
16 12
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index cba4633cd6cf..1b224fa27367 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2002-2005, Instant802 Networks, Inc.
3 * Copyright 2005-2006, Devicescape Software, Inc. 4 * Copyright 2005-2006, Devicescape Software, Inc.
@@ -7,10 +8,6 @@
7 * Copyright (C) 2015-2017 Intel Deutschland GmbH 8 * Copyright (C) 2015-2017 Intel Deutschland GmbH
8 * Copyright (C) 2018-2019 Intel Corporation 9 * Copyright (C) 2018-2019 Intel Corporation
9 * 10 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 *
14 * utilities for mac80211 11 * utilities for mac80211
15 */ 12 */
16 13
@@ -2480,6 +2477,10 @@ int ieee80211_reconfig(struct ieee80211_local *local)
2480 mutex_lock(&local->mtx); 2477 mutex_lock(&local->mtx);
2481 ieee80211_start_next_roc(local); 2478 ieee80211_start_next_roc(local);
2482 mutex_unlock(&local->mtx); 2479 mutex_unlock(&local->mtx);
2480
2481 /* Requeue all works */
2482 list_for_each_entry(sdata, &local->interfaces, list)
2483 ieee80211_queue_work(&local->hw, &sdata->work);
2483 } 2484 }
2484 2485
2485 ieee80211_wake_queues_by_reason(hw, IEEE80211_MAX_QUEUE_MAP, 2486 ieee80211_wake_queues_by_reason(hw, IEEE80211_MAX_QUEUE_MAP,
@@ -3795,7 +3796,9 @@ int ieee80211_check_combinations(struct ieee80211_sub_if_data *sdata,
3795 } 3796 }
3796 3797
3797 /* Always allow software iftypes */ 3798 /* Always allow software iftypes */
3798 if (local->hw.wiphy->software_iftypes & BIT(iftype)) { 3799 if (local->hw.wiphy->software_iftypes & BIT(iftype) ||
3800 (iftype == NL80211_IFTYPE_AP_VLAN &&
3801 local->hw.wiphy->flags & WIPHY_FLAG_4ADDR_AP)) {
3799 if (radar_detect) 3802 if (radar_detect)
3800 return -EINVAL; 3803 return -EINVAL;
3801 return 0; 3804 return 0;
diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c
index 006d82e4a397..b20ff28d9f30 100644
--- a/net/mac80211/vht.c
+++ b/net/mac80211/vht.c
@@ -1,13 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * VHT handling 3 * VHT handling
3 * 4 *
4 * Portions of this file 5 * Portions of this file
5 * Copyright(c) 2015 - 2016 Intel Deutschland GmbH 6 * Copyright(c) 2015 - 2016 Intel Deutschland GmbH
6 * Copyright (C) 2018 Intel Corporation 7 * Copyright (C) 2018 Intel Corporation
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */ 8 */
12 9
13#include <linux/ieee80211.h> 10#include <linux/ieee80211.h>
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c
index bfe9ed9f4c48..3d9e92867ef0 100644
--- a/net/mac80211/wep.c
+++ b/net/mac80211/wep.c
@@ -1,11 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Software WEP encryption implementation 3 * Software WEP encryption implementation
3 * Copyright 2002, Jouni Malinen <jkmaline@cc.hut.fi> 4 * Copyright 2002, Jouni Malinen <jkmaline@cc.hut.fi>
4 * Copyright 2003, Instant802 Networks, Inc. 5 * Copyright 2003, Instant802 Networks, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */ 6 */
10 7
11#include <linux/netdevice.h> 8#include <linux/netdevice.h>
diff --git a/net/mac80211/wep.h b/net/mac80211/wep.h
index 9615749d1f65..866a6798c9ef 100644
--- a/net/mac80211/wep.h
+++ b/net/mac80211/wep.h
@@ -1,11 +1,8 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Software WEP encryption implementation 3 * Software WEP encryption implementation
3 * Copyright 2002, Jouni Malinen <jkmaline@cc.hut.fi> 4 * Copyright 2002, Jouni Malinen <jkmaline@cc.hut.fi>
4 * Copyright 2003, Instant802 Networks, Inc. 5 * Copyright 2003, Instant802 Networks, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */ 6 */
10 7
11#ifndef WEP_H 8#ifndef WEP_H
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index 6a3187883c4b..72920d82928c 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -1,10 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2004, Instant802 Networks, Inc. 3 * Copyright 2004, Instant802 Networks, Inc.
3 * Copyright 2013-2014 Intel Mobile Communications GmbH 4 * Copyright 2013-2014 Intel Mobile Communications GmbH
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */ 5 */
9 6
10#include <linux/netdevice.h> 7#include <linux/netdevice.h>
diff --git a/net/mac80211/wme.h b/net/mac80211/wme.h
index b1b1439cb91b..2e3dec0b6087 100644
--- a/net/mac80211/wme.h
+++ b/net/mac80211/wme.h
@@ -1,10 +1,7 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Copyright 2004, Instant802 Networks, Inc. 3 * Copyright 2004, Instant802 Networks, Inc.
3 * Copyright 2005, Devicescape Software, Inc. 4 * Copyright 2005, Devicescape Software, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */ 5 */
9 6
10#ifndef _WME_H 7#ifndef _WME_H
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
index 58d0b258b684..a51c7909366e 100644
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -1,11 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright 2002-2004, Instant802 Networks, Inc. 3 * Copyright 2002-2004, Instant802 Networks, Inc.
3 * Copyright 2008, Jouni Malinen <j@w1.fi> 4 * Copyright 2008, Jouni Malinen <j@w1.fi>
4 * Copyright (C) 2016-2017 Intel Deutschland GmbH 5 * Copyright (C) 2016-2017 Intel Deutschland GmbH
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */ 6 */
10 7
11#include <linux/netdevice.h> 8#include <linux/netdevice.h>
@@ -1175,7 +1172,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct ieee80211_rx_data *rx)
1175 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); 1172 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
1176 struct ieee80211_key *key = rx->key; 1173 struct ieee80211_key *key = rx->key;
1177 struct ieee80211_mmie_16 *mmie; 1174 struct ieee80211_mmie_16 *mmie;
1178 u8 aad[GMAC_AAD_LEN], mic[GMAC_MIC_LEN], ipn[6], nonce[GMAC_NONCE_LEN]; 1175 u8 aad[GMAC_AAD_LEN], *mic, ipn[6], nonce[GMAC_NONCE_LEN];
1179 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 1176 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
1180 1177
1181 if (!ieee80211_is_mgmt(hdr->frame_control)) 1178 if (!ieee80211_is_mgmt(hdr->frame_control))
@@ -1206,13 +1203,18 @@ ieee80211_crypto_aes_gmac_decrypt(struct ieee80211_rx_data *rx)
1206 memcpy(nonce, hdr->addr2, ETH_ALEN); 1203 memcpy(nonce, hdr->addr2, ETH_ALEN);
1207 memcpy(nonce + ETH_ALEN, ipn, 6); 1204 memcpy(nonce + ETH_ALEN, ipn, 6);
1208 1205
1206 mic = kmalloc(GMAC_MIC_LEN, GFP_ATOMIC);
1207 if (!mic)
1208 return RX_DROP_UNUSABLE;
1209 if (ieee80211_aes_gmac(key->u.aes_gmac.tfm, aad, nonce, 1209 if (ieee80211_aes_gmac(key->u.aes_gmac.tfm, aad, nonce,
1210 skb->data + 24, skb->len - 24, 1210 skb->data + 24, skb->len - 24,
1211 mic) < 0 || 1211 mic) < 0 ||
1212 crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) { 1212 crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) {
1213 key->u.aes_gmac.icverrors++; 1213 key->u.aes_gmac.icverrors++;
1214 kfree(mic);
1214 return RX_DROP_UNUSABLE; 1215 return RX_DROP_UNUSABLE;
1215 } 1216 }
1217 kfree(mic);
1216 } 1218 }
1217 1219
1218 memcpy(key->u.aes_gmac.rx_pn, ipn, 6); 1220 memcpy(key->u.aes_gmac.rx_pn, ipn, 6);
diff --git a/net/mac80211/wpa.h b/net/mac80211/wpa.h
index d98011ee8f55..af3272284e85 100644
--- a/net/mac80211/wpa.h
+++ b/net/mac80211/wpa.h
@@ -1,9 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * Copyright 2002-2004, Instant802 Networks, Inc. 3 * Copyright 2002-2004, Instant802 Networks, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */ 4 */
8 5
9#ifndef WPA_H 6#ifndef WPA_H