nl80211: Update link bandwidth when receiving channel switch event
There is a chance that the driver has switched the channel width so we should update the bandwidth, too, when receiving a channel switch event. Otherwise, this may cause out of sync for bandwidth between i802_link and hostapd_config. Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
This commit is contained in:
parent
11dfdf64c0
commit
5308029f86
1 changed files with 6 additions and 0 deletions
|
@ -1272,8 +1272,14 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv,
|
||||||
mld_link = nl80211_get_link(bss,
|
mld_link = nl80211_get_link(bss,
|
||||||
data.ch_switch.link_id);
|
data.ch_switch.link_id);
|
||||||
mld_link->freq = data.ch_switch.freq;
|
mld_link->freq = data.ch_switch.freq;
|
||||||
|
if (bw)
|
||||||
|
mld_link->bandwidth = channel_width_to_int(
|
||||||
|
data.ch_switch.ch_width);
|
||||||
} else {
|
} else {
|
||||||
bss->flink->freq = data.ch_switch.freq;
|
bss->flink->freq = data.ch_switch.freq;
|
||||||
|
if (bw)
|
||||||
|
bss->flink->bandwidth = channel_width_to_int(
|
||||||
|
data.ch_switch.ch_width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue