summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wil6210/cfg80211.c
diff options
context:
space:
mode:
authorVladimir Kondratiev2013-06-09 08:12:53 +0200
committerJohn W. Linville2013-06-12 21:06:51 +0200
commit92646c9f1f8fa2a31a3c12b026c2a8cd0e168341 (patch)
treeef340b4ba90fbaf8e04747e1e8147ec87756819d /drivers/net/wireless/ath/wil6210/cfg80211.c
parentwil6210: improve frame type reporting (diff)
downloadkernel-qcow2-linux-92646c9f1f8fa2a31a3c12b026c2a8cd0e168341.tar.gz
kernel-qcow2-linux-92646c9f1f8fa2a31a3c12b026c2a8cd0e168341.tar.xz
kernel-qcow2-linux-92646c9f1f8fa2a31a3c12b026c2a8cd0e168341.zip
wil6210: Derive IE's for AP
When starting secure AP, in some cases wpa_s provides probe template but not probe/assoc IE's. In this case, derive missing IE's from probe. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/cfg80211.c')
-rw-r--r--drivers/net/wireless/ath/wil6210/cfg80211.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c
index 4eb05d0818c3..189c3078ef7d 100644
--- a/drivers/net/wireless/ath/wil6210/cfg80211.c
+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -402,6 +402,30 @@ static int wil_cfg80211_set_default_key(struct wiphy *wiphy,
return 0;
}
+static int wil_fix_bcon(struct wil6210_priv *wil,
+ struct cfg80211_beacon_data *bcon)
+{
+ struct ieee80211_mgmt *f = (struct ieee80211_mgmt *)bcon->probe_resp;
+ size_t hlen = offsetof(struct ieee80211_mgmt, u.probe_resp.variable);
+ int rc = 0;
+
+ if (bcon->probe_resp_len <= hlen)
+ return 0;
+
+ if (!bcon->proberesp_ies) {
+ bcon->proberesp_ies = f->u.probe_resp.variable;
+ bcon->proberesp_ies_len = bcon->probe_resp_len - hlen;
+ rc = 1;
+ }
+ if (!bcon->assocresp_ies) {
+ bcon->assocresp_ies = f->u.probe_resp.variable;
+ bcon->assocresp_ies_len = bcon->probe_resp_len - hlen;
+ rc = 1;
+ }
+
+ return rc;
+}
+
static int wil_cfg80211_start_ap(struct wiphy *wiphy,
struct net_device *ndev,
struct cfg80211_ap_settings *info)
@@ -423,6 +447,9 @@ static int wil_cfg80211_start_ap(struct wiphy *wiphy,
print_hex_dump_bytes("SSID ", DUMP_PREFIX_OFFSET,
info->ssid, info->ssid_len);
+ if (wil_fix_bcon(wil, bcon))
+ wil_dbg_misc(wil, "Fixed bcon\n");
+
rc = wil_reset(wil);
if (rc)
return rc;