]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Determine secondary channel offset for CS to 80+80 MHz
authorJouni Malinen <j@w1.fi>
Sat, 6 Mar 2021 23:21:12 +0000 (01:21 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 6 Mar 2021 23:21:12 +0000 (01:21 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211_event.c

index a297511e33fd195963cc2d49c03309157f8750e1..d19586f06ead38533f2bb77af9da62a141216d03 100644 (file)
@@ -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");
        }