aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2009-08-19 04:08:22 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-20 11:36:07 -0400
commit16a832e785820aa199641c77b2d6f4a443d2ec46 (patch)
treedbd843a2f054d0b826802d5f596f0581b3ea33d7 /net
parent30fab9e0aecf15ca79bb194bb603203f5e1fde66 (diff)
cfg80211: allow cfg80211_connect_result with bssid == NULL
In case of connection failure, the bssid info is not a must have. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/core.c4
-rw-r--r--net/wireless/sme.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index c150071b6f29..154e1e294cb9 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -12,6 +12,7 @@
12#include <linux/debugfs.h> 12#include <linux/debugfs.h>
13#include <linux/notifier.h> 13#include <linux/notifier.h>
14#include <linux/device.h> 14#include <linux/device.h>
15#include <linux/etherdevice.h>
15#include <linux/rtnetlink.h> 16#include <linux/rtnetlink.h>
16#include <net/genetlink.h> 17#include <net/genetlink.h>
17#include <net/cfg80211.h> 18#include <net/cfg80211.h>
@@ -309,7 +310,8 @@ static void cfg80211_process_events(struct wireless_dev *wdev)
309 switch (ev->type) { 310 switch (ev->type) {
310 case EVENT_CONNECT_RESULT: 311 case EVENT_CONNECT_RESULT:
311 __cfg80211_connect_result( 312 __cfg80211_connect_result(
312 wdev->netdev, ev->cr.bssid, 313 wdev->netdev, is_zero_ether_addr(ev->cr.bssid) ?
314 NULL : ev->cr.bssid,
313 ev->cr.req_ie, ev->cr.req_ie_len, 315 ev->cr.req_ie, ev->cr.req_ie_len,
314 ev->cr.resp_ie, ev->cr.resp_ie_len, 316 ev->cr.resp_ie, ev->cr.resp_ie_len,
315 ev->cr.status, 317 ev->cr.status,
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index 9ddc00e3c239..4a8289f9b4f0 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -450,7 +450,8 @@ void cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
450 return; 450 return;
451 451
452 ev->type = EVENT_CONNECT_RESULT; 452 ev->type = EVENT_CONNECT_RESULT;
453 memcpy(ev->cr.bssid, bssid, ETH_ALEN); 453 if (bssid)
454 memcpy(ev->cr.bssid, bssid, ETH_ALEN);
454 ev->cr.req_ie = ((u8 *)ev) + sizeof(*ev); 455 ev->cr.req_ie = ((u8 *)ev) + sizeof(*ev);
455 ev->cr.req_ie_len = req_ie_len; 456 ev->cr.req_ie_len = req_ie_len;
456 memcpy((void *)ev->cr.req_ie, req_ie, req_ie_len); 457 memcpy((void *)ev->cr.req_ie, req_ie, req_ie_len);