[PATCH] Change vht_capab according to user requested BW

Jouni Malinen j at w1.fi
Sun Dec 10 11:41:43 PST 2023


On Thu, Dec 07, 2023 at 10:13:05AM +0000, Dmitrijs Martinovs wrote:
> In hostapd_cli chan_switch command (hostapd_ctrl_iface_chan_switch) there are 2 flows - for non-DFS channels and for DFS channels.
> 
> Non-DFS:
> Sets new BW (from chan_switch command input) into iface->conf struct
> Create after-switch-beacon template
> Resets iface->conf BW back to original value.
> During saving of original BW there is a check if that BW corresponds to vht_capab.
> 
> DFS:
> Sets new BW (from chan_switch command input) into iface->conf struct
> Read vht_capab from driver
> Create all necessary beacon templates and do chan switch using new BW and driver's vht_capab
> After this flow new BW remains in iface->conf
> 
> The issue is:
> By default we don't have VHT160 support in vht_capab. If we set BW = 160 for a DFS channel, it will be saved in iface->conf. If we try to set a non-DFS channel afterwards the function that saves previous values will fail the check for old BW == vht_capab as old BW comes from first (DFS) chan_switch command and vht_capab comes from original values.
> 
> Example:
> Set ch=60 bw=160 -> saves BW as 160
> Set ch=40 bw=160 -> compares that BW with original vht_capab that doesn't include VHT160
> 
> Fix:
> Change iface->conf->vht_capab according to BW that is requested by user, i.e. add VHT160 if input BW=160

Thanks, applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list