From 1eb27352392eec26181c9ad050a44cec5ba6375f Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Fri, 11 Sep 2020 21:50:56 +0200 Subject: [PATCH] ap: Fix NULL ap->rates Make sure ap->rates is non-NULL both with and without no_cck_rates. --- src/ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ap.c b/src/ap.c index ac705c31..2c9b7520 100644 --- a/src/ap.c +++ b/src/ap.c @@ -2075,6 +2075,7 @@ struct ap_state *ap_start(struct netdev *netdev, struct ap_config *config, ap->ciphers = wiphy_select_cipher(wiphy, 0xffff); ap->group_cipher = wiphy_select_cipher(wiphy, 0xffff); ap->beacon_interval = 100; + ap->rates = l_uintset_new(200); /* TODO: Pick from actual supported rates */ if (config->no_cck_rates) { @@ -2087,7 +2088,6 @@ struct ap_state *ap_start(struct netdev *netdev, struct ap_config *config, l_uintset_put(ap->rates, 96); /* 48 Mbps*/ l_uintset_put(ap->rates, 108); /* 54 Mbps*/ } else { - ap->rates = l_uintset_new(200); l_uintset_put(ap->rates, 2); /* 1 Mbps*/ l_uintset_put(ap->rates, 11); /* 5.5 Mbps*/ l_uintset_put(ap->rates, 22); /* 11 Mbps*/