Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2e0b974 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT"

parents 626f0ad3 5f3f4d3c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3937,6 +3937,9 @@ struct cfg80211_cached_keys;
 * @conn: (private) cfg80211 software SME connection state machine data
 * @connect_keys: (private) keys to set after connection is established
 * @conn_bss_type: connecting/connected BSS type
 * @conn_owner_nlportid: (private) connection owner socket port ID
 * @disconnect_wk: (private) auto-disconnect work
 * @disconnect_bssid: (private) the BSSID to use for auto-disconnect
 * @ibss_fixed: (private) IBSS is using fixed BSSID
 * @ibss_dfs_possible: (private) IBSS may change to a DFS channel
 * @event_list: (private) list for internal event processing
@@ -3968,6 +3971,10 @@ struct wireless_dev {
	struct cfg80211_conn *conn;
	struct cfg80211_cached_keys *connect_keys;
	enum ieee80211_bss_type conn_bss_type;
	u32 conn_owner_nlportid;

	struct work_struct disconnect_wk;
	u8 disconnect_bssid[ETH_ALEN];

	struct list_head event_list;
	spinlock_t event_lock;
+2 −0
Original line number Diff line number Diff line
@@ -1870,6 +1870,8 @@ enum nl80211_commands {
 *	and remove functions. NAN notifications will be sent in unicast to that
 *	socket. Without this attribute, any socket can add functions and the
 *	notifications will be sent to the %NL80211_MCGRP_NAN multicast group.
 *	If set during %NL80211_CMD_ASSOCIATE or %NL80211_CMD_CONNECT the
 *	station will deauthenticate when the socket is closed.
 *
 * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is
 *	the TDLS link initiator.
+3 −0
Original line number Diff line number Diff line
@@ -1117,6 +1117,8 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
		     wdev->iftype == NL80211_IFTYPE_ADHOC) && !wdev->use_4addr)
			dev->priv_flags |= IFF_DONT_BRIDGE;

		INIT_WORK(&wdev->disconnect_wk, cfg80211_autodisconnect_wk);

		nl80211_notify_iface(rdev, wdev, NL80211_CMD_NEW_INTERFACE);
		break;
	case NETDEV_GOING_DOWN:
@@ -1205,6 +1207,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
#ifdef CONFIG_CFG80211_WEXT
			kzfree(wdev->wext.keys);
#endif
			flush_work(&wdev->disconnect_wk);
		}
		/*
		 * synchronise (so that we won't find this netdev
+1 −0
Original line number Diff line number Diff line
@@ -382,6 +382,7 @@ void __cfg80211_roamed(struct wireless_dev *wdev,
		       struct cfg80211_roam_info *info);
int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev,
			      struct wireless_dev *wdev);
void cfg80211_autodisconnect_wk(struct work_struct *work);

/* SME implementation */
void cfg80211_conn_work(struct work_struct *work);
+5 −0
Original line number Diff line number Diff line
@@ -350,6 +350,11 @@ int cfg80211_mlme_deauth(struct cfg80211_registered_device *rdev,
	     !ether_addr_equal(wdev->current_bss->pub.bssid, bssid)))
		return 0;

	if (ether_addr_equal(wdev->disconnect_bssid, bssid) ||
	    (wdev->current_bss &&
	     ether_addr_equal(wdev->current_bss->pub.bssid, bssid)))
		wdev->conn_owner_nlportid = 0;

	return rdev_deauth(rdev, dev, &req);
}

Loading