[PATCH 20/26] ap: Provide an offset to CSA counters in probe resp.
Ilan Peer
ilan.peer
Tue Sep 8 02:46:27 PDT 2015
From: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
Pass to driver a list of CSA counters' offsets when sending probe
responses during CSA period.
This allows the kernel to correctly update the CSA/eCSA IEs.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
src/ap/beacon.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index 08aa569..2c960aa 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -675,6 +675,9 @@ void handle_probe_req(struct hostapd_data *hapd,
size_t i, resp_len;
int noack;
enum ssid_match_result res;
+ int ret;
+ u16 csa_offs[2];
+ size_t csa_offs_len;
ie = mgmt->u.probe_req.variable;
if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.probe_req))
@@ -863,7 +866,22 @@ void handle_probe_req(struct hostapd_data *hapd,
noack = !!(res == WILDCARD_SSID_MATCH &&
is_broadcast_ether_addr(mgmt->da));
- if (hostapd_drv_send_mlme(hapd, resp, resp_len, noack, NULL, 0) < 0)
+ csa_offs_len = 0;
+ if (hapd->csa_in_progress) {
+ if (hapd->cs_c_off_proberesp)
+ csa_offs[csa_offs_len++] =
+ hapd->cs_c_off_proberesp;
+
+ if (hapd->cs_c_off_ecsa_proberesp)
+ csa_offs[csa_offs_len++] =
+ hapd->cs_c_off_ecsa_proberesp;
+ }
+
+ ret = hostapd_drv_send_mlme(hapd, resp, resp_len, noack,
+ csa_offs_len ? csa_offs : NULL,
+ csa_offs_len);
+
+ if (ret < 0)
wpa_printf(MSG_INFO, "handle_probe_req: send failed");
os_free(resp);
--
1.9.1
More information about the Hostap
mailing list