Source
14
14
#include <linux/slab.h>
15
15
#include <linux/wireless.h>
16
16
#include <net/cfg80211.h>
17
17
#include <net/iw_handler.h>
18
18
#include "core.h"
19
19
#include "nl80211.h"
20
20
#include "rdev-ops.h"
21
21
22
22
23
23
void cfg80211_rx_assoc_resp(struct net_device *dev, struct cfg80211_bss *bss,
24
-
const u8 *buf, size_t len, int uapsd_queues)
24
+
const u8 *buf, size_t len, int uapsd_queues,
25
+
const u8 *req_ies, size_t req_ies_len)
25
26
{
26
27
struct wireless_dev *wdev = dev->ieee80211_ptr;
27
28
struct wiphy *wiphy = wdev->wiphy;
28
29
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
29
30
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf;
30
31
struct cfg80211_connect_resp_params cr;
31
32
32
33
memset(&cr, 0, sizeof(cr));
33
34
cr.status = (int)le16_to_cpu(mgmt->u.assoc_resp.status_code);
34
35
cr.bssid = mgmt->bssid;
35
36
cr.bss = bss;
37
+
cr.req_ie = req_ies;
38
+
cr.req_ie_len = req_ies_len;
36
39
cr.resp_ie = mgmt->u.assoc_resp.variable;
37
40
cr.resp_ie_len =
38
41
len - offsetof(struct ieee80211_mgmt, u.assoc_resp.variable);
39
42
cr.timeout_reason = NL80211_TIMEOUT_UNSPECIFIED;
40
43
41
44
trace_cfg80211_send_rx_assoc(dev, bss);
42
45
43
46
/*
44
47
* This is a bit of a hack, we don't notify userspace of
45
48
* a (re-)association reply if we tried to send a reassoc
46
49
* and got a reject -- we only try again with an assoc
47
50
* frame instead of reassoc.
48
51
*/
49
52
if (cfg80211_sme_rx_assoc_resp(wdev, cr.status)) {
50
53
cfg80211_unhold_bss(bss_from_pub(bss));
51
54
cfg80211_put_bss(wiphy, bss);
52
55
return;
53
56
}
54
57
55
-
nl80211_send_rx_assoc(rdev, dev, buf, len, GFP_KERNEL, uapsd_queues);
58
+
nl80211_send_rx_assoc(rdev, dev, buf, len, GFP_KERNEL, uapsd_queues,
59
+
req_ies, req_ies_len);
56
60
/* update current_bss etc., consumes the bss reference */
57
61
__cfg80211_connect_result(dev, &cr, cr.status == WLAN_STATUS_SUCCESS);
58
62
}
59
63
EXPORT_SYMBOL(cfg80211_rx_assoc_resp);
60
64
61
65
static void cfg80211_process_auth(struct wireless_dev *wdev,
62
66
const u8 *buf, size_t len)
63
67
{
64
68
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
65
69