From dc587c479c7fdcce9c8f76c9ec5e6a843d57abc2 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 7 Mar 2021 01:21:12 +0200 Subject: [PATCH] nl80211: Determine secondary channel offset for CS to 80+80 MHz Signed-off-by: Jouni Malinen --- src/drivers/driver_nl80211_event.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index a297511e3..d19586f06 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -664,8 +664,10 @@ static int calculate_chan_offset(int width, int freq, int cf1, int cf2) case CHAN_WIDTH_160: freq1 = cf1 - 70; break; - case CHAN_WIDTH_UNKNOWN: case CHAN_WIDTH_80P80: + freq1 = cf1 - 30; + break; + case CHAN_WIDTH_UNKNOWN: case CHAN_WIDTH_2160: case CHAN_WIDTH_4320: case CHAN_WIDTH_6480: @@ -727,6 +729,8 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv, nla_get_u32(freq), nla_get_u32(cf1), cf2 ? nla_get_u32(cf2) : 0); + wpa_printf(MSG_DEBUG, "nl80211: Calculated channel offset: %d", + chan_offset); } else { wpa_printf(MSG_WARNING, "nl80211: Unknown secondary channel information - following channel definition calculations may fail"); }