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

Commit 16a832e7 authored by Zhu Yi's avatar Zhu Yi Committed by John W. Linville
Browse files

cfg80211: allow cfg80211_connect_result with bssid == NULL



In case of connection failure, the bssid info is not a must have.

Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 30fab9e0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
#include <linux/debugfs.h>
#include <linux/notifier.h>
#include <linux/device.h>
#include <linux/etherdevice.h>
#include <linux/rtnetlink.h>
#include <net/genetlink.h>
#include <net/cfg80211.h>
@@ -309,7 +310,8 @@ static void cfg80211_process_events(struct wireless_dev *wdev)
		switch (ev->type) {
		case EVENT_CONNECT_RESULT:
			__cfg80211_connect_result(
				wdev->netdev, ev->cr.bssid,
				wdev->netdev, is_zero_ether_addr(ev->cr.bssid) ?
				NULL : ev->cr.bssid,
				ev->cr.req_ie, ev->cr.req_ie_len,
				ev->cr.resp_ie, ev->cr.resp_ie_len,
				ev->cr.status,
+2 −1
Original line number Diff line number Diff line
@@ -450,6 +450,7 @@ void cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
		return;

	ev->type = EVENT_CONNECT_RESULT;
	if (bssid)
		memcpy(ev->cr.bssid, bssid, ETH_ALEN);
	ev->cr.req_ie = ((u8 *)ev) + sizeof(*ev);
	ev->cr.req_ie_len = req_ie_len;