aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/sme.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index 17465777eb47..dcd7685242f7 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -517,12 +517,16 @@ void cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
517 ev->type = EVENT_CONNECT_RESULT; 517 ev->type = EVENT_CONNECT_RESULT;
518 if (bssid) 518 if (bssid)
519 memcpy(ev->cr.bssid, bssid, ETH_ALEN); 519 memcpy(ev->cr.bssid, bssid, ETH_ALEN);
520 ev->cr.req_ie = ((u8 *)ev) + sizeof(*ev); 520 if (req_ie_len) {
521 ev->cr.req_ie_len = req_ie_len; 521 ev->cr.req_ie = ((u8 *)ev) + sizeof(*ev);
522 memcpy((void *)ev->cr.req_ie, req_ie, req_ie_len); 522 ev->cr.req_ie_len = req_ie_len;
523 ev->cr.resp_ie = ((u8 *)ev) + sizeof(*ev) + req_ie_len; 523 memcpy((void *)ev->cr.req_ie, req_ie, req_ie_len);
524 ev->cr.resp_ie_len = resp_ie_len; 524 }
525 memcpy((void *)ev->cr.resp_ie, resp_ie, resp_ie_len); 525 if (resp_ie_len) {
526 ev->cr.resp_ie = ((u8 *)ev) + sizeof(*ev) + req_ie_len;
527 ev->cr.resp_ie_len = resp_ie_len;
528 memcpy((void *)ev->cr.resp_ie, resp_ie, resp_ie_len);
529 }
526 ev->cr.status = status; 530 ev->cr.status = status;
527 531
528 spin_lock_irqsave(&wdev->event_lock, flags); 532 spin_lock_irqsave(&wdev->event_lock, flags);