]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
RNR: Addition in Beacon, Probe Response, and FILS Discovery frames
authorJohn Crispin <john@phrozen.org>
Tue, 27 Jul 2021 23:42:23 +0000 (16:42 -0700)
committerJouni Malinen <j@w1.fi>
Tue, 9 Nov 2021 15:44:45 +0000 (17:44 +0200)
Add Reduced Neighbor Report element in Beacon, Probe Response, and FILS
Discovery frames.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
src/ap/beacon.c

index 15fc2b3db064d2afe6dfe2b4f498ccebf7edca36..a314d0cc08c7e778728d0437e8e4d0ecc46dae0b 100644 (file)
@@ -469,6 +469,7 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
        }
 #endif /* CONFIG_IEEE80211AX */
 
+       buflen += hostapd_eid_rnr_len(hapd, WLAN_FC_STYPE_PROBE_RESP);
        buflen += hostapd_mbo_ie_len(hapd);
        buflen += hostapd_eid_owe_trans_len(hapd);
        buflen += hostapd_eid_dpp_cc_len(hapd);
@@ -573,6 +574,7 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
            (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax))
                pos = hostapd_eid_wb_chsw_wrapper(hapd, pos);
 
+       pos = hostapd_eid_rnr(hapd, pos, WLAN_FC_STYPE_PROBE_RESP);
        pos = hostapd_eid_fils_indic(hapd, pos, 0);
        pos = hostapd_get_rsnxe(hapd, pos, epos - pos);
 
@@ -1284,6 +1286,8 @@ static u8 * hostapd_gen_fils_discovery(struct hostapd_data *hapd, size_t *len)
                total_len += 3;
        }
 
+       total_len += hostapd_eid_rnr_len(hapd, WLAN_FC_STYPE_ACTION);
+
        pos = hostapd_eid_fils_indic(hapd, buf, 0);
        buf_len = pos - buf;
        total_len += buf_len;
@@ -1352,6 +1356,8 @@ static u8 * hostapd_gen_fils_discovery(struct hostapd_data *hapd, size_t *len)
        /* Fill in the Length field value */
        *length_pos = pos - (length_pos + 1);
 
+       pos = hostapd_eid_rnr(hapd, pos, WLAN_FC_STYPE_ACTION);
+
        /* FILS Indication element */
        if (buf_len) {
                os_memcpy(pos, buf, buf_len);
@@ -1438,6 +1444,7 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
        }
 #endif /* CONFIG_IEEE80211AX */
 
+       tail_len += hostapd_eid_rnr_len(hapd, WLAN_FC_STYPE_BEACON);
        tail_len += hostapd_mbo_ie_len(hapd);
        tail_len += hostapd_eid_owe_trans_len(hapd);
        tail_len += hostapd_eid_dpp_cc_len(hapd);
@@ -1562,6 +1569,7 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
            (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax))
                tailpos = hostapd_eid_wb_chsw_wrapper(hapd, tailpos);
 
+       tailpos = hostapd_eid_rnr(hapd, tailpos, WLAN_FC_STYPE_BEACON);
        tailpos = hostapd_eid_fils_indic(hapd, tailpos, 0);
        tailpos = hostapd_get_rsnxe(hapd, tailpos, tailend - tailpos);