From: Jouni Malinen Date: Sat, 6 Mar 2021 23:21:12 +0000 (+0200) Subject: nl80211: Determine secondary channel offset for CS to 80+80 MHz X-Git-Tag: hostap_2_10~464 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc587c479c7fdcce9c8f76c9ec5e6a843d57abc2;p=thirdparty%2Fhostap.git nl80211: Determine secondary channel offset for CS to 80+80 MHz Signed-off-by: Jouni Malinen --- 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"); }