The default length of the Bandwidth Indication subelement should be
equal to the minimum size of ieee80211_bw_ind_element structure. The
previously used value truncated this subelement by one octet.
Fixes: c7e704bdf9c3 ("hostapd: Add Bandwidth Indication subelement support for channel switch")
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Allen Ye <allen.ye@mediatek.com>
{
u16 punct_bitmap = hostapd_get_punct_bitmap(hapd);
struct ieee80211_bw_ind_element *bw_ind_elem;
- size_t elen = 3;
+ size_t elen = 4;
if (hapd->cs_freq_params.bandwidth <= 160 && !punct_bitmap)
return eid;