nl80211: Fix segfault when params->freq is NULL for AP mode start

If params->freq is NULL here, it leads to a segfault. Do not initialize
bss->bandwidth if params->freq is NULL.

Signed-off-by: Chaitanya T K <Chaitanya.Mgit@gmail.com>
master
Chaitanya T K 8 years ago committed by Jouni Malinen
parent 3388e7b96f
commit f5728d0a82

@ -3706,7 +3706,7 @@ static int wpa_driver_nl80211_set_ap(void *priv,
"nl80211: Frequency set succeeded for ht2040 coex");
bss->bandwidth = params->freq->bandwidth;
}
} else if (!beacon_set) {
} else if (!beacon_set && params->freq) {
/*
* cfg80211 updates the driver on frequence change in AP
* mode only at the point when beaconing is started, so

Loading…
Cancel
Save