Merge branch 'linus' into locking/core, to resolve conflicts
Conflicts: include/linux/compiler-clang.h include/linux/compiler-gcc.h include/linux/compiler-intel.h include/uapi/linux/stddef.h Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
obj-$(CONFIG_CFG80211) += cfg80211.o
|
||||
obj-$(CONFIG_LIB80211) += lib80211.o
|
||||
obj-$(CONFIG_LIB80211_CRYPT_WEP) += lib80211_crypt_wep.o
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/ieee80211.h>
|
||||
#include <linux/export.h>
|
||||
#include <net/cfg80211.h>
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* This file contains helper code to handle channel
|
||||
* settings and keeping track of what is possible at
|
||||
|
@@ -1,3 +1,4 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Wireless configuration interface internals.
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __CFG80211_DEBUGFS_H
|
||||
#define __CFG80211_DEBUGFS_H
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/utsname.h>
|
||||
#include <net/cfg80211.h>
|
||||
#include "core.h"
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Some IBSS support code for cfg80211.
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/ieee80211.h>
|
||||
#include <linux/export.h>
|
||||
#include <net/cfg80211.h>
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* cfg80211 MLME SAP interface
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __NET_WIRELESS_NL80211_H
|
||||
#define __NET_WIRELESS_NL80211_H
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __CFG80211_RDEV_OPS
|
||||
#define __CFG80211_RDEV_OPS
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* cfg80211 scan result handling
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* SME code for cfg80211
|
||||
* both driver SME event handling and the SME implementation
|
||||
@@ -522,11 +523,6 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev,
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (wdev->current_bss) {
|
||||
if (!prev_bssid)
|
||||
return -EALREADY;
|
||||
if (prev_bssid &&
|
||||
!ether_addr_equal(prev_bssid, wdev->current_bss->pub.bssid))
|
||||
return -ENOTCONN;
|
||||
cfg80211_unhold_bss(wdev->current_bss);
|
||||
cfg80211_put_bss(wdev->wiphy, &wdev->current_bss->pub);
|
||||
wdev->current_bss = NULL;
|
||||
@@ -1063,11 +1059,35 @@ int cfg80211_connect(struct cfg80211_registered_device *rdev,
|
||||
|
||||
ASSERT_WDEV_LOCK(wdev);
|
||||
|
||||
if (WARN_ON(wdev->connect_keys)) {
|
||||
kzfree(wdev->connect_keys);
|
||||
wdev->connect_keys = NULL;
|
||||
/*
|
||||
* If we have an ssid_len, we're trying to connect or are
|
||||
* already connected, so reject a new SSID unless it's the
|
||||
* same (which is the case for re-association.)
|
||||
*/
|
||||
if (wdev->ssid_len &&
|
||||
(wdev->ssid_len != connect->ssid_len ||
|
||||
memcmp(wdev->ssid, connect->ssid, wdev->ssid_len)))
|
||||
return -EALREADY;
|
||||
|
||||
/*
|
||||
* If connected, reject (re-)association unless prev_bssid
|
||||
* matches the current BSSID.
|
||||
*/
|
||||
if (wdev->current_bss) {
|
||||
if (!prev_bssid)
|
||||
return -EALREADY;
|
||||
if (!ether_addr_equal(prev_bssid, wdev->current_bss->pub.bssid))
|
||||
return -ENOTCONN;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reject if we're in the process of connecting with WEP,
|
||||
* this case isn't very interesting and trying to handle
|
||||
* it would make the code much more complex.
|
||||
*/
|
||||
if (wdev->connect_keys)
|
||||
return -EINPROGRESS;
|
||||
|
||||
cfg80211_oper_and_ht_capa(&connect->ht_capa_mask,
|
||||
rdev->wiphy.ht_capa_mod_mask);
|
||||
|
||||
@@ -1118,7 +1138,12 @@ int cfg80211_connect(struct cfg80211_registered_device *rdev,
|
||||
|
||||
if (err) {
|
||||
wdev->connect_keys = NULL;
|
||||
wdev->ssid_len = 0;
|
||||
/*
|
||||
* This could be reassoc getting refused, don't clear
|
||||
* ssid_len in that case.
|
||||
*/
|
||||
if (!wdev->current_bss)
|
||||
wdev->ssid_len = 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -1145,6 +1170,14 @@ int cfg80211_disconnect(struct cfg80211_registered_device *rdev,
|
||||
else if (wdev->ssid_len)
|
||||
err = rdev_disconnect(rdev, dev, reason);
|
||||
|
||||
/*
|
||||
* Clear ssid_len unless we actually were fully connected,
|
||||
* in which case cfg80211_disconnected() will take care of
|
||||
* this later.
|
||||
*/
|
||||
if (!wdev->current_bss)
|
||||
wdev->ssid_len = 0;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __WIRELESS_SYSFS_H
|
||||
#define __WIRELESS_SYSFS_H
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM cfg80211
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Wireless utility functions
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* cfg80211 - wext compat code
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* cfg80211 wext compat for managed mode.
|
||||
*
|
||||
|
Reference in New Issue
Block a user