]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove Secondary Channel Offset element from Beacon/Probe Response frames
authorJouni Malinen <j@w1.fi>
Sat, 22 Feb 2020 15:05:20 +0000 (17:05 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 22 Feb 2020 17:20:44 +0000 (19:20 +0200)
This element is not used in Beacon or Probe Response frames (which is
the reason why the standard does not indicate where exactly it would be
in those frames..); HT Operation element has this information and so
does Extended CSA element.

In practice, this reverts the functionality added in commit 76aab0305c1f
("Add secondary channel IE for CSA").

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/beacon.c
src/ap/ieee802_11.h
src/ap/ieee802_11_ht.c

index 990a38ad4c6a082dd389945fc4f1a5210a8eb273..f5de1774721bc478ef2131e0b942db592c79f1e6 100644 (file)
@@ -524,11 +524,6 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
        pos = csa_pos;
 
        pos = hostapd_eid_supported_op_classes(hapd, pos);
-
-       /* Secondary Channel Offset element */
-       /* TODO: The standard doesn't specify a position for this element. */
-       pos = hostapd_eid_secondary_channel(hapd, pos);
-
        pos = hostapd_eid_ht_capabilities(hapd, pos);
        pos = hostapd_eid_ht_operation(hapd, pos);
 
@@ -1242,11 +1237,6 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
        tailpos = csa_pos;
 
        tailpos = hostapd_eid_supported_op_classes(hapd, tailpos);
-
-       /* Secondary Channel Offset element */
-       /* TODO: The standard doesn't specify a position for this element. */
-       tailpos = hostapd_eid_secondary_channel(hapd, tailpos);
-
        tailpos = hostapd_eid_ht_capabilities(hapd, tailpos);
        tailpos = hostapd_eid_ht_operation(hapd, tailpos);
 
index ab61eca9de661c6de88a7e7b4727636290dfbfe3..181cfaf0aef38bfaa35129deec7e90bfb109b061 100644 (file)
@@ -53,7 +53,6 @@ u8 * hostapd_eid_rm_enabled_capab(struct hostapd_data *hapd, u8 *eid,
                                  size_t len);
 u8 * hostapd_eid_ht_capabilities(struct hostapd_data *hapd, u8 *eid);
 u8 * hostapd_eid_ht_operation(struct hostapd_data *hapd, u8 *eid);
-u8 * hostapd_eid_secondary_channel(struct hostapd_data *hapd, u8 *eid);
 u8 * hostapd_eid_vht_capabilities(struct hostapd_data *hapd, u8 *eid, u32 nsts);
 u8 * hostapd_eid_vht_operation(struct hostapd_data *hapd, u8 *eid);
 u8 * hostapd_eid_vendor_vht(struct hostapd_data *hapd, u8 *eid);
index 6db93658c669fe8912c5dc67b6cd6316897a570f..26076d12beb15e7bfca9f71f31693c18f60429ca 100644 (file)
@@ -109,30 +109,6 @@ u8 * hostapd_eid_ht_operation(struct hostapd_data *hapd, u8 *eid)
 }
 
 
-u8 * hostapd_eid_secondary_channel(struct hostapd_data *hapd, u8 *eid)
-{
-       u8 sec_ch;
-
-       if (!hapd->cs_freq_params.channel ||
-           !hapd->cs_freq_params.sec_channel_offset ||
-           is_6ghz_op_class(hapd->iconf->op_class))
-               return eid;
-
-       if (hapd->cs_freq_params.sec_channel_offset == -1)
-               sec_ch = HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW;
-       else if (hapd->cs_freq_params.sec_channel_offset == 1)
-               sec_ch = HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE;
-       else
-               return eid;
-
-       *eid++ = WLAN_EID_SECONDARY_CHANNEL_OFFSET;
-       *eid++ = 1;
-       *eid++ = sec_ch;
-
-       return eid;
-}
-
-
 /*
 op_mode
 Set to 0 (HT pure) under the followign conditions