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

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

Merge "Revert "nl80211: fixes for event reordering.""

parents 3340dcb6 d191613f
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -210,7 +210,6 @@ enum cfg80211_event_type {
	EVENT_ROAMED,
	EVENT_DISCONNECTED,
	EVENT_IBSS_JOINED,
	EVENT_AUTHORIZATION,
};

struct cfg80211_event {
@@ -241,10 +240,6 @@ struct cfg80211_event {
		struct {
			u8 bssid[ETH_ALEN];
		} ij;
		struct {
			enum nl80211_authorization_status auth_status;
			u8 key_replay_ctr[NL80211_KEY_REPLAY_CTR_LEN];
		} au;
	};
};

@@ -401,9 +396,6 @@ void __cfg80211_roamed(struct wireless_dev *wdev,
		       const u8 *resp_ie, size_t resp_ie_len);
int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev,
			      struct wireless_dev *wdev);
void __cfg80211_authorization_event(struct net_device *dev,
			   enum nl80211_authorization_status auth_status,
			   const u8 *key_replay_ctr);

void cfg80211_conn_work(struct work_struct *work);
void cfg80211_sme_failed_assoc(struct wireless_dev *wdev);
+12 −36
Original line number Diff line number Diff line
@@ -11241,9 +11241,10 @@ void cfg80211_ap_stopped(struct net_device *netdev, gfp_t gfp)
}
EXPORT_SYMBOL(cfg80211_ap_stopped);

void __cfg80211_authorization_event(struct net_device *dev,
void cfg80211_authorization_event(struct net_device *dev,
				  enum nl80211_authorization_status auth_status,
			    const u8 *key_replay_ctr)
				  const u8 *key_replay_ctr,
				  gfp_t gfp)
{
	struct wireless_dev *wdev = dev->ieee80211_ptr;
	struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
@@ -11251,7 +11252,13 @@ void __cfg80211_authorization_event(struct net_device *dev,
	void *hdr;
	int err;

	msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
	/* Valid only in SME_CONNECTED state */
	if (wdev->sme_state != CFG80211_SME_CONNECTED)
		return;

	trace_cfg80211_authorization_event(wdev->wiphy, dev, auth_status);

	msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
	if (!msg)
		return;

@@ -11275,44 +11282,13 @@ void __cfg80211_authorization_event(struct net_device *dev,
	}

	genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
				nl80211_mlme_mcgrp.id, GFP_KERNEL);
				nl80211_mlme_mcgrp.id, gfp);
	return;

nla_put_failure:
	genlmsg_cancel(msg, hdr);
	nlmsg_free(msg);
}

void cfg80211_authorization_event(struct net_device *dev,
				  enum nl80211_authorization_status auth_status,
				  const u8 *key_replay_ctr,
				  gfp_t gfp)
{
	struct wireless_dev *wdev = dev->ieee80211_ptr;
	struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
	struct cfg80211_event *ev;
	unsigned long flags;

	/* Valid only in SME_CONNECTED state */
	if (wdev->sme_state != CFG80211_SME_CONNECTED)
		return;

	ev = kzalloc(sizeof(*ev), gfp);
	if (!ev)
		return;

	trace_cfg80211_authorization_event(wdev->wiphy, dev, auth_status);

	ev->type = EVENT_AUTHORIZATION;
	ev->au.auth_status = auth_status;
	memcpy(ev->au.key_replay_ctr, key_replay_ctr,
		NL80211_KEY_REPLAY_CTR_LEN);

	spin_lock_irqsave(&wdev->event_lock, flags);
	list_add_tail(&ev->list, &wdev->event_list);
	spin_unlock_irqrestore(&wdev->event_lock, flags);
	queue_work(cfg80211_wq, &rdev->event_work);
}
EXPORT_SYMBOL(cfg80211_authorization_event);

/* initialisation/exit functions */
+0 −4
Original line number Diff line number Diff line
@@ -790,10 +790,6 @@ void cfg80211_process_wdev_events(struct wireless_dev *wdev)
		case EVENT_IBSS_JOINED:
			__cfg80211_ibss_joined(wdev->netdev, ev->ij.bssid);
			break;
		case EVENT_AUTHORIZATION:
			__cfg80211_authorization_event(wdev->netdev,
						       ev->au.auth_status,
						       ev->au.key_replay_ctr);
		}
		wdev_unlock(wdev);