commit 1eb27352392eec26181c9ad050a44cec5ba6375f
parent 0a6de7932a61ec82aca4f78f71dab7247c897860
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date: Fri, 11 Sep 2020 21:50:56 +0200
ap: Fix NULL ap->rates
Make sure ap->rates is non-NULL both with and without no_cck_rates.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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*/